	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function IDirectSound_IDirectSound_Create
_IDirectSound_IDirectSound_Create:      ## @IDirectSound_IDirectSound_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_TRACE
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	_DirectSound_DirectSound_Vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r15)
	movq	$0, 8(%r15)
	movq	%rbx, (%r15)
	movq	%rbx, %rdi
	callq	_IDirectSoundImpl_AddRef
	movq	%r15, (%r14)
	movq	_DS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	_DSERR_INVALIDPARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_ERR
	movq	$0, (%r14)
	movq	_DSERR_INVALIDPARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	callq	_WARN
	movq	$0, (%r14)
	movq	_DSERR_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p,%p)\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid parameter: ppds == NULL\n"

	.comm	_DSERR_INVALIDPARAM,4,2         ## @DSERR_INVALIDPARAM
L_.str.2:                               ## @.str.2
	.asciz	"invalid parameter: pds == NULL\n"

L_.str.3:                               ## @.str.3
	.asciz	"out of memory\n"

	.comm	_DSERR_OUTOFMEMORY,4,2          ## @DSERR_OUTOFMEMORY
	.comm	_DirectSound_DirectSound_Vtbl,4,2 ## @DirectSound_DirectSound_Vtbl
	.comm	_DS_OK,4,2                      ## @DS_OK
	.no_dead_strip	_IDirectSound_IDirectSound_Create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function IDirectSound_IDirectSound_Create
_IDirectSound_IDirectSound_Create:      ; @IDirectSound_IDirectSound_Create
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_TRACE
	cbz	x19, LBB0_4
; %bb.1:
	cbz	x20, LBB0_5
; %bb.2:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #24
	bl	_HeapAlloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
Lloh2:
	adrp	x8, _DirectSound_DirectSound_Vtbl@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DirectSound_DirectSound_Vtbl@GOTPAGEOFF]
	stp	xzr, x8, [x0, #8]
	str	x20, [x0]
	mov	x0, x20
	bl	_IDirectSoundImpl_AddRef
	str	x21, [x19]
Lloh4:
	adrp	x8, _DS_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
	str	xzr, [x19]
LBB0_6:
Lloh10:
	adrp	x8, _DSERR_INVALIDPARAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DSERR_INVALIDPARAM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_WARN
	str	xzr, [x19]
Lloh14:
	adrp	x8, _DSERR_OUTOFMEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DSERR_OUTOFMEMORY@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p,%p)\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid parameter: ppds == NULL\n"

	.comm	_DSERR_INVALIDPARAM,4,2         ; @DSERR_INVALIDPARAM
l_.str.2:                               ; @.str.2
	.asciz	"invalid parameter: pds == NULL\n"

l_.str.3:                               ; @.str.3
	.asciz	"out of memory\n"

	.comm	_DSERR_OUTOFMEMORY,4,2          ; @DSERR_OUTOFMEMORY
	.comm	_DirectSound_DirectSound_Vtbl,4,2 ; @DirectSound_DirectSound_Vtbl
	.comm	_DS_OK,4,2                      ; @DS_OK
	.no_dead_strip	_IDirectSound_IDirectSound_Create
.subsections_via_symbols
