	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_free_voice             ## -- Begin function snd_gf1_free_voice
	.p2align	4, 0x90
_snd_gf1_free_voice:                    ## @snd_gf1_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	cmpq	$0, 32(%rsi)
	je	LBB0_5
## %bb.2:
	movq	%rdi, %r14
	movq	_SNDRV_GF1_HANDLER_VOICE@GOTPCREL(%rip), %rax
	movl	(%rbx), %esi
	orl	(%rax), %esi
	callq	_snd_gf1_set_default_handlers
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%edx, %esi
	callq	_snd_gf1_clear_voices
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %r15
	movq	$0, 8(%rbx)
	movq	$0, 40(%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.3:
	decl	4(%r14)
LBB0_4:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movq	$0, 32(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r15, %r15
	je	LBB0_5
## %bb.6:
	movq	%r15, %rax
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_GF1_HANDLER_VOICE,4,2    ## @SNDRV_GF1_HANDLER_VOICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_free_voice             ; -- Begin function snd_gf1_free_voice
	.p2align	2
_snd_gf1_free_voice:                    ; @snd_gf1_free_voice
	.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
	cbz	x1, LBB0_6
; %bb.1:
	mov	x19, x1
	ldr	x8, [x1, #32]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x20, x0
Lloh0:
	adrp	x8, _SNDRV_GF1_HANDLER_VOICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_GF1_HANDLER_VOICE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w1, w9, w8
	bl	_snd_gf1_set_default_handlers
	ldr	w1, [x19]
	mov	x0, x20
	mov	x2, x1
	bl	_snd_gf1_clear_voices
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x0, [x19, #8]
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	str	xzr, [x19, #8]
	str	xzr, [x19, #40]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x20, #4]
	sub	w8, w8, #1
	str	w8, [x20, #4]
LBB0_4:
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #32]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	cbz	x1, LBB0_6
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	br	x1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_GF1_HANDLER_VOICE,4,2    ; @SNDRV_GF1_HANDLER_VOICE
.subsections_via_symbols
