	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_als4000_capture_prepare
_snd_als4000_capture_prepare:           ## @snd_als4000_capture_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	%r15, %rdi
	callq	_snd_als4000_get_format
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_period_bytes
                                        ## kill: def $eax killed $eax def $rax
	movq	_ALS4000_FORMAT_16BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r13), %ecx
	setne	%cl
	shrl	%cl, %eax
	leal	-1(%rax), %r14d
	leaq	8(%r13), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movl	4(%r15), %esi
	movq	%r13, %rdi
	callq	_snd_als4000_set_rate
	movl	(%r15), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_snd_als4000_set_capture_dma
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	leaq	4(%r13), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movq	_ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r14b, %edx
	movq	%r13, %rdi
	callq	_snd_als4_cr_write
	movq	_ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$8, %r14d
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_snd_als4_cr_write
	movq	%rbx, %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	_ALS4000_FORMAT_16BIT,4,2       ## @ALS4000_FORMAT_16BIT
	.comm	_ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO,4,2 ## @ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO
	.comm	_ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI,4,2 ## @ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI
	.no_dead_strip	_snd_als4000_capture_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_als4000_capture_prepare
_snd_als4000_capture_prepare:           ; @snd_als4000_capture_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	x21, [x20]
	mov	x0, x21
	bl	_snd_als4000_get_format
	mov	x22, x19
	str	w0, [x22], #8
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	mov	x23, x0
	mov	x0, x20
	bl	_snd_pcm_lib_period_bytes
	mov	x20, x19
	ldr	w8, [x20], #4
Lloh0:
	adrp	x9, _ALS4000_FORMAT_16BIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ALS4000_FORMAT_16BIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	lsr	w8, w0, w8
	sub	w24, w8, #1
	mov	x0, x22
	bl	_spin_lock_irq
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_snd_als4000_set_rate
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x23
	bl	_snd_als4000_set_capture_dma
	mov	x0, x22
	bl	_spin_unlock_irq
	mov	x0, x20
	bl	_spin_lock_irq
Lloh3:
	adrp	x8, _ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	and	w2, w24, #0xff
	mov	x0, x19
	bl	_snd_als4_cr_write
Lloh6:
	adrp	x8, _ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	lsr	w2, w24, #8
	mov	x0, x19
	bl	_snd_als4_cr_write
	mov	x0, x20
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ALS4000_FORMAT_16BIT,4,2       ; @ALS4000_FORMAT_16BIT
	.comm	_ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO,4,2 ; @ALS4K_CR1C_FIFO2_BLOCK_LENGTH_LO
	.comm	_ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI,4,2 ; @ALS4K_CR1D_FIFO2_BLOCK_LENGTH_HI
	.no_dead_strip	_snd_als4000_capture_prepare
.subsections_via_symbols
