	.file	"extr_lodepng.c_get_color_profile.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	get_color_profile, @function
get_color_profile:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR [rsp], rdx
	mov	QWORD PTR 8[rsp], rcx
	mov	DWORD PTR 24[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rcx]
	cmp	eax, 16
	je	.L79
	cmp	QWORD PTR [rsp], 0
	je	.L80
	lea	rax, 48[rsp]
	xor	r12d, r12d
	lea	r15, 54[rsp]
	mov	QWORD PTR 16[rsp], rax
	lea	r14, 52[rsp]
	lea	r13, 50[rsp]
	.p2align 4,,10
	.p2align 3
.L50:
	mov	eax, DWORD PTR 24[rsp]
	mov	BYTE PTR 48[rsp], 0
	mov	r8, rbp
	mov	r9, r12
	mov	BYTE PTR 50[rsp], 0
	mov	rcx, r15
	mov	rdx, r14
	mov	rsi, r13
	mov	BYTE PTR 52[rsp], 0
	mov	BYTE PTR 54[rsp], 0
	push	rax
	.cfi_def_cfa_offset 136
	push	QWORD PTR 16[rsp]
	.cfi_def_cfa_offset 144
	mov	rdi, QWORD PTR 32[rsp]
	call	getPixelColorRGBA8@PLT
	pop	rdi
	.cfi_def_cfa_offset 136
	pop	r8
	.cfi_def_cfa_offset 128
	mov	r10d, eax
	test	eax, eax
	jne	.L29
	mov	esi, DWORD PTR 16[rbx]
	test	esi, esi
	jne	.L30
	movzx	eax, BYTE PTR 48[rsp]
	cmp	al, BYTE PTR 50[rsp]
	je	.L81
.L31:
	movabs	rax, 4294967297
	mov	DWORD PTR 8[rbx], 1
	mov	QWORD PTR 16[rbx], rax
.L30:
	mov	ecx, DWORD PTR 24[rbx]
	test	ecx, ecx
	jne	.L32
	movzx	eax, BYTE PTR 54[rsp]
	cmp	al, -1
	je	.L33
	test	al, al
	jne	.L34
	mov	edx, DWORD PTR 28[rbx]
	movzx	eax, BYTE PTR 48[rsp]
	test	edx, edx
	jne	.L82
	mov	WORD PTR 32[rbx], ax
	movzx	eax, BYTE PTR 50[rsp]
	mov	DWORD PTR 28[rbx], 1
	mov	WORD PTR 34[rbx], ax
	movzx	eax, BYTE PTR 52[rsp]
	mov	WORD PTR 36[rbx], ax
	.p2align 4,,10
	.p2align 3
.L32:
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	jne	.L44
	movzx	edi, BYTE PTR 48[rsp]
	mov	DWORD PTR 32[rsp], r10d
	call	getValueRequiredBits@PLT
	mov	edx, DWORD PTR 44[rbx]
	mov	r10d, DWORD PTR 32[rsp]
	cmp	edx, eax
	jnb	.L45
	mov	DWORD PTR 44[rbx], eax
	mov	edx, eax
.L45:
	cmp	edx, 7
	jbe	.L44
	mov	DWORD PTR 8[rbx], 1
	.p2align 4,,10
	.p2align 3
.L44:
	mov	eax, DWORD PTR 12[rbx]
	test	eax, eax
	je	.L41
.L46:
	mov	ecx, DWORD PTR 24[rbx]
	test	ecx, ecx
	jne	.L42
.L52:
	add	r12, 1
	cmp	QWORD PTR [rsp], r12
	jne	.L50
.L29:
	mov	rax, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR [rax]
.L27:
	cmp	eax, 15
	jg	.L1
	movzx	edx, WORD PTR 32[rbx]
	mov	eax, edx
	sal	eax, 8
	add	eax, edx
	movzx	edx, WORD PTR 34[rbx]
	mov	WORD PTR 32[rbx], ax
	mov	eax, edx
	sal	eax, 8
	add	eax, edx
	movzx	edx, WORD PTR 36[rbx]
	mov	WORD PTR 34[rbx], ax
	mov	eax, edx
	sal	eax, 8
	add	eax, edx
	mov	WORD PTR 36[rbx], ax
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L83
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r10d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	eax, DWORD PTR 28[rbx]
	test	eax, eax
	je	.L32
	movzx	eax, BYTE PTR 48[rsp]
	cmp	ax, WORD PTR 32[rbx]
	jne	.L32
	movzx	eax, BYTE PTR 50[rsp]
	cmp	ax, WORD PTR 34[rbx]
	jne	.L32
	movzx	eax, BYTE PTR 52[rsp]
	cmp	ax, WORD PTR 36[rbx]
	jne	.L32
	mov	eax, DWORD PTR 12[rbx]
	mov	DWORD PTR 40[rbx], 1
	mov	DWORD PTR 24[rbx], 1
	mov	DWORD PTR 8[rbx], 1
	test	eax, eax
	jne	.L42
	.p2align 4,,10
	.p2align 3
.L41:
	movzx	ecx, BYTE PTR 52[rsp]
	movzx	edx, BYTE PTR 50[rsp]
	lea	rdi, 68[rbx]
	mov	DWORD PTR 44[rsp], r10d
	movzx	esi, BYTE PTR 48[rsp]
	movzx	r8d, BYTE PTR 54[rsp]
	mov	QWORD PTR 32[rsp], rdi
	call	color_tree_has@PLT
	mov	rdi, QWORD PTR 32[rsp]
	mov	r10d, DWORD PTR 44[rsp]
	test	eax, eax
	je	.L84
.L47:
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	je	.L52
	mov	r11d, DWORD PTR 12[rbx]
	test	r11d, r11d
	je	.L52
	.p2align 4,,10
	.p2align 3
.L42:
	mov	r9d, DWORD PTR 16[rbx]
	test	r9d, r9d
	je	.L52
	mov	r8d, DWORD PTR 8[rbx]
	test	r8d, r8d
	je	.L52
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L82:
	cmp	WORD PTR 32[rbx], ax
	jne	.L34
	movzx	eax, BYTE PTR 50[rsp]
	cmp	ax, WORD PTR 34[rbx]
	je	.L85
	.p2align 4,,10
	.p2align 3
.L34:
	mov	DWORD PTR 40[rbx], 1
	mov	DWORD PTR 24[rbx], 1
	mov	DWORD PTR 8[rbx], 1
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L81:
	cmp	al, BYTE PTR 52[rsp]
	jne	.L31
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L84:
	movzx	ecx, BYTE PTR 52[rsp]
	movzx	edx, BYTE PTR 50[rsp]
	mov	DWORD PTR 32[rsp], r10d
	movzx	esi, BYTE PTR 48[rsp]
	mov	r9d, DWORD PTR 48[rbx]
	movzx	r8d, BYTE PTR 54[rsp]
	call	color_tree_add@PLT
	mov	eax, DWORD PTR 48[rbx]
	mov	r10d, DWORD PTR 32[rsp]
	cmp	eax, 255
	jg	.L48
	movzx	esi, BYTE PTR 48[rsp]
	mov	rdx, QWORD PTR 56[rbx]
	lea	ecx, 0[0+rax*4]
	mov	rax, rcx
	mov	BYTE PTR [rdx+rcx], sil
	movzx	esi, BYTE PTR 50[rsp]
	lea	ecx, 1[rcx]
	mov	BYTE PTR [rdx+rcx], sil
	movzx	esi, BYTE PTR 52[rsp]
	lea	ecx, 2[rax]
	add	eax, 3
	mov	BYTE PTR [rdx+rcx], sil
	movzx	ecx, BYTE PTR 54[rsp]
	mov	BYTE PTR [rdx+rax], cl
	mov	eax, DWORD PTR 48[rbx]
.L48:
	add	eax, 1
	mov	DWORD PTR 48[rbx], eax
	cmp	eax, DWORD PTR 64[rbx]
	jb	.L47
	mov	DWORD PTR 12[rbx], 1
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L79:
	xor	r10d, r10d
	cmp	QWORD PTR [rsp], 0
	je	.L1
	lea	rax, 48[rsp]
	xor	r12d, r12d
	lea	r15, 54[rsp]
	mov	QWORD PTR 16[rsp], rax
	lea	r14, 52[rsp]
	lea	r13, 50[rsp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L89:
	movzx	eax, WORD PTR 54[rsp]
	cmp	ax, -1
	je	.L9
	test	ax, ax
	jne	.L77
	cmp	QWORD PTR [rsp], 16
	ja	.L86
.L77:
	mov	DWORD PTR 40[rbx], 1
	mov	DWORD PTR 24[rbx], 1
	mov	DWORD PTR 8[rbx], 1
.L17:
	mov	eax, DWORD PTR 12[rbx]
	test	eax, eax
	je	.L87
.L20:
	mov	esi, DWORD PTR 24[rbx]
	test	esi, esi
	jne	.L54
.L26:
	add	r12, 1
	cmp	QWORD PTR [rsp], r12
	je	.L29
.L24:
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	r8, rbp
	mov	r9, r12
	mov	rcx, r15
	push	QWORD PTR 16[rsp]
	.cfi_def_cfa_offset 144
	mov	rdi, QWORD PTR 32[rsp]
	mov	rdx, r14
	mov	rsi, r13
	call	getPixelColorRGBA16@PLT
	pop	rdi
	.cfi_def_cfa_offset 136
	pop	r8
	.cfi_def_cfa_offset 128
	mov	r10d, eax
	test	eax, eax
	jne	.L29
	mov	esi, DWORD PTR [rbx]
	test	esi, esi
	jne	.L5
	movzx	ecx, WORD PTR 48[rsp]
	movzx	edx, WORD PTR 50[rsp]
	movzx	esi, WORD PTR 52[rsp]
	mov	eax, ecx
	shr	ax, 8
	xor	eax, ecx
	mov	ecx, edx
	shr	cx, 8
	xor	ecx, edx
	mov	edx, esi
	shr	dx, 8
	or	eax, ecx
	xor	edx, esi
	or	eax, edx
	test	al, al
	je	.L5
	movabs	rax, 4294967297
	mov	QWORD PTR [rbx], rax
	mov	QWORD PTR 8[rbx], rax
.L5:
	mov	ecx, DWORD PTR 16[rbx]
	test	ecx, ecx
	jne	.L6
	movzx	eax, WORD PTR 48[rsp]
	cmp	ax, WORD PTR 50[rsp]
	je	.L88
.L7:
	movabs	rax, 4294967297
	mov	DWORD PTR 8[rbx], 1
	mov	QWORD PTR 16[rbx], rax
.L6:
	mov	edx, DWORD PTR 24[rbx]
	test	edx, edx
	je	.L89
.L8:
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	jne	.L17
	movzx	edi, BYTE PTR 48[rsp]
	mov	DWORD PTR 24[rsp], r10d
	call	getValueRequiredBits@PLT
	mov	edx, DWORD PTR 44[rbx]
	mov	r10d, DWORD PTR 24[rsp]
	cmp	edx, eax
	jnb	.L19
	mov	DWORD PTR 44[rbx], eax
	mov	edx, eax
.L19:
	cmp	edx, 7
	jbe	.L17
	mov	eax, DWORD PTR 12[rbx]
	mov	DWORD PTR 8[rbx], 1
	test	eax, eax
	jne	.L20
	.p2align 4,,10
	.p2align 3
.L87:
	movzx	ecx, BYTE PTR 52[rsp]
	movzx	edx, BYTE PTR 50[rsp]
	lea	rdi, 68[rbx]
	mov	DWORD PTR 32[rsp], r10d
	movzx	esi, BYTE PTR 48[rsp]
	movzx	r8d, BYTE PTR 54[rsp]
	mov	QWORD PTR 24[rsp], rdi
	call	color_tree_has@PLT
	mov	rdi, QWORD PTR 24[rsp]
	mov	r10d, DWORD PTR 32[rsp]
	test	eax, eax
	je	.L90
.L21:
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	je	.L26
	mov	eax, DWORD PTR 12[rbx]
	test	eax, eax
	je	.L26
	.p2align 4,,10
	.p2align 3
.L54:
	mov	eax, DWORD PTR 16[rbx]
	test	eax, eax
	je	.L26
	mov	r11d, DWORD PTR [rbx]
	test	r11d, r11d
	je	.L26
	mov	r9d, DWORD PTR 8[rbx]
	test	r9d, r9d
	je	.L26
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, DWORD PTR 28[rbx]
	test	edx, edx
	je	.L8
	movzx	eax, WORD PTR 48[rsp]
	cmp	WORD PTR 32[rbx], ax
	jne	.L8
	movzx	eax, WORD PTR 50[rsp]
	cmp	WORD PTR 34[rbx], ax
	jne	.L8
	movzx	eax, WORD PTR 52[rsp]
	cmp	WORD PTR 36[rbx], ax
	jne	.L8
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L88:
	cmp	ax, WORD PTR 52[rsp]
	jne	.L7
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L90:
	movzx	ecx, BYTE PTR 52[rsp]
	movzx	edx, BYTE PTR 50[rsp]
	mov	DWORD PTR 24[rsp], r10d
	movzx	esi, BYTE PTR 48[rsp]
	mov	r9d, DWORD PTR 48[rbx]
	movzx	r8d, BYTE PTR 54[rsp]
	call	color_tree_add@PLT
	mov	eax, DWORD PTR 48[rbx]
	mov	r10d, DWORD PTR 24[rsp]
	cmp	eax, 255
	jg	.L22
	movzx	esi, WORD PTR 48[rsp]
	mov	rdx, QWORD PTR 56[rbx]
	lea	ecx, 0[0+rax*4]
	mov	rax, rcx
	mov	BYTE PTR [rdx+rcx], sil
	movzx	esi, WORD PTR 50[rsp]
	lea	ecx, 1[rcx]
	mov	BYTE PTR [rdx+rcx], sil
	movzx	esi, WORD PTR 52[rsp]
	lea	ecx, 2[rax]
	add	eax, 3
	mov	BYTE PTR [rdx+rcx], sil
	movzx	ecx, WORD PTR 54[rsp]
	mov	BYTE PTR [rdx+rax], cl
	mov	eax, DWORD PTR 48[rbx]
.L22:
	add	eax, 1
	mov	DWORD PTR 48[rbx], eax
	cmp	eax, DWORD PTR 64[rbx]
	jb	.L21
	mov	DWORD PTR 12[rbx], 1
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L86:
	mov	eax, DWORD PTR 28[rbx]
	test	eax, eax
	je	.L11
	movzx	eax, WORD PTR 48[rsp]
	cmp	WORD PTR 32[rbx], ax
	jne	.L77
	movzx	eax, WORD PTR 50[rsp]
	cmp	WORD PTR 34[rbx], ax
	jne	.L77
	movzx	eax, WORD PTR 52[rsp]
	cmp	WORD PTR 36[rbx], ax
	jne	.L77
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, DWORD PTR 40[rbx]
	test	edi, edi
	jne	.L8
	movzx	eax, WORD PTR 48[rsp]
	mov	DWORD PTR 28[rbx], 1
	mov	WORD PTR 32[rbx], ax
	movzx	eax, WORD PTR 50[rsp]
	mov	WORD PTR 34[rbx], ax
	movzx	eax, WORD PTR 52[rsp]
	mov	WORD PTR 36[rbx], ax
	jmp	.L8
.L85:
	movzx	eax, BYTE PTR 52[rsp]
	cmp	ax, WORD PTR 36[rbx]
	jne	.L34
	jmp	.L32
.L80:
	xor	r10d, r10d
	jmp	.L27
.L83:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_color_profile, .-get_color_profile
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_lodepng.c_get_color_profile.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_color_profile, %function
get_color_profile:
	@ args = 4, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #60
	str	r3, [sp, #20]
	ldr	r3, [r3]
	str	r2, [sp, #32]
	ldr	r2, .L110
	str	r1, [sp, #28]
	cmp	r3, #16
	mov	r4, r0
	ldr	r2, [r2]
	str	r2, [sp, #52]
	mov	r2,#0
	beq	.L97
	ldr	r2, [sp, #32]
	cmp	r2, #0
	beq	.L98
	mov	r6, #0
	mov	r7, #1
	mov	r5, r6
	add	r3, r4, #60
	add	fp, sp, #50
	add	r10, sp, #48
	add	r9, sp, #46
	add	r8, sp, #44
	str	r3, [sp, #36]
.L52:
	ldr	r3, [sp, #96]
	mov	r2, r10
	str	r3, [sp, #12]
	ldr	r3, [sp, #20]
	mov	r1, r9
	str	r3, [sp, #8]
	ldr	r3, [sp, #28]
	mov	r0, r8
	str	r3, [sp]
	str	r6, [sp, #4]
	mov	r3, fp
	strb	r5, [sp, #44]
	strb	r5, [sp, #46]
	strb	r5, [sp, #48]
	strb	r5, [sp, #50]
	bl	getPixelColorRGBA8
	subs	r3, r0, #0
	str	r3, [sp, #24]
	bne	.L31
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L32
	ldrb	r1, [sp, #44]	@ zero_extendqisi2
	ldrb	r2, [sp, #46]	@ zero_extendqisi2
	cmp	r2, r1
	beq	.L99
.L33:
	str	r7, [r4, #20]
	str	r7, [r4, #16]
	str	r7, [r4, #8]
.L32:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	bne	.L34
	ldrb	r0, [sp, #50]	@ zero_extendqisi2
	cmp	r0, #255
	beq	.L35
	cmp	r0, #0
	bne	.L36
	ldr	r3, [r4, #28]
	ldrb	r1, [sp, #44]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L100
	ldrb	r2, [sp, #46]	@ zero_extendqisi2
	ldrb	r3, [sp, #48]	@ zero_extendqisi2
	str	r7, [r4, #28]
	strh	r1, [r4, #32]	@ movhi
	strh	r2, [r4, #34]	@ movhi
	strh	r3, [r4, #36]	@ movhi
.L34:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L46
	ldrb	r0, [sp, #44]	@ zero_extendqisi2
	bl	getValueRequiredBits
	ldr	r3, [r4, #44]
	cmp	r3, r0
	movcc	r3, r0
	strcc	r0, [r4, #44]
	cmp	r3, #7
	strhi	r7, [r4, #8]
.L46:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L101
.L48:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	bne	.L44
.L54:
	ldr	r3, [sp, #32]
	add	r6, r6, #1
	cmp	r3, r6
	bne	.L52
.L31:
	ldr	r3, [sp, #20]
	ldr	r3, [r3]
.L29:
	cmp	r3, #15
	bgt	.L1
	ldrh	r1, [r4, #32]
	ldrh	r2, [r4, #34]
	ldrh	r3, [r4, #36]
	add	r1, r1, r1, lsl #8
	add	r2, r2, r2, lsl #8
	add	r3, r3, r3, lsl #8
	strh	r1, [r4, #32]	@ movhi
	strh	r2, [r4, #34]	@ movhi
	strh	r3, [r4, #36]	@ movhi
.L1:
	ldr	r3, .L110
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L102
	ldr	r0, [sp, #24]
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L101:
	ldrb	r1, [sp, #44]	@ zero_extendqisi2
	ldrb	r2, [sp, #46]	@ zero_extendqisi2
	ldrb	r3, [sp, #48]	@ zero_extendqisi2
	ldrb	r0, [sp, #50]	@ zero_extendqisi2
.L43:
	str	r0, [sp]
	ldr	r0, [sp, #36]
	bl	color_tree_has
	cmp	r0, #0
	beq	.L103
.L49:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	beq	.L54
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L54
.L44:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L54
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L54
	b	.L31
.L100:
	ldrh	r3, [r4, #32]
	cmp	r3, r1
	bne	.L36
	ldrb	r2, [sp, #46]	@ zero_extendqisi2
	ldrh	r3, [r4, #34]
	cmp	r2, r3
	beq	.L104
.L36:
	str	r7, [r4, #40]
	str	r7, [r4, #24]
	str	r7, [r4, #8]
	b	.L46
.L99:
	ldrb	r3, [sp, #48]	@ zero_extendqisi2
	cmp	r3, r2
	bne	.L33
	b	.L32
.L35:
	ldr	r3, [r4, #28]
	cmp	r3, #0
	beq	.L34
	ldrb	r1, [sp, #44]	@ zero_extendqisi2
	ldrh	r3, [r4, #32]
	cmp	r1, r3
	bne	.L34
	ldrb	r2, [sp, #46]	@ zero_extendqisi2
	ldrh	r3, [r4, #34]
	cmp	r2, r3
	bne	.L34
	ldrb	r3, [sp, #48]	@ zero_extendqisi2
	ldrh	ip, [r4, #36]
	cmp	r3, ip
	bne	.L34
	ldr	ip, [r4, #12]
	str	r7, [r4, #40]
	cmp	ip, #0
	str	r7, [r4, #24]
	str	r7, [r4, #8]
	bne	.L44
	b	.L43
.L103:
	ldr	r2, [r4, #48]
	ldrb	r3, [sp, #50]	@ zero_extendqisi2
	str	r2, [sp, #4]
	str	r3, [sp]
	ldrb	r2, [sp, #46]	@ zero_extendqisi2
	ldrb	r3, [sp, #48]	@ zero_extendqisi2
	ldrb	r1, [sp, #44]	@ zero_extendqisi2
	ldr	r0, [sp, #36]
	bl	color_tree_add
	ldr	r3, [r4, #48]
	cmp	r3, #255
	bgt	.L50
	ldr	r1, [r4, #52]
	ldrb	r0, [sp, #44]	@ zero_extendqisi2
	add	r2, r1, r3, lsl #2
	strb	r0, [r1, r3, lsl #2]
	ldrb	r3, [sp, #46]	@ zero_extendqisi2
	strb	r3, [r2, #1]
	ldrb	r3, [sp, #48]	@ zero_extendqisi2
	strb	r3, [r2, #2]
	ldrb	r3, [sp, #50]	@ zero_extendqisi2
	strb	r3, [r2, #3]
	ldr	r3, [r4, #48]
.L50:
	ldr	r2, [r4, #56]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r4, #48]
	strcs	r7, [r4, #12]
	bcs	.L48
	b	.L49
.L97:
	ldr	r3, [sp, #32]
	cmp	r3, #0
	streq	r3, [sp, #24]
	beq	.L1
	add	r7, r4, #60
	str	r7, [sp, #36]
	mov	r6, #0
	mov	r5, #1
	ldr	r7, [sp, #32]
	add	fp, sp, #50
	add	r10, sp, #48
	add	r9, sp, #46
	add	r8, sp, #44
	b	.L26
.L108:
	ldrh	r0, [sp, #50]
	ldr	r3, .L110+4
	cmp	r0, r3
	beq	.L9
	cmp	r7, #16
	movls	r3, #0
	movhi	r3, #1
	cmp	r0, #0
	moveq	r0, r3
	movne	r0, #0
	cmp	r0, #0
	bne	.L105
.L10:
	str	r5, [r4, #40]
	str	r5, [r4, #24]
	str	r5, [r4, #8]
.L20:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L106
.L22:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	bne	.L18
.L28:
	add	r6, r6, #1
	cmp	r7, r6
	beq	.L31
.L26:
	ldr	r3, [sp, #20]
	mov	r2, r10
	str	r3, [sp, #8]
	ldr	r3, [sp, #28]
	mov	r1, r9
	str	r3, [sp]
	mov	r0, r8
	mov	r3, fp
	str	r6, [sp, #4]
	bl	getPixelColorRGBA16
	subs	r3, r0, #0
	str	r3, [sp, #24]
	bne	.L31
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L5
	ldrh	r1, [sp, #44]
	ldrh	r2, [sp, #46]
	ldrh	r3, [sp, #48]
	eor	r1, r1, r1, lsr #8
	eor	r2, r2, r2, lsr #8
	orr	r1, r1, r2
	eor	r3, r3, r3, lsr #8
	orr	r1, r1, r3
	tst	r1, #255
	strne	r5, [r4, #4]
	strne	r5, [r4]
	strne	r5, [r4, #8]
	strne	r5, [r4, #12]
.L5:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L6
	ldrh	r1, [sp, #44]
	ldrh	r2, [sp, #46]
	cmp	r2, r1
	beq	.L107
.L7:
	str	r5, [r4, #20]
	str	r5, [r4, #16]
	str	r5, [r4, #8]
.L6:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	beq	.L108
.L8:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L20
	ldrb	r0, [sp, #44]	@ zero_extendqisi2
	bl	getValueRequiredBits
	ldr	r3, [r4, #44]
	cmp	r3, r0
	movcc	r3, r0
	strcc	r0, [r4, #44]
	cmp	r3, #7
	ldr	r3, [r4, #12]
	strhi	r5, [r4, #8]
	cmp	r3, #0
	bne	.L22
.L106:
	ldrh	r1, [sp, #44]
	ldrh	r2, [sp, #46]
	ldrh	r3, [sp, #48]
	ldrh	r0, [sp, #50]
.L17:
	and	r0, r0, #255
	str	r0, [sp]
	and	r3, r3, #255
	ldr	r0, [sp, #36]
	and	r2, r2, #255
	and	r1, r1, #255
	bl	color_tree_has
	cmp	r0, #0
	beq	.L109
.L23:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	beq	.L28
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L28
.L18:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L28
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L28
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L28
	b	.L31
.L9:
	ldr	r3, [r4, #28]
	cmp	r3, #0
	beq	.L8
	ldrh	r3, [r4, #32]
	ldrh	r1, [sp, #44]
	cmp	r3, r1
	bne	.L8
	ldrh	r3, [r4, #34]
	ldrh	r2, [sp, #46]
	cmp	r3, r2
	bne	.L8
	ldrh	ip, [r4, #36]
	ldrh	r3, [sp, #48]
	cmp	ip, r3
	bne	.L8
	ldr	ip, [r4, #12]
	str	r5, [r4, #40]
	cmp	ip, #0
	str	r5, [r4, #24]
	str	r5, [r4, #8]
	bne	.L18
	b	.L17
.L107:
	ldrh	r3, [sp, #48]
	cmp	r3, r2
	bne	.L7
	b	.L6
.L109:
	ldr	r2, [r4, #48]
	ldrb	r3, [sp, #50]	@ zero_extendqisi2
	str	r2, [sp, #4]
	str	r3, [sp]
	ldrb	r2, [sp, #46]	@ zero_extendqisi2
	ldrb	r3, [sp, #48]	@ zero_extendqisi2
	ldrb	r1, [sp, #44]	@ zero_extendqisi2
	ldr	r0, [sp, #36]
	bl	color_tree_add
	ldr	r3, [r4, #48]
	cmp	r3, #255
	bgt	.L24
	ldr	r1, [r4, #52]
	ldrh	r0, [sp, #44]
	add	r2, r1, r3, lsl #2
	strb	r0, [r1, r3, lsl #2]
	ldrh	r3, [sp, #46]
	strb	r3, [r2, #1]
	ldrh	r3, [sp, #48]
	strb	r3, [r2, #2]
	ldrh	r3, [sp, #50]
	strb	r3, [r2, #3]
	ldr	r3, [r4, #48]
.L24:
	ldr	r2, [r4, #56]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r4, #48]
	strcs	r5, [r4, #12]
	bcs	.L22
	b	.L23
.L105:
	ldr	r3, [r4, #28]
	cmp	r3, #0
	beq	.L11
	ldrh	r3, [r4, #32]
	ldrh	r1, [sp, #44]
	cmp	r3, r1
	bne	.L10
	ldrh	r3, [r4, #34]
	ldrh	r2, [sp, #46]
	cmp	r3, r2
	bne	.L10
	ldrh	r2, [r4, #36]
	ldrh	r3, [sp, #48]
	cmp	r2, r3
	bne	.L10
	b	.L8
.L11:
	ldr	r3, [r4, #40]
	cmp	r3, #0
	bne	.L8
	ldrh	r1, [sp, #44]
	ldrh	r2, [sp, #46]
	ldrh	r3, [sp, #48]
	str	r5, [r4, #28]
	strh	r1, [r4, #32]	@ movhi
	strh	r2, [r4, #34]	@ movhi
	strh	r3, [r4, #36]	@ movhi
	b	.L8
.L104:
	ldrb	r2, [sp, #48]	@ zero_extendqisi2
	ldrh	r3, [r4, #36]
	cmp	r2, r3
	bne	.L36
	b	.L34
.L98:
	str	r2, [sp, #24]
	b	.L29
.L102:
	bl	__stack_chk_fail
.L111:
	.align	2
.L110:
	.word	.LC0
	.word	65535
	.size	get_color_profile, .-get_color_profile
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
