	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FatOpen                        ## -- Begin function FatOpen
	.p2align	4, 0x90
_FatOpen:                               ## @FatOpen
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_OpenReadOnly@GOTPCREL(%rip), %rax
	movq	_OpenDirectory@GOTPCREL(%rip), %rcx
	cmpq	%rsi, (%rax)
	je	LBB0_3
## %bb.1:
	cmpq	%rbx, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_EACCES@GOTPCREL(%rip), %r12
	jmp	LBB0_14
LBB0_3:
	movq	(%r15), %rdi
	callq	_FsGetDeviceId
	movq	_FatVolumes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %r14d
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_TRACE
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_RtlZeroMemory
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	%r14d, %edi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_FatLookupFile
	movq	_ESUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_4
## %bb.5:
	movq	_ATTR_DIRECTORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-48(%rbp), %eax
	je	LBB0_8
## %bb.6:
	movq	_OpenDirectory@GOTPCREL(%rip), %rcx
	cmpq	%rbx, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	_EISDIR@GOTPCREL(%rip), %r12
	jmp	LBB0_14
LBB0_4:
	movq	_ENOENT@GOTPCREL(%rip), %r12
LBB0_14:
	movq	(%r12), %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	_OpenReadOnly@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_ENOTDIR@GOTPCREL(%rip), %r12
	jmp	LBB0_14
LBB0_11:
	movq	_TAG_FAT_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_FrLdrTempAlloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %rbx
	leaq	-48(%rbp), %rsi
	movq	%rax, %rdi
	movl	$4, %edx
	callq	_RtlCopyMemory
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_FsSetDeviceSpecific
	jmp	LBB0_14
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %r12
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_OpenReadOnly,8,3               ## @OpenReadOnly
	.comm	_OpenDirectory,8,3              ## @OpenDirectory
	.comm	_EACCES,8,3                     ## @EACCES
	.comm	_FatVolumes,8,3                 ## @FatVolumes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FatOpen() FileName = %s\n"

	.comm	_ESUCCESS,8,3                   ## @ESUCCESS
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_ATTR_DIRECTORY,4,2             ## @ATTR_DIRECTORY
	.comm	_EISDIR,8,3                     ## @EISDIR
	.comm	_ENOTDIR,8,3                    ## @ENOTDIR
	.comm	_TAG_FAT_FILE,4,2               ## @TAG_FAT_FILE
	.comm	_ENOMEM,8,3                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FatOpen                        ; -- Begin function FatOpen
	.p2align	2
_FatOpen:                               ; @FatOpen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, _OpenReadOnly@GOTPAGE
Lloh1:
	ldr	x23, [x23, _OpenReadOnly@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x24, _OpenDirectory@GOTPAGE
Lloh3:
	ldr	x24, [x24, _OpenDirectory@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x1
	ccmp	x9, x1, #4, ne
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x0, [x2]
	bl	_FsGetDeviceId
Lloh4:
	adrp	x8, _FatVolumes@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FatVolumes@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	w20, [x8, x0, lsl #2]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	add	x0, sp, #8
	mov	w1, #4
	bl	_RtlZeroMemory
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x22
	bl	_FatLookupFile
Lloh9:
	adrp	x8, _ESUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ESUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.2:
Lloh12:
	adrp	x8, _ATTR_DIRECTORY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATTR_DIRECTORY@GOTPAGEOFF]
	ldr	w9, [sp, #8]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w9
	ldr	x9, [x24]
	cmp	w8, #0
	ccmp	x9, x21, #4, ne
	b.ne	LBB0_8
; %bb.3:
	cbnz	w8, LBB0_9
; %bb.4:
	ldr	x8, [x23]
	cmp	x8, x21
	b.eq	LBB0_9
; %bb.5:
Lloh15:
	adrp	x8, _ENOTDIR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTDIR@GOTPAGEOFF]
	b	LBB0_12
LBB0_6:
Lloh17:
	adrp	x8, _EACCES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
Lloh19:
	adrp	x8, _ENOENT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
Lloh21:
	adrp	x8, _EISDIR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EISDIR@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh23:
	adrp	x8, _TAG_FAT_FILE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TAG_FAT_FILE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_FrLdrTempAlloc
	cbz	x0, LBB0_11
; %bb.10:
	mov	x21, x0
	add	x1, sp, #8
	mov	w2, #4
	bl	_RtlCopyMemory
	str	w20, [x21]
	ldr	x0, [x19]
	mov	x1, x21
	bl	_FsSetDeviceSpecific
Lloh26:
	adrp	x8, _ESUCCESS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ESUCCESS@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_OpenReadOnly,8,3               ; @OpenReadOnly
	.comm	_OpenDirectory,8,3              ; @OpenDirectory
	.comm	_EACCES,8,3                     ; @EACCES
	.comm	_FatVolumes,8,3                 ; @FatVolumes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FatOpen() FileName = %s\n"

	.comm	_ESUCCESS,8,3                   ; @ESUCCESS
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_ATTR_DIRECTORY,4,2             ; @ATTR_DIRECTORY
	.comm	_EISDIR,8,3                     ; @EISDIR
	.comm	_ENOTDIR,8,3                    ; @ENOTDIR
	.comm	_TAG_FAT_FILE,4,2               ; @TAG_FAT_FILE
	.comm	_ENOMEM,8,3                     ; @ENOMEM
.subsections_via_symbols
