	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pemu_sound_start               ## -- Begin function pemu_sound_start
	.p2align	4, 0x90
_pemu_sound_start:                      ## @pemu_sound_start
	.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	_PsndOut@GOTPCREL(%rip), %r15
	movq	$0, (%r15)
	movq	_EOPT_EXT_FRMLIMIT@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	notl	%eax
	movq	_currentConfig@GOTPCREL(%rip), %rbx
	andl	(%rbx), %eax
	movl	%eax, (%rbx)
	movq	_EOPT_EN_SOUND@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	xorl	%edi, %edi
	callq	_PsndRerate
	movq	_FrameWnd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PsndRate@GOTPCREL(%rip), %rax
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	movq	_POPT_EN_STEREO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	xorl	%edx, %edx
	andl	(%rcx), %esi
	movl	(%rax), %esi
	setne	%dl
	movq	_PsndLen@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_DSoundInit
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lprintf                        ## TAILCALL
LBB0_2:
	movq	_sndbuff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	_update_sound@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoWriteSound@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	(%r14), %eax
	orl	%eax, (%rbx)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PsndOut,8,3                    ## @PsndOut
	.comm	_EOPT_EXT_FRMLIMIT,4,2          ## @EOPT_EXT_FRMLIMIT
	.comm	_currentConfig,4,2              ## @currentConfig
	.comm	_EOPT_EN_SOUND,4,2              ## @EOPT_EN_SOUND
	.comm	_FrameWnd,4,2                   ## @FrameWnd
	.comm	_PsndRate,4,2                   ## @PsndRate
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_POPT_EN_STEREO,4,2             ## @POPT_EN_STEREO
	.comm	_PsndLen,4,2                    ## @PsndLen
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dsound init failed\n"

	.comm	_sndbuff,8,3                    ## @sndbuff
	.comm	_update_sound,4,2               ## @update_sound
	.comm	_PicoWriteSound,4,2             ## @PicoWriteSound
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pemu_sound_start               ; -- Begin function pemu_sound_start
	.p2align	2
_pemu_sound_start:                      ; @pemu_sound_start
	.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	x21, _PsndOut@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PsndOut@GOTPAGEOFF]
	str	xzr, [x21]
Lloh2:
	adrp	x20, _EOPT_EXT_FRMLIMIT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _EOPT_EXT_FRMLIMIT@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh4:
	adrp	x19, _currentConfig@GOTPAGE
Lloh5:
	ldr	x19, [x19, _currentConfig@GOTPAGEOFF]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh6:
	adrp	x9, _EOPT_EN_SOUND@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EOPT_EN_SOUND@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	w0, #0
	bl	_PsndRerate
Lloh9:
	adrp	x8, _FrameWnd@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FrameWnd@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _PsndRate@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PsndRate@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _PicoOpt@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PicoOpt@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _POPT_EN_STEREO@GOTPAGE
Lloh19:
	ldr	x9, [x9, _POPT_EN_STEREO@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
Lloh21:
	adrp	x8, _PsndLen@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PsndLen@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	bl	_DSoundInit
	cbz	w0, LBB0_3
; %bb.2:
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	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	_lprintf
LBB0_3:
Lloh26:
	adrp	x8, _sndbuff@GOTPAGE
Lloh27:
	ldr	x8, [x8, _sndbuff@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	str	x8, [x21]
Lloh29:
	adrp	x8, _update_sound@GOTPAGE
Lloh30:
	ldr	x8, [x8, _update_sound@GOTPAGEOFF]
Lloh31:
	adrp	x9, _PicoWriteSound@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PicoWriteSound@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	str	w8, [x9]
	ldr	w8, [x20]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PsndOut,8,3                    ; @PsndOut
	.comm	_EOPT_EXT_FRMLIMIT,4,2          ; @EOPT_EXT_FRMLIMIT
	.comm	_currentConfig,4,2              ; @currentConfig
	.comm	_EOPT_EN_SOUND,4,2              ; @EOPT_EN_SOUND
	.comm	_FrameWnd,4,2                   ; @FrameWnd
	.comm	_PsndRate,4,2                   ; @PsndRate
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_POPT_EN_STEREO,4,2             ; @POPT_EN_STEREO
	.comm	_PsndLen,4,2                    ; @PsndLen
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dsound init failed\n"

	.comm	_sndbuff,8,3                    ; @sndbuff
	.comm	_update_sound,4,2               ; @update_sound
	.comm	_PicoWriteSound,4,2             ; @PicoWriteSound
.subsections_via_symbols
