	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emu_init                       ## -- Begin function emu_init
	.p2align	4, 0x90
_emu_init:                              ## @emu_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$528, %rsp                      ## imm = 0x210
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	-544(%rbp), %r14
	movq	%r14, %rdi
	movl	$508, %esi                      ## imm = 0x1FC
	callq	_plat_get_root_dir
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mkdir_path
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mkdir_path
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mkdir_path
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mkdir_path
	xorl	%eax, %eax
	callq	_pprof_init
	movq	%r14, %rdi
	callq	_make_config_cfg
	movq	%r14, %rdi
	callq	_config_readlrom
	xorl	%eax, %eax
	callq	_PicoInit
	movq	_plat_status_msg_busy_next@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoMessage@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_emu_tray_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoMCDopenTray@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_emu_tray_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoMCDcloseTray@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_sndout_init
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$528, %rsp                      ## imm = 0x210
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mds"

L_.str.1:                               ## @.str.1
	.asciz	"srm"

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

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

	.comm	_plat_status_msg_busy_next,4,2  ## @plat_status_msg_busy_next
	.comm	_PicoMessage,4,2                ## @PicoMessage
	.comm	_emu_tray_open,4,2              ## @emu_tray_open
	.comm	_PicoMCDopenTray,4,2            ## @PicoMCDopenTray
	.comm	_emu_tray_close,4,2             ## @emu_tray_close
	.comm	_PicoMCDcloseTray,4,2           ## @PicoMCDcloseTray
	.comm	_p32x_bios_m,4,2                ## @p32x_bios_m
	.comm	_p32x_bios_s,4,2                ## @p32x_bios_s
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emu_init                       ; -- Begin function emu_init
	.p2align	2
_emu_init:                              ; @emu_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	sp, sp, #528
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	add	x0, sp, #8
	mov	w1, #508
	bl	_plat_get_root_dir
	mov	x19, x0
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	x1, x19
	bl	_mkdir_path
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	x1, x19
	bl	_mkdir_path
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #8
	mov	x1, x19
	bl	_mkdir_path
Lloh9:
	adrp	x2, l_.str.3@PAGE
Lloh10:
	add	x2, x2, l_.str.3@PAGEOFF
	add	x0, sp, #8
	mov	x1, x19
	bl	_mkdir_path
	bl	_pprof_init
	add	x0, sp, #8
	bl	_make_config_cfg
	add	x0, sp, #8
	bl	_config_readlrom
	bl	_PicoInit
Lloh11:
	adrp	x8, _plat_status_msg_busy_next@GOTPAGE
Lloh12:
	ldr	x8, [x8, _plat_status_msg_busy_next@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _PicoMessage@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PicoMessage@GOTPAGEOFF]
Lloh16:
	str	w8, [x9]
Lloh17:
	adrp	x8, _emu_tray_open@GOTPAGE
Lloh18:
	ldr	x8, [x8, _emu_tray_open@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _PicoMCDopenTray@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PicoMCDopenTray@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
Lloh23:
	adrp	x8, _emu_tray_close@GOTPAGE
Lloh24:
	ldr	x8, [x8, _emu_tray_close@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _PicoMCDcloseTray@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PicoMCDcloseTray@GOTPAGEOFF]
Lloh28:
	str	w8, [x9]
	bl	_sndout_init
	ldur	x8, [x29, #-24]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	add	sp, sp, #528
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mds"

l_.str.1:                               ; @.str.1
	.asciz	"srm"

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

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

	.comm	_plat_status_msg_busy_next,4,2  ; @plat_status_msg_busy_next
	.comm	_PicoMessage,4,2                ; @PicoMessage
	.comm	_emu_tray_open,4,2              ; @emu_tray_open
	.comm	_PicoMCDopenTray,4,2            ; @PicoMCDopenTray
	.comm	_emu_tray_close,4,2             ; @emu_tray_close
	.comm	_PicoMCDcloseTray,4,2           ; @PicoMCDcloseTray
	.comm	_p32x_bios_m,4,2                ; @p32x_bios_m
	.comm	_p32x_bios_s,4,2                ; @p32x_bios_s
.subsections_via_symbols
