	.file	"extr_alpha_enc.c_GetNumColors.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	GetNumColors, @function
GetNumColors:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 2072
	.cfi_def_cfa_offset 2080
	mov	r11, rdi
	mov	r8d, ecx
	mov	ecx, 256
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 2056[rsp], rax
	xor	eax, eax
	mov	rdi, rsp
	rep stosq
	test	edx, edx
	jle	.L12
	lea	r10d, -1[rsi]
	movsx	rcx, r8d
	xor	r8d, r8d
	lea	rdi, 8[r11+r10*8]
	not	r10
	lea	r9, 0[0+rcx*8]
	sal	r10, 3
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rax, [r10+rdi]
	test	esi, esi
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rcx, QWORD PTR [rax]
	add	rax, 8
	mov	QWORD PTR [rsp+rcx*8], 1
	cmp	rax, rdi
	jne	.L6
.L7:
	add	r8d, 1
	add	rdi, r9
	cmp	edx, r8d
	jne	.L4
	mov	rdx, QWORD PTR [rsp]
.L2:
	lea	rax, 8[rsp]
	lea	rcx, 2048[rsp]
	xor	r8d, r8d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdx, QWORD PTR [rax]
	add	rax, 8
.L10:
	cmp	rdx, 1
	sbb	r8d, -1
	cmp	rax, rcx
	jne	.L20
	mov	rax, QWORD PTR 2056[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	mov	eax, r8d
	add	rsp, 2072
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	xor	edx, edx
	jmp	.L2
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	GetNumColors, .-GetNumColors
	.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_alpha_enc.c_GetNumColors.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetNumColors, %function
GetNumColors:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r2
	sub	sp, sp, #1024
	sub	sp, sp, #8
	mov	r8, r3
	ldr	r3, .L24
	mov	r4, r0
	mov	r7, r1
	mov	r2, #1024
	mov	r1, #0
	add	r0, sp, #4
	ldr	r3, [r3]
	str	r3, [sp, #1028]
	mov	r3,#0
	bl	memset
	cmp	r6, #0
	ble	.L12
	mov	r5, #0
	mov	lr, #1
	rsb	r1, r7, r7, lsl #30
	lsl	r2, r8, #2
	add	r0, r4, r7, lsl #2
	lsl	r1, r1, #2
.L4:
	cmp	r7, #0
	addgt	ip, r0, r1
	ble	.L7
.L6:
	ldr	r3, [ip], #4
	add	r4, sp, #1024
	add	r4, r4, #8
	add	r3, r4, r3, lsl #2
	cmp	ip, r0
	str	lr, [r3, #-1028]
	bne	.L6
.L7:
	add	r5, r5, #1
	cmp	r6, r5
	add	r0, r0, r2
	bne	.L4
	ldr	r2, [sp, #4]
.L2:
	mov	r0, #0
	add	r3, sp, #4
	add	r1, sp, #1024
	b	.L10
.L22:
	ldr	r2, [r3, #4]!
.L10:
	cmp	r2, #0
	addne	r0, r0, #1
	cmp	r3, r1
	bne	.L22
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #1028]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #1024
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mov	r2, #0
	b	.L2
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC0
	.size	GetNumColors, .-GetNumColors
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
