	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LoadFile
_LoadFile:                              ## @LoadFile
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_system_hw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SYSTEM_MCD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	_cdd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CD_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	_cdc@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_cdd_load
	movl	%eax, %ebx
	movq	_scd@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.4:
	testl	%ebx, %ebx
	jne	LBB0_6
LBB0_5:
	movq	_NO_DISC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_cdd@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	%r14, %rdi
	callq	_load_rom
	movl	%eax, %ebx
LBB0_6:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setg	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%r15), %rdi
	callq	_getrominfo
	testl	%ebx, %ebx
	jne	LBB0_6
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_system_hw,8,3                  ## @system_hw
	.comm	_SYSTEM_MCD,8,3                 ## @SYSTEM_MCD
	.comm	_cdd,8,3                        ## @cdd
	.comm	_CD_OPEN,8,3                    ## @CD_OPEN
	.comm	_cdc,8,3                        ## @cdc
	.comm	_scd,4,2                        ## @scd
	.comm	_NO_DISC,8,3                    ## @NO_DISC
	.no_dead_strip	_LoadFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LoadFile
_LoadFile:                              ; @LoadFile
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _system_hw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _SYSTEM_MCD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYSTEM_MCD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x21, _cdd@GOTPAGE
Lloh7:
	ldr	x21, [x21, _cdd@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _CD_OPEN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CD_OPEN@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh11:
	adrp	x22, _cdc@GOTPAGE
Lloh12:
	ldr	x22, [x22, _cdc@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_cdd_load
	mov	x20, x0
Lloh13:
	adrp	x8, _scd@GOTPAGE
Lloh14:
	ldr	x8, [x8, _scd@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.3:
	cbnz	w20, LBB0_5
LBB0_4:
Lloh16:
	adrp	x8, _NO_DISC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NO_DISC@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x21]
	mov	x0, x19
	bl	_load_rom
	mov	x20, x0
LBB0_5:
	cmp	w20, #0
	cset	w0, gt
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x0, [x22]
	bl	_getrominfo
	cbnz	w20, LBB0_5
	b	LBB0_4
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_system_hw,8,3                  ; @system_hw
	.comm	_SYSTEM_MCD,8,3                 ; @SYSTEM_MCD
	.comm	_cdd,8,3                        ; @cdd
	.comm	_CD_OPEN,8,3                    ; @CD_OPEN
	.comm	_cdc,8,3                        ; @cdc
	.comm	_scd,4,2                        ; @scd
	.comm	_NO_DISC,8,3                    ; @NO_DISC
	.no_dead_strip	_LoadFile
.subsections_via_symbols
