	.file	"extr_output-ps.c_ps_write_band.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"compression error %d"
	.text
	.p2align 4
	.type	ps_write_band, @function
ps_write_band:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR 80[rsi]
	mov	QWORD PTR 16[rsp], r9
	mov	QWORD PTR 8[rsp], rax
	test	rax, rax
	je	.L1
	mov	eax, DWORD PTR 68[rsi]
	mov	rbx, rsi
	mov	ebp, edx
	lea	esi, [rcx+r8]
	mov	r10d, DWORD PTR 72[rbx]
	mov	r12, rdi
	mov	edx, eax
	sub	edx, ecx
	mov	ecx, DWORD PTR 64[rbx]
	cmp	esi, eax
	lea	rax, 32[rbx]
	cmovge	r8d, edx
	mov	rdi, rax
	mov	DWORD PTR 36[rsp], r10d
	mov	r15d, ecx
	mov	DWORD PTR 40[rsp], ecx
	imul	r15d, r10d
	mov	DWORD PTR 32[rsp], r8d
	mov	QWORD PTR 24[rsp], rax
	mov	r13d, r15d
	imul	r13d, r8d
	mov	esi, r13d
	call	deflateBound@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	r8d, DWORD PTR 32[rsp]
	mov	r10d, DWORD PTR 36[rsp]
	mov	ecx, DWORD PTR 40[rsp]
	mov	r14, rax
	test	rsi, rsi
	mov	r9, QWORD PTR 16[rsp]
	je	.L4
	cmp	DWORD PTR 8[rbx], r13d
	jl	.L4
.L5:
	mov	rsi, QWORD PTR 16[rbx]
	test	rsi, rsi
	je	.L6
	cmp	DWORD PTR 24[rbx], r14d
	jl	.L6
.L7:
	mov	rsi, QWORD PTR [rbx]
	test	r8d, r8d
	jle	.L8
	lea	edi, -1[r10]
	sub	ebp, r15d
	xor	r14d, r14d
	mov	rax, rdi
	movsx	r15, ebp
	cdqe
	lea	rbp, 1[rax]
	.p2align 4,,10
	.p2align 3
.L9:
	xor	r11d, r11d
	test	ecx, ecx
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L14:
	xor	eax, eax
	test	r10d, r10d
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	movzx	edx, BYTE PTR [r9+rax]
	mov	BYTE PTR [rsi+rax], dl
	mov	rdx, rax
	add	rax, 1
	cmp	rdi, rdx
	jne	.L10
	add	r9, rbp
	add	rsi, rbp
.L13:
	add	r11d, 1
	cmp	ecx, r11d
	jne	.L14
.L11:
	add	r14d, 1
	add	r9, r15
	cmp	r8d, r14d
	jne	.L9
	mov	rsi, QWORD PTR [rbx]
.L8:
	mov	rax, QWORD PTR 16[rbx]
	mov	rdi, QWORD PTR 24[rsp]
	mov	QWORD PTR 56[rbx], rsi
	mov	DWORD PTR 32[rbx], r13d
	mov	esi, DWORD PTR Z_NO_FLUSH[rip]
	mov	QWORD PTR 48[rbx], rax
	movsx	rax, DWORD PTR 24[rbx]
	mov	QWORD PTR 40[rbx], rax
	call	deflate@PLT
	cmp	DWORD PTR Z_OK[rip], eax
	mov	ecx, eax
	jne	.L32
.L15:
	movsx	rcx, DWORD PTR 24[rbx]
	mov	rdx, QWORD PTR 16[rbx]
	mov	rdi, r12
	sub	rcx, QWORD PTR 40[rbx]
	mov	rsi, QWORD PTR 8[rsp]
	add	rsp, 56
	.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
	jmp	fz_write_data@PLT
.L32:
	.cfi_restore_state
	mov	esi, DWORD PTR FZ_ERROR_GENERIC[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, r12
	call	fz_throw@PLT
	jmp	.L15
.L6:
	mov	rdi, r12
	mov	QWORD PTR 40[rsp], r9
	mov	DWORD PTR 36[rsp], r8d
	mov	DWORD PTR 32[rsp], r10d
	mov	DWORD PTR 16[rsp], ecx
	call	fz_free@PLT
	mov	QWORD PTR 16[rbx], 0
	mov	esi, r14d
	mov	rdi, r12
	call	fz_malloc@PLT
	mov	DWORD PTR 24[rbx], r14d
	mov	r9, QWORD PTR 40[rsp]
	mov	r8d, DWORD PTR 36[rsp]
	mov	r10d, DWORD PTR 32[rsp]
	mov	QWORD PTR 16[rbx], rax
	mov	ecx, DWORD PTR 16[rsp]
	jmp	.L7
.L4:
	mov	rdi, r12
	mov	QWORD PTR 40[rsp], r9
	mov	DWORD PTR 36[rsp], r8d
	mov	DWORD PTR 32[rsp], r10d
	mov	DWORD PTR 16[rsp], ecx
	call	fz_free@PLT
	mov	QWORD PTR [rbx], 0
	mov	esi, r13d
	mov	rdi, r12
	call	fz_malloc@PLT
	mov	DWORD PTR 8[rbx], r13d
	mov	r9, QWORD PTR 40[rsp]
	mov	r8d, DWORD PTR 36[rsp]
	mov	r10d, DWORD PTR 32[rsp]
	mov	QWORD PTR [rbx], rax
	mov	ecx, DWORD PTR 16[rsp]
	jmp	.L5
.L1:
	add	rsp, 56
	.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
	.cfi_endproc
.LFE0:
	.size	ps_write_band, .-ps_write_band
	.comm	Z_OK,4,4
	.comm	Z_NO_FLUSH,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
	.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_output-ps.c_ps_write_band.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"compression error %d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ps_write_band, %function
ps_write_band:
	@ args = 8, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	ldr	r1, [r1, #44]
	sub	sp, sp, #20
	cmp	r1, #0
	ldr	r10, [sp, #56]
	ldr	r4, [sp, #60]
	str	r1, [sp]
	str	r2, [sp, #4]
	beq	.L1
	ldr	r2, [r6, #36]
	add	r1, r3, r10
	ldr	r9, [r6, #32]
	ldr	r5, [r6, #40]
	cmp	r1, r2
	subge	r10, r2, r3
	mul	r3, r5, r9
	str	r3, [sp, #8]
	mul	r3, r10, r3
	mov	r7, r0
	mov	r1, r3
	add	r0, r6, #16
	mov	r8, r3
	str	r0, [sp, #12]
	bl	deflateBound
	ldr	r1, [r6]
	mov	fp, r0
	cmp	r1, #0
	beq	.L4
	ldr	r3, [r6, #4]
	cmp	r3, r8
	blt	.L4
.L5:
	ldr	r1, [r6, #8]
	cmp	r1, #0
	beq	.L6
	ldr	r3, [r6, #12]
	cmp	r3, fp
	blt	.L6
.L7:
	cmp	r10, #0
	ldr	r0, [r6]
	ble	.L8
	mov	lr, #0
	ldr	r3, [sp, #4]
	ldr	r2, [sp, #8]
	sub	fp, r3, r2
.L9:
	cmp	r9, #0
	movgt	ip, #0
	ble	.L11
.L14:
	cmp	r5, #0
	subgt	r3, r0, #1
	addgt	r1, r4, r5
	ble	.L13
.L10:
	ldrb	r2, [r4], #1	@ zero_extendqisi2
	cmp	r1, r4
	strb	r2, [r3, #1]!
	bne	.L10
	add	r0, r0, r5
.L13:
	add	ip, ip, #1
	cmp	r9, ip
	bne	.L14
.L11:
	add	lr, lr, #1
	cmp	r10, lr
	add	r4, r4, fp
	bne	.L9
	ldr	r0, [r6]
.L8:
	ldr	r1, [r6, #8]
	ldr	r2, [r6, #12]
	ldr	r3, .L28
	str	r0, [r6, #28]
	str	r1, [r6, #24]
	str	r2, [r6, #20]
	ldr	r1, [r3]
	ldr	r0, [sp, #12]
	str	r8, [r6, #16]
	bl	deflate
	ldr	r2, .L28+4
	mov	r3, r0
	ldr	r2, [r2]
	cmp	r2, r0
	bne	.L27
.L15:
	mov	r0, r7
	ldr	r2, [r6, #12]
	ldr	r3, [r6, #20]
	ldr	r1, [sp]
	sub	r3, r2, r3
	ldr	r2, [r6, #8]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	fz_write_data
.L27:
	ldr	r2, .L28+8
	mov	r0, r7
	ldr	r1, [r2]
	ldr	r2, .L28+12
	bl	fz_throw
	b	.L15
.L6:
	mov	r0, r7
	bl	fz_free
	mov	r3, #0
	mov	r1, fp
	mov	r0, r7
	str	r3, [r6, #8]
	bl	fz_malloc
	str	fp, [r6, #12]
	str	r0, [r6, #8]
	b	.L7
.L4:
	mov	r0, r7
	bl	fz_free
	mov	r3, #0
	mov	r1, r8
	mov	r0, r7
	str	r3, [r6]
	bl	fz_malloc
	stm	r6, {r0, r8}
	b	.L5
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	.align	2
.L28:
	.word	Z_NO_FLUSH
	.word	Z_OK
	.word	FZ_ERROR_GENERIC
	.word	.LC0
	.size	ps_write_band, .-ps_write_band
	.comm	Z_OK,4,4
	.comm	Z_NO_FLUSH,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
