	.file	"extr_file_allocation_table.c__FAT_fat_clearLinks.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	_FAT_fat_clearLinks
	.type	_FAT_fat_clearLinks, @function
_FAT_fat_clearLinks:
.LFB0:
	.cfi_startproc
	endbr64
	xor	eax, eax
	cmp	DWORD PTR CLUSTER_FIRST[rip], esi
	jg	.L12
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	cmp	DWORD PTR 16[rdi], esi
	jl	.L1
	cmp	DWORD PTR 12[rdi], esi
	jle	.L3
	mov	DWORD PTR 12[rdi], esi
.L3:
	cmp	ebp, DWORD PTR CLUSTER_EOF[rip]
	jne	.L4
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	cmp	DWORD PTR CLUSTER_ERROR[rip], ebp
	je	.L6
	mov	esi, ebp
	mov	rdi, rbx
	call	_FAT_fat_nextCluster@PLT
	mov	edx, DWORD PTR CLUSTER_FREE[rip]
	mov	esi, ebp
	mov	rdi, rbx
	mov	r12d, eax
	call	_FAT_fat_writeFatEntry@PLT
	mov	eax, DWORD PTR [rbx]
	mov	ecx, DWORD PTR 8[rbx]
	cdq
	idiv	DWORD PTR 4[rbx]
	cmp	ecx, eax
	jge	.L5
	add	ecx, 1
	mov	DWORD PTR 8[rbx], ecx
.L5:
	cmp	DWORD PTR CLUSTER_EOF[rip], r12d
	je	.L6
	mov	ebp, r12d
.L4:
	cmp	DWORD PTR CLUSTER_FREE[rip], ebp
	jne	.L16
.L6:
	mov	eax, 1
.L1:
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE0:
	.size	_FAT_fat_clearLinks, .-_FAT_fat_clearLinks
	.comm	CLUSTER_FREE,4,4
	.comm	CLUSTER_FIRST,4,4
	.comm	CLUSTER_ERROR,4,4
	.comm	CLUSTER_EOF,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_file_allocation_table.c__FAT_fat_clearLinks.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.global	_FAT_fat_clearLinks
	.syntax unified
	.arm
	.fpu softvfp
	.type	_FAT_fat_clearLinks, %function
_FAT_fat_clearLinks:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, r1
	bgt	.L8
	ldr	r3, [r0, #16]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, r1
	mov	r5, r1
	mov	r4, r0
	blt	.L9
	ldr	r3, [r0, #12]
	ldr	r7, .L17+4
	cmp	r3, r1
	ldr	r3, [r7]
	strgt	r1, [r0, #12]
	cmp	r1, r3
	beq	.L6
	ldr	r6, .L17+8
	ldr	r8, .L17+12
	b	.L4
.L16:
	ldr	r3, [r8]
	cmp	r3, r5
	beq	.L6
	mov	r1, r5
	mov	r0, r4
	bl	_FAT_fat_nextCluster
	mov	r3, r0
	mov	r1, r5
	ldr	r2, [r6]
	mov	r0, r4
	mov	r5, r3
	bl	_FAT_fat_writeFatEntry
	ldm	r4, {r0, r1}
	bl	__aeabi_idiv
	ldr	r3, [r4, #8]
	ldr	r2, [r7]
	cmp	r3, r0
	addlt	r3, r3, #1
	strlt	r3, [r4, #8]
	cmp	r2, r5
	beq	.L6
.L4:
	ldr	r3, [r6]
	cmp	r3, r5
	bne	.L16
.L6:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r0, #0
	bx	lr
.L18:
	.align	2
.L17:
	.word	CLUSTER_FIRST
	.word	CLUSTER_EOF
	.word	CLUSTER_FREE
	.word	CLUSTER_ERROR
	.size	_FAT_fat_clearLinks, .-_FAT_fat_clearLinks
	.comm	CLUSTER_FREE,4,4
	.comm	CLUSTER_FIRST,4,4
	.comm	CLUSTER_ERROR,4,4
	.comm	CLUSTER_EOF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
