	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_trident_allocate_evoice
_snd_trident_allocate_evoice:           ## @snd_trident_allocate_evoice
	.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
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_snd_pcm_substream_chip
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	(%rax), %r15
	movq	(%r15), %r13
	movq	%r14, %rdi
	callq	_params_buffer_size
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movq	%r14, %rdi
	callq	_params_period_size
	xorl	%r14d, %r14d
	cmpl	%eax, %ebx
	jne	LBB0_1
## %bb.5:
	testq	%r13, %r13
	je	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_snd_trident_free_voice
	movq	$0, (%r15)
	jmp	LBB0_7
LBB0_1:
	testq	%r13, %r13
	jne	LBB0_7
## %bb.2:
	movq	_SNDRV_TRIDENT_VOICE_TYPE_PCM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_trident_alloc_voice
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, (%r15)
	movq	%r12, 8(%rax)
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_TRIDENT_VOICE_TYPE_PCM,4,2 ## @SNDRV_TRIDENT_VOICE_TYPE_PCM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_snd_trident_allocate_evoice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_trident_allocate_evoice
_snd_trident_allocate_evoice:           ; @snd_trident_allocate_evoice
	.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	x22, x1
	mov	x19, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x23, [x8]
	ldr	x21, [x23]
	mov	x0, x22
	bl	_params_buffer_size
	cmp	w0, #0
	cinc	w24, w0, lt
	mov	x0, x22
	bl	_params_period_size
	cmp	w0, w24, asr #1
	b.ne	LBB0_3
; %bb.1:
	cbz	x21, LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_snd_trident_free_voice
	mov	w0, #0
	str	xzr, [x23]
	b	LBB0_5
LBB0_3:
	cbz	x21, LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
LBB0_6:
Lloh0:
	adrp	x8, _SNDRV_TRIDENT_VOICE_TYPE_PCM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_TRIDENT_VOICE_TYPE_PCM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_snd_trident_alloc_voice
	cbz	x0, LBB0_8
; %bb.7:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x23]
	str	x19, [x8, #8]
	b	LBB0_5
LBB0_8:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_TRIDENT_VOICE_TYPE_PCM,4,2 ; @SNDRV_TRIDENT_VOICE_TYPE_PCM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_snd_trident_allocate_evoice
.subsections_via_symbols
