	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fatchain
_fatchain:                              ## @fatchain
	.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
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movq	_CLUST_FIRST@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jg	LBB0_22
## %bb.1:
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r15
	leal	(%rbx,%r13), %eax
	decl	%eax
	cmpl	(%rdi), %eax
	jle	LBB0_2
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_21:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	testl	%ebx, %ebx
	jg	LBB0_3
LBB0_20:
	movl	$1, 8(%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rsi
	movl	-64(%rbp), %edx
	movq	%r15, %rdi
	callq	_updatefats
	leal	1(%rbx), %eax
	cmpl	$1, %eax
	jle	LBB0_20
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_FATOFS
	movq	%r15, %rdi
	movl	%eax, %esi
	leaq	-64(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_fatblock
	movl	12(%r15), %edi
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %edx
	movq	_NOCRED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %r8
	callq	_bread
	movl	%ebx, %r12d
	testl	%eax, %eax
	jne	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%r13d
	cmpl	$2, %r12d
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	cmovael	%r13d, %r14d
	movl	4(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$129, %eax
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$130, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	callq	_getushort
	testb	$1, %r13b
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=2
	andl	$15, %eax
	shll	$4, %r14d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	callq	_getulong
	xorl	%eax, %r14d
	andl	4(%r15), %r14d
	xorl	%eax, %r14d
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	movl	%r14d, %esi
	callq	_putulong
	movl	-44(%rbp), %eax
	addl	$4, %eax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	movl	%r14d, %esi
	callq	_putushort
	movl	-44(%rbp), %eax
	addl	$2, %eax
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%eax, -44(%rbp)
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	-44(%rbp), %eax
	jmp	LBB0_17
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	andl	$61440, %eax                    ## imm = 0xF000
	andl	$4095, %r14d                    ## imm = 0xFFF
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=2
	orl	%eax, %r14d
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	movl	%r14d, %esi
	callq	_putushort
	movl	-44(%rbp), %ecx
	leal	1(%rcx), %eax
	movl	%eax, -44(%rbp)
	testb	$1, %r13b
	jne	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=2
	addl	$2, %ecx
	movl	%ecx, -44(%rbp)
	movl	%ecx, %eax
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=2
	leal	-1(%r12), %ebx
	cmpl	-60(%rbp), %eax
	jge	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$1, %r12d
	movl	%ebx, %r12d
	ja	LBB0_5
	jmp	LBB0_19
LBB0_4:
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi
	callq	_brelse
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_CLUST_FIRST,4,2                ## @CLUST_FIRST
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NOCRED,4,2                     ## @NOCRED
	.no_dead_strip	_fatchain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fatchain
_fatchain:                              ; @fatchain
	.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
Lloh0:
	adrp	x8, _CLUST_FIRST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLUST_FIRST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.gt	LBB0_2
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	add	w8, w1, w2
	sub	w8, w8, #1
	ldr	w9, [x0]
	cmp	w8, w9
	b.le	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
LBB0_3:
	mov	x0, x23
	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_4:
	cmp	w21, #1
	b.lt	LBB0_18
; %bb.5:
	mov	x19, x3
Lloh6:
	adrp	x24, _NOCRED@GOTPAGE
Lloh7:
	ldr	x24, [x24, _NOCRED@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [sp, #8]
	ldr	w2, [sp, #28]
	mov	x0, x20
	bl	_updatefats
	add	w8, w21, #1
	cmp	w8, #1
	b.le	LBB0_18
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x0, x20
	mov	x1, x22
	bl	_FATOFS
	mov	x1, x0
	add	x2, sp, #28
	add	x3, sp, #20
	add	x4, sp, #24
	mov	x0, x20
	bl	_fatblock
	ldr	w0, [x20, #12]
	ldr	w1, [sp, #28]
	ldr	w2, [sp, #20]
	ldr	w3, [x24]
	add	x4, sp, #8
	bl	_bread
	cbz	w0, LBB0_11
	b	LBB0_19
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	bl	_getulong
	ldr	w8, [x20, #4]
	bic	w9, w0, w8
	and	w8, w8, w23
	orr	w1, w9, w8
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	bl	_putulong
	ldr	w8, [sp, #24]
	add	w8, w8, #4
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=2
	str	w8, [sp, #24]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	w9, [sp, #20]
	cmp	w8, w9
	ccmp	w25, #1, #0, lt
	b.ls	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x25, x21
	subs	w21, w21, #1
	csinc	w23, w19, w22, ls
	add	w22, w22, #1
	ldr	w8, [x20, #4]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	cmp	w8, #129
	b.eq	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	cmp	w8, #130
	b.ne	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	bl	_getushort
	and	w8, w0, #0xf000
	bfi	w0, w23, #4, #28
	bfxil	w8, w23, #0, #12
	tst	w22, #0x1
	csel	w1, w0, w8, eq
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	bl	_putushort
	ldr	w9, [sp, #24]
	add	w8, w9, #1
	str	w8, [sp, #24]
	tbnz	w22, #0, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=2
	add	w8, w9, #2
	b	LBB0_9
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	mov	x1, x23
	bl	_putushort
	ldr	w8, [sp, #24]
	add	w8, w8, #2
	b	LBB0_9
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	w8, [sp, #24]
	b	LBB0_10
LBB0_18:
	mov	w23, #0
	mov	w8, #1
	str	w8, [x20, #8]
	b	LBB0_3
LBB0_19:
	mov	x23, x0
	ldr	x0, [sp, #8]
	bl	_brelse
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CLUST_FIRST,4,2                ; @CLUST_FIRST
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NOCRED,4,2                     ; @NOCRED
	.no_dead_strip	_fatchain
.subsections_via_symbols
