	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_freeclusterchain               ## -- Begin function freeclusterchain
	.p2align	4, 0x90
_freeclusterchain:                      ## @freeclusterchain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -48(%rbp)
	movq	_CLUST_FIRST@GOTPCREL(%rip), %r12
	xorl	%eax, %eax
	cmpq	%rsi, (%r12)
	jg	LBB0_24
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	$-1, %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	(%r12), %r15
	jl	LBB0_21
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r13), %r15
	jg	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_FATOFS
	movq	%r13, %rdi
	movq	%rax, %rsi
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	leaq	-56(%rbp), %r8
	callq	_fatblock
	movq	-64(%rbp), %rsi
	cmpq	%rsi, %r14
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_updatefats
	movq	-64(%rbp), %rsi
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r13), %edi
	movq	-72(%rbp), %rdx
	movq	_NOCRED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %r8
	callq	_bread
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %r14
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_usemap_free
	movl	8(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %eax
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$130, %eax
	jne	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rbx
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rdi
	addq	(%rax), %rdi
	callq	_getushort
	movq	%rax, %r12
	testb	$1, %r15b
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %esi
	andl	$61440, %esi                    ## imm = 0xF000
	movq	_MSDOSFSFREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$4095, %ecx                     ## imm = 0xFFF
	andl	%ecx, %eax
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rdi
	addq	(%rax), %rdi
	callq	_getulong
	movq	%rax, %r15
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rdi
	addq	(%rax), %rdi
	movq	_MSDOSFSFREE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$128, %eax
	andl	%eax, %esi
	movl	%r15d, %eax
	andl	$-129, %eax
	orl	%eax, %esi
	callq	_putulong
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rdi
	addq	(%rax), %rdi
	callq	_getushort
	movq	%rax, %r15
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rdi
	addq	(%rax), %rdi
	movq	_MSDOSFSFREE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_putushort
	jmp	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rcx
	sarq	$4, %rcx
	andl	$15, %r12d
	movq	_MSDOSFSFREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$4, %eax
	movq	%r12, %rsi
	movq	%rcx, %r12
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rcx
	movq	-56(%rbp), %rdi
	addq	(%rcx), %rdi
	orl	%eax, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_putushort
	movq	%r12, %r15
	movq	%rbx, %r12
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	8(%r13), %rax
	andq	%rax, %r15
	movq	%rax, %rcx
	notq	%rcx
	orq	%r15, %rcx
	movq	_CLUST_RSRVD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	jmp	LBB0_20
LBB0_21:
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.22:
	movq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_updatefats
LBB0_23:
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_7:
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_brelse
	movl	%ebx, %eax
LBB0_24:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLUST_FIRST,8,3                ## @CLUST_FIRST
	.comm	_NOCRED,4,2                     ## @NOCRED
	.comm	_MSDOSFSFREE,4,2                ## @MSDOSFSFREE
	.comm	_CLUST_RSRVD,8,3                ## @CLUST_RSRVD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_freeclusterchain               ; -- Begin function freeclusterchain
	.p2align	2
_freeclusterchain:                      ; @freeclusterchain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	str	xzr, [sp, #24]
Lloh0:
	adrp	x22, _CLUST_FIRST@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CLUST_FIRST@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, x1
	b.gt	LBB0_20
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	mov	x20, #-1
Lloh2:
	adrp	x23, _MSDOSFSFREE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MSDOSFSFREE@GOTPAGEOFF]
Lloh4:
	adrp	x24, _CLUST_RSRVD@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CLUST_RSRVD@GOTPAGEOFF]
Lloh6:
	adrp	x25, _NOCRED@GOTPAGE
Lloh7:
	ldr	x25, [x25, _NOCRED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	add	x0, x9, x8
	bl	_getulong
	mov	x21, x0
	ldr	x8, [sp, #24]
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	add	x0, x9, x8
	ldr	w8, [x23]
	lsr	w8, w8, #7
	mov	x1, x21
	bfi	w1, w8, #7, #1
	bl	_putulong
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x19, #8]
	and	x9, x21, x8
	mvn	w10, w8
	sxtw	x10, w10
	orr	x10, x9, x10
	ldr	x11, [x24]
	cmp	x10, x11
	csel	x21, x9, x8, lt
	ldr	x8, [x22]
	cmp	x21, x8
	b.lt	LBB0_18
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	cmp	x21, x8
	b.gt	LBB0_18
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_FATOFS
	mov	x1, x0
	add	x2, sp, #16
	mov	x3, sp
	add	x4, sp, #8
	mov	x0, x19
	bl	_fatblock
	ldr	x1, [sp, #16]
	cmp	x20, x1
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x8
	mov	x2, x20
	bl	_updatefats
	ldr	x1, [sp, #16]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #12]
	ldr	x2, [sp]
	ldr	w3, [x25]
	add	x4, sp, #24
	bl	_bread
	cbnz	w0, LBB0_22
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x20, [sp, #16]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_usemap_free
	ldr	w8, [x19, #8]
	cmp	w8, #128
	b.eq	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #129
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #130
	b.ne	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	add	x0, x9, x8
	bl	_getushort
	tbnz	w21, #0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	and	x8, x0, #0xf000
	ldr	w9, [x23]
	and	w9, w9, #0xfff
	mov	x21, x0
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	add	x0, x9, x8
	bl	_getushort
	mov	x21, x0
	ldr	x8, [sp, #24]
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	add	x0, x9, x8
	ldr	w1, [x23]
	bl	_putushort
	b	LBB0_3
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	asr	x21, x0, #4
	and	x8, x0, #0xf
	ldr	w9, [x23]
	lsl	w9, w9, #4
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [sp, #24]
	ldr	x10, [x10]
	ldr	x11, [sp, #8]
	add	x0, x11, x10
	orr	w1, w9, w8
	bl	_putushort
	b	LBB0_3
LBB0_18:
	ldr	x1, [sp, #24]
	cbz	x1, LBB0_20
; %bb.19:
	ldr	x2, [sp, #16]
	mov	x0, x19
	bl	_updatefats
LBB0_20:
	mov	w20, #0
LBB0_21:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
	mov	x20, x0
	ldr	x0, [sp, #24]
	bl	_brelse
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_CLUST_FIRST,8,3                ; @CLUST_FIRST
	.comm	_NOCRED,4,2                     ; @NOCRED
	.comm	_MSDOSFSFREE,4,2                ; @MSDOSFSFREE
	.comm	_CLUST_RSRVD,8,3                ; @CLUST_RSRVD
.subsections_via_symbols
