	.file	"extr_cave_parse.c_get_decoded_buffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	get_decoded_buffer
	.type	get_decoded_buffer, @function
get_decoded_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR MAX_DECODED_CHUNK_Z[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR MAX_DECODED_CHUNK_X[rip]
	and	edx, esi
	sub	eax, 1
	movsx	rdx, edx
	and	eax, edi
	cdqe
	lea	rcx, [rax+rax*2]
	mov	rax, QWORD PTR decoded_buffers[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	lea	r12, [rax+rcx*8]
	mov	eax, DWORD PTR [r12]
	test	eax, eax
	je	.L2
	cmp	DWORD PTR 4[r12], edi
	je	.L10
	mov	rax, QWORD PTR 16[r12]
	test	rax, rax
	je	.L2
.L11:
	mov	rdi, QWORD PTR [rax]
	mov	DWORD PTR 12[rsp], esi
	call	free@PLT
	mov	rdi, QWORD PTR 16[r12]
	call	free@PLT
	mov	esi, DWORD PTR 12[rsp]
.L2:
	mov	DWORD PTR 4[r12], ebp
	mov	edi, ebp
	mov	DWORD PTR 8[r12], esi
	mov	DWORD PTR [r12], 1
	mov	QWORD PTR 16[r12], 0
	call	get_decoded_fastchunk_uncached@PLT
	mov	QWORD PTR 16[r12], rax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	cmp	DWORD PTR 8[r12], esi
	je	.L1
	mov	rax, QWORD PTR 16[r12]
	test	rax, rax
	jne	.L11
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	get_decoded_buffer, .-get_decoded_buffer
	.comm	decoded_buffers,8,8
	.comm	MAX_DECODED_CHUNK_Z,4,4
	.comm	MAX_DECODED_CHUNK_X,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_cave_parse.c_get_decoded_buffer.c"
	.text
	.align	2
	.global	get_decoded_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_decoded_buffer, %function
get_decoded_buffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	ldr	r3, .L15
	ldr	r2, .L15+4
	ldr	r3, [r3]
	ldr	r1, .L15+8
	ldr	r2, [r2]
	ldr	r4, [r1]
	sub	r3, r3, #1
	and	r3, r3, r7
	ldr	r8, [r2, r3, lsl #2]
	sub	r4, r4, #1
	and	r4, r4, r0
	ldr	r3, [r8, r4, lsl #4]
	mov	r6, r0
	cmp	r3, #0
	add	r5, r8, r4, lsl #4
	beq	.L2
	ldr	r3, [r5, #4]
	cmp	r3, r0
	beq	.L13
	ldr	r3, [r5, #12]
	cmp	r3, #0
	beq	.L2
.L14:
	ldr	r0, [r3]
	bl	free
	ldr	r0, [r5, #12]
	bl	free
.L2:
	mov	r2, #1
	mov	r3, #0
	stmib	r5, {r6, r7}
	mov	r1, r7
	str	r2, [r8, r4, lsl #4]
	mov	r0, r6
	str	r3, [r5, #12]
	bl	get_decoded_fastchunk_uncached
	str	r0, [r5, #12]
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r3, [r5, #8]
	cmp	r3, r7
	beq	.L1
	ldr	r3, [r5, #12]
	cmp	r3, #0
	bne	.L14
	b	.L2
.L16:
	.align	2
.L15:
	.word	MAX_DECODED_CHUNK_Z
	.word	decoded_buffers
	.word	MAX_DECODED_CHUNK_X
	.size	get_decoded_buffer, .-get_decoded_buffer
	.comm	decoded_buffers,4,4
	.comm	MAX_DECODED_CHUNK_Z,4,4
	.comm	MAX_DECODED_CHUNK_X,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
