	.file	"extr_lz_encoder.c_lz_encoder_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lz_encoder_init, @function
lz_encoder_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmp	QWORD PTR 32[rdi], 0
	mov	rbx, rdi
	je	.L17
.L2:
	mov	eax, DWORD PTR 96[rbx]
	movsx	rdx, DWORD PTR 8[rbx]
	mov	QWORD PTR 88[rbx], 0
	mov	QWORD PTR 80[rbx], 0
	mov	DWORD PTR 100[rbx], eax
	movsx	rax, DWORD PTR SIZE_MAX[rip]
	mov	rcx, rdx
	mov	QWORD PTR 72[rbx], 0
	shr	rax, 2
	mov	DWORD PTR 4[rbx], 0
	mov	QWORD PTR 64[rbx], 0
	cmp	rdx, rax
	ja	.L15
	movsx	rdx, DWORD PTR 12[rbx]
	cmp	rax, rdx
	jb	.L15
	mov	rdi, QWORD PTR 48[rbx]
	lea	r8d, 0[0+rcx*4]
	test	rdi, rdi
	je	.L18
	mov	esi, r8d
	call	memzero@PLT
.L7:
	cmp	QWORD PTR 8[rbp], 0
	mov	QWORD PTR 40[rbx], 0
	je	.L9
	mov	rdi, QWORD PTR 0[rbp]
	test	rdi, rdi
	jg	.L19
.L9:
	mov	eax, DWORD PTR LZMA_RUN[rip]
	mov	DWORD PTR 16[rbx], eax
	xor	eax, eax
.L20:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	edi, r8d
	mov	rsi, r12
	call	lzma_alloc_zero@PLT
	mov	rsi, r12
	mov	QWORD PTR 48[rbx], rax
	mov	eax, DWORD PTR 12[rbx]
	lea	edi, 0[0+rax*4]
	call	lzma_alloc@PLT
	mov	rdi, QWORD PTR 48[rbx]
	mov	QWORD PTR 56[rbx], rax
	test	rax, rax
	je	.L10
	test	rdi, rdi
	jne	.L7
.L10:
	mov	rsi, r12
	call	lzma_free@PLT
	mov	QWORD PTR 48[rbx], 0
	mov	rdi, QWORD PTR 56[rbx]
	mov	rsi, r12
	call	lzma_free@PLT
	mov	QWORD PTR 56[rbx], 0
.L15:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	esi, DWORD PTR [rbx]
	call	my_min@PLT
	mov	rcx, QWORD PTR 0[rbp]
	mov	rdi, QWORD PTR 32[rbx]
	mov	edx, eax
	mov	DWORD PTR 4[rbx], eax
	cdqe
	sub	rcx, rax
	mov	rax, rcx
	mov	rcx, QWORD PTR 8[rbp]
	lea	rsi, [rcx+rax*4]
	call	memcpy@PLT
	mov	eax, DWORD PTR LZMA_SYNC_FLUSH[rip]
	mov	esi, DWORD PTR 4[rbx]
	mov	rdi, rbx
	mov	DWORD PTR 16[rbx], eax
	call	[QWORD PTR 24[rbx]]
	mov	eax, DWORD PTR LZMA_RUN[rip]
	mov	DWORD PTR 16[rbx], eax
	xor	eax, eax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR LZMA_MEMCMPLEN_EXTRA[rip]
	add	edi, DWORD PTR [rbx]
	call	lzma_alloc@PLT
	mov	QWORD PTR 32[rbx], rax
	test	rax, rax
	je	.L15
	movsx	rdx, DWORD PTR [rbx]
	mov	esi, DWORD PTR LZMA_MEMCMPLEN_EXTRA[rip]
	lea	rdi, [rax+rdx*4]
	call	memzero@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	lz_encoder_init, .-lz_encoder_init
	.comm	SIZE_MAX,4,4
	.comm	LZMA_SYNC_FLUSH,4,4
	.comm	LZMA_RUN,4,4
	.comm	LZMA_MEMCMPLEN_EXTRA,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_lz_encoder.c_lz_encoder_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lz_encoder_init, %function
lz_encoder_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #24]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #0
	mov	r4, r0
	mov	r6, r2
	mov	r5, r1
	beq	.L18
.L2:
	mov	r3, #0
	ldr	r2, .L21
	ldr	r0, [r4, #8]
	ldr	ip, [r2]
	ldr	r2, [r4, #56]
	cmp	r0, ip, lsr #2
	str	r3, [r4, #52]
	lsr	ip, ip, #2
	str	r3, [r4, #48]
	str	r3, [r4, #44]
	str	r3, [r4, #4]
	str	r3, [r4, #40]
	str	r2, [r4, #60]
	bhi	.L16
	ldr	r3, [r4, #12]
	cmp	ip, r3
	bcc	.L16
	ldr	r7, [r4, #32]
	lsl	r1, r0, #2
	cmp	r7, #0
	beq	.L19
	mov	r0, r7
	bl	memzero
.L7:
	mov	r2, #0
	ldr	r3, [r6, #4]
	str	r2, [r4, #28]
	cmp	r3, r2
	beq	.L8
	ldr	r0, [r6]
	cmp	r0, r2
	bgt	.L20
.L8:
	ldr	r3, .L21+4
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	mov	r0, r1
	mov	r1, r5
	bl	lzma_alloc_zero
	ldr	r3, [r4, #12]
	str	r0, [r4, #32]
	mov	r1, r5
	lsl	r0, r3, #2
	bl	lzma_alloc
	mov	r3, r0
	ldr	r0, [r4, #32]
	str	r3, [r4, #36]
	cmp	r0, #0
	cmpne	r3, #0
	bne	.L7
	mov	r1, r5
	bl	lzma_free
	mov	r1, r5
	ldr	r0, [r4, #36]
	str	r7, [r4, #32]
	bl	lzma_free
	str	r7, [r4, #36]
.L16:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	ldr	r1, [r4]
	bl	my_min
	ldr	r3, [r6]
	ldr	r1, [r6, #4]
	sub	r3, r3, r0
	mov	r2, r0
	str	r0, [r4, #4]
	add	r1, r1, r3, lsl #2
	ldr	r0, [r4, #24]
	bl	memcpy
	ldr	r2, .L21+8
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r3, [r4, #20]
	ldr	r1, [r4, #4]
	str	r2, [r4, #16]
	blx	r3
	b	.L8
.L18:
	ldr	r7, .L21+12
	ldr	r0, [r0]
	ldr	r3, [r7]
	add	r0, r0, r3
	bl	lzma_alloc
	cmp	r0, #0
	str	r0, [r4, #24]
	beq	.L16
	ldr	r3, [r4]
	ldr	r1, [r7]
	add	r0, r0, r3, lsl #2
	bl	memzero
	b	.L2
.L22:
	.align	2
.L21:
	.word	SIZE_MAX
	.word	LZMA_RUN
	.word	LZMA_SYNC_FLUSH
	.word	LZMA_MEMCMPLEN_EXTRA
	.size	lz_encoder_init, .-lz_encoder_init
	.comm	SIZE_MAX,4,4
	.comm	LZMA_SYNC_FLUSH,4,4
	.comm	LZMA_RUN,4,4
	.comm	LZMA_MEMCMPLEN_EXTRA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
