	.file	"extr_hpdf_image_ccitt.c_HPDF_Stream_CcittToStream.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	HPDF_Stream_CcittToStream
	.type	HPDF_Stream_CcittToStream, @function
HPDF_Stream_CcittToStream:
.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
	mov	r14d, ecx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r8d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, r9d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	edi, edx
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	HPDF_UNUSED@PLT
	test	r12d, r12d
	je	.L14
	cmp	QWORD PTR 128[rsp], 0
	jne	.L16
	lea	eax, -1[r12]
	movsx	rdx, ebp
	mov	rcx, rbx
	mov	esi, ebp
	imul	eax, ebp
	sal	rdx, 2
	neg	esi
	sub	rcx, rdx
	mov	DWORD PTR 12[rsp], esi
	mov	QWORD PTR [rsp], rcx
	cdqe
	lea	rbx, [rbx+rax*4]
.L5:
	lea	r15, 16[rsp]
	xor	esi, esi
	mov	edx, 40
	mov	rdi, r15
	call	memset@PLT
	mov	edi, 16384
	mov	DWORD PTR 48[rsp], r13d
	call	malloc@PLT
	mov	rdi, r15
	mov	DWORD PTR 16[rsp], 16384
	mov	QWORD PTR 24[rsp], rax
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 32[rsp], rax
	call	HPDF_InitCCITTFax3@PLT
	cmp	rax, QWORD PTR HPDF_OK[rip]
	jne	.L14
	mov	ecx, ebp
	mov	edx, r12d
	mov	esi, r14d
	mov	rdi, r15
	call	HPDF_Fax3SetupState@PLT
	cmp	rax, QWORD PTR HPDF_OK[rip]
	jne	.L8
	mov	rdi, r15
	call	HPDF_Fax3PreEncode@PLT
	cmp	rax, QWORD PTR HPDF_OK[rip]
	jne	.L8
	cmp	rbx, QWORD PTR [rsp]
	je	.L9
	movsx	r12, DWORD PTR 12[rsp]
	sal	r12, 2
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rsi, rbx
	mov	edx, ebp
	mov	rdi, r15
	add	rbx, r12
	call	HPDF_Fax4Encode@PLT
	cmp	QWORD PTR [rsp], rbx
	jne	.L10
.L9:
	mov	rdi, r15
	call	HPDF_Fax4PostEncode@PLT
	mov	rdi, r15
	call	HPDF_FreeCCITTFax3@PLT
	mov	eax, DWORD PTR HPDF_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, r15
	call	HPDF_FreeCCITTFax3@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, 1
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L17
	add	rsp, 72
	.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
.L16:
	.cfi_restore_state
	mov	eax, r12d
	mov	DWORD PTR 12[rsp], ebp
	imul	eax, ebp
	cdqe
	lea	rax, [rbx+rax*4]
	mov	QWORD PTR [rsp], rax
	jmp	.L5
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	HPDF_Stream_CcittToStream, .-HPDF_Stream_CcittToStream
	.comm	HPDF_OK,8,8
	.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_hpdf_image_ccitt.c_HPDF_Stream_CcittToStream.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	HPDF_Stream_CcittToStream
	.syntax unified
	.arm
	.fpu softvfp
	.type	HPDF_Stream_CcittToStream, %function
HPDF_Stream_CcittToStream:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	sub	sp, sp, #24
	ldr	r7, [sp, #56]
	mov	r6, r3
	ldr	r3, .L18
	mov	r4, r0
	mov	r0, r2
	mov	r10, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r5, [sp, #60]
	bl	HPDF_UNUSED
	cmp	r7, #0
	beq	.L14
	ldr	r3, [sp, #64]
	mov	r0, #16384
	cmp	r3, #0
	subeq	r3, r7, #1
	muleq	r3, r5, r3
	mulne	r8, r5, r7
	subeq	r8, r4, r5, lsl #2
	movne	r9, r5
	addeq	r4, r4, r3, lsl #2
	addne	r8, r4, r8, lsl #2
	rsbeq	r9, r5, #0
	str	r10, [sp, #16]
	bl	malloc
	mov	r3, #0
	mov	r2, r0
	mov	r1, #16384
	mov	r0, sp
	str	r3, [sp, #12]
	str	r2, [sp, #4]
	str	r2, [sp, #8]
	str	r1, [sp]
	bl	HPDF_InitCCITTFax3
	ldr	r10, .L18+4
	ldr	r3, [r10]
	cmp	r0, r3
	beq	.L16
.L14:
	mov	r0, #1
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	mov	r3, r5
	mov	r2, r7
	mov	r1, r6
	mov	r0, sp
	bl	HPDF_Fax3SetupState
	ldr	r3, [r10]
	cmp	r0, r3
	bne	.L8
	mov	r0, sp
	bl	HPDF_Fax3PreEncode
	ldr	r3, [r10]
	cmp	r0, r3
	bne	.L8
	cmp	r4, r8
	beq	.L9
	lsl	r9, r9, #2
.L10:
	mov	r1, r4
	mov	r2, r5
	mov	r0, sp
	add	r4, r4, r9
	bl	HPDF_Fax4Encode
	cmp	r8, r4
	bne	.L10
.L9:
	mov	r0, sp
	bl	HPDF_Fax4PostEncode
	mov	r0, sp
	bl	HPDF_FreeCCITTFax3
	ldr	r0, [r10]
	b	.L1
.L8:
	mov	r0, sp
	bl	HPDF_FreeCCITTFax3
	b	.L14
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	HPDF_OK
	.size	HPDF_Stream_CcittToStream, .-HPDF_Stream_CcittToStream
	.comm	HPDF_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
