	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_als300_capture_prepare
_snd_als300_capture_prepare:            ## @snd_als300_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, %r14
	movq	(%rbx), %r12
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_snd_als300_dbgcallenter
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movl	4(%r14), %edi
	movq	_RECORD_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_snd_als300_gcr_read
	movzwl	%r15w, %esi
	movzwl	%bx, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_snd_als300_dbgplay
	leal	-1(%r15), %eax
	movl	4(%r14), %edi
	movl	(%r13), %esi
	movzwl	%ax, %edx
	callq	_snd_als300_gcr_write
	movl	4(%r14), %edi
	movq	_RECORD_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	(%r12), %edx
	callq	_snd_als300_gcr_write
	movl	4(%r14), %edi
	movq	_RECORD_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addw	(%r12), %bx
	decl	%ebx
	movzwl	%bx, %edx
	callq	_snd_als300_gcr_write
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	xorl	%eax, %eax
	callq	_snd_als300_dbgcallleave
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RECORD_CONTROL,4,2             ## @RECORD_CONTROL
	.comm	_TRANSFER_START,4,2             ## @TRANSFER_START
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Period bytes: %d Buffer bytes %d\n"

	.comm	_RECORD_START,4,2               ## @RECORD_START
	.comm	_RECORD_END,4,2                 ## @RECORD_END
	.no_dead_strip	_snd_als300_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_als300_capture_prepare
_snd_als300_capture_prepare:            ; @snd_als300_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	x22, [x20]
	mov	x0, x20
	bl	_snd_pcm_lib_period_bytes
	mov	x21, x0
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	mov	x20, x0
	bl	_snd_als300_dbgcallenter
	mov	x0, x19
	bl	_spin_lock_irq
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x23, _RECORD_CONTROL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RECORD_CONTROL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_snd_als300_gcr_read
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	bl	_snd_als300_dbgplay
	sub	w8, w21, #1
	ldr	w0, [x19, #4]
	ldr	w1, [x23]
	and	w2, w8, #0xffff
	bl	_snd_als300_gcr_write
	ldr	w0, [x19, #4]
Lloh4:
	adrp	x8, _RECORD_START@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RECORD_START@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldrh	w2, [x22]
	bl	_snd_als300_gcr_write
Lloh7:
	adrp	x8, _RECORD_END@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RECORD_END@GOTPAGEOFF]
	ldr	w0, [x19, #4]
Lloh9:
	ldr	w1, [x8]
	ldrh	w8, [x22]
	add	w8, w20, w8
	sub	w8, w8, #1
	and	w2, w8, #0xffff
	bl	_snd_als300_gcr_write
	mov	x0, x19
	bl	_spin_unlock_irq
	bl	_snd_als300_dbgcallleave
	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	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RECORD_CONTROL,4,2             ; @RECORD_CONTROL
	.comm	_TRANSFER_START,4,2             ; @TRANSFER_START
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Period bytes: %d Buffer bytes %d\n"

	.comm	_RECORD_START,4,2               ; @RECORD_START
	.comm	_RECORD_END,4,2                 ; @RECORD_END
	.no_dead_strip	_snd_als300_capture_prepare
.subsections_via_symbols
