	.file	"extr_ff.c_f_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	f_read
	.type	f_read, @function
f_read:
.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, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	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
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR [rcx], 0
	call	validate@PLT
	cmp	QWORD PTR FR_OK[rip], rax
	je	.L2
	mov	rdi, QWORD PTR 48[r14]
	mov	rsi, rax
	call	LEAVE_FF@PLT
.L2:
	mov	rsi, QWORD PTR 72[r14]
	mov	rdi, QWORD PTR 48[r14]
	test	rsi, rsi
	jne	.L42
.L3:
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR FA_READ[rip], eax
	je	.L43
.L4:
	mov	rbx, QWORD PTR 16[r14]
	mov	rdx, QWORD PTR 8[r14]
	sub	rdx, rbx
	cmp	rdx, rbp
	cmovle	rbp, rdx
	test	rbp, rbp
	jne	.L24
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L44:
	mov	rdi, QWORD PTR 48[r14]
.L7:
	call	SS@PLT
	mov	rdi, QWORD PTR 48[r14]
	mov	r15, QWORD PTR 16[r14]
	mov	rbx, rax
	call	SS@PLT
	xor	edx, edx
	mov	rdi, QWORD PTR 48[r14]
	mov	r9, rax
	mov	rax, r15
	mov	r15, QWORD PTR 40[r14]
	div	r9
	mov	rax, QWORD PTR 16[r14]
	mov	QWORD PTR 8[rsp], rax
	sub	rbx, rdx
	cmp	rbx, rbp
	cmovg	rbx, rbp
	call	SS@PLT
	xor	edx, edx
	mov	rdi, r12
	mov	r9, rax
	mov	rax, QWORD PTR 8[rsp]
	div	r9
	lea	rsi, [r15+rdx*8]
	mov	rdx, rbx
	call	mem_cpy@PLT
	mov	rax, rbx
.L19:
	add	QWORD PTR 16[r14], rbx
	mov	rdi, QWORD PTR 48[r14]
	lea	r12, [r12+rax*8]
	add	QWORD PTR 0[r13], rbx
	sub	rbp, rbx
	je	.L5
	mov	rbx, QWORD PTR 16[r14]
.L24:
	call	SS@PLT
	xor	edx, edx
	mov	r9, rax
	mov	rax, rbx
	div	r9
	test	rdx, rdx
	jne	.L44
	mov	rdi, QWORD PTR 48[r14]
	mov	r15, QWORD PTR 16[r14]
	call	SS@PLT
	mov	rdi, QWORD PTR 48[r14]
	xor	edx, edx
	mov	r9, rax
	mov	eax, DWORD PTR [rdi]
	lea	ebx, -1[rax]
	mov	rax, r15
	div	r9
	movsx	rbx, ebx
	and	rbx, rax
	je	.L8
	mov	r15, QWORD PTR 56[r14]
	mov	rsi, r15
	call	clust2sect@PLT
	mov	r15, rax
	test	rax, rax
	je	.L45
.L14:
	mov	rdi, QWORD PTR 48[r14]
	add	r15, rbx
	call	SS@PLT
	xor	edx, edx
	mov	r9, rax
	mov	rax, rbp
	div	r9
	mov	r9, rax
	mov	r10, rax
	test	rax, rax
	jne	.L46
	mov	rdx, QWORD PTR 32[r14]
	mov	rdi, QWORD PTR 48[r14]
	cmp	rdx, r15
	je	.L20
	mov	rsi, QWORD PTR 40[r14]
	mov	edi, DWORD PTR 24[rdi]
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR FA__DIRTY[rip], eax
	jne	.L47
.L21:
	mov	ecx, 1
	mov	rdx, r15
	call	disk_read@PLT
	cmp	rax, QWORD PTR RES_OK[rip]
	mov	rdi, QWORD PTR 48[r14]
	je	.L20
	mov	esi, DWORD PTR FR_DISK_ERR[rip]
	call	ABORT@PLT
	mov	rdi, QWORD PTR 48[r14]
.L20:
	mov	QWORD PTR 32[r14], r15
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	cmp	QWORD PTR 16[r14], 0
	jne	.L10
	mov	r15, QWORD PTR 24[r14]
	cmp	r15, 1
	jle	.L48
.L12:
	mov	eax, 4294967295
	cmp	r15, rax
	je	.L49
.L13:
	mov	QWORD PTR 56[r14], r15
	mov	rsi, r15
	call	clust2sect@PLT
	mov	r15, rax
	test	rax, rax
	jne	.L14
.L45:
	mov	rdi, QWORD PTR 48[r14]
	mov	esi, DWORD PTR FR_INT_ERR[rip]
	call	ABORT@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L46:
	mov	rax, QWORD PTR 48[r14]
	lea	rcx, [rbx+r9]
	movsx	rdx, DWORD PTR [rax]
	cmp	rcx, rdx
	jle	.L16
	sub	rdx, rbx
	mov	r10, rdx
	mov	r9, rdx
.L16:
	mov	edi, DWORD PTR 24[rax]
	mov	ecx, r10d
	mov	rdx, r15
	mov	rsi, r12
	mov	QWORD PTR 16[rsp], r9
	mov	QWORD PTR 8[rsp], r10
	call	disk_read@PLT
	mov	r10, QWORD PTR 8[rsp]
	mov	r9, QWORD PTR 16[rsp]
	cmp	rax, QWORD PTR RES_OK[rip]
	je	.L17
	mov	rdi, QWORD PTR 48[r14]
	mov	esi, DWORD PTR FR_DISK_ERR[rip]
	mov	QWORD PTR 16[rsp], r10
	mov	QWORD PTR 8[rsp], r9
	call	ABORT@PLT
	mov	r10, QWORD PTR 16[rsp]
	mov	r9, QWORD PTR 8[rsp]
.L17:
	mov	rdi, QWORD PTR 48[r14]
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR FA__DIRTY[rip], eax
	je	.L18
	mov	rax, QWORD PTR 32[r14]
	sub	rax, r15
	cmp	rax, r10
	jl	.L50
.L18:
	mov	QWORD PTR 8[rsp], r9
	call	SS@PLT
	mov	r9, QWORD PTR 8[rsp]
	imul	rax, r9
	mov	rbx, rax
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, QWORD PTR FR_OK[rip]
	call	LEAVE_FF@PLT
	add	rsp, 40
	.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
.L10:
	.cfi_restore_state
	mov	rsi, QWORD PTR 56[r14]
	call	get_fat@PLT
	mov	rdi, QWORD PTR 48[r14]
	mov	r15, rax
	cmp	r15, 1
	jg	.L12
.L48:
	mov	esi, DWORD PTR FR_INT_ERR[rip]
	call	ABORT@PLT
	mov	rdi, QWORD PTR 48[r14]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L47:
	mov	ecx, 1
	call	disk_write@PLT
	cmp	rax, QWORD PTR RES_OK[rip]
	jne	.L51
.L22:
	mov	eax, DWORD PTR FA__DIRTY[rip]
	mov	rsi, QWORD PTR 40[r14]
	not	eax
	and	DWORD PTR [r14], eax
	mov	rax, QWORD PTR 48[r14]
	mov	edi, DWORD PTR 24[rax]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	mov	rdi, QWORD PTR 48[r14]
	mov	esi, DWORD PTR FR_DISK_ERR[rip]
	call	ABORT@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L50:
	mov	QWORD PTR 24[rsp], r9
	call	SS@PLT
	mov	rsi, QWORD PTR 40[r14]
	mov	rbx, QWORD PTR 32[r14]
	mov	rdi, QWORD PTR 48[r14]
	mov	QWORD PTR 16[rsp], rax
	mov	QWORD PTR 8[rsp], rsi
	sub	rbx, r15
	call	SS@PLT
	mov	rdx, QWORD PTR 16[rsp]
	mov	rsi, QWORD PTR 8[rsp]
	imul	rbx, rax
	lea	rdi, [r12+rbx*8]
	call	mem_cpy@PLT
	mov	rdi, QWORD PTR 48[r14]
	mov	r9, QWORD PTR 24[rsp]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L49:
	mov	esi, DWORD PTR FR_DISK_ERR[rip]
	call	ABORT@PLT
	mov	rdi, QWORD PTR 48[r14]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L43:
	mov	rsi, QWORD PTR FR_DENIED[rip]
	call	LEAVE_FF@PLT
	mov	rdi, QWORD PTR 48[r14]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L42:
	call	LEAVE_FF@PLT
	mov	rdi, QWORD PTR 48[r14]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	f_read, .-f_read
	.comm	RES_OK,8,8
	.comm	FR_OK,8,8
	.comm	FR_INT_ERR,4,4
	.comm	FR_DISK_ERR,4,4
	.comm	FR_DENIED,8,8
	.comm	FA__DIRTY,4,4
	.comm	FA_READ,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_ff.c_f_read.c"
	.text
	.global	__aeabi_uidivmod
	.global	__aeabi_uidiv
	.align	2
	.global	f_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	f_read, %function
f_read:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	str	ip, [r3]
	sub	sp, sp, #12
	mov	r10, r3
	mov	r8, r1
	mov	r5, r2
	mov	r4, r0
	bl	validate
	ldr	r3, .L53
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L2
	mov	r1, r0
	ldr	r0, [r4, #24]
	bl	LEAVE_FF
.L2:
	ldr	r1, [r4, #36]
	ldr	r0, [r4, #24]
	cmp	r1, #0
	bne	.L44
.L3:
	ldr	r3, .L53+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L45
.L4:
	ldmib	r4, {r2, r6}
	sub	r2, r2, r6
	cmp	r2, r5
	movlt	r5, r2
	cmp	r5, #0
	beq	.L5
	ldr	fp, .L53+8
	b	.L24
.L49:
	ldr	r6, [r4, #28]
.L9:
	mov	r1, r6
	mov	r0, r9
	bl	clust2sect
	subs	r6, r0, #0
	beq	.L46
.L14:
	ldr	r0, [r4, #24]
	bl	SS
	mov	r1, r0
	mov	r0, r5
	bl	__aeabi_uidiv
	cmp	r0, #0
	mov	r9, r0
	mov	r3, r0
	add	r6, r7, r6
	bne	.L47
	ldr	r2, [r4, #16]
	ldr	r0, [r4, #24]
	cmp	r2, r6
	beq	.L20
	ldr	r1, [r4]
	ldr	r3, [fp]
	ldr	r0, [r0, #12]
	tst	r1, r3
	ldr	r1, [r4, #20]
	bne	.L48
.L21:
	mov	r3, #1
	mov	r2, r6
	bl	disk_read
	ldr	r3, .L53+12
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L42
	ldr	r3, .L53+16
	ldr	r0, [r4, #24]
	ldr	r1, [r3]
	bl	ABORT
.L42:
	ldr	r0, [r4, #24]
.L20:
	str	r6, [r4, #16]
.L7:
	bl	SS
	mov	r6, r0
	ldr	r0, [r4, #24]
	ldr	r7, [r4, #8]
	bl	SS
	mov	r1, r0
	mov	r0, r7
	bl	__aeabi_uidivmod
	sub	r6, r6, r1
	cmp	r6, r5
	ldr	r0, [r4, #24]
	movge	r6, r5
	ldr	r9, [r4, #8]
	ldr	r7, [r4, #20]
	bl	SS
	mov	r1, r0
	mov	r0, r9
	bl	__aeabi_uidivmod
	mov	r2, r6
	mov	r0, r8
	add	r1, r7, r1, lsl #2
	bl	mem_cpy
	mov	r9, r6
.L19:
	ldr	r3, [r4, #8]
	subs	r5, r5, r6
	add	r3, r3, r6
	str	r3, [r4, #8]
	ldr	r2, [r10]
	ldr	r0, [r4, #24]
	add	r2, r2, r6
	add	r8, r8, r9, lsl #2
	str	r2, [r10]
	beq	.L5
	ldr	r6, [r4, #8]
.L24:
	bl	SS
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_uidivmod
	cmp	r1, #0
	ldr	r0, [r4, #24]
	bne	.L7
	ldr	r7, [r4, #8]
	bl	SS
	mov	r1, r0
	mov	r0, r7
	bl	__aeabi_uidiv
	ldr	r9, [r4, #24]
	ldr	r6, [r9]
	sub	r6, r6, #1
	ands	r7, r6, r0
	bne	.L49
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L10
	ldr	r6, [r4, #12]
	cmp	r6, #1
	ble	.L50
.L12:
	str	r6, [r4, #28]
	b	.L9
.L46:
	ldr	r3, .L53+20
	ldr	r0, [r4, #24]
	ldr	r1, [r3]
	bl	ABORT
	b	.L14
.L47:
	ldr	r1, [r4, #24]
	add	r2, r7, r0
	ldr	r0, [r1]
	cmp	r2, r0
	subgt	r3, r0, r7
	mov	r2, r6
	ldr	r0, [r1, #12]
	mov	r1, r8
	movgt	r9, r3
	str	r3, [sp, #4]
	bl	disk_read
	ldr	r3, .L53+12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	cmp	r0, r2
	beq	.L17
	ldr	r3, .L53+16
	ldr	r0, [r4, #24]
	ldr	r1, [r3]
	bl	ABORT
	ldr	r3, [sp, #4]
.L17:
	ldr	r1, [r4]
	ldr	r2, [fp]
	ldr	r0, [r4, #24]
	tst	r1, r2
	beq	.L18
	ldr	r2, [r4, #16]
	sub	r6, r2, r6
	cmp	r6, r3
	blt	.L51
.L18:
	bl	SS
	mul	r9, r0, r9
	mov	r6, r9
	b	.L19
.L5:
	ldr	r3, .L53
	ldr	r1, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	LEAVE_FF
.L10:
	mov	r0, r9
	ldr	r1, [r4, #28]
	bl	get_fat
	mov	r6, r0
	cmp	r6, #1
	ldr	r9, [r4, #24]
	bgt	.L12
.L50:
	ldr	r3, .L53+20
	mov	r0, r9
	ldr	r1, [r3]
	bl	ABORT
	cmn	r6, #1
	bne	.L41
	ldr	r3, .L53+16
	ldr	r0, [r4, #24]
	ldr	r1, [r3]
	bl	ABORT
.L41:
	ldr	r9, [r4, #24]
	b	.L12
.L48:
	mov	r3, #1
	bl	disk_write
	ldr	r3, .L53+12
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L52
.L22:
	ldr	r1, [fp]
	ldr	r3, [r4]
	ldr	r2, [r4, #24]
	bic	r3, r3, r1
	ldr	r0, [r2, #12]
	ldr	r1, [r4, #20]
	str	r3, [r4]
	b	.L21
.L52:
	ldr	r3, .L53+16
	ldr	r0, [r4, #24]
	ldr	r1, [r3]
	bl	ABORT
	b	.L22
.L51:
	bl	SS
	mul	r6, r0, r6
	ldr	r0, [r4, #24]
	ldr	r7, [r4, #20]
	bl	SS
	add	r6, r8, r6, lsl #2
	mov	r2, r0
	mov	r1, r7
	mov	r0, r6
	bl	mem_cpy
	ldr	r0, [r4, #24]
	bl	SS
	mul	r9, r0, r9
	mov	r6, r9
	b	.L19
.L45:
	ldr	r3, .L53+24
	ldr	r1, [r3]
	bl	LEAVE_FF
	ldr	r0, [r4, #24]
	b	.L4
.L44:
	bl	LEAVE_FF
	ldr	r0, [r4, #24]
	b	.L3
.L54:
	.align	2
.L53:
	.word	FR_OK
	.word	FA_READ
	.word	FA__DIRTY
	.word	RES_OK
	.word	FR_DISK_ERR
	.word	FR_INT_ERR
	.word	FR_DENIED
	.size	f_read, .-f_read
	.comm	RES_OK,4,4
	.comm	FR_OK,4,4
	.comm	FR_INT_ERR,4,4
	.comm	FR_DISK_ERR,4,4
	.comm	FR_DENIED,4,4
	.comm	FA__DIRTY,4,4
	.comm	FA_READ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
