	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_capture_prepare
_snd_emu10k1_capture_prepare:           ## @snd_emu10k1_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	(%rbx), %r12
	movq	16(%r12), %r15
	movl	28(%r15), %esi
	movq	%rax, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr_write
	movl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.2:
	movq	_ADCCR@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.4:
	movq	_A_FXWC1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	_A_FXWC2@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_FXWC@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr_write
LBB0_7:
	movl	24(%r15), %esi
	movl	8(%r12), %ecx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_snd_emu10k1_ptr_write
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movq	%rax, 8(%r15)
	movl	$0, 16(%r15)
	movq	_capture_period_sizes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$1, %edx
	cmpq	%rax, (%rcx)
	je	LBB0_39
## %bb.8:
	movl	$2, %edx
	cmpq	%rax, 8(%rcx)
	je	LBB0_39
## %bb.9:
	movl	$3, %edx
	cmpq	%rax, 16(%rcx)
	je	LBB0_39
## %bb.10:
	movl	$4, %edx
	cmpq	%rax, 24(%rcx)
	je	LBB0_39
## %bb.11:
	movl	$5, %edx
	cmpq	%rax, 32(%rcx)
	je	LBB0_39
## %bb.12:
	movl	$6, %edx
	cmpq	%rax, 40(%rcx)
	je	LBB0_39
## %bb.13:
	movl	$7, %edx
	cmpq	%rax, 48(%rcx)
	je	LBB0_39
## %bb.14:
	movl	$8, %edx
	cmpq	%rax, 56(%rcx)
	je	LBB0_39
## %bb.15:
	movl	$9, %edx
	cmpq	%rax, 64(%rcx)
	je	LBB0_39
## %bb.16:
	movl	$10, %edx
	cmpq	%rax, 72(%rcx)
	je	LBB0_39
## %bb.17:
	movl	$11, %edx
	cmpq	%rax, 80(%rcx)
	je	LBB0_39
## %bb.18:
	movl	$12, %edx
	cmpq	%rax, 88(%rcx)
	je	LBB0_39
## %bb.19:
	movl	$13, %edx
	cmpq	%rax, 96(%rcx)
	je	LBB0_39
## %bb.20:
	movl	$14, %edx
	cmpq	%rax, 104(%rcx)
	je	LBB0_39
## %bb.21:
	movl	$15, %edx
	cmpq	%rax, 112(%rcx)
	je	LBB0_39
## %bb.22:
	movl	$16, %edx
	cmpq	%rax, 120(%rcx)
	je	LBB0_39
## %bb.23:
	movl	$17, %edx
	cmpq	%rax, 128(%rcx)
	je	LBB0_39
## %bb.24:
	movl	$18, %edx
	cmpq	%rax, 136(%rcx)
	je	LBB0_39
## %bb.25:
	movl	$19, %edx
	cmpq	%rax, 144(%rcx)
	je	LBB0_39
## %bb.26:
	movl	$20, %edx
	cmpq	%rax, 152(%rcx)
	je	LBB0_39
## %bb.27:
	movl	$21, %edx
	cmpq	%rax, 160(%rcx)
	je	LBB0_39
## %bb.28:
	movl	$22, %edx
	cmpq	%rax, 168(%rcx)
	je	LBB0_39
## %bb.29:
	movl	$23, %edx
	cmpq	%rax, 176(%rcx)
	je	LBB0_39
## %bb.30:
	movl	$24, %edx
	cmpq	%rax, 184(%rcx)
	je	LBB0_39
## %bb.31:
	movl	$25, %edx
	cmpq	%rax, 192(%rcx)
	je	LBB0_39
## %bb.32:
	movl	$26, %edx
	cmpq	%rax, 200(%rcx)
	je	LBB0_39
## %bb.33:
	movl	$27, %edx
	cmpq	%rax, 208(%rcx)
	je	LBB0_39
## %bb.34:
	movl	$28, %edx
	cmpq	%rax, 216(%rcx)
	je	LBB0_39
## %bb.35:
	movl	$29, %edx
	cmpq	%rax, 224(%rcx)
	je	LBB0_39
## %bb.36:
	movl	$30, %edx
	cmpq	%rax, 232(%rcx)
	je	LBB0_39
## %bb.37:
	movl	$31, %edx
	cmpq	%rax, 240(%rcx)
	je	LBB0_39
## %bb.38:
	xorl	%eax, %eax
	callq	_snd_BUG
	movl	16(%r15), %edx
	incl	%edx
LBB0_39:
	movl	%edx, 16(%r15)
	cmpl	$129, (%r15)
	jne	LBB0_52
## %bb.40:
	movq	(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_41
## %bb.42:
	movq	_ADCCR_LCHANENABLE@GOTPCREL(%rip), %rcx
	jmp	LBB0_43
LBB0_41:
	movq	_A_ADCCR_LCHANENABLE@GOTPCREL(%rip), %rcx
LBB0_43:
	movl	(%rcx), %ecx
	movl	%ecx, 20(%r15)
	cmpl	$2, (%r12)
	jl	LBB0_48
## %bb.44:
	testq	%rax, %rax
	jne	LBB0_45
## %bb.46:
	movq	_ADCCR_RCHANENABLE@GOTPCREL(%rip), %rdx
	jmp	LBB0_47
LBB0_45:
	movq	_A_ADCCR_RCHANENABLE@GOTPCREL(%rip), %rdx
LBB0_47:
	orl	(%rdx), %ecx
	movl	%ecx, 20(%r15)
LBB0_48:
	movl	4(%r12), %edi
	testq	%rax, %rax
	je	LBB0_50
## %bb.49:
	callq	_snd_emu10k1_audigy_capture_rate_reg
	jmp	LBB0_51
LBB0_50:
	callq	_snd_emu10k1_capture_rate_reg
LBB0_51:
	orl	%eax, 20(%r15)
LBB0_52:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADCCR,4,2                      ## @ADCCR
	.comm	_A_FXWC1,4,2                    ## @A_FXWC1
	.comm	_A_FXWC2,4,2                    ## @A_FXWC2
	.comm	_FXWC,4,2                       ## @FXWC
	.comm	_capture_period_sizes,8,3       ## @capture_period_sizes
	.comm	_A_ADCCR_LCHANENABLE,4,2        ## @A_ADCCR_LCHANENABLE
	.comm	_ADCCR_LCHANENABLE,4,2          ## @ADCCR_LCHANENABLE
	.comm	_A_ADCCR_RCHANENABLE,4,2        ## @A_ADCCR_RCHANENABLE
	.comm	_ADCCR_RCHANENABLE,4,2          ## @ADCCR_RCHANENABLE
	.no_dead_strip	_snd_emu10k1_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_emu10k1_capture_prepare
_snd_emu10k1_capture_prepare:           ; @snd_emu10k1_capture_prepare
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x22, [x20]
	ldr	x21, [x22, #16]
	ldr	w1, [x21, #28]
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_ptr_write
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _ADCCR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADCCR@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _A_FXWC1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _A_FXWC1@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_ptr_write
Lloh5:
	adrp	x8, _A_FXWC2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _A_FXWC2@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _FXWC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FXWC@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_ptr_write
LBB0_7:
	ldr	w1, [x21, #24]
	ldr	w3, [x22, #8]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_emu10k1_ptr_write
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	str	x0, [x21, #8]
	str	wzr, [x21, #16]
Lloh9:
	adrp	x8, _capture_period_sizes@GOTPAGE
Lloh10:
	ldr	x8, [x8, _capture_period_sizes@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x9, [x8]
	cmp	x9, x0
	b.ne	LBB0_9
; %bb.8:
	mov	w8, #1
	b	LBB0_70
LBB0_9:
	ldr	x9, [x8, #8]
	cmp	x9, x0
	b.ne	LBB0_11
; %bb.10:
	mov	w8, #2
	b	LBB0_70
LBB0_11:
	ldr	x9, [x8, #16]
	cmp	x9, x0
	b.ne	LBB0_13
; %bb.12:
	mov	w8, #3
	b	LBB0_70
LBB0_13:
	ldr	x9, [x8, #24]
	cmp	x9, x0
	b.ne	LBB0_15
; %bb.14:
	mov	w8, #4
	b	LBB0_70
LBB0_15:
	ldr	x9, [x8, #32]
	cmp	x9, x0
	b.ne	LBB0_17
; %bb.16:
	mov	w8, #5
	b	LBB0_70
LBB0_17:
	ldr	x9, [x8, #40]
	cmp	x9, x0
	b.ne	LBB0_19
; %bb.18:
	mov	w8, #6
	b	LBB0_70
LBB0_19:
	ldr	x9, [x8, #48]
	cmp	x9, x0
	b.ne	LBB0_21
; %bb.20:
	mov	w8, #7
	b	LBB0_70
LBB0_21:
	ldr	x9, [x8, #56]
	cmp	x9, x0
	b.ne	LBB0_23
; %bb.22:
	mov	w8, #8
	b	LBB0_70
LBB0_23:
	ldr	x9, [x8, #64]
	cmp	x9, x0
	b.ne	LBB0_25
; %bb.24:
	mov	w8, #9
	b	LBB0_70
LBB0_25:
	ldr	x9, [x8, #72]
	cmp	x9, x0
	b.ne	LBB0_27
; %bb.26:
	mov	w8, #10
	b	LBB0_70
LBB0_27:
	ldr	x9, [x8, #80]
	cmp	x9, x0
	b.ne	LBB0_29
; %bb.28:
	mov	w8, #11
	b	LBB0_70
LBB0_29:
	ldr	x9, [x8, #88]
	cmp	x9, x0
	b.ne	LBB0_31
; %bb.30:
	mov	w8, #12
	b	LBB0_70
LBB0_31:
	ldr	x9, [x8, #96]
	cmp	x9, x0
	b.ne	LBB0_33
; %bb.32:
	mov	w8, #13
	b	LBB0_70
LBB0_33:
	ldr	x9, [x8, #104]
	cmp	x9, x0
	b.ne	LBB0_35
; %bb.34:
	mov	w8, #14
	b	LBB0_70
LBB0_35:
	ldr	x9, [x8, #112]
	cmp	x9, x0
	b.ne	LBB0_37
; %bb.36:
	mov	w8, #15
	b	LBB0_70
LBB0_37:
	ldr	x9, [x8, #120]
	cmp	x9, x0
	b.ne	LBB0_39
; %bb.38:
	mov	w8, #16
	b	LBB0_70
LBB0_39:
	ldr	x9, [x8, #128]
	cmp	x9, x0
	b.ne	LBB0_41
; %bb.40:
	mov	w8, #17
	b	LBB0_70
LBB0_41:
	ldr	x9, [x8, #136]
	cmp	x9, x0
	b.ne	LBB0_43
; %bb.42:
	mov	w8, #18
	b	LBB0_70
LBB0_43:
	ldr	x9, [x8, #144]
	cmp	x9, x0
	b.ne	LBB0_45
; %bb.44:
	mov	w8, #19
	b	LBB0_70
LBB0_45:
	ldr	x9, [x8, #152]
	cmp	x9, x0
	b.ne	LBB0_47
; %bb.46:
	mov	w8, #20
	b	LBB0_70
LBB0_47:
	ldr	x9, [x8, #160]
	cmp	x9, x0
	b.ne	LBB0_49
; %bb.48:
	mov	w8, #21
	b	LBB0_70
LBB0_49:
	ldr	x9, [x8, #168]
	cmp	x9, x0
	b.ne	LBB0_51
; %bb.50:
	mov	w8, #22
	b	LBB0_70
LBB0_51:
	ldr	x9, [x8, #176]
	cmp	x9, x0
	b.ne	LBB0_53
; %bb.52:
	mov	w8, #23
	b	LBB0_70
LBB0_53:
	ldr	x9, [x8, #184]
	cmp	x9, x0
	b.ne	LBB0_55
; %bb.54:
	mov	w8, #24
	b	LBB0_70
LBB0_55:
	ldr	x9, [x8, #192]
	cmp	x9, x0
	b.ne	LBB0_57
; %bb.56:
	mov	w8, #25
	b	LBB0_70
LBB0_57:
	ldr	x9, [x8, #200]
	cmp	x9, x0
	b.ne	LBB0_59
; %bb.58:
	mov	w8, #26
	b	LBB0_70
LBB0_59:
	ldr	x9, [x8, #208]
	cmp	x9, x0
	b.ne	LBB0_61
; %bb.60:
	mov	w8, #27
	b	LBB0_70
LBB0_61:
	ldr	x9, [x8, #216]
	cmp	x9, x0
	b.ne	LBB0_63
; %bb.62:
	mov	w8, #28
	b	LBB0_70
LBB0_63:
	ldr	x9, [x8, #224]
	cmp	x9, x0
	b.ne	LBB0_65
; %bb.64:
	mov	w8, #29
	b	LBB0_70
LBB0_65:
	ldr	x9, [x8, #232]
	cmp	x9, x0
	b.ne	LBB0_67
; %bb.66:
	mov	w8, #30
	b	LBB0_70
LBB0_67:
	ldr	x8, [x8, #240]
	cmp	x8, x0
	b.ne	LBB0_69
; %bb.68:
	mov	w8, #31
	b	LBB0_70
LBB0_69:
	bl	_snd_BUG
	ldr	w8, [x21, #16]
	add	w8, w8, #1
LBB0_70:
	str	w8, [x21, #16]
	ldr	w8, [x21]
	cmp	w8, #129
	b.ne	LBB0_77
; %bb.71:
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _A_ADCCR_LCHANENABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _A_ADCCR_LCHANENABLE@GOTPAGEOFF]
Lloh14:
	adrp	x10, _ADCCR_LCHANENABLE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ADCCR_LCHANENABLE@GOTPAGEOFF]
	cmp	x8, #0
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	str	w9, [x21, #20]
	ldr	w10, [x22]
	cmp	w10, #2
	b.lt	LBB0_73
; %bb.72:
Lloh16:
	adrp	x10, _A_ADCCR_RCHANENABLE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _A_ADCCR_RCHANENABLE@GOTPAGEOFF]
Lloh18:
	adrp	x11, _ADCCR_RCHANENABLE@GOTPAGE
Lloh19:
	ldr	x11, [x11, _ADCCR_RCHANENABLE@GOTPAGEOFF]
	cmp	x8, #0
	csel	x10, x11, x10, eq
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x21, #20]
LBB0_73:
	ldr	w0, [x22, #4]
	cbz	x8, LBB0_75
; %bb.74:
	bl	_snd_emu10k1_audigy_capture_rate_reg
	b	LBB0_76
LBB0_75:
	bl	_snd_emu10k1_capture_rate_reg
LBB0_76:
	ldr	w8, [x21, #20]
	orr	w8, w8, w0
	str	w8, [x21, #20]
LBB0_77:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ADCCR,4,2                      ; @ADCCR
	.comm	_A_FXWC1,4,2                    ; @A_FXWC1
	.comm	_A_FXWC2,4,2                    ; @A_FXWC2
	.comm	_FXWC,4,2                       ; @FXWC
	.comm	_capture_period_sizes,8,3       ; @capture_period_sizes
	.comm	_A_ADCCR_LCHANENABLE,4,2        ; @A_ADCCR_LCHANENABLE
	.comm	_ADCCR_LCHANENABLE,4,2          ; @ADCCR_LCHANENABLE
	.comm	_A_ADCCR_RCHANENABLE,4,2        ; @A_ADCCR_RCHANENABLE
	.comm	_ADCCR_RCHANENABLE,4,2          ; @ADCCR_RCHANENABLE
	.no_dead_strip	_snd_emu10k1_capture_prepare
.subsections_via_symbols
