	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_alloc_timing_voice
_sis_alloc_timing_voice:                ## @sis_alloc_timing_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
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_snd_pcm_substream_chip
	movq	%rax, %r12
	movq	(%r13), %rax
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_params_period_size
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_params_buffer_size
	movq	(%r14), %rcx
	cmpl	%eax, %r15d
	je	LBB0_8
## %bb.1:
	shrl	%eax
	cmpl	%eax, %r15d
	je	LBB0_8
## %bb.2:
	xorl	%r15d, %r15d
	testq	%rcx, %rcx
	jne	LBB0_10
## %bb.3:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	callq	___sis_alloc_playback_voice
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	___sis_map_silence
LBB0_5:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%r13, (%rax)
	jmp	LBB0_10
LBB0_8:
	xorl	%r15d, %r15d
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_sis_free_voice
	movq	$0, (%r14)
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sis_alloc_timing_voice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis_alloc_timing_voice
_sis_alloc_timing_voice:                ; @sis_alloc_timing_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	x23, x1
	mov	x19, x0
	bl	_snd_pcm_substream_chip
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x20, [x8]
	mov	x0, x23
	bl	_params_period_size
	mov	x22, x0
	mov	x0, x23
	bl	_params_buffer_size
	ldr	x8, [x20]
	cmp	w22, w0
	b.eq	LBB0_7
; %bb.1:
	lsr	w9, w0, #1
	cmp	w22, w9
	b.eq	LBB0_7
; %bb.2:
	cbnz	x8, LBB0_9
; %bb.3:
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x21
	bl	___sis_alloc_playback_voice
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	___sis_map_silence
LBB0_5:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.6:
	mov	w0, #0
	str	x19, [x8]
	b	LBB0_10
LBB0_7:
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x20
	bl	_sis_free_voice
	mov	w0, #0
	str	xzr, [x20]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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_11:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sis_alloc_timing_voice
.subsections_via_symbols
