	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_sonicvibes_playback_prepare
_snd_sonicvibes_playback_prepare:       ## @snd_sonicvibes_playback_prepare
	.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	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r13
	movq	(%rbx), %r15
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %r12d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, %r14d
	movl	%r12d, (%r13)
	movl	12(%r15), %edi
	xorl	%ebx, %ebx
	cmpl	$2, (%r15)
	setge	%bl
	callq	_snd_pcm_format_width
	leal	2(%rbx), %ecx
	cmpl	$16, %eax
	movzbl	%cl, %eax
	cmovnel	%ebx, %eax
	decl	%r14d
	movzbl	%al, %edx
	movq	%r13, %rdi
	movl	$-4, %esi
	callq	_snd_sonicvibes_setfmt
	movl	8(%r15), %esi
	movq	%r13, %rdi
	callq	_snd_sonicvibes_set_dac_rate
	leaq	4(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movl	4(%r15), %esi
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_snd_sonicvibes_setdmaa
	movq	_SV_IREG_DMA_A_UPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	shrl	$8, %edx
	movq	%r13, %rdi
	callq	_snd_sonicvibes_out1
	movq	_SV_IREG_DMA_A_LOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_snd_sonicvibes_out1
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SV_IREG_DMA_A_UPPER,4,2        ## @SV_IREG_DMA_A_UPPER
	.comm	_SV_IREG_DMA_A_LOWER,4,2        ## @SV_IREG_DMA_A_LOWER
	.no_dead_strip	_snd_sonicvibes_playback_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_sonicvibes_playback_prepare
_snd_sonicvibes_playback_prepare:       ; @snd_sonicvibes_playback_prepare
	.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, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x23, [x20]
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	mov	x21, x0
	mov	x0, x20
	bl	_snd_pcm_lib_period_bytes
	mov	x20, x0
	mov	x22, x19
	str	w21, [x22], #4
	ldr	w8, [x23]
	cmp	w8, #1
	cset	w24, gt
	ldr	w0, [x23, #12]
	bl	_snd_pcm_format_width
	orr	w8, w24, #0x2
	cmp	w0, #16
	csel	w2, w8, w24, eq
	sub	w20, w20, #1
	mov	x0, x19
	mov	w1, #-4
	bl	_snd_sonicvibes_setfmt
	ldr	w1, [x23, #8]
	mov	x0, x19
	bl	_snd_sonicvibes_set_dac_rate
	mov	x0, x22
	bl	_spin_lock_irq
	ldr	w1, [x23, #4]
	mov	x0, x19
	mov	x2, x21
	bl	_snd_sonicvibes_setdmaa
Lloh0:
	adrp	x8, _SV_IREG_DMA_A_UPPER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SV_IREG_DMA_A_UPPER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	lsr	w2, w20, #8
	mov	x0, x19
	bl	_snd_sonicvibes_out1
Lloh3:
	adrp	x8, _SV_IREG_DMA_A_LOWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SV_IREG_DMA_A_LOWER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_snd_sonicvibes_out1
	mov	x0, x22
	bl	_spin_unlock_irq
	mov	w0, #0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SV_IREG_DMA_A_UPPER,4,2        ; @SV_IREG_DMA_A_UPPER
	.comm	_SV_IREG_DMA_A_LOWER,4,2        ; @SV_IREG_DMA_A_LOWER
	.no_dead_strip	_snd_sonicvibes_playback_prepare
.subsections_via_symbols
