	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_PrimaryStop             ## -- Begin function DSOUND_PrimaryStop
	.p2align	4, 0x90
_DSOUND_PrimaryStop:                    ## @DSOUND_PrimaryStop
	.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	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TRACE
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	callq	_IDsDriverBuffer_Stop
	movq	%rax, %r14
	movq	_DSERR_BUFFERLOST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	callq	_DSOUND_PrimaryClose
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_DSOUND_ReopenDevice
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	jmp	LBB0_11
LBB0_8:
	movq	%rbx, %rdi
	callq	_LeaveCriticalSection
	movl	4(%rbx), %edi
	callq	_waveOutPause
	movl	%eax, %edi
	callq	_mmErr
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_EnterCriticalSection
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_11
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_10
LBB0_6:
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_11
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_10
LBB0_4:
	movq	%rbx, %rdi
	callq	_DSOUND_PrimaryOpen
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
LBB0_10:
	callq	_WARN
LBB0_11:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DS_OK,8,3                      ## @DS_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p)\n"

	.comm	_DSERR_BUFFERLOST,8,3           ## @DSERR_BUFFERLOST
	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"DSOUND_ReopenDevice failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"DSOUND_PrimaryOpen failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"IDsDriverBuffer_Stop failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"waveOutPause failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_PrimaryStop             ; -- Begin function DSOUND_PrimaryStop
	.p2align	2
_DSOUND_PrimaryStop:                    ; @DSOUND_PrimaryStop
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_4
; %bb.1:
	bl	_IDsDriverBuffer_Stop
Lloh2:
	adrp	x8, _DSERR_BUFFERLOST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DSERR_BUFFERLOST@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_DSOUND_PrimaryClose
Lloh5:
	adrp	x8, _FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_DSOUND_ReopenDevice
	mov	x19, x0
	bl	_FAILED
	cbz	x0, LBB0_8
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	b	LBB0_11
LBB0_4:
	mov	x0, x20
	bl	_LeaveCriticalSection
	ldr	w0, [x20, #4]
	bl	_waveOutPause
	bl	_mmErr
	mov	x19, x0
	mov	x0, x20
	bl	_EnterCriticalSection
Lloh10:
	adrp	x8, _DS_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x19, x8
	b.eq	LBB0_11
; %bb.5:
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_6:
	mov	x19, x0
Lloh15:
	adrp	x8, _DS_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.7:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_DSOUND_PrimaryOpen
	mov	x19, x0
	bl	_FAILED
	cbz	x0, LBB0_11
; %bb.9:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_10:
	bl	_WARN
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DS_OK,8,3                      ; @DS_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p)\n"

	.comm	_DSERR_BUFFERLOST,8,3           ; @DSERR_BUFFERLOST
	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"DSOUND_ReopenDevice failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"DSOUND_PrimaryOpen failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"IDsDriverBuffer_Stop failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"waveOutPause failed\n"

.subsections_via_symbols
