	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fatentry                       ## -- Begin function fatentry
	.p2align	4, 0x90
_fatentry:                              ## @fatentry
	.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	_CLUST_FIRST@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jg	LBB0_2
## %bb.1:
	movl	%edx, %ebx
	movq	%rsi, %r15
	cmpl	%edx, (%rsi)
	jge	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rcx, %r13
	movl	%edi, %r12d
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_FATOFS
	leaq	-64(%rbp), %rdx
	leaq	-68(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_fatblock
	movl	12(%r15), %edi
	movl	-64(%rbp), %esi
	movl	-68(%rbp), %edx
	movq	_NOCRED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %r8
	callq	_bread
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi
LBB0_6:
	callq	_brelse
	jmp	LBB0_3
LBB0_7:
	movq	_FAT_GET@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_12
## %bb.8:
	movq	%r15, %rdi
	callq	_FAT32
	movq	-56(%rbp), %rcx
	movl	-44(%rbp), %edi
	addl	(%rcx), %edi
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	callq	_getulong
	jmp	LBB0_11
LBB0_10:
	callq	_getushort
LBB0_11:
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_FAT12
	andl	%ebx, %eax
	movl	%r14d, %ecx
	sarl	$4, %ecx
	testb	$1, %al
	cmovel	%r14d, %ecx
	movl	4(%r15), %eax
	movl	%ecx, %edx
	andl	%eax, %edx
	notl	%eax
	orl	%ecx, %eax
	movq	_CLUST_RSRVD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	cmovll	%edx, %eax
	movl	%eax, (%r13)
LBB0_12:
	movq	_FAT_SET@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_18
## %bb.13:
	movl	4(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_19
## %bb.14:
	cmpl	$129, %eax
	je	LBB0_20
## %bb.15:
	cmpl	$130, %eax
	jne	LBB0_24
## %bb.16:
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	callq	_getushort
	testb	$1, %bl
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	jne	LBB0_21
## %bb.17:
	andl	$61440, %eax                    ## imm = 0xF000
	andl	$4095, %esi                     ## imm = 0xFFF
	jmp	LBB0_22
LBB0_18:
	movq	-56(%rbp), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	jne	LBB0_6
	jmp	LBB0_3
LBB0_19:
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	callq	_getulong
	andl	$-129, %eax
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	andl	$128, %esi
	orl	%eax, %esi
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	callq	_putulong
	jmp	LBB0_24
LBB0_20:
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_23
LBB0_21:
	andl	$15, %eax
	shll	$4, %esi
LBB0_22:
	orl	%eax, %esi
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %edi
	addl	(%rax), %edi
LBB0_23:
	callq	_putushort
LBB0_24:
	movq	-56(%rbp), %rsi
	movl	-64(%rbp), %edx
	movq	%r15, %rdi
	callq	_updatefats
	movl	$1, 8(%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_CLUST_FIRST,4,2                ## @CLUST_FIRST
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NOCRED,4,2                     ## @NOCRED
	.comm	_FAT_GET,4,2                    ## @FAT_GET
	.comm	_CLUST_RSRVD,4,2                ## @CLUST_RSRVD
	.comm	_FAT_SET,4,2                    ## @FAT_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fatentry                       ; -- Begin function fatentry
	.p2align	2
_fatentry:                              ; @fatentry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _CLUST_FIRST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLUST_FIRST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.gt	LBB0_2
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	ldr	w8, [x1]
	cmp	w8, w2
	b.ge	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
LBB0_3:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	mov	x20, x4
	mov	x23, x3
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_FATOFS
	mov	x1, x0
	add	x2, sp, #28
	add	x3, sp, #20
	add	x4, sp, #24
	mov	x0, x19
	bl	_fatblock
	ldr	w0, [x19, #12]
	ldr	w1, [sp, #28]
	ldr	w2, [sp, #20]
Lloh6:
	adrp	x8, _NOCRED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NOCRED@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	add	x4, sp, #8
	bl	_bread
	cbz	w0, LBB0_6
; %bb.5:
	mov	x24, x0
	ldr	x0, [sp, #8]
	bl	_brelse
	b	LBB0_3
LBB0_6:
Lloh9:
	adrp	x8, _FAT_GET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FAT_GET@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_11
; %bb.7:
	mov	x0, x19
	bl	_FAT32
	mov	x8, x0
	ldr	x9, [sp, #8]
	ldr	w9, [x9]
	ldr	w10, [sp, #24]
	add	w0, w10, w9
	cbz	x8, LBB0_9
; %bb.8:
	bl	_getulong
	b	LBB0_10
LBB0_9:
	bl	_getushort
LBB0_10:
	mov	x24, x0
	mov	x0, x19
	bl	_FAT12
	and	w8, w21, w0
	asr	w9, w24, #4
	tst	w8, #0x1
	csel	w8, w24, w9, eq
	ldr	w9, [x19, #4]
	and	w10, w8, w9
	orn	w8, w8, w9
Lloh12:
	adrp	x9, _CLUST_RSRVD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CLUST_RSRVD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w10, w8, lt
	str	w8, [x23]
LBB0_11:
Lloh15:
	adrp	x8, _FAT_SET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FAT_SET@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_16
; %bb.12:
	ldr	w8, [x19, #4]
	cmp	w8, #128
	b.eq	LBB0_19
; %bb.13:
	cmp	w8, #129
	b.eq	LBB0_20
; %bb.14:
	cmp	w8, #130
	b.ne	LBB0_22
; %bb.15:
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	bl	_getushort
	and	w8, w0, #0xf000
	bfxil	w8, w20, #0, #12
	bfi	w0, w20, #4, #28
	tst	w21, #0x1
	csel	w1, w8, w0, eq
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	b	LBB0_21
LBB0_16:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_brelse
LBB0_18:
	mov	w24, #0
	b	LBB0_3
LBB0_19:
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	bl	_getulong
	mov	x1, x0
	lsr	w8, w20, #7
	bfi	w1, w8, #7, #1
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	bl	_putulong
	b	LBB0_22
LBB0_20:
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	add	w0, w9, w8
	mov	x1, x20
LBB0_21:
	bl	_putushort
LBB0_22:
	ldr	x1, [sp, #8]
	ldr	w2, [sp, #28]
	mov	x0, x19
	bl	_updatefats
	mov	w24, #0
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CLUST_FIRST,4,2                ; @CLUST_FIRST
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NOCRED,4,2                     ; @NOCRED
	.comm	_FAT_GET,4,2                    ; @FAT_GET
	.comm	_CLUST_RSRVD,4,2                ; @CLUST_RSRVD
	.comm	_FAT_SET,4,2                    ; @FAT_SET
.subsections_via_symbols
