	.file	"extr_vcd.c_Block.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"cannot get a new block of size: %i"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"cannot read sector %i"
.LC2:
	.string	"seekpoint change"
	.text
	.p2align 4
	.type	Block, @function
Block:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbp, QWORD PTR [rdi]
	mov	r12d, DWORD PTR VCD_BLOCKS_ONCE[rip]
	mov	r15, QWORD PTR 40[rbp]
	movsx	rcx, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 0[rbp]
	mov	rax, QWORD PTR [r15]
	mov	eax, DWORD PTR 8[rax+rcx*4]
	cmp	edx, eax
	jl	.L2
	mov	r14, rsi
	mov	rbx, rcx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 0[rbp]
	mov	DWORD PTR 8[rbp], 0
	mov	QWORD PTR 16[rbp], 0
	lea	ebx, 1[rax]
	mov	rax, QWORD PTR [r15]
	movsx	rcx, ebx
	mov	DWORD PTR 4[rbp], ebx
	mov	eax, DWORD PTR 8[rax+rcx*4]
	cmp	edx, eax
	jl	.L2
.L5:
	mov	edi, DWORD PTR 8[r15]
	add	ebx, 2
	call	USABLE_TITLES@PLT
	cmp	ebx, eax
	jl	.L3
	mov	DWORD PTR [r14], 1
	xor	r14d, r14d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
	lea	ecx, [r12+rdx]
	mov	esi, eax
	mov	edi, DWORD PTR VCD_DATA_SIZE[rip]
	sub	esi, edx
	cmp	ecx, eax
	cmovge	r12d, esi
	imul	edi, r12d
	test	r12d, r12d
	js	.L7
	call	block_Alloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L19
	mov	r9d, DWORD PTR VCD_TYPE[rip]
	mov	ecx, DWORD PTR 8[rax]
	mov	rdi, r13
	mov	ebx, DWORD PTR 0[rbp]
	mov	r15d, DWORD PTR 32[rbp]
	mov	DWORD PTR 12[rsp], r9d
	mov	DWORD PTR 8[rsp], ecx
	call	VLC_OBJECT@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	ecx, DWORD PTR 8[rsp]
	mov	edx, ebx
	mov	edi, eax
	mov	r8d, r12d
	mov	esi, r15d
	call	ioctl_ReadSectors@PLT
	test	rax, rax
	js	.L9
	mov	rdi, QWORD PTR 16[rbp]
	xor	ebx, ebx
	lea	r15, .LC2[rip]
	test	r12d, r12d
	je	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	movsx	rax, DWORD PTR 4[rbp]
	sal	rax, 4
	add	rax, QWORD PTR 24[rbp]
	mov	rdx, QWORD PTR [rax]
	test	rdx, rdx
	jle	.L12
	movsx	rsi, DWORD PTR 8[rbp]
	lea	ecx, 1[rsi]
	movsx	rcx, ecx
	cmp	rdx, rcx
	jle	.L12
	mov	edx, DWORD PTR VCD_DATA_SIZE[rip]
	mov	rax, QWORD PTR 8[rax]
	imul	edx, ebx
	movsx	rdx, edx
	add	rdx, rdi
	cmp	rdx, QWORD PTR 8[rax+rsi*8]
	jge	.L20
	.p2align 4,,10
	.p2align 3
.L12:
	add	ebx, 1
	cmp	r12d, ebx
	jne	.L10
.L11:
	add	rdi, QWORD PTR [r14]
	add	DWORD PTR 0[rbp], r12d
	mov	QWORD PTR 16[rbp], rdi
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, r13
	mov	rsi, r15
	call	msg_Dbg@PLT
	add	DWORD PTR 8[rbp], 1
	mov	rdi, QWORD PTR 16[rbp]
	jmp	.L12
.L19:
	mov	edi, DWORD PTR VCD_DATA_SIZE[rip]
	imul	edi, r12d
.L7:
	mov	edx, edi
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	xor	r14d, r14d
	call	msg_Err@PLT
	jmp	.L1
.L9:
	mov	edx, DWORD PTR 0[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, r13
	call	msg_Err@PLT
	mov	rdi, r14
	xor	r14d, r14d
	call	block_Release@PLT
	movsx	rax, DWORD PTR VCD_DATA_SIZE[rip]
	add	DWORD PTR 0[rbp], 1
	add	QWORD PTR 16[rbp], rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	Block, .-Block
	.comm	VCD_TYPE,4,4
	.comm	VCD_DATA_SIZE,4,4
	.comm	VCD_BLOCKS_ONCE,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_vcd.c_Block.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cannot get a new block of size: %i\000"
	.align	2
.LC1:
	.ascii	"cannot read sector %i\000"
	.align	2
.LC2:
	.ascii	"seekpoint change\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Block, %function
Block:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, [r0]
	mov	r8, r0
	ldr	r10, [r4, #24]
	ldr	r5, [r4, #4]
	ldr	r2, [r10]
	add	r5, r5, #2
	ldr	r0, [r2, r5, lsl #2]
	ldr	r2, [r4]
	ldr	r3, .L20
	cmp	r2, r0
	ldr	r7, [r3]
	sub	sp, sp, #8
	blt	.L2
	mov	r9, r1
	mov	r6, #0
	b	.L5
.L3:
	ldr	r3, [r4, #4]
	ldr	r2, [r10]
	add	r1, r3, #3
	ldr	r0, [r2, r1, lsl #2]
	ldr	r2, [r4]
	add	r5, r3, #1
	cmp	r2, r0
	str	r6, [r4, #8]
	str	r6, [r4, #12]
	str	r5, [r4, #4]
	blt	.L2
	mov	r5, r1
.L5:
	ldr	r0, [r10, #4]
	bl	USABLE_TITLES
	cmp	r5, r0
	blt	.L3
	mov	r3, #1
	mov	r6, #0
	str	r3, [r9]
.L1:
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	add	r3, r7, r2
	ldr	r9, .L20+4
	cmp	r3, r0
	subge	r7, r0, r2
	ldr	r0, [r9]
	cmp	r7, #0
	mul	r0, r7, r0
	blt	.L7
	bl	block_Alloc
	subs	r6, r0, #0
	beq	.L18
	mov	r0, r8
	bl	VLC_OBJECT
	ldr	r2, .L20+8
	ldr	r3, [r6, #4]
	ldr	ip, [r2]
	ldr	r1, [r4, #20]
	ldr	r2, [r4]
	stm	sp, {r7, ip}
	bl	ioctl_ReadSectors
	cmp	r0, #0
	blt	.L9
	cmp	r7, #0
	movne	r5, #0
	ldr	r0, [r4, #12]
	ldrne	r10, .L20+12
	beq	.L11
.L10:
	ldr	r2, [r4, #4]
	ldr	r3, [r4, #16]
	ldr	r1, [r3, r2, lsl #3]
	add	r3, r3, r2, lsl #3
	cmp	r1, #0
	ble	.L12
	ldr	r2, [r4, #8]
	add	r2, r2, #1
	cmp	r1, r2
	ble	.L12
	ldr	r1, [r9]
	ldr	ip, [r3, #4]
	mla	r3, r1, r5, r0
	ldr	r2, [ip, r2, lsl #2]
	cmp	r3, r2
	bge	.L19
.L12:
	add	r5, r5, #1
	cmp	r7, r5
	bne	.L10
.L11:
	ldr	r2, [r6]
	ldr	r3, [r4]
	add	r0, r2, r0
	str	r0, [r4, #12]
	mov	r0, r6
	add	r7, r3, r7
	str	r7, [r4]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	mov	r1, r10
	mov	r0, r8
	bl	msg_Dbg
	ldr	r3, [r4, #8]
	ldr	r0, [r4, #12]
	add	r3, r3, #1
	str	r3, [r4, #8]
	b	.L12
.L18:
	ldr	r0, [r9]
	mul	r0, r7, r0
.L7:
	mov	r6, #0
	mov	r2, r0
	ldr	r1, .L20+16
	mov	r0, r8
	bl	msg_Err
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r2, [r4]
	ldr	r1, .L20+20
	mov	r0, r8
	bl	msg_Err
	mov	r0, r6
	bl	block_Release
	ldr	r1, [r9]
	ldr	r2, [r4, #12]
	ldr	r3, [r4]
	add	r2, r2, r1
	add	r3, r3, #1
	mov	r6, #0
	str	r2, [r4, #12]
	str	r3, [r4]
	b	.L1
.L21:
	.align	2
.L20:
	.word	VCD_BLOCKS_ONCE
	.word	VCD_DATA_SIZE
	.word	VCD_TYPE
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	Block, .-Block
	.comm	VCD_TYPE,4,4
	.comm	VCD_DATA_SIZE,4,4
	.comm	VCD_BLOCKS_ONCE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
