	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DSoundRender_HandleEndOfStream
_DSoundRender_HandleEndOfStream:        ## @DSoundRender_HandleEndOfStream
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	_State_Running@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	leaq	24(%rdi), %r15
	leaq	-48(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	leaq	-56(%rbp), %rsi
	movq	%r13, %rdx
	callq	_DSoundRender_UpdatePositions
	movq	-56(%rbp), %rax
	cmpq	-48(%rbp), %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, (%rbx)
	movq	%r14, %rdi
	callq	_LeaveCriticalSection
	movq	%r15, %rdi
	callq	_LeaveCriticalSection
	movl	32(%rbx), %edi
	movl	$10, %esi
	callq	_WaitForSingleObject
	movq	%r15, %rdi
	callq	_EnterCriticalSection
	movq	%r14, %rdi
	callq	_EnterCriticalSection
	movl	$0, (%rbx)
	movq	8(%rbx), %rax
	cmpq	(%r12), %rax
	je	LBB0_2
LBB0_4:
	movq	_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_State_Running,8,3              ## @State_Running
	.comm	_S_OK,4,2                       ## @S_OK
	.no_dead_strip	_DSoundRender_HandleEndOfStream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DSoundRender_HandleEndOfStream
_DSoundRender_HandleEndOfStream:        ; @DSoundRender_HandleEndOfStream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x22, _State_Running@GOTPAGE
Lloh1:
	ldr	x22, [x22, _State_Running@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
	add	x20, x0, #16
	add	x21, x0, #24
	mov	w23, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_DSoundRender_UpdatePositions
	ldp	x9, x8, [sp]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w23, [x19]
	mov	x0, x20
	bl	_LeaveCriticalSection
	mov	x0, x21
	bl	_LeaveCriticalSection
	ldr	w0, [x19, #32]
	mov	w1, #10
	bl	_WaitForSingleObject
	mov	x0, x21
	bl	_EnterCriticalSection
	mov	x0, x20
	bl	_EnterCriticalSection
	str	wzr, [x19]
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_2
LBB0_4:
Lloh2:
	adrp	x8, _S_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_State_Running,8,3              ; @State_Running
	.comm	_S_OK,4,2                       ; @S_OK
	.no_dead_strip	_DSoundRender_HandleEndOfStream
.subsections_via_symbols
