	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pemu_sound_stop                ## -- Begin function pemu_sound_stop
	.p2align	4, 0x90
_pemu_sound_stop:                       ## @pemu_sound_stop
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_samples_done@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_sndBuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_samples_block@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	xorl	%esi, %esi
	callq	_memset32
	movl	(%r14), %eax
	leal	(%rax,%rax,2), %eax
	movq	_samples_made@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_sound_sem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_sceKernelSignalSema
LBB0_2:
	movl	$100000, %edi                   ## imm = 0x186A0
	callq	_sceKernelDelayThread
	movq	$0, (%rbx)
	movq	_samples_made@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	xorl	%eax, %eax
	callq	_sceAudioOutput2GetRestSample
	testq	%rax, %rax
	jle	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$100, %edi
	callq	_psp_msleep
	xorl	%eax, %eax
	callq	_sceAudioOutput2GetRestSample
	testq	%rax, %rax
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%rbx), %eax
	cmpl	$15, %ebx
	movl	%eax, %ebx
	jb	LBB0_4
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sceAudio_5C37C0AE              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_samples_done,8,3               ## @samples_done
	.comm	_sndBuffer,8,3                  ## @sndBuffer
	.comm	_samples_block,4,2              ## @samples_block
	.comm	_samples_made,4,2               ## @samples_made
	.comm	_sound_sem,4,2                  ## @sound_sem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pemu_sound_stop                ; -- Begin function pemu_sound_stop
	.p2align	2
_pemu_sound_stop:                       ; @pemu_sound_stop
	.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	x19, _samples_done@GOTPAGE
Lloh1:
	ldr	x19, [x19, _samples_done@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x20, _samples_made@GOTPAGE
Lloh3:
	ldr	x20, [x20, _samples_made@GOTPAGEOFF]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _sndBuffer@GOTPAGE
Lloh5:
	ldr	x8, [x8, _sndBuffer@GOTPAGEOFF]
Lloh6:
	ldr	x0, [x8]
Lloh7:
	adrp	x21, _samples_block@GOTPAGE
Lloh8:
	ldr	x21, [x21, _samples_block@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_memset32
	ldr	w8, [x21]
	add	w8, w8, w8, lsl #1
	str	w8, [x20]
Lloh9:
	adrp	x8, _sound_sem@GOTPAGE
Lloh10:
	ldr	x8, [x8, _sound_sem@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_sceKernelSignalSema
LBB0_2:
	mov	w0, #34464
	movk	w0, #1, lsl #16
	bl	_sceKernelDelayThread
	str	xzr, [x19]
	str	wzr, [x20]
	bl	_sceAudioOutput2GetRestSample
	cmp	x0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w19, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #100
	bl	_psp_msleep
	bl	_sceAudioOutput2GetRestSample
	cmp	x0, #1
	b.lt	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w19, #1
	cmp	w19, #15
	mov	x19, x8
	b.lo	LBB0_4
LBB0_6:
	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	_sceAudio_5C37C0AE
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_samples_done,8,3               ; @samples_done
	.comm	_sndBuffer,8,3                  ; @sndBuffer
	.comm	_samples_block,4,2              ; @samples_block
	.comm	_samples_made,4,2               ; @samples_made
	.comm	_sound_sem,4,2                  ; @sound_sem
.subsections_via_symbols
