	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_sb8_capture_prepare
_snd_sb8_capture_prepare:               ## @snd_sb8_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, %rbx
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_6
## %bb.1:
	movq	(%r15), %r13
	movl	(%r13), %r14d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	cmpl	$2, 4(%r13)
	jl	LBB0_10
## %bb.3:
	movl	$11025, %edi                    ## imm = 0x2B11
	callq	_SB8_RATE
	xorl	%edi, %edi
	cmpl	%eax, %r14d
	je	LBB0_5
## %bb.4:
	movl	$22050, %edi                    ## imm = 0x5622
	callq	_SB8_RATE
	xorl	%edi, %edi
	cmpl	%eax, %r14d
	setne	%dil
LBB0_5:
	callq	_snd_BUG_ON
	testl	%eax, %eax
	je	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_7:
	cmpl	$13001, %r14d                   ## imm = 0x32C9
	jb	LBB0_12
LBB0_11:
	movq	_SB_DSP_HI_INPUT_AUTO@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_9:
	movq	_SB_DSP_INPUT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	cmpl	$23001, %r14d                   ## imm = 0x59D9
	jae	LBB0_11
LBB0_12:
	movq	_SB_DSP_LO_INPUT_AUTO@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%r15, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %r14d
	movl	%eax, 16(%rbx)
	movq	%r15, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, %r12d
	movl	%eax, 20(%rbx)
	leaq	32(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_SB_DSP_SPEAKER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
	cmpl	$2, 4(%r13)
	jl	LBB0_15
## %bb.14:
	movq	_SB_DSP_STEREO_8BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
LBB0_15:
	movq	_SB_DSP_SAMPLE_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
	movl	8(%r13), %eax
	cmpl	$2, 4(%r13)
	jl	LBB0_17
## %bb.16:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	$256, %esi                      ## imm = 0x100
	subl	%ecx, %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r13
	addq	$36, %r13
	movq	%r13, %rdi
	callq	_spin_lock
	movq	_SB_DSP_CAPTURE_FILT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_sbmixer_read
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r15d
	movl	%eax, %r14d
	movq	_SB_DSP_CAPTURE_FILT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	orl	$32, %edx
	movq	%rbx, %rdi
	callq	_snd_sbmixer_write
	movq	%r13, %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	callq	_spin_unlock
	movl	%r14d, 24(%rbx)
	movl	%r15d, %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_17:
	movl	$256, %esi                      ## imm = 0x100
	subl	%eax, %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
LBB0_18:
	movq	8(%rbx), %rax
	movq	_SB_DSP_INPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_20
## %bb.19:
	decl	%r12d
	movq	_SB_DSP_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
	movzbl	%r12b, %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
	shrl	$8, %r12d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_snd_sbdsp_command
LBB0_20:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	28(%rbx), %edi
	movl	12(%r13), %esi
	movq	_DMA_MODE_READ@GOTPCREL(%rip), %rax
	movq	_DMA_AUTOINIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%r14d, %edx
	callq	_snd_dma_program
	xorl	%eax, %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SB_DSP_HI_INPUT_AUTO,8,3       ## @SB_DSP_HI_INPUT_AUTO
	.comm	_SB_DSP_LO_INPUT_AUTO,8,3       ## @SB_DSP_LO_INPUT_AUTO
	.comm	_SB_DSP_INPUT,8,3               ## @SB_DSP_INPUT
	.comm	_SB_DSP_SPEAKER_OFF,4,2         ## @SB_DSP_SPEAKER_OFF
	.comm	_SB_DSP_STEREO_8BIT,4,2         ## @SB_DSP_STEREO_8BIT
	.comm	_SB_DSP_SAMPLE_RATE,4,2         ## @SB_DSP_SAMPLE_RATE
	.comm	_SB_DSP_CAPTURE_FILT,4,2        ## @SB_DSP_CAPTURE_FILT
	.comm	_SB_DSP_BLOCK_SIZE,4,2          ## @SB_DSP_BLOCK_SIZE
	.comm	_DMA_MODE_READ,4,2              ## @DMA_MODE_READ
	.comm	_DMA_AUTOINIT,4,2               ## @DMA_AUTOINIT
	.no_dead_strip	_snd_sb8_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_sb8_capture_prepare
_snd_sb8_capture_prepare:               ; @snd_sb8_capture_prepare
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
	bl	_snd_pcm_substream_chip
	ldr	w8, [x0]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_20
; %bb.1:
	mov	x19, x0
	ldr	x25, [x21]
	ldr	w20, [x25]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
Lloh2:
	adrp	x26, _SB_DSP_INPUT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SB_DSP_INPUT@GOTPAGEOFF]
	br	x10
LBB0_2:
	ldr	w8, [x25, #4]
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.3:
	mov	w0, #11025
	bl	_SB8_RATE
	cmp	w20, w0
	b.ne	LBB0_19
; %bb.4:
	mov	w0, #0
	bl	_snd_BUG_ON
	cbnz	w0, LBB0_20
	b	LBB0_6
LBB0_5:
	mov	w8, #13001
	cmp	w20, w8
	b.lo	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _SB_DSP_HI_INPUT_AUTO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SB_DSP_HI_INPUT_AUTO@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh6:
	adrp	x8, _SB_DSP_LO_INPUT_AUTO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SB_DSP_LO_INPUT_AUTO@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	ldr	x8, [x26]
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x8, _SB_DSP_HI_INPUT_AUTO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SB_DSP_HI_INPUT_AUTO@GOTPAGEOFF]
Lloh10:
	adrp	x9, _SB_DSP_LO_INPUT_AUTO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SB_DSP_LO_INPUT_AUTO@GOTPAGEOFF]
	mov	w10, #23000
	cmp	w20, w10
	csel	x8, x8, x9, hi
LBB0_10:
	ldr	x8, [x8]
LBB0_11:
	str	x8, [x19, #8]
	mov	x0, x21
	bl	_snd_pcm_lib_buffer_bytes
	mov	x20, x0
	str	w0, [x19, #16]
	mov	x0, x21
	bl	_snd_pcm_lib_period_bytes
	mov	x22, x0
	str	w0, [x19, #20]
	add	x21, x19, #32
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh12:
	adrp	x8, _SB_DSP_SPEAKER_OFF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SB_DSP_SPEAKER_OFF@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_sbdsp_command
	ldr	w8, [x25, #4]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.12:
Lloh15:
	adrp	x8, _SB_DSP_STEREO_8BIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SB_DSP_STEREO_8BIT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_sbdsp_command
LBB0_13:
Lloh18:
	adrp	x8, _SB_DSP_SAMPLE_RATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SB_DSP_SAMPLE_RATE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_sbdsp_command
	ldp	w9, w8, [x25, #4]
	cmp	w9, #2
	b.lt	LBB0_15
; %bb.14:
	cmp	w8, #0
	cinc	w8, w8, lt
	mov	w9, #256
	sub	w1, w9, w8, asr #1
	mov	x0, x19
	bl	_snd_sbdsp_command
	add	x23, x19, #36
	mov	x0, x23
	bl	_spin_lock
Lloh21:
	adrp	x27, _SB_DSP_CAPTURE_FILT@GOTPAGE
Lloh22:
	ldr	x27, [x27, _SB_DSP_CAPTURE_FILT@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x19
	bl	_snd_sbmixer_read
	mov	x24, x0
	ldr	w1, [x27]
	orr	w2, w0, #0x20
	mov	x0, x19
	bl	_snd_sbmixer_write
	mov	x0, x23
	bl	_spin_unlock
	str	w24, [x19, #24]
	b	LBB0_16
LBB0_15:
	mov	w9, #256
	sub	w1, w9, w8
	mov	x0, x19
	bl	_snd_sbdsp_command
LBB0_16:
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
	sub	w22, w22, #1
Lloh23:
	adrp	x8, _SB_DSP_BLOCK_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SB_DSP_BLOCK_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_sbdsp_command
	and	w1, w22, #0xff
	mov	x0, x19
	bl	_snd_sbdsp_command
	lsr	w1, w22, #8
	mov	x0, x19
	bl	_snd_sbdsp_command
LBB0_18:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #28]
Lloh26:
	adrp	x8, _DMA_MODE_READ@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DMA_MODE_READ@GOTPAGEOFF]
	ldr	w1, [x25, #12]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _DMA_AUTOINIT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _DMA_AUTOINIT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x2, x20
	bl	_snd_dma_program
	mov	w0, #0
	b	LBB0_21
LBB0_19:
	mov	w0, #22050
	bl	_SB8_RATE
	cmp	w20, w0
	cset	w0, ne
	bl	_snd_BUG_ON
	cbz	w0, LBB0_6
LBB0_20:
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SB_DSP_HI_INPUT_AUTO,8,3       ; @SB_DSP_HI_INPUT_AUTO
	.comm	_SB_DSP_LO_INPUT_AUTO,8,3       ; @SB_DSP_LO_INPUT_AUTO
	.comm	_SB_DSP_INPUT,8,3               ; @SB_DSP_INPUT
	.comm	_SB_DSP_SPEAKER_OFF,4,2         ; @SB_DSP_SPEAKER_OFF
	.comm	_SB_DSP_STEREO_8BIT,4,2         ; @SB_DSP_STEREO_8BIT
	.comm	_SB_DSP_SAMPLE_RATE,4,2         ; @SB_DSP_SAMPLE_RATE
	.comm	_SB_DSP_CAPTURE_FILT,4,2        ; @SB_DSP_CAPTURE_FILT
	.comm	_SB_DSP_BLOCK_SIZE,4,2          ; @SB_DSP_BLOCK_SIZE
	.comm	_DMA_MODE_READ,4,2              ; @DMA_MODE_READ
	.comm	_DMA_AUTOINIT,4,2               ; @DMA_AUTOINIT
	.no_dead_strip	_snd_sb8_capture_prepare
.subsections_via_symbols
