	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_fm801_capture_prepare
_snd_fm801_capture_prepare:             ## @snd_fm801_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, %r14
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	movq	(%r14), %r12
	movq	%r14, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, (%r15)
	movq	%r14, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, 4(%r15)
	leaq	12(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	_FM801_START@GOTPCREL(%rip), %rax
	movq	_FM801_16BIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	orl	(%rax), %ecx
	movq	_FM801_STEREO@GOTPCREL(%rip), %r13
	orl	(%r13), %ecx
	movq	_FM801_RATE_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 8(%r15)
	movl	20(%r12), %edi
	callq	_snd_pcm_format_width
	cmpl	$16, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %eax
	orl	%eax, 8(%r15)
LBB0_2:
	cmpl	$2, (%r12)
	jl	LBB0_4
## %bb.3:
	movl	(%r13), %eax
	orl	%eax, 8(%r15)
LBB0_4:
	movl	16(%r12), %edi
	callq	_snd_fm801_rate_bits
	movl	%eax, %ebx
	movq	_FM801_RATE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	8(%r15), %ebx
	movl	%ebx, 8(%r15)
	movq	$0, 32(%r15)
	movq	_CAP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_FM801_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outw
	movl	4(%r15), %ebx
	decl	%ebx
	movq	_CAP_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_FM801_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outw
	movq	8(%r12), %rbx
	movq	%rbx, 16(%r15)
	movq	$0, 24(%r15)
	movq	_CAP_BUF1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_FM801_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_outl
	movl	4(%r15), %eax
	cltd
	idivl	(%r15)
	movslq	%edx, %rbx
	addq	16(%r15), %rbx
	movq	_CAP_BUF2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_FM801_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_outl
	movq	%r14, %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	_FM801_START,4,2                ## @FM801_START
	.comm	_FM801_16BIT,4,2                ## @FM801_16BIT
	.comm	_FM801_STEREO,4,2               ## @FM801_STEREO
	.comm	_FM801_RATE_MASK,4,2            ## @FM801_RATE_MASK
	.comm	_FM801_RATE_SHIFT,4,2           ## @FM801_RATE_SHIFT
	.comm	_CAP_CTRL,4,2                   ## @CAP_CTRL
	.comm	_CAP_COUNT,4,2                  ## @CAP_COUNT
	.comm	_CAP_BUF1,4,2                   ## @CAP_BUF1
	.comm	_CAP_BUF2,4,2                   ## @CAP_BUF2
	.no_dead_strip	_snd_fm801_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_fm801_capture_prepare
_snd_fm801_capture_prepare:             ; @snd_fm801_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_buffer_bytes
	str	w0, [x19]
	mov	x0, x20
	bl	_snd_pcm_lib_period_bytes
	str	w0, [x19, #4]
	add	x20, x19, #12
	mov	x0, x20
	bl	_spin_lock_irq
Lloh0:
	adrp	x8, _FM801_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FM801_START@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x23, _FM801_16BIT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _FM801_16BIT@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
Lloh5:
	adrp	x21, _FM801_STEREO@GOTPAGE
Lloh6:
	ldr	x21, [x21, _FM801_STEREO@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w8, w9
Lloh7:
	adrp	x9, _FM801_RATE_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _FM801_RATE_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
	ldr	w0, [x22, #20]
	bl	_snd_pcm_format_width
	cmp	w0, #16
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x23]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_2:
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
	ldr	w8, [x21]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_4:
	ldr	w0, [x22, #16]
	bl	_snd_fm801_rate_bits
Lloh10:
	adrp	x8, _FM801_RATE_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FM801_RATE_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	ldr	w9, [x19, #8]
	orr	w21, w9, w8
	str	w21, [x19, #8]
	str	xzr, [x19, #32]
Lloh13:
	adrp	x8, _CAP_CTRL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CAP_CTRL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_FM801_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outw
	ldr	w8, [x19, #4]
	sub	w21, w8, #1
Lloh16:
	adrp	x8, _CAP_COUNT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CAP_COUNT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_FM801_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outw
	ldr	x21, [x22, #8]
	stp	x21, xzr, [x19, #16]
Lloh19:
	adrp	x8, _CAP_BUF1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CAP_BUF1@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_FM801_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
	ldr	x8, [x19, #16]
	ldp	w10, w9, [x19]
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	add	x21, x8, w9, sxtw
Lloh22:
	adrp	x8, _CAP_BUF2@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CAP_BUF2@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_FM801_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
	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	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_FM801_START,4,2                ; @FM801_START
	.comm	_FM801_16BIT,4,2                ; @FM801_16BIT
	.comm	_FM801_STEREO,4,2               ; @FM801_STEREO
	.comm	_FM801_RATE_MASK,4,2            ; @FM801_RATE_MASK
	.comm	_FM801_RATE_SHIFT,4,2           ; @FM801_RATE_SHIFT
	.comm	_CAP_CTRL,4,2                   ; @CAP_CTRL
	.comm	_CAP_COUNT,4,2                  ; @CAP_COUNT
	.comm	_CAP_BUF1,4,2                   ; @CAP_BUF1
	.comm	_CAP_BUF2,4,2                   ; @CAP_BUF2
	.no_dead_strip	_snd_fm801_capture_prepare
.subsections_via_symbols
