	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InternalDirectSoundCreate      ## -- Begin function InternalDirectSoundCreate
	.p2align	4, 0x90
_InternalDirectSoundCreate:             ## @InternalDirectSoundCreate
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	testq	%rdx, %rdx
	jne	LBB0_2
## %bb.3:
	movl	%ecx, %r12d
	movq	%rsi, %r14
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$4, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r13
	movl	$1, (%r13)
	movl	%r12d, 16(%r13)
	addq	$8, %r13
	movq	_vt_DirectSound8@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_IDirectSound8_Initialize
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	%r13, (%r14)
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	callq	_DPRINT
	movq	_DS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_DSERR_INVALIDPARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_DSERR_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rbx
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_DPRINT
	movq	%r13, %rdi
	callq	_IDirectSound8_Release
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_DSERR_INVALIDPARAM,8,3         ## @DSERR_INVALIDPARAM
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_DSERR_OUTOFMEMORY,8,3          ## @DSERR_OUTOFMEMORY
	.comm	_vt_DirectSound8,4,2            ## @vt_DirectSound8
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize DirectSound object with %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"DirectSound object %p\n"

	.comm	_DS_OK,8,3                      ## @DS_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InternalDirectSoundCreate      ; -- Begin function InternalDirectSoundCreate
	.p2align	2
_InternalDirectSoundCreate:             ; @InternalDirectSoundCreate
	.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
	cbz	x1, LBB0_5
; %bb.1:
	cbnz	x2, LBB0_5
; %bb.2:
	mov	x22, x3
	mov	x19, x1
	mov	x21, x0
	bl	_GetProcessHeap
Lloh0:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_HeapAlloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
	mov	w8, #1
	str	w8, [x0]
	str	w22, [x0, #16]
Lloh3:
	adrp	x8, _vt_DirectSound8@GOTPAGE
Lloh4:
	ldr	x8, [x8, _vt_DirectSound8@GOTPAGEOFF]
	str	x8, [x20, #8]!
	mov	x0, x20
	mov	x1, x21
	bl	_IDirectSound8_Initialize
	mov	x21, x0
	bl	_SUCCEEDED
	cbz	w0, LBB0_9
; %bb.4:
	str	x20, [x19]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_DPRINT
Lloh7:
	adrp	x8, _DS_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _DSERR_INVALIDPARAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DSERR_INVALIDPARAM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _DSERR_OUTOFMEMORY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DSERR_OUTOFMEMORY@GOTPAGEOFF]
LBB0_7:
	ldr	x21, [x8]
LBB0_8:
	mov	x0, x21
	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
LBB0_9:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DPRINT
	mov	x0, x20
	bl	_IDirectSound8_Release
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DSERR_INVALIDPARAM,8,3         ; @DSERR_INVALIDPARAM
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_DSERR_OUTOFMEMORY,8,3          ; @DSERR_OUTOFMEMORY
	.comm	_vt_DirectSound8,4,2            ; @vt_DirectSound8
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize DirectSound object with %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"DirectSound object %p\n"

	.comm	_DS_OK,8,3                      ; @DS_OK
.subsections_via_symbols
