	.file	"extr_lzma_encoder_optimum_normal.c_lzma_lzma_optimum_normal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	lzma_lzma_optimum_normal
	.type	lzma_lzma_optimum_normal, @function
lzma_lzma_optimum_normal:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -56
	mov	QWORD PTR -104[rbp], rcx
	mov	rcx, QWORD PTR 8[rdi]
	mov	QWORD PTR -96[rbp], rdx
	mov	DWORD PTR -72[rbp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rsi]
	cmp	QWORD PTR [rdi], rcx
	jne	.L21
	mov	rbx, rsi
	test	rax, rax
	jne	.L5
	cmp	DWORD PTR 16[rdi], 127
	jg	.L22
.L6:
	mov	rax, QWORD PTR ALIGN_SIZE[rip]
	cmp	QWORD PTR 24[r12], rax
	jge	.L23
.L5:
	mov	r8d, DWORD PTR -72[rbp]
	mov	rcx, QWORD PTR -104[rbp]
	mov	rsi, rbx
	mov	rdi, r12
	mov	rdx, QWORD PTR -96[rbp]
	call	helper1@PLT
	cmp	DWORD PTR UINT32_MAX[rip], eax
	mov	r15d, eax
	je	.L1
	movsx	rax, DWORD PTR REPS[rip]
	mov	rcx, rsp
	mov	rdx, rax
	lea	rax, 15[0+rax*4]
	mov	rsi, rax
	and	rax, -4096
	sub	rcx, rax
	and	rsi, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L9
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L9:
	and	esi, 4095
	sub	rsp, rsi
	test	rsi, rsi
	je	.L10
	or	QWORD PTR -8[rsp+rsi], 0
.L10:
	mov	esi, DWORD PTR 44[r12]
	mov	rdi, rsp
	sal	edx, 2
	mov	QWORD PTR -88[rbp], rdi
	call	memcpy@PLT
	cmp	r15d, 1
	jle	.L14
	lea	rax, 40[r12]
	mov	r13d, 1
	mov	QWORD PTR -80[rbp], rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L25:
	mov	esi, r13d
	mov	rdi, rbx
	not	esi
	add	esi, DWORD PTR OPTS[rip]
	mov	r14d, esi
	call	mf_avail@PLT
	mov	esi, r14d
	lea	rdi, 1[rax]
	call	my_min@PLT
	mov	rdi, rbx
	mov	r14d, DWORD PTR 8[rbx]
	mov	DWORD PTR -68[rbp], eax
	call	mf_ptr@PLT
	mov	esi, DWORD PTR -68[rbp]
	mov	r9d, r13d
	mov	ecx, r15d
	lea	rdx, -1[rax]
	mov	eax, DWORD PTR -72[rbp]
	mov	rdi, r12
	push	rsi
	mov	rsi, QWORD PTR -88[rbp]
	push	r14
	lea	r8d, 0[r13+rax]
	add	r13d, 1
	call	helper2@PLT
	mov	r15d, eax
	pop	rax
	pop	rdx
	cmp	r15d, r13d
	jle	.L11
.L12:
	xor	edi, edi
	cmp	DWORD PTR OPTS[rip], r13d
	setg	dil
	call	assert@PLT
	mov	edx, DWORD PTR 36[r12]
	mov	rsi, QWORD PTR -80[rbp]
	mov	rdi, rbx
	call	mf_find@PLT
	mov	DWORD PTR 32[r12], eax
	cmp	eax, DWORD PTR 8[rbx]
	jl	.L25
.L11:
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, QWORD PTR -104[rbp]
	mov	ecx, r13d
	mov	rdi, r12
	call	backward@PLT
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	xor	edi, edi
	test	rax, rax
	setg	dil
	call	assert@PLT
	mov	rdx, QWORD PTR 8[r12]
	mov	rax, QWORD PTR 48[r12]
	lea	rax, [rax+rdx*8]
	mov	ecx, DWORD PTR [rax]
	sub	ecx, edx
	mov	edx, ecx
	mov	rcx, QWORD PTR -104[rbp]
	mov	DWORD PTR [rcx], edx
	mov	rcx, QWORD PTR -96[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	DWORD PTR [rcx], edx
	movsx	rax, DWORD PTR [rax]
	mov	QWORD PTR 8[r12], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rdi, r12
	call	fill_align_prices@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	call	fill_dist_prices@PLT
	jmp	.L6
.L14:
	mov	r13d, 1
	jmp	.L11
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lzma_lzma_optimum_normal, .-lzma_lzma_optimum_normal
	.comm	UINT32_MAX,4,4
	.comm	REPS,4,4
	.comm	OPTS,4,4
	.comm	ALIGN_SIZE,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_lzma_encoder_optimum_normal.c_lzma_lzma_optimum_normal.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	lzma_lzma_optimum_normal
	.syntax unified
	.arm
	.fpu softvfp
	.type	lzma_lzma_optimum_normal, %function
lzma_lzma_optimum_normal:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	mov	r5, r1
	ldr	ip, [r0]
	ldr	r1, [r0, #4]
	str	r3, [fp, #-60]
	ldr	r3, .L21
	str	r2, [fp, #-56]
	cmp	ip, r1
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r7, r0
	ldr	r3, [r5]
	bne	.L16
	cmp	r3, #0
	bne	.L5
	ldr	r3, [r0, #8]
	cmp	r3, #127
	bgt	.L17
.L6:
	ldr	r3, .L21+4
	ldr	r2, [r7, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L18
.L5:
	ldr	r3, [fp, #4]
	mov	r1, r5
	str	r3, [sp]
	mov	r0, r7
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-56]
	bl	helper1
	ldr	r3, .L21+8
	mov	r6, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L1
	ldr	r3, .L21+12
	ldr	r1, [r7, #28]
	ldr	r2, [r3]
	mov	r4, #1
	lsl	r2, r2, #2
	add	r3, r2, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r9, sp, #16
	mov	r0, r9
	bl	memcpy
	cmp	r6, #1
	ble	.L8
	ldr	r8, .L21+16
	add	r10, r7, #24
	str	r9, [fp, #-52]
	b	.L9
.L19:
	mov	r0, r5
	bl	mf_ptr
	mov	r2, r0
	mov	r0, r5
	str	r2, [fp, #-48]
	ldr	r9, [r5, #4]
	bl	mf_avail
	ldr	r1, [r8]
	add	r0, r0, #1
	sub	r1, r1, #1
	sub	r1, r1, r4
	bl	my_min
	ldr	r3, [fp, #4]
	ldr	r2, [fp, #-48]
	add	r1, r4, r3
	str	r0, [sp, #12]
	mov	r3, r6
	str	r4, [sp, #4]
	str	r1, [sp]
	mov	r0, r7
	ldr	r1, [fp, #-52]
	sub	r2, r2, #1
	str	r9, [sp, #8]
	bl	helper2
	add	r4, r4, #1
	cmp	r0, r4
	mov	r6, r0
	ble	.L8
.L9:
	ldr	r0, [r8]
	cmp	r0, r4
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	mov	r1, r10
	mov	r0, r5
	ldr	r2, [r7, #20]
	bl	mf_find
	ldr	r3, [r5, #4]
	str	r0, [r7, #16]
	cmp	r0, r3
	blt	.L19
.L8:
	mov	r3, r4
	mov	r0, r7
	ldr	r2, [fp, #-56]
	ldr	r1, [fp, #-60]
	bl	backward
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	cmp	r3, #0
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	ldr	r3, [r7, #4]
	ldr	r2, [r7, #32]
	ldr	ip, [fp, #-60]
	ldr	r1, [r2, r3, lsl #3]
	add	r0, r2, r3, lsl #3
	sub	r1, r1, r3
	str	r1, [ip]
	ldr	r1, [r0, #4]
	ldr	r0, [fp, #-56]
	str	r1, [r0]
	ldr	r3, [r2, r3, lsl #3]
	str	r3, [r7, #4]
	b	.L1
.L18:
	mov	r0, r7
	bl	fill_align_prices
	b	.L5
.L17:
	bl	fill_dist_prices
	b	.L6
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	ALIGN_SIZE
	.word	UINT32_MAX
	.word	REPS
	.word	OPTS
	.size	lzma_lzma_optimum_normal, .-lzma_lzma_optimum_normal
	.comm	UINT32_MAX,4,4
	.comm	REPS,4,4
	.comm	OPTS,4,4
	.comm	ALIGN_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
