	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ymfpci_pcm_voice_alloc
_snd_ymfpci_pcm_voice_alloc:            ## @snd_ymfpci_pcm_voice_alloc
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	cmpl	$1, %esi
	jg	LBB0_3
## %bb.1:
	movq	(%r14), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movq	8(%r14), %rdi
	callq	_snd_ymfpci_voice_free
	movq	(%r14), %rax
	movq	$0, 8(%rax)
LBB0_3:
	cmpl	$2, %ebx
	je	LBB0_7
## %bb.4:
	cmpl	$1, %ebx
	jne	LBB0_9
## %bb.5:
	movq	(%r14), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	jne	LBB0_19
	jmp	LBB0_6
LBB0_7:
	movq	(%r14), %rcx
	movq	(%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.8:
	xorl	%eax, %eax
	cmpq	$0, 8(%rcx)
	jne	LBB0_19
	jmp	LBB0_11
LBB0_9:
	jle	LBB0_6
## %bb.10:
	movq	(%r14), %rcx
	movq	(%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
LBB0_11:
	movb	$1, %bl
	cmpq	$0, 8(%rcx)
	jne	LBB0_16
## %bb.12:
	movq	8(%r14), %rdi
	callq	_snd_ymfpci_voice_free
	movq	(%r14), %rax
	movq	$0, (%rax)
	jmp	LBB0_16
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_15:
	movb	$1, %bl
LBB0_16:
	movq	(%r14), %rcx
	movq	8(%r14), %rdi
	movq	_YMFPCI_PCM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	callq	_snd_ymfpci_voice_alloc
	testl	%eax, %eax
	js	LBB0_19
## %bb.17:
	movq	(%r14), %rcx
	movq	(%rcx), %rax
	movq	%r14, 8(%rax)
	movq	_snd_ymfpci_pcm_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rcx), %rdx
	movl	%eax, 16(%rdx)
	xorl	%eax, %eax
	testb	%bl, %bl
	je	LBB0_19
## %bb.18:
	movq	8(%r14), %rsi
	movq	(%rsi), %rsi
	movslq	(%rdx), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	leaq	(%rsi,%rdx,8), %rdx
	addq	$24, %rdx
	movq	%rdx, 8(%rcx)
	movq	(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	%r14, 8(%rcx)
LBB0_19:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_YMFPCI_PCM,4,2                 ## @YMFPCI_PCM
	.comm	_snd_ymfpci_pcm_interrupt,4,2   ## @snd_ymfpci_pcm_interrupt
	.no_dead_strip	_snd_ymfpci_pcm_voice_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ymfpci_pcm_voice_alloc
_snd_ymfpci_pcm_voice_alloc:            ; @snd_ymfpci_pcm_voice_alloc
	.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
	mov	x20, x1
	mov	x19, x0
	cmp	w1, #1
	b.gt	LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_3
; %bb.2:
	ldr	x0, [x19, #8]
	bl	_snd_ymfpci_voice_free
	ldr	x8, [x19]
	str	xzr, [x8, #8]
LBB0_3:
	cmp	w20, #2
	b.eq	LBB0_6
; %bb.4:
	cmp	w20, #1
	b.ne	LBB0_9
; %bb.5:
	mov	w0, #0
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbnz	x8, LBB0_18
	b	LBB0_14
LBB0_6:
	ldr	x8, [x19]
	ldr	x1, [x8]
	cbz	x1, LBB0_13
; %bb.7:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_11
; %bb.8:
	mov	w0, #0
	b	LBB0_18
LBB0_9:
	cmp	w20, #2
	b.lt	LBB0_14
; %bb.10:
	ldr	x8, [x19]
	ldr	x1, [x8]
	cbz	x1, LBB0_13
LBB0_11:
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_13
; %bb.12:
	ldr	x0, [x19, #8]
	bl	_snd_ymfpci_voice_free
	ldr	x8, [x19]
	str	xzr, [x8]
LBB0_13:
	mov	w20, #1
	b	LBB0_15
LBB0_14:
	mov	w20, #0
LBB0_15:
Lloh0:
	adrp	x8, _YMFPCI_PCM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _YMFPCI_PCM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	x3, x0, [x19]
	mov	x2, x20
	bl	_snd_ymfpci_voice_alloc
	tbnz	w0, #31, LBB0_18
; %bb.16:
	ldr	x8, [x19]
	ldr	x9, [x8]
	str	x19, [x9, #8]
Lloh3:
	adrp	x9, _snd_ymfpci_pcm_interrupt@GOTPAGE
Lloh4:
	ldr	x9, [x9, _snd_ymfpci_pcm_interrupt@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x9]
	ldr	x9, [x8]
	str	w10, [x9, #16]
	mov	w0, #0
	cbz	w20, LBB0_18
; %bb.17:
	ldr	x10, [x19, #8]
	ldr	x10, [x10]
	ldrsw	x9, [x9]
	mov	w11, #24
	madd	x9, x9, x11, x10
	add	x9, x9, #24
	str	x9, [x8, #8]
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	str	x19, [x8, #8]
LBB0_18:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_YMFPCI_PCM,4,2                 ; @YMFPCI_PCM
	.comm	_snd_ymfpci_pcm_interrupt,4,2   ; @snd_ymfpci_pcm_interrupt
	.no_dead_strip	_snd_ymfpci_pcm_voice_alloc
.subsections_via_symbols
