	.file	"extr_extras.c_WebPImportColorMappedARGB.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	WebPImportColorMappedARGB
	.type	WebPImportColorMappedARGB, @function
WebPImportColorMappedARGB:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movsx	r14, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	xor	edi, edi
	cmp	DWORD PTR MAX_PALETTE_SIZE[rip], 256
	setle	dil
	call	assert@PLT
	test	rbp, rbp
	je	.L2
	test	rbx, rbx
	je	.L2
	cmp	DWORD PTR 0[rbp], r14d
	jg	.L2
	test	r13, r13
	je	.L2
	cmp	DWORD PTR MAX_PALETTE_SIZE[rip], r12d
	jl	.L2
	test	r12d, r12d
	jle	.L2
	mov	DWORD PTR 4[rbp], 1
	mov	rdi, rbp
	call	WebPPictureAlloc@PLT
	test	eax, eax
	je	.L2
	mov	esi, DWORD PTR 8[rbp]
	mov	rcx, QWORD PTR 16[rbp]
	sal	r14, 2
	xor	edi, edi
	test	esi, esi
	jle	.L8
.L5:
	mov	edx, DWORD PTR 0[rbp]
	xor	eax, eax
	test	edx, edx
	jg	.L7
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edx, DWORD PTR 0[r13+rsi*4]
	mov	DWORD PTR [rcx+rax*4], edx
	add	rax, 1
	cmp	DWORD PTR 0[rbp], eax
	jle	.L9
.L7:
	movsx	rsi, DWORD PTR [rbx+rax*4]
	cmp	esi, r12d
	jl	.L6
	mov	rdi, rbp
	call	WebPPictureFree@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	movsx	rax, DWORD PTR 12[rbp]
	add	rbx, r14
	add	edi, 1
	lea	rcx, [rcx+rax*4]
	cmp	DWORD PTR 8[rbp], edi
	jg	.L5
.L8:
	mov	eax, 1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	WebPImportColorMappedARGB, .-WebPImportColorMappedARGB
	.comm	MAX_PALETTE_SIZE,4,4
	.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_extras.c_WebPImportColorMappedARGB.c"
	.text
	.align	2
	.global	WebPImportColorMappedARGB
	.syntax unified
	.arm
	.fpu softvfp
	.type	WebPImportColorMappedARGB, %function
WebPImportColorMappedARGB:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	ldr	r9, .L19
	ldr	r6, [sp, #32]
	ldr	r0, [r9]
	mov	r8, r1
	cmp	r0, #256
	movgt	r0, #0
	movle	r0, #1
	mov	r5, r2
	mov	r4, r3
	bl	assert
	cmp	r7, #0
	cmpne	r6, #0
	beq	.L2
	clz	r3, r5
	ldr	r2, [r6]
	lsr	r3, r3, #5
	cmp	r2, r8
	orrgt	r3, r3, #1
	cmp	r3, #0
	bne	.L2
	ldr	r3, [r9]
	cmp	r3, r4
	cmpge	r4, #0
	movle	r9, #1
	movgt	r9, #0
	bgt	.L17
.L2:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	mov	r3, #1
	mov	r0, r6
	str	r3, [r6, #4]
	bl	WebPPictureAlloc
	cmp	r0, #0
	beq	.L2
	ldr	r3, [r6, #8]
	ldr	lr, [r6, #16]
	cmp	r3, #0
	ldrgt	r2, [r6]
	lslgt	r8, r8, #2
	ble	.L8
.L5:
	cmp	r2, #0
	movgt	r3, #0
	subgt	r0, r7, #4
	subgt	ip, lr, #4
	bgt	.L7
	b	.L10
.L6:
	ldr	r2, [r5, r2, lsl #2]
	str	r2, [ip, #4]!
	ldr	r2, [r6]
	cmp	r2, r3
	ble	.L18
.L7:
	ldr	r2, [r0, #4]!
	add	r3, r3, #1
	cmp	r2, r4
	blt	.L6
	mov	r0, r6
	bl	WebPPictureFree
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	ldr	r3, [r6, #8]
.L10:
	ldr	r1, [r6, #12]
	add	r9, r9, #1
	cmp	r3, r9
	add	r7, r7, r8
	add	lr, lr, r1, lsl #2
	bgt	.L5
.L8:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	.align	2
.L19:
	.word	MAX_PALETTE_SIZE
	.size	WebPImportColorMappedARGB, .-WebPImportColorMappedARGB
	.comm	MAX_PALETTE_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
