	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emu_HandleResume               ## -- Begin function emu_HandleResume
	.p2align	4, 0x90
_emu_HandleResume:                      ## @emu_HandleResume
	.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	_PicoAHW@GOTPCREL(%rip), %rax
	movq	_PAHW_MCD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.1:
	movq	_Pico_mcd@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	16(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.2:
	movq	_rom_fname_reload@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	cmpl	$5, %eax
	jl	LBB0_5
## %bb.3:
	movl	%eax, %eax
	leaq	(%rbx,%rax), %rdi
	addq	$-4, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_12
LBB0_5:
	xorl	%r14d, %r14d
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_lprintf
	movq	(%r15), %rax
	movq	16(%rax), %rax
	movq	(%rax), %rdi
	callq	_pm_close
	movq	%rbx, %rdi
	callq	_pm_open
	movq	(%r15), %rcx
	movq	16(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	(%r15), %rax
	movq	16(%rax), %rax
	cmpq	$0, (%rax)
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_lprintf
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_cue_destroy
LBB0_8:
	xorl	%eax, %eax
	callq	_mp3_reopen_file
	movq	(%r15), %rax
	movq	(%rax), %rcx
	testb	$1, 216(%rcx)
	jne	LBB0_10
## %bb.9:
	testb	$1, 8(%rax)
	jne	LBB0_11
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cdda_start_play                ## TAILCALL
LBB0_12:
	movq	(%r14), %rdi
	callq	_cue_parse
	testq	%rax, %rax
	je	LBB0_5
## %bb.13:
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	8(%rax), %rbx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PicoAHW,4,2                    ## @PicoAHW
	.comm	_PAHW_MCD,4,2                   ## @PAHW_MCD
	.comm	_Pico_mcd,8,3                   ## @Pico_mcd
	.comm	_rom_fname_reload,8,3           ## @rom_fname_reload
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".cue"

L_.str.1:                               ## @.str.1
	.asciz	"emu_HandleResume: reopen %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"reopen %s\n"

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

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emu_HandleResume               ; -- Begin function emu_HandleResume
	.p2align	2
_emu_HandleResume:                      ; @emu_HandleResume
	.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
Lloh0:
	adrp	x8, _PicoAHW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PicoAHW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PAHW_MCD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAHW_MCD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.1:
Lloh6:
	adrp	x21, _Pico_mcd@GOTPAGE
Lloh7:
	ldr	x21, [x21, _Pico_mcd@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.2:
Lloh8:
	adrp	x20, _rom_fname_reload@GOTPAGE
Lloh9:
	ldr	x20, [x20, _rom_fname_reload@GOTPAGEOFF]
	ldr	x19, [x20]
	mov	x0, x19
	bl	_strlen
	cmp	w0, #5
	b.lt	LBB0_4
; %bb.3:
	add	x8, x19, w0, uxtw
	sub	x0, x8, #4
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcasecmp
	cbz	x0, LBB0_11
LBB0_4:
	mov	x20, #0
LBB0_5:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_lprintf
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	ldr	x0, [x8]
	bl	_pm_close
	mov	x0, x19
	bl	_pm_open
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	str	x0, [x8]
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	ldr	x8, [x8]
Lloh14:
	adrp	x9, l_.str.3@PAGE
Lloh15:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh16:
	adrp	x10, l_.str.4@PAGE
Lloh17:
	add	x10, x10, l_.str.4@PAGEOFF
	cmp	x8, #0
	csel	x1, x10, x9, eq
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_lprintf
	cbz	x20, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_cue_destroy
LBB0_7:
	bl	_mp3_reopen_file
	ldr	x8, [x21]
	ldr	x9, [x8]
	ldrb	w9, [x9, #216]
	tbnz	w9, #0, LBB0_9
; %bb.8:
	ldrb	w8, [x8, #8]
	tbnz	w8, #0, LBB0_10
LBB0_9:
	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_10:
	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
	b	_cdda_start_play
LBB0_11:
	ldr	x0, [x20]
	bl	_cue_parse
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.12:
	ldr	x8, [x20]
	ldr	x19, [x8, #8]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PicoAHW,4,2                    ; @PicoAHW
	.comm	_PAHW_MCD,4,2                   ; @PAHW_MCD
	.comm	_Pico_mcd,8,3                   ; @Pico_mcd
	.comm	_rom_fname_reload,8,3           ; @rom_fname_reload
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".cue"

l_.str.1:                               ; @.str.1
	.asciz	"emu_HandleResume: reopen %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"reopen %s\n"

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

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

.subsections_via_symbols
