	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_osd_version@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_VERSION@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	xorl	%eax, %eax
	callq	_gx_video_Init
	xorl	%eax, %eax
	callq	_DVD_Init
	xorl	%eax, %eax
	callq	_gx_input_Init
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_fatInitDefault
	movl	%eax, %r14d
	movl	$250000, %edi                   ## imm = 0x3D090
	callq	_usleep
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %eax
	cmpl	$11, %ebx
	movl	%eax, %ebx
	jb	LBB0_1
LBB0_3:
	testl	%r14d, %r14d
	je	LBB0_68
## %bb.4:
	movq	%rsp, %r14
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_DEFAULT_PATH@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_7
LBB0_6:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_7:
	movq	(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_10
LBB0_9:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_10:
	movq	(%r15), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_13
LBB0_12:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_13:
	movq	(%r15), %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_16
LBB0_15:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_16:
	movq	(%r15), %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_19
LBB0_18:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_19:
	movq	(%r15), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_22
LBB0_21:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_22:
	movq	(%r15), %rdx
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_25
LBB0_24:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_25:
	movq	(%r15), %rdx
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_28
LBB0_27:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_28:
	movq	(%r15), %rdx
	leaq	L_.str.8(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_31
LBB0_30:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_31:
	movq	(%r15), %rdx
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_33
## %bb.32:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_34
LBB0_33:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_34:
	movq	(%r15), %rdx
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_36
## %bb.35:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_37
LBB0_36:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_37:
	movq	(%r15), %rdx
	leaq	L_.str.11(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_39
## %bb.38:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_40
LBB0_39:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_40:
	movq	(%r15), %rdx
	leaq	L_.str.12(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_42
## %bb.41:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_43
LBB0_42:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_43:
	movq	(%r15), %rdx
	leaq	L_.str.13(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_45
## %bb.44:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_46
LBB0_45:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_46:
	movq	(%r15), %rdx
	leaq	L_.str.14(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_48
## %bb.47:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_49
LBB0_48:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_49:
	movq	(%r15), %rdx
	leaq	L_.str.15(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_51
## %bb.50:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_52
LBB0_51:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_52:
	movq	(%r15), %rdx
	leaq	L_.str.16(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_54
## %bb.53:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_55
LBB0_54:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_55:
	movq	(%r15), %rdx
	leaq	L_.str.17(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_57
## %bb.56:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_58
LBB0_57:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_58:
	movq	(%r15), %rdx
	leaq	L_.str.18(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_60
## %bb.59:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_61
LBB0_60:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_61:
	movq	(%r15), %rdx
	leaq	L_.str.19(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_63
## %bb.62:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_64
LBB0_63:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_64:
	movq	(%r15), %rdx
	leaq	L_.str.20(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_66
## %bb.65:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_67
LBB0_66:
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdir
LBB0_67:
	movq	%r14, %rsp
LBB0_68:
	xorl	%eax, %eax
	callq	_gx_audio_Init
	xorl	%eax, %eax
	callq	_history_default
	xorl	%eax, %eax
	callq	_config_default
	xorl	%eax, %eax
	callq	_init_machine
	movq	_config@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_73
## %bb.69:
	movq	_SILENT@GOTPCREL(%rip), %rbx
	movl	$1, (%rbx)
	movq	_TYPE_RECENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-1, %esi
	callq	_OpenDirectory
	testq	%rax, %rax
	je	LBB0_72
## %bb.70:
	xorl	%edi, %edi
	callq	_LoadFile
	testq	%rax, %rax
	je	LBB0_72
## %bb.71:
	xorl	%eax, %eax
	callq	_reloadrom
	xorl	%eax, %eax
	callq	_gx_video_Start
	xorl	%eax, %eax
	callq	_gx_audio_Start
	movq	_ConfigRequested@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_72:
	movl	$0, (%rbx)
LBB0_73:
	movq	_ConfigRequested@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_75
## %bb.74:
	xorl	%eax, %eax
	callq	_legal
LBB0_75:
	movq	_Reset_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SYS_SetResetCallback
	xorl	%eax, %eax
	callq	_run_emulation
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_77
## %bb.76:
	xorl	%eax, %eax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_77:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_osd_version,8,3                ## @osd_version
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s (GCN)"

	.comm	_VERSION,8,3                    ## @VERSION
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_DEFAULT_PATH,8,3               ## @DEFAULT_PATH
	.comm	_S_IRWXU,4,2                    ## @S_IRWXU
L_.str.1:                               ## @.str.1
	.asciz	"%s/saves"

L_.str.2:                               ## @.str.2
	.asciz	"%s/saves/md"

L_.str.3:                               ## @.str.3
	.asciz	"%s/saves/ms"

L_.str.4:                               ## @.str.4
	.asciz	"%s/saves/gg"

L_.str.5:                               ## @.str.5
	.asciz	"%s/saves/sg"

L_.str.6:                               ## @.str.6
	.asciz	"%s/saves/cd"

L_.str.7:                               ## @.str.7
	.asciz	"%s/snaps"

L_.str.8:                               ## @.str.8
	.asciz	"%s/snaps/md"

L_.str.9:                               ## @.str.9
	.asciz	"%s/snaps/ms"

L_.str.10:                              ## @.str.10
	.asciz	"%s/snaps/gg"

L_.str.11:                              ## @.str.11
	.asciz	"%s/snaps/sg"

L_.str.12:                              ## @.str.12
	.asciz	"%s/snaps/cd"

L_.str.13:                              ## @.str.13
	.asciz	"%s/cheats"

L_.str.14:                              ## @.str.14
	.asciz	"%s/cheats/md"

L_.str.15:                              ## @.str.15
	.asciz	"%s/cheats/ms"

L_.str.16:                              ## @.str.16
	.asciz	"%s/cheats/gg"

L_.str.17:                              ## @.str.17
	.asciz	"%s/cheats/sg"

L_.str.18:                              ## @.str.18
	.asciz	"%s/cheats/cd"

L_.str.19:                              ## @.str.19
	.asciz	"%s/bios"

L_.str.20:                              ## @.str.20
	.asciz	"%s/lock-on"

	.comm	_config,8,3                     ## @config
	.comm	_SILENT,4,2                     ## @SILENT
	.comm	_TYPE_RECENT,4,2                ## @TYPE_RECENT
	.comm	_ConfigRequested,8,3            ## @ConfigRequested
	.comm	_Reset_cb,4,2                   ## @Reset_cb
	.comm	_PowerOff_cb,4,2                ## @PowerOff_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _osd_version@GOTPAGE
Lloh4:
	ldr	x8, [x8, _osd_version@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
Lloh6:
	adrp	x8, _VERSION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VERSION@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [sp, #-16]!
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	add	sp, sp, #16
	bl	_gx_video_Init
	bl	_DVD_Init
	bl	_gx_input_Init
	mov	w20, #0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_fatInitDefault
	mov	x19, x0
	mov	w0, #53392
	movk	w0, #3, lsl #16
	bl	_usleep
	cbnz	w19, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w20, #1
	cmp	w20, #11
	mov	x20, x8
	b.lo	LBB0_1
LBB0_3:
	cbz	w19, LBB0_68
; %bb.4:
	mov	x20, sp
Lloh11:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	x9, x8
Lloh14:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh15:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh16:
	adrp	x21, _DEFAULT_PATH@GOTPAGE
Lloh17:
	ldr	x21, [x21, _DEFAULT_PATH@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_sprintf
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_6
; %bb.5:
	bl	_closedir
	b	LBB0_7
LBB0_6:
Lloh18:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh19:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_7:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_9
; %bb.8:
	bl	_closedir
	b	LBB0_10
LBB0_9:
Lloh23:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh24:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_10:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_12
; %bb.11:
	bl	_closedir
	b	LBB0_13
LBB0_12:
Lloh28:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh29:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_13:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_15
; %bb.14:
	bl	_closedir
	b	LBB0_16
LBB0_15:
Lloh33:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh34:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_16:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_18
; %bb.17:
	bl	_closedir
	b	LBB0_19
LBB0_18:
Lloh38:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh39:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_19:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh41:
	adrp	x1, l_.str.5@PAGE
Lloh42:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_21
; %bb.20:
	bl	_closedir
	b	LBB0_22
LBB0_21:
Lloh43:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh44:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_22:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh46:
	adrp	x1, l_.str.6@PAGE
Lloh47:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_24
; %bb.23:
	bl	_closedir
	b	LBB0_25
LBB0_24:
Lloh48:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh49:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_25:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh51:
	adrp	x1, l_.str.7@PAGE
Lloh52:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_27
; %bb.26:
	bl	_closedir
	b	LBB0_28
LBB0_27:
Lloh53:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh54:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_28:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh56:
	adrp	x1, l_.str.8@PAGE
Lloh57:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_30
; %bb.29:
	bl	_closedir
	b	LBB0_31
LBB0_30:
Lloh58:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh59:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh60:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_31:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh61:
	adrp	x1, l_.str.9@PAGE
Lloh62:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_33
; %bb.32:
	bl	_closedir
	b	LBB0_34
LBB0_33:
Lloh63:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh64:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_34:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh66:
	adrp	x1, l_.str.10@PAGE
Lloh67:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_36
; %bb.35:
	bl	_closedir
	b	LBB0_37
LBB0_36:
Lloh68:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh69:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_37:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh71:
	adrp	x1, l_.str.11@PAGE
Lloh72:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_39
; %bb.38:
	bl	_closedir
	b	LBB0_40
LBB0_39:
Lloh73:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh74:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh75:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_40:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh76:
	adrp	x1, l_.str.12@PAGE
Lloh77:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_42
; %bb.41:
	bl	_closedir
	b	LBB0_43
LBB0_42:
Lloh78:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh79:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh80:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_43:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh81:
	adrp	x1, l_.str.13@PAGE
Lloh82:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_45
; %bb.44:
	bl	_closedir
	b	LBB0_46
LBB0_45:
Lloh83:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh84:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh85:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_46:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh86:
	adrp	x1, l_.str.14@PAGE
Lloh87:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_48
; %bb.47:
	bl	_closedir
	b	LBB0_49
LBB0_48:
Lloh88:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh89:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh90:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_49:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh91:
	adrp	x1, l_.str.15@PAGE
Lloh92:
	add	x1, x1, l_.str.15@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_51
; %bb.50:
	bl	_closedir
	b	LBB0_52
LBB0_51:
Lloh93:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh94:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh95:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_52:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh96:
	adrp	x1, l_.str.16@PAGE
Lloh97:
	add	x1, x1, l_.str.16@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_54
; %bb.53:
	bl	_closedir
	b	LBB0_55
LBB0_54:
Lloh98:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh99:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh100:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_55:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh101:
	adrp	x1, l_.str.17@PAGE
Lloh102:
	add	x1, x1, l_.str.17@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_57
; %bb.56:
	bl	_closedir
	b	LBB0_58
LBB0_57:
Lloh103:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh104:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh105:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_58:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh106:
	adrp	x1, l_.str.18@PAGE
Lloh107:
	add	x1, x1, l_.str.18@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_60
; %bb.59:
	bl	_closedir
	b	LBB0_61
LBB0_60:
Lloh108:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh109:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh110:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_61:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh111:
	adrp	x1, l_.str.19@PAGE
Lloh112:
	add	x1, x1, l_.str.19@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_63
; %bb.62:
	bl	_closedir
	b	LBB0_64
LBB0_63:
Lloh113:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh114:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh115:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_64:
	ldr	x8, [x21]
	str	x8, [sp, #-16]!
Lloh116:
	adrp	x1, l_.str.20@PAGE
Lloh117:
	add	x1, x1, l_.str.20@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x19
	bl	_opendir
	cbz	x0, LBB0_66
; %bb.65:
	bl	_closedir
	b	LBB0_67
LBB0_66:
Lloh118:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh119:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh120:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mkdir
LBB0_67:
	mov	sp, x20
LBB0_68:
	bl	_gx_audio_Init
	bl	_history_default
	bl	_config_default
	bl	_init_machine
Lloh121:
	adrp	x8, _config@GOTPAGE
Lloh122:
	ldr	x8, [x8, _config@GOTPAGEOFF]
Lloh123:
	ldr	x8, [x8]
Lloh124:
	adrp	x19, _ConfigRequested@GOTPAGE
Lloh125:
	ldr	x19, [x19, _ConfigRequested@GOTPAGEOFF]
	cbz	x8, LBB0_73
; %bb.69:
Lloh126:
	adrp	x20, _SILENT@GOTPAGE
Lloh127:
	ldr	x20, [x20, _SILENT@GOTPAGEOFF]
	mov	w8, #1
	str	w8, [x20]
Lloh128:
	adrp	x8, _TYPE_RECENT@GOTPAGE
Lloh129:
	ldr	x8, [x8, _TYPE_RECENT@GOTPAGEOFF]
Lloh130:
	ldr	w0, [x8]
	mov	w1, #-1
	bl	_OpenDirectory
	cbz	x0, LBB0_72
; %bb.70:
	mov	w0, #0
	bl	_LoadFile
	cbz	x0, LBB0_72
; %bb.71:
	bl	_reloadrom
	bl	_gx_video_Start
	bl	_gx_audio_Start
	str	xzr, [x19]
LBB0_72:
	str	wzr, [x20]
LBB0_73:
	ldr	x8, [x19]
	cbz	x8, LBB0_75
; %bb.74:
	bl	_legal
LBB0_75:
Lloh131:
	adrp	x8, _Reset_cb@GOTPAGE
Lloh132:
	ldr	x8, [x8, _Reset_cb@GOTPAGEOFF]
Lloh133:
	ldr	w0, [x8]
	bl	_SYS_SetResetCallback
	bl	_run_emulation
	ldur	x8, [x29, #-40]
Lloh134:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh135:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh136:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_77
; %bb.76:
	mov	w0, #0
	sub	sp, x29, #32
	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_77:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpAdd	Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpAdd	Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpAdd	Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpAdd	Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh103, Lloh104, Lloh105
	.loh AdrpAdd	Lloh106, Lloh107
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.loh AdrpAdd	Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpAdd	Lloh116, Lloh117
	.loh AdrpLdrGotLdr	Lloh118, Lloh119, Lloh120
	.loh AdrpLdrGot	Lloh124, Lloh125
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGotLdr	Lloh128, Lloh129, Lloh130
	.loh AdrpLdrGot	Lloh126, Lloh127
	.loh AdrpLdrGotLdr	Lloh134, Lloh135, Lloh136
	.loh AdrpLdrGotLdr	Lloh131, Lloh132, Lloh133
	.cfi_endproc
                                        ; -- End function
	.comm	_osd_version,8,3                ; @osd_version
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s (GCN)"

	.comm	_VERSION,8,3                    ; @VERSION
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_DEFAULT_PATH,8,3               ; @DEFAULT_PATH
	.comm	_S_IRWXU,4,2                    ; @S_IRWXU
l_.str.1:                               ; @.str.1
	.asciz	"%s/saves"

l_.str.2:                               ; @.str.2
	.asciz	"%s/saves/md"

l_.str.3:                               ; @.str.3
	.asciz	"%s/saves/ms"

l_.str.4:                               ; @.str.4
	.asciz	"%s/saves/gg"

l_.str.5:                               ; @.str.5
	.asciz	"%s/saves/sg"

l_.str.6:                               ; @.str.6
	.asciz	"%s/saves/cd"

l_.str.7:                               ; @.str.7
	.asciz	"%s/snaps"

l_.str.8:                               ; @.str.8
	.asciz	"%s/snaps/md"

l_.str.9:                               ; @.str.9
	.asciz	"%s/snaps/ms"

l_.str.10:                              ; @.str.10
	.asciz	"%s/snaps/gg"

l_.str.11:                              ; @.str.11
	.asciz	"%s/snaps/sg"

l_.str.12:                              ; @.str.12
	.asciz	"%s/snaps/cd"

l_.str.13:                              ; @.str.13
	.asciz	"%s/cheats"

l_.str.14:                              ; @.str.14
	.asciz	"%s/cheats/md"

l_.str.15:                              ; @.str.15
	.asciz	"%s/cheats/ms"

l_.str.16:                              ; @.str.16
	.asciz	"%s/cheats/gg"

l_.str.17:                              ; @.str.17
	.asciz	"%s/cheats/sg"

l_.str.18:                              ; @.str.18
	.asciz	"%s/cheats/cd"

l_.str.19:                              ; @.str.19
	.asciz	"%s/bios"

l_.str.20:                              ; @.str.20
	.asciz	"%s/lock-on"

	.comm	_config,8,3                     ; @config
	.comm	_SILENT,4,2                     ; @SILENT
	.comm	_TYPE_RECENT,4,2                ; @TYPE_RECENT
	.comm	_ConfigRequested,8,3            ; @ConfigRequested
	.comm	_Reset_cb,4,2                   ; @Reset_cb
	.comm	_PowerOff_cb,4,2                ; @PowerOff_cb
.subsections_via_symbols
