	.file	"509330.c"
	.intel_syntax noprefix
	.text
	.globl	predictions
	.section	.rodata
	.align 32
	.type	predictions, @object
	.size	predictions, 99
predictions:
	.string	"Brak      "
	.string	"W         "
	.string	"N         "
	.string	"NW        "
	.string	"W+N-NW    "
	.string	"W+(N-NW)/2"
	.string	"N+(W-NW)/2"
	.string	"(W+N)/2   "
	.string	"LOCO-I    "
	.globl	colors
	.align 16
	.type	colors, @object
	.size	colors, 18
colors:
	.string	"RED  "
	.string	"GREEN"
	.string	"BLUE "
	.text
	.globl	entropy
	.type	entropy, @function
entropy:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	pxor	xmm0, xmm0
	movsd	QWORD PTR -16[rbp], xmm0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jle	.L3
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -44[rbp]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	mov	rax, QWORD PTR -8[rbp]
	movq	xmm0, rax
	call	log2@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	mulsd	xmm0, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR -16[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
.L3:
	add	DWORD PTR -20[rbp], 1
.L2:
	cmp	DWORD PTR -20[rbp], 255
	jle	.L4
	pxor	xmm0, xmm0
	ucomisd	xmm0, QWORD PTR -16[rbp]
	jp	.L9
	pxor	xmm0, xmm0
	comisd	xmm0, QWORD PTR -16[rbp]
	je	.L10
.L9:
	movsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC1[rip]
	xorpd	xmm0, xmm1
	jmp	.L8
.L10:
	movsd	xmm0, QWORD PTR -16[rbp]
.L8:
	movq	rax, xmm0
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	entropy, .-entropy
	.globl	entropy_prediction
	.type	entropy_prediction, @function
entropy_prediction:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1088
	mov	QWORD PTR -1064[rbp], rdi
	mov	DWORD PTR -1068[rbp], esi
	mov	DWORD PTR -1072[rbp], edx
	mov	DWORD PTR -1076[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1056[rbp], 0
	lea	rdx, -1040[rbp]
	mov	eax, 0
	mov	ecx, 128
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -1052[rbp], 1
	jmp	.L12
.L17:
	mov	DWORD PTR -1048[rbp], 1
	jmp	.L13
.L16:
	mov	DWORD PTR -1044[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -1052[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1048[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1076[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1044[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	movsx	rdx, eax
	mov	edx, DWORD PTR -1040[rbp+rdx*4]
	add	edx, 1
	cdqe
	mov	DWORD PTR -1040[rbp+rax*4], edx
	add	DWORD PTR -1056[rbp], 1
	add	DWORD PTR -1044[rbp], 1
.L14:
	cmp	DWORD PTR -1044[rbp], 2
	jle	.L15
	add	DWORD PTR -1048[rbp], 1
.L13:
	mov	eax, DWORD PTR -1048[rbp]
	cmp	eax, DWORD PTR -1072[rbp]
	jle	.L16
	add	DWORD PTR -1052[rbp], 1
.L12:
	mov	eax, DWORD PTR -1052[rbp]
	cmp	eax, DWORD PTR -1068[rbp]
	jle	.L17
	mov	edx, DWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	entropy
	movq	rax, xmm0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	entropy_prediction, .-entropy_prediction
	.globl	entropy_prediction_color
	.type	entropy_prediction_color, @function
entropy_prediction_color:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1088
	mov	QWORD PTR -1064[rbp], rdi
	mov	DWORD PTR -1068[rbp], esi
	mov	DWORD PTR -1072[rbp], edx
	mov	DWORD PTR -1076[rbp], ecx
	mov	DWORD PTR -1080[rbp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1052[rbp], 0
	lea	rdx, -1040[rbp]
	mov	eax, 0
	mov	ecx, 128
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -1048[rbp], 1
	jmp	.L21
.L24:
	mov	DWORD PTR -1044[rbp], 1
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -1048[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1044[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1076[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1080[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	movsx	rdx, eax
	mov	edx, DWORD PTR -1040[rbp+rdx*4]
	add	edx, 1
	cdqe
	mov	DWORD PTR -1040[rbp+rax*4], edx
	add	DWORD PTR -1052[rbp], 1
	add	DWORD PTR -1044[rbp], 1
.L22:
	mov	eax, DWORD PTR -1044[rbp]
	cmp	eax, DWORD PTR -1072[rbp]
	jle	.L23
	add	DWORD PTR -1048[rbp], 1
.L21:
	mov	eax, DWORD PTR -1048[rbp]
	cmp	eax, DWORD PTR -1068[rbp]
	jle	.L24
	mov	edx, DWORD PTR -1052[rbp]
	lea	rax, -1040[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	entropy
	movq	rax, xmm0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	entropy_prediction_color, .-entropy_prediction_color
	.section	.rodata
	.align 8
.LC2:
	.string	"Uzywac:\n\t$ ./main <plik ze zdjeciem>"
.LC3:
	.string	"r"
	.align 8
.LC4:
	.string	"Czy podales wlasciwy plik? (%s)\n"
	.align 8
.LC6:
	.string	"Metoda predykcji = %s -> Entropia = %f\n"
.LC7:
	.string	"\n"
	.align 8
.LC8:
	.string	"Metody predykcji = %s, Kolor = %s -> Entropia = %f\n"
	.align 8
.LC9:
	.string	"Optymalna metoda dla calego obrazu to %s -> Entropia = %f\n"
	.align 8
.LC10:
	.string	"Optymalna metoda dla koloru %s  to %s -> Entropia = %f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 216
	.cfi_offset 3, -24
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -212[rbp], 2
	je	.L28
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L63
.L28:
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -128[rbp], rax
	cmp	QWORD PTR -128[rbp], 0
	jne	.L30
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L63
.L30:
	mov	rdx, QWORD PTR -128[rbp]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	mov	edx, 18
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	movzx	eax, BYTE PTR -36[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -35[rbp]
	movzx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -160[rbp], eax
	movzx	eax, BYTE PTR -34[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -33[rbp]
	movzx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -156[rbp], eax
	mov	eax, DWORD PTR -156[rbp]
	add	eax, 1
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	DWORD PTR -204[rbp], 0
	jmp	.L31
.L36:
	mov	eax, DWORD PTR -160[rbp]
	add	eax, 1
	cdqe
	sal	rax, 3
	mov	edx, DWORD PTR -204[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -120[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	DWORD PTR -200[rbp], 0
	jmp	.L32
.L35:
	mov	eax, DWORD PTR -204[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -200[rbp]
	cdqe
	sal	rax, 3
	lea	rbx, [rdx+rax]
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	DWORD PTR -196[rbp], 0
	jmp	.L33
.L34:
	mov	eax, DWORD PTR -204[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -200[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -196[rbp]
	cdqe
	sal	rax, 3
	lea	rbx, [rdx+rax]
	mov	esi, 1
	mov	edi, 3
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -196[rbp], 1
.L33:
	cmp	DWORD PTR -196[rbp], 8
	jle	.L34
	add	DWORD PTR -200[rbp], 1
.L32:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -200[rbp]
	jge	.L35
	add	DWORD PTR -204[rbp], 1
.L31:
	mov	eax, DWORD PTR -156[rbp]
	cmp	eax, DWORD PTR -204[rbp]
	jge	.L36
	mov	DWORD PTR -192[rbp], 1
	jmp	.L37
.L50:
	mov	DWORD PTR -188[rbp], 1
	jmp	.L38
.L49:
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 3
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -184[rbp], 0
	jmp	.L39
.L48:
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -152[rbp], eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -148[rbp], eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -144[rbp], eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -140[rbp], eax
	mov	eax, DWORD PTR -152[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -148[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	sub	ecx, esi
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -152[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -144[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	sub	ecx, esi
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -152[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -140[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	sub	ecx, esi
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -152[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -140[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -148[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -144[rbp]
	add	eax, ecx
	mov	ecx, edx
	sub	ecx, eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 32
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	lea	edx, [rsi+rcx]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -152[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -148[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -144[rbp]
	sub	eax, DWORD PTR -140[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	add	ecx, eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 40
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	sub	esi, ecx
	mov	edx, esi
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -152[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -144[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -148[rbp]
	sub	eax, DWORD PTR -140[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	add	ecx, eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 48
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	sub	esi, ecx
	mov	edx, esi
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -152[rbp]
	mov	ecx, eax
	mov	edx, DWORD PTR -148[rbp]
	mov	eax, DWORD PTR -144[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	esi, eax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 56
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	add	rax, rdx
	sub	ecx, esi
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -152[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -148[rbp]
	cmp	DWORD PTR -144[rbp], eax
	cmovge	eax, DWORD PTR -144[rbp]
	cmp	DWORD PTR -140[rbp], eax
	jl	.L40
	mov	eax, DWORD PTR -148[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jge	.L41
	mov	eax, DWORD PTR -148[rbp]
	jmp	.L43
.L41:
	mov	eax, DWORD PTR -144[rbp]
	jmp	.L43
.L40:
	mov	eax, DWORD PTR -148[rbp]
	cmp	DWORD PTR -144[rbp], eax
	cmovle	eax, DWORD PTR -144[rbp]
	cmp	DWORD PTR -140[rbp], eax
	jg	.L44
	mov	eax, DWORD PTR -148[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jle	.L45
	mov	eax, DWORD PTR -148[rbp]
	jmp	.L43
.L45:
	mov	eax, DWORD PTR -144[rbp]
	jmp	.L43
.L44:
	mov	eax, DWORD PTR -144[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -148[rbp]
	add	eax, edx
	mov	edx, DWORD PTR -140[rbp]
	sub	eax, edx
.L43:
	mov	edx, DWORD PTR -192[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -120[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -188[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rdx, QWORD PTR [rdx]
	add	rdx, 64
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -184[rbp]
	movsx	rdx, edx
	add	rdx, rcx
	sub	esi, eax
	mov	ecx, esi
	mov	BYTE PTR [rdx], cl
	add	DWORD PTR -184[rbp], 1
.L39:
	cmp	DWORD PTR -184[rbp], 2
	jle	.L48
	add	DWORD PTR -188[rbp], 1
.L38:
	mov	eax, DWORD PTR -188[rbp]
	cmp	eax, DWORD PTR -160[rbp]
	jle	.L49
	add	DWORD PTR -192[rbp], 1
.L37:
	mov	eax, DWORD PTR -192[rbp]
	cmp	eax, DWORD PTR -156[rbp]
	jle	.L50
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	fclose@PLT
	movsd	xmm0, QWORD PTR .LC5[rip]
	movsd	QWORD PTR -136[rbp], xmm0
	mov	DWORD PTR -180[rbp], 9
	mov	DWORD PTR -176[rbp], 0
	jmp	.L51
.L54:
	mov	ecx, DWORD PTR -176[rbp]
	mov	edx, DWORD PTR -160[rbp]
	mov	esi, DWORD PTR -156[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	entropy_prediction
	movq	rax, xmm0
	mov	QWORD PTR -104[rbp], rax
	movsd	xmm0, QWORD PTR -136[rbp]
	comisd	xmm0, QWORD PTR -104[rbp]
	jbe	.L52
	movsd	xmm0, QWORD PTR -104[rbp]
	movsd	QWORD PTR -136[rbp], xmm0
	mov	eax, DWORD PTR -176[rbp]
	mov	DWORD PTR -180[rbp], eax
.L52:
	mov	eax, DWORD PTR -176[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, predictions[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	movq	xmm0, rax
	mov	rsi, rdx
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
	add	DWORD PTR -176[rbp], 1
.L51:
	cmp	DWORD PTR -176[rbp], 8
	jle	.L54
	lea	rdi, .LC7[rip]
	call	puts@PLT
	movsd	xmm0, QWORD PTR .LC5[rip]
	movsd	QWORD PTR -80[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC5[rip]
	movsd	QWORD PTR -72[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC5[rip]
	movsd	QWORD PTR -64[rbp], xmm0
	mov	DWORD PTR -92[rbp], 9
	mov	DWORD PTR -88[rbp], 9
	mov	DWORD PTR -84[rbp], 9
	mov	DWORD PTR -172[rbp], 0
	jmp	.L55
.L60:
	mov	DWORD PTR -168[rbp], 0
	jmp	.L56
.L59:
	mov	edi, DWORD PTR -168[rbp]
	mov	ecx, DWORD PTR -172[rbp]
	mov	edx, DWORD PTR -160[rbp]
	mov	esi, DWORD PTR -156[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	entropy_prediction_color
	movq	rax, xmm0
	mov	QWORD PTR -112[rbp], rax
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	movsd	xmm0, QWORD PTR -80[rbp+rax*8]
	comisd	xmm0, QWORD PTR -112[rbp]
	jbe	.L57
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	movsd	xmm0, QWORD PTR -112[rbp]
	movsd	QWORD PTR -80[rbp+rax*8], xmm0
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	mov	edx, DWORD PTR -172[rbp]
	mov	DWORD PTR -92[rbp+rax*4], edx
.L57:
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rax
	lea	rdx, colors[rip]
	lea	rsi, [rax+rdx]
	mov	eax, DWORD PTR -172[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, predictions[rip]
	lea	rcx, [rax+rdx]
	mov	rax, QWORD PTR -112[rbp]
	movq	xmm0, rax
	mov	rdx, rsi
	mov	rsi, rcx
	lea	rdi, .LC8[rip]
	mov	eax, 1
	call	printf@PLT
	add	DWORD PTR -168[rbp], 1
.L56:
	cmp	DWORD PTR -168[rbp], 2
	jle	.L59
	add	DWORD PTR -172[rbp], 1
.L55:
	cmp	DWORD PTR -172[rbp], 8
	jle	.L60
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, predictions[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -136[rbp]
	movq	xmm0, rax
	mov	rsi, rdx
	lea	rdi, .LC9[rip]
	mov	eax, 1
	call	printf@PLT
	mov	DWORD PTR -164[rbp], 0
	jmp	.L61
.L62:
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	mov	rcx, QWORD PTR -80[rbp+rax*8]
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	mov	eax, DWORD PTR -92[rbp+rax*4]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, predictions[rip]
	add	rdx, rax
	mov	eax, DWORD PTR -164[rbp]
	movsx	rsi, eax
	mov	rax, rsi
	add	rax, rax
	add	rax, rsi
	add	rax, rax
	lea	rsi, colors[rip]
	add	rax, rsi
	movq	xmm0, rcx
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 1
	call	printf@PLT
	add	DWORD PTR -164[rbp], 1
.L61:
	cmp	DWORD PTR -164[rbp], 2
	jle	.L62
	mov	eax, 0
.L63:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC1:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC5:
	.long	0
	.long	1075970048
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"509330.c"
	.text
	.global	predictions
	.section	.rodata
	.align	2
	.type	predictions, %object
	.size	predictions, 99
predictions:
	.ascii	"Brak      \000"
	.ascii	"W         \000"
	.ascii	"N         \000"
	.ascii	"NW        \000"
	.ascii	"W+N-NW    \000"
	.ascii	"W+(N-NW)/2\000"
	.ascii	"N+(W-NW)/2\000"
	.ascii	"(W+N)/2   \000"
	.ascii	"LOCO-I    \000"
	.global	colors
	.align	2
	.type	colors, %object
	.size	colors, 18
colors:
	.ascii	"RED  \000"
	.ascii	"GREEN\000"
	.ascii	"BLUE \000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_dcmpeq
	.text
	.align	2
	.global	entropy
	.syntax unified
	.arm
	.fpu softvfp
	.type	entropy, %function
entropy:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L2
.L4:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L3
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-52]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	log2
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
.L3:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L2:
	ldr	r3, [fp, #-40]
	cmp	r3, #255
	ble	.L4
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpeq
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r4, [fp, #-36]
	ldr	r3, [fp, #-32]
	eor	r5, r3, #-2147483648
	b	.L8
.L10:
	sub	r5, fp, #36
	ldmia	r5, {r4-r5}
.L8:
	mov	r2, r4
	mov	r3, r5
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
	.size	entropy, .-entropy
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	entropy_prediction
	.syntax unified
	.arm
	.fpu softvfp
	.type	entropy_prediction, %function
entropy_prediction:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	sub	sp, sp, #8
	str	r0, [fp, #-1056]
	str	r1, [fp, #-1060]
	str	r2, [fp, #-1064]
	str	r3, [fp, #-1068]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1048]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-1044]
	b	.L12
.L17:
	mov	r3, #1
	str	r3, [fp, #-1040]
	b	.L13
.L16:
	mov	r3, #0
	str	r3, [fp, #-1036]
	b	.L14
.L15:
	ldr	r3, [fp, #-1044]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1056]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-1040]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-1068]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-1036]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-1028]
	add	r1, r3, #1
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-1028]
	ldr	r3, [fp, #-1048]
	add	r3, r3, #1
	str	r3, [fp, #-1048]
	ldr	r3, [fp, #-1036]
	add	r3, r3, #1
	str	r3, [fp, #-1036]
.L14:
	ldr	r3, [fp, #-1036]
	cmp	r3, #2
	ble	.L15
	ldr	r3, [fp, #-1040]
	add	r3, r3, #1
	str	r3, [fp, #-1040]
.L13:
	ldr	r2, [fp, #-1040]
	ldr	r3, [fp, #-1064]
	cmp	r2, r3
	ble	.L16
	ldr	r3, [fp, #-1044]
	add	r3, r3, #1
	str	r3, [fp, #-1044]
.L12:
	ldr	r2, [fp, #-1044]
	ldr	r3, [fp, #-1060]
	cmp	r2, r3
	ble	.L17
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-1048]
	mov	r0, r3
	bl	entropy
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L20
	ldr	r0, [r1]
	ldr	r1, [fp, #-8]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC2
	.size	entropy_prediction, .-entropy_prediction
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	entropy_prediction_color
	.syntax unified
	.arm
	.fpu softvfp
	.type	entropy_prediction_color, %function
entropy_prediction_color:
	@ args = 4, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	str	r2, [fp, #-1056]
	str	r3, [fp, #-1060]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1044]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-1040]
	b	.L23
.L26:
	mov	r3, #1
	str	r3, [fp, #-1036]
	b	.L24
.L25:
	ldr	r3, [fp, #-1040]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1048]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-1036]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-1060]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #4]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-1028]
	add	r1, r3, #1
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-1028]
	ldr	r3, [fp, #-1044]
	add	r3, r3, #1
	str	r3, [fp, #-1044]
	ldr	r3, [fp, #-1036]
	add	r3, r3, #1
	str	r3, [fp, #-1036]
.L24:
	ldr	r2, [fp, #-1036]
	ldr	r3, [fp, #-1056]
	cmp	r2, r3
	ble	.L25
	ldr	r3, [fp, #-1040]
	add	r3, r3, #1
	str	r3, [fp, #-1040]
.L23:
	ldr	r2, [fp, #-1040]
	ldr	r3, [fp, #-1052]
	cmp	r2, r3
	ble	.L26
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-1044]
	mov	r0, r3
	bl	entropy
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L29
	ldr	r0, [r1]
	ldr	r1, [fp, #-8]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC3
	.size	entropy_prediction_color, .-entropy_prediction_color
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Uzywac:\012\011$ ./main <plik ze zdjeciem>\000"
	.align	2
.LC5:
	.ascii	"r\000"
	.align	2
.LC6:
	.ascii	"Czy podales wlasciwy plik? (%s)\012\000"
	.global	__aeabi_dcmplt
	.align	2
.LC7:
	.ascii	"Metoda predykcji = %s -> Entropia = %f\012\000"
	.align	2
.LC8:
	.ascii	"\012\000"
	.align	2
.LC9:
	.ascii	"Metody predykcji = %s, Kolor = %s -> Entropia = %f\012"
	.ascii	"\000"
	.align	2
.LC10:
	.ascii	"Optymalna metoda dla calego obrazu to %s -> Entropi"
	.ascii	"a = %f\012\000"
	.align	2
.LC11:
	.ascii	"Optymalna metoda dla koloru %s  to %s -> Entropia ="
	.ascii	" %f\012\000"
	.align	3
.LC0:
	.word	0
	.word	1075970048
	.word	0
	.word	1075970048
	.word	0
	.word	1075970048
	.align	2
.LC1:
	.word	9
	.word	9
	.word	9
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 176
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #188
	str	r0, [fp, #-184]
	str	r1, [fp, #-188]
	ldr	r3, .L71
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-184]
	cmp	r3, #2
	beq	.L32
	ldr	r0, .L71+4
	bl	printf
	mov	r3, #1
	b	.L67
.L32:
	ldr	r3, [fp, #-188]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L71+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-132]
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L34
	ldr	r3, [fp, #-188]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L71+12
	bl	printf
	mov	r3, #1
	b	.L67
.L34:
	sub	r0, fp, #36
	ldr	r3, [fp, #-132]
	mov	r2, #18
	mov	r1, #1
	bl	fread
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-128]
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-120]
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L35
.L40:
	ldr	r3, [fp, #-128]
	add	r3, r3, #1
	lsl	r1, r3, #2
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	mov	r3, #0
	str	r3, [fp, #-172]
	b	.L36
.L39:
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-172]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, #36
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	mov	r3, #0
	str	r3, [fp, #-168]
	b	.L37
.L38:
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-172]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-168]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #1
	mov	r0, #3
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
.L37:
	ldr	r3, [fp, #-168]
	cmp	r3, #8
	ble	.L38
	ldr	r3, [fp, #-172]
	add	r3, r3, #1
	str	r3, [fp, #-172]
.L36:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-172]
	cmp	r2, r3
	bge	.L39
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L35:
	ldr	r2, [fp, #-124]
	ldr	r3, [fp, #-176]
	cmp	r2, r3
	bge	.L40
	mov	r3, #1
	str	r3, [fp, #-164]
	b	.L41
.L54:
	mov	r3, #1
	str	r3, [fp, #-160]
	b	.L42
.L53:
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r0, [r3]
	ldr	r3, [fp, #-132]
	mov	r2, #1
	mov	r1, #3
	bl	fread
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L43
.L52:
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-160]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-164]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-164]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-160]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r3, [fp, #-112]
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-120]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r0, r3
	sub	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r3, [fp, #-108]
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-120]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r3, #8
	ldr	r0, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r0, r3
	sub	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r3, [fp, #-104]
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-120]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r3, #12
	ldr	r0, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r0, r3
	sub	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r3, [fp, #-104]
	and	r2, r3, #255
	ldr	r3, [fp, #-112]
	and	r0, r3, #255
	ldr	r3, [fp, #-108]
	and	r3, r3, #255
	add	r3, r0, r3
	and	r3, r3, #255
	sub	r3, r2, r3
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-120]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r3, #16
	ldr	r0, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r0, r3
	add	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r3, [fp, #-112]
	and	r2, r3, #255
	ldr	r0, [fp, #-108]
	ldr	r3, [fp, #-104]
	sub	r3, r0, r3
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	and	r3, r3, #255
	add	r3, r2, r3
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-120]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r3, #20
	ldr	r0, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r0, r3
	sub	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r3, [fp, #-108]
	and	r2, r3, #255
	ldr	r0, [fp, #-112]
	ldr	r3, [fp, #-104]
	sub	r3, r0, r3
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	and	r3, r3, #255
	add	r3, r2, r3
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-120]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r3, #24
	ldr	r0, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r0, r3
	sub	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r2, [fp, #-112]
	ldr	r3, [fp, #-108]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-120]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r3, #28
	ldr	r0, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r0, r3
	sub	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	and	r1, r3, #255
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	ldr	r2, [fp, #-104]
	cmp	r2, r3
	blt	.L44
	ldr	r2, [fp, #-112]
	ldr	r3, [fp, #-108]
	cmp	r2, r3
	bge	.L45
	ldr	r3, [fp, #-112]
	and	r3, r3, #255
	b	.L47
.L45:
	ldr	r3, [fp, #-108]
	and	r3, r3, #255
	b	.L47
.L44:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
	ldr	r2, [fp, #-104]
	cmp	r2, r3
	bgt	.L48
	ldr	r2, [fp, #-112]
	ldr	r3, [fp, #-108]
	cmp	r2, r3
	ble	.L49
	ldr	r3, [fp, #-112]
	and	r3, r3, #255
	b	.L47
.L49:
	ldr	r3, [fp, #-108]
	and	r3, r3, #255
	b	.L47
.L48:
	ldr	r3, [fp, #-108]
	and	r2, r3, #255
	ldr	r3, [fp, #-112]
	and	r3, r3, #255
	add	r3, r2, r3
	and	r2, r3, #255
	ldr	r3, [fp, #-104]
	and	r3, r3, #255
	sub	r3, r2, r3
	and	r3, r3, #255
.L47:
	ldr	r2, [fp, #-164]
	lsl	r2, r2, #2
	ldr	r0, [fp, #-120]
	add	r2, r0, r2
	ldr	r0, [r2]
	ldr	r2, [fp, #-160]
	lsl	r2, r2, #2
	add	r2, r0, r2
	ldr	r2, [r2]
	add	r2, r2, #32
	ldr	r0, [r2]
	ldr	r2, [fp, #-156]
	add	r2, r0, r2
	sub	r3, r1, r3
	and	r3, r3, #255
	strb	r3, [r2]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L43:
	ldr	r3, [fp, #-156]
	cmp	r3, #2
	ble	.L52
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L42:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	ble	.L53
	ldr	r3, [fp, #-164]
	add	r3, r3, #1
	str	r3, [fp, #-164]
.L41:
	ldr	r2, [fp, #-164]
	ldr	r3, [fp, #-124]
	cmp	r2, r3
	ble	.L54
	ldr	r0, [fp, #-132]
	bl	fclose
	mov	r2, #0
	ldr	r3, .L71+16
	str	r2, [fp, #-100]
	str	r3, [fp, #-96]
	mov	r3, #9
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L55
.L58:
	ldr	r3, [fp, #-148]
	ldr	r2, [fp, #-128]
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	entropy_prediction
	str	r0, [fp, #-84]
	str	r1, [fp, #-80]
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	sub	r1, fp, #84
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L56
	sub	r3, fp, #84
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-100]
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-148]
	str	r3, [fp, #-152]
.L56:
	ldr	r2, [fp, #-148]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, .L71+20
	add	r1, r3, r2
	sub	r3, fp, #84
	ldmia	r3, {r2-r3}
	ldr	r0, .L71+24
	bl	printf
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L55:
	ldr	r3, [fp, #-148]
	cmp	r3, #8
	ble	.L58
	ldr	r0, .L71+28
	bl	puts
	ldr	r3, .L71+32
	sub	ip, fp, #60
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r2, .L71+36
	sub	r3, fp, #72
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L59
.L64:
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L60
.L63:
	ldr	r3, [fp, #-140]
	str	r3, [sp]
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-128]
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	entropy_prediction_color
	str	r0, [fp, #-92]
	str	r1, [fp, #-88]
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #48
	ldmia	r3, {r2-r3}
	sub	r1, fp, #92
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L61
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r1, r3, #48
	sub	r3, fp, #92
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [fp, #-144]
	str	r2, [r3, #-60]
.L61:
	ldr	r2, [fp, #-144]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, .L71+20
	add	r1, r3, r2
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, .L71+40
	add	r0, r3, r2
	sub	r3, fp, #92
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r0
	ldr	r0, .L71+44
	bl	printf
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L60:
	ldr	r3, [fp, #-140]
	cmp	r3, #2
	ble	.L63
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L59:
	ldr	r3, [fp, #-144]
	cmp	r3, #8
	ble	.L64
	ldr	r0, .L71+28
	bl	puts
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, .L71+20
	add	r1, r3, r2
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	ldr	r0, .L71+48
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L65
.L66:
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, .L71+40
	add	r1, r3, r2
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, .L71+20
	add	r0, r3, r2
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #48
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r0
	ldr	r0, .L71+52
	bl	printf
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L65:
	ldr	r3, [fp, #-136]
	cmp	r3, #2
	ble	.L66
	mov	r3, #0
.L67:
	ldr	r2, .L71
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L68
	bl	__stack_chk_fail
.L68:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L72:
	.align	2
.L71:
	.word	.LC12
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	1075970048
	.word	predictions
	.word	.LC7
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	colors
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
