	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DSoundRender_UpdatePositions
_DSoundRender_UpdatePositions:          ## @DSoundRender_UpdatePositions
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	(%rdi), %r14
	movq	8(%rdi), %rax
	movq	16(%rdi), %r13
	xorl	%r15d, %r15d
	cmpq	%r13, %r14
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	cmovleq	%rax, %r15
	movl	24(%rdi), %edi
	leaq	-64(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_IDirectSoundBuffer_GetCurrentPosition
	movq	-64(%rbp), %rdx
	cmpq	%r13, %rdx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jge	LBB0_1
## %bb.2:
	movq	8(%rbx), %rsi
	movq	%rdx, %r12
	addq	%rsi, %r12
	movq	%rbx, %rdi
	callq	_time_from_pos
	addl	%eax, 28(%rbx)
	movq	-64(%rbp), %rdx
	jmp	LBB0_3
LBB0_1:
	movq	%rdx, %r12
LBB0_3:
	addq	%r14, %r15
	movq	%rdx, 16(%rbx)
	subq	%r13, %r12
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%r12, %rcx
	callq	_TRACE
	movl	24(%rbx), %edi
	leaq	-72(%rbp), %rax
	leaq	-96(%rbp), %rcx
	leaq	-80(%rbp), %r8
	leaq	-88(%rbp), %r9
	movq	%r13, %rsi
	movq	%r12, %rdx
	pushq	$0
	pushq	%rax
	callq	_IDirectSoundBuffer_Lock
	addq	$16, %rsp
	xorl	%esi, %esi
	movq	-104(%rbp), %r12                ## 8-byte Reload
	cmpl	$8, (%r12)
	movq	-96(%rbp), %rdi
	sete	%sil
	shll	$7, %esi
	movq	-80(%rbp), %rdx
	callq	_memset
	xorl	%esi, %esi
	cmpl	$8, (%r12)
	movq	-88(%rbp), %rdi
	sete	%sil
	shll	$7, %esi
	movq	-72(%rbp), %rdx
	callq	_memset
	movl	24(%rbx), %edi
	movq	-96(%rbp), %rsi
	movq	-80(%rbp), %rdx
	movq	-88(%rbp), %rcx
	movq	-72(%rbp), %r8
	callq	_IDirectSoundBuffer_Unlock
LBB0_5:
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	cmpq	%rdi, %r14
	setl	%al
	movq	-56(%rbp), %rdx
	cmpq	%rdx, %r15
	setge	%cl
	andb	%al, %cl
	leaq	-56(%rbp), %r15
	movq	%r15, %rax
	cmovneq	%rbx, %rax
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	movq	%rdx, (%rsi)
	cmpq	%rdi, %r14
	jge	LBB0_6
## %bb.7:
	testb	%cl, %cl
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_9
## %bb.8:
	movq	8(%rbx), %rax
	movq	%rax, (%rbx)
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
	movq	%r15, %rax
	jmp	LBB0_9
LBB0_6:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_9:
	movq	(%rax), %rax
	movq	%rax, (%r14)
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Moving from %u to %u: clearing %u bytes\n"

L_.str.1:                               ## @.str.1
	.asciz	"Underrun of data occurred!\n"

	.no_dead_strip	_DSoundRender_UpdatePositions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DSoundRender_UpdatePositions
_DSoundRender_UpdatePositions:          ; @DSoundRender_UpdatePositions
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #32]
	ldr	x26, [x8]
	ldp	x24, x25, [x0]
	ldr	x22, [x0, #16]
	cmp	x24, x22
	csel	x23, xzr, x25, gt
	ldr	w0, [x0, #24]
	add	x1, sp, #8
	mov	x2, sp
	bl	_IDirectSoundBuffer_GetCurrentPosition
	ldr	x2, [sp, #8]
	mov	x28, x2
	cmp	x2, x22
	b.ge	LBB0_2
; %bb.1:
	ldr	x1, [x20, #8]
	add	x28, x1, x2
	mov	x0, x20
	bl	_time_from_pos
	ldr	w8, [x20, #28]
	add	w8, w8, w0
	str	w8, [x20, #28]
	ldr	x2, [sp, #8]
LBB0_2:
	add	x27, x23, x24
	str	x2, [x20, #16]
	subs	x23, x28, x22
	b.eq	LBB0_4
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x3, x23
	bl	_TRACE
	ldr	w0, [x20, #24]
	add	x3, sp, #40
	add	x4, sp, #24
	add	x5, sp, #32
	add	x6, sp, #16
	mov	x1, x22
	mov	x2, x23
	mov	w7, #0
	bl	_IDirectSoundBuffer_Lock
	ldr	x0, [sp, #40]
	ldr	w8, [x26]
	cmp	w8, #8
	cset	w8, eq
	lsl	w1, w8, #7
	ldr	x2, [sp, #24]
	bl	_memset
	ldr	x0, [sp, #32]
	ldr	w8, [x26]
	cmp	w8, #8
	cset	w8, eq
	lsl	w1, w8, #7
	ldr	x2, [sp, #16]
	bl	_memset
	ldr	w0, [x20, #24]
	ldp	x3, x1, [sp, #32]
	ldp	x4, x2, [sp, #16]
	bl	_IDirectSoundBuffer_Unlock
LBB0_4:
	cmp	x24, x25
	cset	w8, lt
	ldr	x10, [sp]
	cmp	x27, x10
	cset	w9, ge
	ands	w9, w8, w9
	mov	x8, sp
	csel	x8, x20, x8, ne
	str	x10, [x21]
	cmp	x24, x25
	b.ge	LBB0_7
; %bb.5:
	tbnz	w9, #0, LBB0_7
; %bb.6:
	ldr	x8, [x20, #8]
	str	x8, [x20]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
	mov	x8, sp
LBB0_7:
	ldr	x8, [x8]
	str	x8, [x19]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Moving from %u to %u: clearing %u bytes\n"

l_.str.1:                               ; @.str.1
	.asciz	"Underrun of data occurred!\n"

	.no_dead_strip	_DSoundRender_UpdatePositions
.subsections_via_symbols
