	.file	"extr_bitmap.c_pkm_write_band.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"wrong number of color components in bitmap"
	.text
	.p2align 4
	.type	pkm_write_band, @function
pkm_write_band:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r9
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, ecx
	add	ecx, r8d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	cmp	DWORD PTR 8[rsi], 4
	mov	r12, QWORD PTR 16[rsi]
	mov	r10d, DWORD PTR [rsi]
	mov	ebx, DWORD PTR 4[rsi]
	je	.L2
	mov	esi, DWORD PTR FZ_ERROR_GENERIC[rip]
	lea	rdx, .LC0[rip]
	mov	DWORD PTR 20[rsp], ecx
	mov	DWORD PTR 8[rsp], r10d
	call	fz_throw@PLT
	mov	ecx, DWORD PTR 20[rsp]
	mov	r10d, DWORD PTR 8[rsp]
.L2:
	cmp	ebx, ecx
	mov	eax, r10d
	mov	edx, r13d
	cmovg	ebx, ecx
	sar	eax
	sub	edx, eax
	sub	ebx, r14d
	lea	r13d, -1[rbx]
	test	ebx, ebx
	je	.L1
	movsx	rax, edx
	lea	r14d, -1[r10]
	mov	QWORD PTR 8[rsp], rax
	lea	eax, -2[r10]
	shr	eax
	mov	edx, eax
	neg	eax
	lea	rdi, 1[rdx]
	lea	eax, -3[r10+rax*2]
	mov	QWORD PTR 24[rsp], rdi
	mov	DWORD PTR 20[rsp], eax
	.p2align 4,,10
	.p2align 3
.L7:
	test	r14d, r14d
	jle	.L9
	mov	rax, QWORD PTR 24[rsp]
	lea	rbx, [r15+rax]
	.p2align 4,,10
	.p2align 3
.L5:
	movzx	eax, BYTE PTR [r15]
	add	r15, 1
	mov	ecx, 8
	mov	rsi, r12
	mov	rdx, QWORD PTR pkm[rip]
	mov	rdi, rbp
	sal	eax, 3
	cdqe
	lea	rdx, [rdx+rax*4]
	call	fz_write_data@PLT
	cmp	r15, rbx
	jne	.L5
	mov	eax, DWORD PTR 20[rsp]
.L4:
	test	eax, eax
	je	.L14
.L6:
	mov	rax, QWORD PTR 8[rsp]
	sub	r13d, 1
	lea	r15, [rbx+rax]
	cmp	r13d, -1
	jne	.L7
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L14:
	.cfi_restore_state
	movzx	eax, BYTE PTR [rbx]
	mov	rdx, QWORD PTR pkm[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	ecx, 4
	sal	eax, 3
	cdqe
	lea	rdx, [rdx+rax*4]
	call	fz_write_data@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, r14d
	mov	rbx, r15
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	pkm_write_band, .-pkm_write_band
	.comm	pkm,8,8
	.comm	FZ_ERROR_GENERIC,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_bitmap.c_pkm_write_band.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"wrong number of color components in bitmap\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pkm_write_band, %function
pkm_write_band:
	@ args = 8, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	sub	sp, sp, #12
	ldr	r3, [r1, #8]
	ldr	r9, [sp, #48]
	cmp	r3, #4
	mov	fp, r2
	mov	r6, r0
	ldr	r7, [r1, #12]
	ldr	r10, [r1]
	ldr	r8, [r1, #4]
	ldr	r4, [sp, #52]
	add	r9, r5, r9
	beq	.L2
	ldr	r3, .L18
	ldr	r2, .L18+4
	ldr	r1, [r3]
	bl	fz_throw
.L2:
	cmp	r8, r9
	rsble	r5, r5, r8
	rsbgt	r5, r5, r9
	cmp	r5, #0
	sub	r9, r5, #1
	sub	fp, fp, r10, asr #1
	beq	.L1
	sub	r3, r10, #2
	lsr	r3, r3, #1
	rsb	r1, r3, r3, lsl #31
	sub	r2, r10, #3
	add	r3, r3, #1
	str	r3, [sp, #4]
	ldr	r8, .L18+8
	add	r3, r2, r1, lsl #1
	str	r3, [sp]
	sub	r10, r10, #1
.L7:
	cmp	r10, #0
	ble	.L9
	ldr	r3, [sp, #4]
	add	r5, r4, r3
.L5:
	ldrb	r1, [r4], #1	@ zero_extendqisi2
	ldr	r2, [r8]
	mov	r3, #8
	add	r2, r2, r1, lsl #5
	mov	r0, r6
	mov	r1, r7
	bl	fz_write_data
	cmp	r4, r5
	bne	.L5
	ldr	r3, [sp]
.L4:
	cmp	r3, #0
	beq	.L17
.L6:
	sub	r9, r9, #1
	cmn	r9, #1
	add	r4, r5, fp
	bne	.L7
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	ldrb	r0, [r5]	@ zero_extendqisi2
	ldr	r2, [r8]
	mov	r3, #4
	add	r2, r2, r0, lsl #5
	mov	r1, r7
	mov	r0, r6
	bl	fz_write_data
	b	.L6
.L9:
	mov	r5, r4
	mov	r3, r10
	b	.L4
.L19:
	.align	2
.L18:
	.word	FZ_ERROR_GENERIC
	.word	.LC0
	.word	pkm
	.size	pkm_write_band, .-pkm_write_band
	.comm	pkm,4,4
	.comm	FZ_ERROR_GENERIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
