	.file	"extr_load-png.c_png_read_plte.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"too many samples in palette"
	.text
	.p2align 4
	.type	png_read_plte, @function
png_read_plte:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	ecx, 770
	ja	.L16
	mov	esi, ecx
	mov	eax, 2863311531
	imul	rsi, rax
	shr	rsi, 33
	cmp	ecx, 2
	jbe	.L8
.L3:
	mov	rdx, rbp
	xor	eax, eax
	xor	ecx, ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movzx	r8d, BYTE PTR [rdx]
	mov	rdi, QWORD PTR [rbx]
	add	ecx, 1
	add	rdx, 3
	mov	BYTE PTR [rdi+rax], r8b
	movzx	r8d, BYTE PTR -2[rdx]
	mov	rdi, QWORD PTR [rbx]
	mov	BYTE PTR 1[rdi+rax], r8b
	movzx	r8d, BYTE PTR -1[rdx]
	mov	rdi, QWORD PTR [rbx]
	mov	BYTE PTR 2[rdi+rax], r8b
	add	rax, 4
	cmp	esi, ecx
	jg	.L5
	cmp	esi, 256
	je	.L1
.L4:
	lea	eax, 0[0+rsi*4]
	cdqe
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, QWORD PTR [rbx]
	add	esi, 1
	mov	BYTE PTR [rdx+rax], 0
	mov	rdx, QWORD PTR [rbx]
	mov	BYTE PTR 1[rdx+rax], 0
	mov	rdx, QWORD PTR [rbx]
	mov	BYTE PTR 2[rdx+rax], 0
	add	rax, 4
	cmp	esi, 256
	jne	.L7
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	call	fz_warn@PLT
	mov	esi, 256
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	xor	esi, esi
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	png_read_plte, .-png_read_plte
	.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_load-png.c_png_read_plte.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"too many samples in palette\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	png_read_plte, %function
png_read_plte:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, .L18
	push	{r4, r5, r6, lr}
	cmp	r3, ip
	mov	r4, r1
	mov	r5, r2
	bhi	.L17
	ldr	r1, .L18+4
	cmp	r3, #2
	umull	r2, r3, r1, r3
	lsr	r1, r3, #1
	bls	.L8
.L3:
	mov	r3, #0
	mov	r2, r5
	mov	ip, r3
.L5:
	ldrb	lr, [r2]	@ zero_extendqisi2
	ldr	r0, [r4]
	add	ip, ip, #1
	strb	lr, [r0, r3]
	ldr	r0, [r4]
	ldrb	lr, [r2, #1]	@ zero_extendqisi2
	add	r0, r0, r3
	strb	lr, [r0, #1]
	ldr	r0, [r4]
	ldrb	lr, [r2, #2]	@ zero_extendqisi2
	add	r0, r0, r3
	cmp	r1, ip
	strb	lr, [r0, #2]
	add	r3, r3, #4
	add	r2, r2, #3
	bgt	.L5
	cmp	r1, #256
	popeq	{r4, r5, r6, pc}
.L4:
	mov	r0, #0
	lsl	r3, r1, #2
.L7:
	ldr	r2, [r4]
	add	r1, r1, #1
	strb	r0, [r2, r3]
	ldr	r2, [r4]
	cmp	r1, #256
	add	r2, r2, r3
	strb	r0, [r2, #1]
	ldr	r2, [r4]
	add	r2, r2, r3
	strb	r0, [r2, #2]
	add	r3, r3, #4
	bne	.L7
	pop	{r4, r5, r6, pc}
.L17:
	ldr	r1, .L18+8
	bl	fz_warn
	mov	r1, #256
	b	.L3
.L8:
	mov	r1, #0
	b	.L4
.L19:
	.align	2
.L18:
	.word	770
	.word	-1431655765
	.word	.LC0
	.size	png_read_plte, .-png_read_plte
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
