	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function free_voice
_free_voice:                            ## @free_voice
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	16(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	_IFATN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$65280, %ecx                    ## imm = 0xFF00
	callq	_snd_emu10k1_ptr_write
	movq	_DCYSUSV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	_DCYSUSV_CHANNELENABLE_MASK@GOTPCREL(%rip), %rax
	movl	$32895, %ecx                    ## imm = 0x807F
	orl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_snd_emu10k1_ptr_write
	movq	_VTFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movl	$65535, %ecx                    ## imm = 0xFFFF
	callq	_snd_emu10k1_ptr_write
	movq	_CVCF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movl	$65535, %ecx                    ## imm = 0xFFFF
	callq	_snd_emu10k1_ptr_write
	movq	(%rbx), %rsi
	shlq	$2, %rsi
	addq	(%r14), %rsi
	movq	%r14, %rdi
	callq	_snd_emu10k1_voice_free
	movq	8(%rbx), %rax
	decl	(%rax)
	movq	$-1, (%rbx)
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IFATN,4,2                      ## @IFATN
	.comm	_DCYSUSV,4,2                    ## @DCYSUSV
	.comm	_DCYSUSV_CHANNELENABLE_MASK,4,2 ## @DCYSUSV_CHANNELENABLE_MASK
	.comm	_VTFT,4,2                       ## @VTFT
	.comm	_CVCF,4,2                       ## @CVCF
	.no_dead_strip	_free_voice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function free_voice
_free_voice:                            ; @free_voice
	.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
	ldr	x20, [x0, #16]
	cbz	x20, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x2, [x0]
Lloh0:
	adrp	x8, _IFATN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IFATN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w3, #65280
	bl	_snd_emu10k1_ptr_write
Lloh3:
	adrp	x8, _DCYSUSV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DCYSUSV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x19]
Lloh6:
	adrp	x8, _DCYSUSV_CHANNELENABLE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DCYSUSV_CHANNELENABLE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #32895
	orr	w3, w8, w9
	mov	x0, x20
	bl	_snd_emu10k1_ptr_write
Lloh9:
	adrp	x8, _VTFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VTFT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x2, [x19]
	mov	x0, x20
	mov	w3, #65535
	bl	_snd_emu10k1_ptr_write
Lloh12:
	adrp	x8, _CVCF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CVCF@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	x2, [x19]
	mov	x0, x20
	mov	w3, #65535
	bl	_snd_emu10k1_ptr_write
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	bl	_snd_emu10k1_voice_free
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
	mov	x8, #-1
	str	x8, [x19]
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IFATN,4,2                      ; @IFATN
	.comm	_DCYSUSV,4,2                    ; @DCYSUSV
	.comm	_DCYSUSV_CHANNELENABLE_MASK,4,2 ; @DCYSUSV_CHANNELENABLE_MASK
	.comm	_VTFT,4,2                       ; @VTFT
	.comm	_CVCF,4,2                       ; @CVCF
	.no_dead_strip	_free_voice
.subsections_via_symbols
