	.file	"extr_XzIn.c_Xzs_ReadBackward.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	Xzs_ReadBackward
	.type	Xzs_ReadBackward, @function
Xzs_ReadBackward:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	rdi, r12
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	edx, DWORD PTR SZ_SEEK_END[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	rsi, 24[rsp]
	lea	r13, 32[rsp]
	mov	QWORD PTR 24[rsp], 0
	call	ILookInStream_Seek@PLT
	mov	rdi, rax
	call	RINOK@PLT
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR 0[rbp], rax
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r13
	call	Xz_Construct@PLT
	mov	ecx, r15d
	mov	rdx, rbp
	mov	rsi, r12
	mov	rdi, r13
	call	Xz_ReadBackward@PLT
	mov	rdi, rax
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 32[rsp], rax
	call	RINOK@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR 8[rbx]
	je	.L2
	mov	rcx, QWORD PTR 16[rbx]
.L3:
	lea	rdx, 1[rax]
	mov	QWORD PTR [rbx], rdx
	mov	rdx, QWORD PTR 32[rsp]
	mov	QWORD PTR [rcx+rax*8], rdx
	mov	rsi, QWORD PTR 0[rbp]
	test	rsi, rsi
	je	.L7
	mov	rdi, r12
	call	LookInStream_SeekTo@PLT
	mov	rdi, rax
	call	RINOK@PLT
	test	r14, r14
	je	.L9
	mov	rsi, QWORD PTR 24[rsp]
	mov	edx, -1
	sub	rsi, QWORD PTR 0[rbp]
	mov	rdi, r14
	call	ICompressProgress_Progress@PLT
	cmp	rax, QWORD PTR SZ_OK[rip]
	je	.L9
	mov	rax, QWORD PTR SZ_ERROR_PROGRESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	test	rax, rax
	lea	rdx, 3[rax]
	mov	edi, r15d
	cmovns	rdx, rax
	sar	rdx, 2
	lea	rdx, 1[rax+rdx]
	lea	rsi, 0[0+rdx*8]
	mov	QWORD PTR 8[rsp], rdx
	call	ISzAlloc_Alloc@PLT
	mov	rdx, QWORD PTR 8[rsp]
	test	rax, rax
	mov	rcx, rax
	je	.L20
	mov	QWORD PTR 8[rbx], rdx
	mov	rdx, QWORD PTR [rbx]
	mov	rsi, QWORD PTR 16[rbx]
	test	rdx, rdx
	jne	.L21
.L6:
	mov	edi, r15d
	mov	QWORD PTR 8[rsp], rcx
	call	ISzAlloc_Free@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 16[rbx], rcx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	sal	edx, 3
	mov	rdi, rax
	mov	QWORD PTR 8[rsp], rax
	call	memcpy@PLT
	mov	rsi, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR 8[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR SZ_OK[rip]
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 56
	.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
.L20:
	.cfi_restore_state
	mov	rax, QWORD PTR SZ_ERROR_MEM[rip]
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Xzs_ReadBackward, .-Xzs_ReadBackward
	.comm	SZ_SEEK_END,4,4
	.comm	SZ_OK,8,8
	.comm	SZ_ERROR_PROGRESS,8,8
	.comm	SZ_ERROR_MEM,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_XzIn.c_Xzs_ReadBackward.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Xzs_ReadBackward
	.syntax unified
	.arm
	.fpu softvfp
	.type	Xzs_ReadBackward, %function
Xzs_ReadBackward:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r2
	ldr	r2, .L23
	sub	sp, sp, #20
	mov	r8, r3
	ldr	r3, .L23+4
	ldr	r2, [r2]
	mov	r7, r1
	mov	r5, r0
	mov	r0, r1
	add	r1, sp, #4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r9, [sp, #56]
	str	ip, [sp, #4]
	bl	ILookInStream_Seek
	bl	RINOK
	ldr	r3, [sp, #4]
	ldr	r10, .L23+8
	str	r3, [r6]
.L9:
	add	r0, sp, #8
	bl	Xz_Construct
	mov	r3, r9
	mov	r2, r6
	mov	r1, r7
	add	r0, sp, #8
	bl	Xz_ReadBackward
	ldr	r3, [r6]
	str	r3, [sp, #8]
	bl	RINOK
	ldr	ip, [r5]
	ldr	r3, [r5, #4]
	cmp	ip, r3
	beq	.L2
	ldr	fp, [r5, #8]
.L3:
	ldr	r3, [sp, #8]
	add	r2, ip, #1
	str	r2, [r5]
	str	r3, [fp, ip, lsl #2]
	ldr	r1, [r6]
	cmp	r1, #0
	beq	.L7
	mov	r0, r7
	bl	LookInStream_SeekTo
	bl	RINOK
	cmp	r8, #0
	beq	.L9
	ldr	r3, [r6]
	ldr	r1, [sp, #4]
	mvn	r2, #0
	sub	r1, r1, r3
	mov	r0, r8
	bl	ICompressProgress_Progress
	ldr	r3, [r10]
	cmp	r0, r3
	beq	.L9
	ldr	r3, .L23+12
	ldr	r0, [r3]
	b	.L1
.L2:
	cmp	ip, #0
	add	r4, ip, #3
	movge	r4, ip
	add	ip, ip, r4, asr #2
	add	r4, ip, #1
	mov	r0, r9
	lsl	r1, r4, #2
	bl	ISzAlloc_Alloc
	subs	fp, r0, #0
	beq	.L20
	ldr	r2, [r5]
	ldr	r1, [r5, #8]
	cmp	r2, #0
	str	r4, [r5, #4]
	bne	.L21
.L6:
	mov	r0, r9
	bl	ISzAlloc_Free
	ldr	ip, [r5]
	str	fp, [r5, #8]
	b	.L3
.L21:
	lsl	r2, r2, #2
	bl	memcpy
	ldr	r1, [r5, #8]
	b	.L6
.L7:
	ldr	r3, .L23+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L23+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r3, .L23+16
	ldr	r0, [r3]
	b	.L1
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	SZ_SEEK_END
	.word	.LC0
	.word	SZ_OK
	.word	SZ_ERROR_PROGRESS
	.word	SZ_ERROR_MEM
	.size	Xzs_ReadBackward, .-Xzs_ReadBackward
	.comm	SZ_SEEK_END,4,4
	.comm	SZ_OK,4,4
	.comm	SZ_ERROR_PROGRESS,4,4
	.comm	SZ_ERROR_MEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
