	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SNDDXUpdateAudio               ## -- Begin function SNDDXUpdateAudio
	.p2align	4, 0x90
_SNDDXUpdateAudio:                      ## @SNDDXUpdateAudio
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_lpDSB2@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	-52(%rbp), %rsi
	callq	_IDirectSoundBuffer8_GetStatus
	movq	_DSBSTATUS_BUFFERLOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -52(%rbp)
	jne	LBB0_5
## %bb.1:
	movl	(%r12), %edi
	movq	_soundoffset@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(,%rbx,8), %edx
	leaq	-48(%rbp), %rax
	leaq	-72(%rbp), %rcx
	leaq	-44(%rbp), %r8
	leaq	-64(%rbp), %r9
	pushq	$0
	pushq	%rax
	callq	_IDirectSoundBuffer8_Lock
	addq	$16, %rsp
	movq	_stereodata16@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %ecx
	callq	_ScspConvert32uto16s
	movq	-72(%rbp), %rdi
	movq	(%r13), %rsi
	movl	-44(%rbp), %edx
	callq	_memcpy
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.3:
	movslq	-44(%rbp), %rsi
	shlq	$2, %rsi
	addq	(%r13), %rsi
	movl	-48(%rbp), %edx
	callq	_memcpy
	movq	-64(%rbp), %rcx
	jmp	LBB0_4
LBB0_2:
	xorl	%ecx, %ecx
LBB0_4:
	movl	-44(%rbp), %ebx
	movl	-48(%rbp), %r8d
	leal	(%r8,%rbx), %eax
	movq	_soundoffset@GOTPCREL(%rip), %rdi
	addl	(%rdi), %eax
	movq	_soundbufsize@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movl	%edx, (%rdi)
	movl	(%r12), %edi
	movq	-72(%rbp), %rsi
	movl	%ebx, %edx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_IDirectSoundBuffer8_Unlock
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lpDSB2,4,2                     ## @lpDSB2
	.comm	_DSBSTATUS_BUFFERLOST,4,2       ## @DSBSTATUS_BUFFERLOST
	.comm	_soundoffset,4,2                ## @soundoffset
	.comm	_stereodata16,8,3               ## @stereodata16
	.comm	_soundbufsize,4,2               ## @soundbufsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SNDDXUpdateAudio               ; -- Begin function SNDDXUpdateAudio
	.p2align	2
_SNDDXUpdateAudio:                      ; @SNDDXUpdateAudio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _lpDSB2@GOTPAGE
Lloh1:
	ldr	x22, [x22, _lpDSB2@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x1, sp, #4
	bl	_IDirectSoundBuffer8_GetStatus
	ldr	w8, [sp, #4]
Lloh2:
	adrp	x9, _DSBSTATUS_BUFFERLOST@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DSBSTATUS_BUFFERLOST@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.1:
	ldr	w0, [x22]
Lloh5:
	adrp	x23, _soundoffset@GOTPAGE
Lloh6:
	ldr	x23, [x23, _soundoffset@GOTPAGEOFF]
	ldr	w1, [x23]
	lsl	w2, w19, #3
	add	x3, sp, #24
	add	x4, sp, #12
	add	x5, sp, #16
	add	x6, sp, #8
	mov	w7, #0
	bl	_IDirectSoundBuffer8_Lock
Lloh7:
	adrp	x24, _stereodata16@GOTPAGE
Lloh8:
	ldr	x24, [x24, _stereodata16@GOTPAGEOFF]
	ldr	x2, [x24]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_ScspConvert32uto16s
	ldr	x0, [sp, #24]
	ldr	x1, [x24]
	ldr	w2, [sp, #12]
	bl	_memcpy
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x24]
	ldp	w2, w9, [sp, #8]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x1, x8, x9, lsl #2
	bl	_memcpy
	ldr	x3, [sp, #16]
	b	LBB0_4
LBB0_3:
	mov	x3, #0
LBB0_4:
	ldp	w4, w2, [sp, #8]
	ldr	w8, [x23]
	add	w9, w4, w2
	add	w8, w9, w8
Lloh9:
	adrp	x9, _soundbufsize@GOTPAGE
Lloh10:
	ldr	x9, [x9, _soundbufsize@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x23]
	ldr	w0, [x22]
	ldr	x1, [sp, #24]
	bl	_IDirectSoundBuffer8_Unlock
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_lpDSB2,4,2                     ; @lpDSB2
	.comm	_DSBSTATUS_BUFFERLOST,4,2       ; @DSBSTATUS_BUFFERLOST
	.comm	_soundoffset,4,2                ; @soundoffset
	.comm	_stereodata16,8,3               ; @stereodata16
	.comm	_soundbufsize,4,2               ; @soundbufsize
.subsections_via_symbols
