	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FatMount                       ## -- Begin function FatMount
	.p2align	4, 0x90
_FatMount:                              ## @FatMount
	.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	%r12
	pushq	%rbx
	subq	$2096, %rsp                     ## imm = 0x830
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_TRACE
	movq	_TAG_FAT_VOLUME@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$4, %edi
	callq	_FrLdrTempAlloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_RtlZeroMemory
	movq	$0, -2112(%rbp)
	movq	_SeekAbsolute@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-2112(%rbp), %rsi
	movl	%r14d, %edi
	callq	_ArcSeek
	movq	_ESUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_15
## %bb.2:
	leaq	-2096(%rbp), %rsi
	leaq	-2100(%rbp), %rcx
	movl	%r14d, %edi
	movl	$2048, %edx                     ## imm = 0x800
	callq	_ArcRead
	cmpq	(%r12), %rax
	jne	LBB0_15
## %bb.3:
	cmpl	$2048, -2100(%rbp)              ## imm = 0x800
	jne	LBB0_15
## %bb.4:
	movl	-2096(%rbp), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$8, %edx
	callq	_RtlEqualMemory
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	-2096(%rbp), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$8, %edx
	callq	_RtlEqualMemory
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movl	-2096(%rbp), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	$8, %edx
	callq	_RtlEqualMemory
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	-2096(%rbp), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	$4, %edx
	callq	_RtlEqualMemory
	testl	%eax, %eax
	je	LBB0_15
LBB0_8:
	leaq	-2128(%rbp), %rsi
	movl	%r14d, %edi
	callq	_ArcGetFileInformation
	cmpq	(%r12), %rax
	jne	LBB0_15
## %bb.9:
	movq	-2120(%rbp), %rax
	subq	-2128(%rbp), %rax
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_12
## %bb.10:
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	jmp	LBB0_13
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edx
LBB0_13:
	movl	%r14d, (%rbx)
	leaq	-2096(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_FatOpenVolume
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	_FatVolumes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movq	%rbx, (%rax,%rcx,8)
	leaq	L_.str.5(%rip), %rdi
	movl	%r14d, %esi
	callq	_TRACE
	movq	_FatFuncTable@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_FrLdrTempFree
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	addq	$2096, %rsp                     ## imm = 0x830
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter FatMount(%lu)\n"

	.comm	_TAG_FAT_VOLUME,4,2             ## @TAG_FAT_VOLUME
	.comm	_SeekAbsolute,4,2               ## @SeekAbsolute
	.comm	_ESUCCESS,8,3                   ## @ESUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"FAT12   "

L_.str.2:                               ## @.str.2
	.asciz	"FAT16   "

L_.str.3:                               ## @.str.3
	.asciz	"FAT32   "

L_.str.4:                               ## @.str.4
	.asciz	"FATX"

	.comm	_SECTOR_SIZE,8,3                ## @SECTOR_SIZE
	.comm	_FatVolumes,8,3                 ## @FatVolumes
L_.str.5:                               ## @.str.5
	.asciz	"FatMount(%lu) success\n"

	.comm	_FatFuncTable,4,2               ## @FatFuncTable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FatMount                       ; -- Begin function FatMount
	.p2align	2
_FatMount:                              ; @FatMount
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #2096
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
Lloh5:
	adrp	x21, _TAG_FAT_VOLUME@GOTPAGE
Lloh6:
	ldr	x21, [x21, _TAG_FAT_VOLUME@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #4
	bl	_FrLdrTempAlloc
	cbz	x0, LBB0_12
; %bb.1:
	mov	x20, x0
	mov	w1, #4
	bl	_RtlZeroMemory
	str	xzr, [sp, #16]
Lloh7:
	adrp	x8, _SeekAbsolute@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SeekAbsolute@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x1, sp, #16
	mov	x0, x19
	bl	_ArcSeek
Lloh10:
	adrp	x22, _ESUCCESS@GOTPAGE
Lloh11:
	ldr	x22, [x22, _ESUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.2:
	add	x1, sp, #40
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #2048
	bl	_ArcRead
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.3:
	ldr	w8, [sp, #12]
	cmp	w8, #2048
	b.ne	LBB0_11
; %bb.4:
	ldr	w0, [sp, #40]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #8
	bl	_RtlEqualMemory
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w0, [sp, #40]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #8
	bl	_RtlEqualMemory
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	w0, [sp, #40]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #8
	bl	_RtlEqualMemory
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	w0, [sp, #40]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #4
	bl	_RtlEqualMemory
	cbz	w0, LBB0_11
LBB0_8:
	add	x1, sp, #24
	mov	x0, x19
	bl	_ArcGetFileInformation
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.9:
	ldp	x9, x8, [sp, #24]
	sub	x8, x8, x9
Lloh20:
	adrp	x9, _SECTOR_SIZE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SECTOR_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	str	w19, [x20]
	sdiv	x2, x8, x9
	add	x1, sp, #40
	mov	x0, x20
	bl	_FatOpenVolume
	cbz	w0, LBB0_11
; %bb.10:
Lloh23:
	adrp	x8, _FatVolumes@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FatVolumes@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	str	x20, [x8, w19, sxtw #3]
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x19
	bl	_TRACE
Lloh28:
	adrp	x0, _FatFuncTable@GOTPAGE
Lloh29:
	ldr	x0, [x0, _FatFuncTable@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_FrLdrTempFree
	mov	x0, #0
LBB0_12:
	ldur	x8, [x29, #-56]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	add	sp, sp, #2096
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter FatMount(%lu)\n"

	.comm	_TAG_FAT_VOLUME,4,2             ; @TAG_FAT_VOLUME
	.comm	_SeekAbsolute,4,2               ; @SeekAbsolute
	.comm	_ESUCCESS,8,3                   ; @ESUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"FAT12   "

l_.str.2:                               ; @.str.2
	.asciz	"FAT16   "

l_.str.3:                               ; @.str.3
	.asciz	"FAT32   "

l_.str.4:                               ; @.str.4
	.asciz	"FATX"

	.comm	_SECTOR_SIZE,8,3                ; @SECTOR_SIZE
	.comm	_FatVolumes,8,3                 ; @FatVolumes
l_.str.5:                               ; @.str.5
	.asciz	"FatMount(%lu) success\n"

	.comm	_FatFuncTable,4,2               ; @FatFuncTable
.subsections_via_symbols
