	.file	"extr_rasc.c_decode_kfrm.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Inflate reset error: %d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Inflate failed with return code: %d.\n"
	.text
	.p2align 4
	.type	decode_kfrm, @function
decode_kfrm:
.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	r14, rsi
	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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r15, QWORD PTR 8[rdi]
	mov	DWORD PTR 8[rsp], edx
	lea	r12, 56[r15]
	mov	rdi, r12
	call	bytestream2_tell@PLT
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], eax
	call	bytestream2_peek_le32@PLT
	cmp	eax, 101
	je	.L2
.L6:
	mov	rax, QWORD PTR 48[r15]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR AVERROR_INVALIDDATA[rip]
	cmp	QWORD PTR [rdx], 0
	je	.L1
	lea	rbx, 8[r15]
	mov	rdi, rbx
	call	inflateReset@PLT
	cmp	DWORD PTR Z_OK[rip], eax
	mov	ecx, eax
	jne	.L21
	mov	rdi, r12
	mov	r14, QWORD PTR [r14]
	xor	r13d, r13d
	call	bytestream2_tell@PLT
	mov	rdi, r12
	mov	eax, eax
	add	r14, rax
	mov	QWORD PTR 32[r15], r14
	call	bytestream2_get_bytes_left@PLT
	mov	ecx, DWORD PTR 0[rbp]
	mov	DWORD PTR 24[r15], eax
	mov	rax, QWORD PTR 48[r15]
	mov	rsi, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rax]
	lea	eax, -1[rcx]
	imul	eax, DWORD PTR [rsi]
	mov	rdx, QWORD PTR [rdx]
	cdqe
	lea	r14, [rdx+rax*4]
	test	ecx, ecx
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR 40[r15]
	mov	esi, DWORD PTR Z_SYNC_FLUSH[rip]
	mov	QWORD PTR 16[r15], r14
	mov	rdi, rbx
	mov	DWORD PTR 8[r15], eax
	call	inflate@PLT
	cmp	DWORD PTR Z_OK[rip], eax
	je	.L9
	cmp	DWORD PTR Z_STREAM_END[rip], eax
	jne	.L19
.L9:
	mov	rax, QWORD PTR 48[r15]
	add	r13d, 1
	mov	rax, QWORD PTR [rax]
	movsx	rax, DWORD PTR [rax]
	sal	rax, 2
	sub	r14, rax
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, r13d
	jg	.L8
	mov	rdx, QWORD PTR [r15]
	mov	rsi, QWORD PTR [rdx]
	mov	rcx, QWORD PTR 8[rdx]
	lea	edx, -1[rax]
	imul	edx, DWORD PTR [rsi]
	mov	rcx, QWORD PTR [rcx]
	movsx	rdx, edx
	lea	r14, [rcx+rdx*4]
	test	eax, eax
	jle	.L10
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR 40[r15]
	mov	esi, DWORD PTR Z_SYNC_FLUSH[rip]
	mov	QWORD PTR 16[r15], r14
	mov	rdi, rbx
	mov	DWORD PTR 8[r15], eax
	call	inflate@PLT
	cmp	DWORD PTR Z_OK[rip], eax
	je	.L11
	cmp	DWORD PTR Z_STREAM_END[rip], eax
	jne	.L19
.L11:
	mov	rax, QWORD PTR [r15]
	add	r13d, 1
	mov	rax, QWORD PTR [rax]
	movsx	rax, DWORD PTR [rax]
	sal	rax, 2
	sub	r14, rax
	cmp	DWORD PTR 0[rbp], r13d
	jg	.L12
.L10:
	mov	rdi, r12
	call	bytestream2_tell@PLT
	mov	esi, DWORD PTR 12[rsp]
	add	esi, DWORD PTR 8[rsp]
	mov	rdi, r12
	sub	esi, eax
	call	bytestream2_skip@PLT
	xor	eax, eax
.L1:
	add	rsp, 24
	.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
.L21:
	.cfi_restore_state
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	mov	rdi, rbp
	lea	rdx, .LC0[rip]
	call	av_log@PLT
	mov	eax, DWORD PTR AVERROR_EXTERNAL[rip]
	add	rsp, 24
	.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
.L19:
	.cfi_restore_state
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	mov	rdi, rbp
	mov	ecx, eax
	lea	rdx, .LC1[rip]
	call	av_log@PLT
	mov	eax, DWORD PTR AVERROR_INVALIDDATA[rip]
	add	rsp, 24
	.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
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR 8[rsp]
	mov	rsi, r14
	mov	rdi, rbp
	call	decode_fint@PLT
	test	eax, eax
	jns	.L6
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	decode_kfrm, .-decode_kfrm
	.comm	Z_SYNC_FLUSH,4,4
	.comm	Z_STREAM_END,4,4
	.comm	Z_OK,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AVERROR_INVALIDDATA,4,4
	.comm	AVERROR_EXTERNAL,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_rasc.c_decode_kfrm.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Inflate reset error: %d\012\000"
	.align	2
.LC1:
	.ascii	"Inflate failed with return code: %d.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	decode_kfrm, %function
decode_kfrm:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r4, [r0, #4]
	sub	sp, sp, #12
	add	r9, r4, #28
	mov	r6, r0
	mov	r0, r9
	mov	r5, r1
	str	r2, [sp]
	bl	bytestream2_tell
	mov	r1, r0
	mov	r0, r9
	str	r1, [sp, #4]
	bl	bytestream2_peek_le32
	cmp	r0, #101
	beq	.L2
.L6:
	ldr	r3, [r4, #24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L19
	add	r7, r4, #4
	mov	r0, r7
	bl	inflateReset
	ldr	r8, .L22
	ldr	r2, [r8]
	cmp	r2, r0
	bne	.L21
	mov	r0, r9
	ldr	r5, [r5]
	bl	bytestream2_tell
	add	r5, r5, r0
	str	r5, [r4, #16]
	mov	r0, r9
	bl	bytestream2_get_bytes_left
	ldr	ip, [r4, #24]
	ldr	r1, [r6]
	ldr	r2, [ip]
	str	r0, [r4, #12]
	ldr	r2, [r2]
	sub	r5, r1, #1
	mul	r2, r5, r2
	ldr	r0, [ip, #4]
	cmp	r1, #0
	ldr	r5, [r0]
	movgt	r10, #0
	ldrgt	fp, .L22+4
	add	r5, r5, r2, lsl #2
	ble	.L10
.L8:
	ldr	r3, [r4, #20]
	mov	r0, r7
	stmib	r4, {r3, r5}
	ldr	r3, .L22+8
	add	r10, r10, #1
	ldr	r1, [r3]
	bl	inflate
	ldr	r3, [r8]
	cmp	r3, r0
	beq	.L9
	ldr	r3, [fp]
	cmp	r3, r0
	bne	.L18
.L9:
	ldr	r3, [r4, #24]
	ldr	r1, [r6]
	ldr	r3, [r3]
	cmp	r1, r10
	ldr	r3, [r3]
	sub	r5, r5, r3, lsl #2
	bgt	.L8
	ldr	r0, [r4]
	sub	r2, r1, #1
	ldr	lr, [r0]
	ldr	ip, [r0, #4]
	ldr	r0, [lr]
	ldr	fp, [ip]
	mul	r2, r0, r2
	cmp	r1, #0
	add	fp, fp, r2, lsl #2
	ble	.L10
	mov	r10, #0
	ldr	r5, .L22+4
.L12:
	ldr	r3, [r4, #20]
	mov	r0, r7
	stmib	r4, {r3, fp}
	ldr	r3, .L22+8
	add	r10, r10, #1
	ldr	r1, [r3]
	bl	inflate
	ldr	r3, [r8]
	cmp	r3, r0
	beq	.L11
	ldr	r3, [r5]
	cmp	r3, r0
	bne	.L18
.L11:
	ldr	r3, [r4]
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r10
	ldr	r3, [r3]
	sub	fp, fp, r3, lsl #2
	bgt	.L12
.L10:
	mov	r0, r9
	bl	bytestream2_tell
	ldm	sp, {r2, r3}
	add	r1, r3, r2
	sub	r1, r1, r0
	mov	r0, r9
	bl	bytestream2_skip
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	ldr	r2, .L22+12
	mov	r3, r0
	ldr	r1, [r2]
	mov	r0, r6
	ldr	r2, .L22+16
	bl	av_log
	ldr	r3, .L22+20
	ldr	r0, [r3]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r2, .L22+12
	mov	r3, r0
	ldr	r1, [r2]
	mov	r0, r6
	ldr	r2, .L22+24
	bl	av_log
.L19:
	ldr	r3, .L22+28
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r1, r5
	mov	r0, r6
	ldr	r2, [sp]
	bl	decode_fint
	cmp	r0, #0
	bge	.L6
	b	.L1
.L23:
	.align	2
.L22:
	.word	Z_OK
	.word	Z_STREAM_END
	.word	Z_SYNC_FLUSH
	.word	AV_LOG_ERROR
	.word	.LC0
	.word	AVERROR_EXTERNAL
	.word	.LC1
	.word	AVERROR_INVALIDDATA
	.size	decode_kfrm, .-decode_kfrm
	.comm	Z_SYNC_FLUSH,4,4
	.comm	Z_STREAM_END,4,4
	.comm	Z_OK,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AVERROR_INVALIDDATA,4,4
	.comm	AVERROR_EXTERNAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
