	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_PrimaryPlay             ## -- Begin function DSOUND_PrimaryPlay
	.p2align	4, 0x90
_DSOUND_PrimaryPlay:                    ## @DSOUND_PrimaryPlay
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TRACE
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	_DSBPLAY_LOOPING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_IDsDriverBuffer_Play
	movq	%rax, %rbx
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_3:
	movl	(%rbx), %edi
	callq	_waveOutRestart
	movl	%eax, %edi
	callq	_mmErr
	movq	%rax, %rbx
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
LBB0_5:
	callq	_WARN
LBB0_6:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	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	_DSBPLAY_LOOPING,4,2            ## @DSBPLAY_LOOPING
L_.str.1:                               ## @.str.1
	.asciz	"IDsDriverBuffer_Play failed\n"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_PrimaryPlay             ; -- Begin function DSOUND_PrimaryPlay
	.p2align	2
_DSOUND_PrimaryPlay:                    ; @DSOUND_PrimaryPlay
	.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	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _DSBPLAY_LOOPING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DSBPLAY_LOOPING@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	w1, #0
	mov	w2, #0
	bl	_IDsDriverBuffer_Play
	mov	x19, x0
Lloh5:
	adrp	x8, _DS_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.2:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19]
	bl	_waveOutRestart
	bl	_mmErr
	mov	x19, x0
Lloh10:
	adrp	x8, _DS_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.4:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_5:
	bl	_WARN
LBB0_6:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DS_OK,8,3                      ; @DS_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p)\n"

	.comm	_DSBPLAY_LOOPING,4,2            ; @DSBPLAY_LOOPING
l_.str.1:                               ; @.str.1
	.asciz	"IDsDriverBuffer_Play failed\n"

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

.subsections_via_symbols
