	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NewSecondarySoundBuffer        ## -- Begin function NewSecondarySoundBuffer
	.p2align	4, 0x90
_NewSecondarySoundBuffer:               ## @NewSecondarySoundBuffer
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$4, %edx
	callq	_HeapAlloc
	movq	_DSERR_OUTOFMEMORY@GOTPCREL(%rip), %r13
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rax
	movl	(%rax), %r14d
	addl	$4, %r14d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_HeapAlloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	(%r12), %edi
	callq	_ASSERT
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	(%r12), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	movq	%rax, 80(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	(%r12), %esi
	movq	8(%r12), %rcx
	xorl	%edx, %edx
	cmpl	$8, 4(%rcx)
	sete	%dl
	shll	$7, %edx
	movq	%rax, %rdi
	callq	_FillMemory
	movl	$1, (%rbx)
	movq	%rbx, %r13
	addq	$8, %r13
	movq	_vt_DirectSoundBuffer8@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movl	%r15d, 72(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 68(%rbx)
	movl	16(%r12), %eax
	movl	%eax, 64(%rbx)
	movq	8(%r12), %rsi
	movl	8(%rsi), %eax
	movl	%eax, 60(%rbx)
	movq	_KSSTATE_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_DSBVOLUME_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_DSBPAN_CENTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movl	(%r12), %eax
	movl	%eax, 4(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%rbx)
	movq	16(%rbx), %rdi
	movl	%r14d, %edx
	callq	_CopyMemory
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movq	_DS_OK@GOTPCREL(%rip), %r13
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	16(%rbx), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
LBB0_2:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
LBB0_6:
	movl	(%r13), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_DSERR_OUTOFMEMORY,4,2          ## @DSERR_OUTOFMEMORY
	.comm	_vt_DirectSoundBuffer8,4,2      ## @vt_DirectSoundBuffer8
	.comm	_KSSTATE_STOP,4,2               ## @KSSTATE_STOP
	.comm	_DSBVOLUME_MAX,4,2              ## @DSBVOLUME_MAX
	.comm	_DSBPAN_CENTER,4,2              ## @DSBPAN_CENTER
	.comm	_DS_OK,4,2                      ## @DS_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NewSecondarySoundBuffer        ; -- Begin function NewSecondarySoundBuffer
	.p2align	2
_NewSecondarySoundBuffer:               ; @NewSecondarySoundBuffer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x4
	mov	x24, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, 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.1:
	mov	x19, x0
	ldr	x8, [x24, #8]
	ldr	w8, [x8]
	add	w25, w8, #4
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x25
	bl	_HeapAlloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x24]
	bl	_ASSERT
	bl	_GetProcessHeap
	ldr	w2, [x24]
	mov	w1, #0
	bl	_HeapAlloc
	str	x0, [x19, #80]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x24]
	ldr	x8, [x24, #8]
	ldr	w8, [x8, #4]
	cmp	w8, #8
	cset	w8, eq
	lsl	w2, w8, #7
	bl	_FillMemory
	mov	w8, #1
	ldr	w9, [x24, #16]
	ldr	x1, [x24, #8]
	ldr	w10, [x1, #8]
	stp	xzr, xzr, [x19, #32]
	ldr	w11, [x24]
	str	w8, [x19]
Lloh3:
	adrp	x8, _vt_DirectSoundBuffer8@GOTPAGE
Lloh4:
	ldr	x8, [x8, _vt_DirectSoundBuffer8@GOTPAGEOFF]
	mov	x24, x19
	str	x8, [x24, #8]!
	stp	w22, w23, [x19, #68]
	str	w9, [x19, #64]
Lloh5:
	adrp	x8, _KSSTATE_STOP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KSSTATE_STOP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w8, w10, [x19, #56]
Lloh8:
	adrp	x8, _DSBVOLUME_MAX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DSBVOLUME_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _DSBPAN_CENTER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DSBPAN_CENTER@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
	str	w11, [x19, #4]
	str	x21, [x19, #24]
	ldr	x0, [x19, #16]
	mov	x2, x25
	bl	_CopyMemory
	str	x24, [x20]
Lloh14:
	adrp	x8, _DS_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DS_OK@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	bl	_GetProcessHeap
	ldr	x2, [x19, #16]
	mov	w1, #0
	bl	_HeapFree
LBB0_5:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
LBB0_6:
Lloh16:
	adrp	x8, _DSERR_OUTOFMEMORY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DSERR_OUTOFMEMORY@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_DSERR_OUTOFMEMORY,4,2          ; @DSERR_OUTOFMEMORY
	.comm	_vt_DirectSoundBuffer8,4,2      ; @vt_DirectSoundBuffer8
	.comm	_KSSTATE_STOP,4,2               ; @KSSTATE_STOP
	.comm	_DSBVOLUME_MAX,4,2              ; @DSBVOLUME_MAX
	.comm	_DSBPAN_CENTER,4,2              ; @DSBPAN_CENTER
	.comm	_DS_OK,4,2                      ; @DS_OK
.subsections_via_symbols
