	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_Create                  ## -- Begin function DSOUND_Create
	.p2align	4, 0x90
_DSOUND_Create:                         ## @DSOUND_Create
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	callq	_debugstr_guid
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_TRACE
	movq	_IID_IUnknown@GOTPCREL(%rip), %rsi
	movl	%ebx, %edi
	callq	_IsEqualIID
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_IID_IDirectSound@GOTPCREL(%rip), %rsi
	movl	%ebx, %edi
	callq	_IsEqualIID
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_setup_dsound_options
	leaq	-20(%rbp), %rdi
	callq	_IDirectSoundImpl_Create
	movq	%rax, %rbx
	movq	_DS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_7
## %bb.4:
	movl	-20(%rbp), %edi
	movq	%r14, %rsi
	callq	_IDirectSound_IDirectSound_Create
	movq	%rax, %rbx
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_IDirectSound_IDirectSound_AddRef
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_WARN
	movq	$0, (%r14)
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_WARN
	movl	-20(%rbp), %edi
	callq	_IDirectSound8_Release
	jmp	LBB0_8
LBB0_2:
	movq	$0, (%r14)
	movq	_E_NOINTERFACE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_8:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%s, %p)\n"

	.comm	_IID_IUnknown,4,2               ## @IID_IUnknown
	.comm	_IID_IDirectSound,4,2           ## @IID_IDirectSound
	.comm	_E_NOINTERFACE,8,3              ## @E_NOINTERFACE
	.comm	_DS_OK,8,3                      ## @DS_OK
L_.str.1:                               ## @.str.1
	.asciz	"IDirectSound_IDirectSound_Create failed\n"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_Create                  ; -- Begin function DSOUND_Create
	.p2align	2
_DSOUND_Create:                         ; @DSOUND_Create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_debugstr_guid
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_TRACE
Lloh2:
	adrp	x1, _IID_IUnknown@GOTPAGE
Lloh3:
	ldr	x1, [x1, _IID_IUnknown@GOTPAGEOFF]
	mov	x0, x20
	bl	_IsEqualIID
	cbnz	w0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x1, _IID_IDirectSound@GOTPAGE
Lloh5:
	ldr	x1, [x1, _IID_IDirectSound@GOTPAGEOFF]
	mov	x0, x20
	bl	_IsEqualIID
	cbz	w0, LBB0_7
LBB0_2:
	bl	_setup_dsound_options
	add	x0, sp, #12
	bl	_IDirectSoundImpl_Create
Lloh6:
	adrp	x8, _DS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [sp, #12]
	mov	x1, x19
	bl	_IDirectSound_IDirectSound_Create
	mov	x20, x0
	ldr	x0, [x19]
	cbz	x0, LBB0_6
; %bb.4:
	bl	_IDirectSound_IDirectSound_AddRef
	b	LBB0_8
LBB0_5:
	mov	x20, x0
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WARN
	str	xzr, [x19]
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
	ldr	w0, [sp, #12]
	bl	_IDirectSound8_Release
	b	LBB0_8
LBB0_7:
	str	xzr, [x19]
Lloh13:
	adrp	x8, _E_NOINTERFACE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _E_NOINTERFACE@GOTPAGEOFF]
Lloh15:
	ldr	x20, [x8]
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%s, %p)\n"

	.comm	_IID_IUnknown,4,2               ; @IID_IUnknown
	.comm	_IID_IDirectSound,4,2           ; @IID_IDirectSound
	.comm	_E_NOINTERFACE,8,3              ; @E_NOINTERFACE
	.comm	_DS_OK,8,3                      ; @DS_OK
l_.str.1:                               ; @.str.1
	.asciz	"IDirectSound_IDirectSound_Create failed\n"

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

.subsections_via_symbols
