	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_alloc_voice            ## -- Begin function snd_gf1_alloc_voice
	.p2align	4, 0x90
_snd_gf1_alloc_voice:                   ## @snd_gf1_alloc_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	%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
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r13
	callq	_spin_lock_irqsave
	movq	_SNDRV_GF1_VOICE_TYPE_PCM@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	8(%r13), %rax
	cmpq	16(%r13), %rax
	jge	LBB0_21
LBB0_2:
	movq	24(%r13), %rax
	leaq	16(%rax), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx)
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 24(%rdx)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 48(%rdx)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 72(%rdx)
	je	LBB0_7
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	$4, %rcx
	addq	$96, %rdx
	cmpq	$32, %rcx
	jne	LBB0_3
## %bb.13:
	leaq	32(%rax), %rdx
	xorl	%ecx, %ecx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=1
	addq	$2, %rcx
	addq	$48, %rdx
	cmpq	$32, %rcx
	je	LBB0_21
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -24(%rdx)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	$0, -28(%rdx)
	je	LBB0_19
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	cmpq	$0, (%rdx)
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	$0, -4(%rdx)
	jne	LBB0_20
## %bb.18:
	incq	%rcx
LBB0_19:
	movl	%ecx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rbx
	movl	(%rax,%rcx,8), %edx
	movq	%r13, %rdi
	movl	%edx, %esi
	callq	_snd_gf1_clear_voices
	jmp	LBB0_11
LBB0_21:
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_8:
	incq	%rcx
	jmp	LBB0_10
LBB0_9:
	addq	$2, %rcx
	jmp	LBB0_10
LBB0_7:
	addq	$3, %rcx
LBB0_10:
	movl	%ecx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rbx
LBB0_11:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	callq	_snd_gf1_alloc_voice_use
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
LBB0_22:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_GF1_VOICE_TYPE_PCM,4,2   ## @SNDRV_GF1_VOICE_TYPE_PCM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_alloc_voice            ; -- Begin function snd_gf1_alloc_voice
	.p2align	2
_snd_gf1_alloc_voice:                   ; @snd_gf1_alloc_voice
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _SNDRV_GF1_VOICE_TYPE_PCM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_GF1_VOICE_TYPE_PCM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.1:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.ge	LBB0_11
LBB0_2:
	mov	x9, #0
	ldr	x8, [x19, #24]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x8, x9
	ldr	w10, [x23, #16]
	cbz	w10, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #24
	cmp	x9, #768
	b.ne	LBB0_3
; %bb.5:
	mov	x9, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x9, #24
	cmp	x9, #768
	b.eq	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x10, x8, x9
	ldr	x11, [x10, #8]
	cbz	x11, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w10, [x10, #4]
	cbnz	w10, LBB0_6
; %bb.9:
	add	x23, x8, x9
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x1
	bl	_snd_gf1_clear_voices
LBB0_10:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_snd_gf1_alloc_voice_use
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x23, #0
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_GF1_VOICE_TYPE_PCM,4,2   ; @SNDRV_GF1_VOICE_TYPE_PCM
.subsections_via_symbols
