	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_wss_capture_format
_snd_wss_capture_format:                ## @snd_wss_capture_format
	.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
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	movq	_WSS_HW_CS4231A@GOTPCREL(%rip), %rcx
	movzbl	%r12b, %r15d
	cmpl	(%rcx), %eax
	je	LBB0_2
## %bb.1:
	movq	_WSS_HW_CS4232_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_2:
	leaq	20(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	movq	_CS4231_PLAYBK_FORMAT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	xorl	%r15d, %ecx
	testb	$15, %cl
	je	LBB0_4
## %bb.3:
	movq	_CS4231_IFACE_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_CS4231_PLAYBACK_ENABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	je	LBB0_7
LBB0_4:
	movq	_CS4231_ALT_FEATURE_1@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movb	(%rax,%rsi,4), %al
	orb	$32, %al
	movzbl	%al, %edx
	movq	%rbx, %rdi
	callq	_snd_wss_out
	movq	_CS4231_REC_FORMAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	8(%rbx), %rax
	movl	%r15d, (%rax,%rsi,4)
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_snd_wss_out
	movq	(%r12), %rsi
	movq	8(%rbx), %rax
	movl	(%rax,%rsi,4), %edx
	movl	%edx, %ecx
	andl	$-33, %ecx
	movl	%ecx, (%rax,%rsi,4)
	andl	$223, %edx
	movq	%rbx, %rdi
	callq	_snd_wss_out
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_17
LBB0_7:
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_8
LBB0_5:
	movq	_WSS_HW_AD1845@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.6:
	movq	%r13, %rdi
	callq	_params_rate
	movl	%eax, %r13d
	leaq	20(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_CS4231_REC_FORMAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	andb	$-16, %r12b
	movzbl	%r12b, %edx
	movq	%rbx, %rdi
	callq	_snd_wss_out
	movq	_AD1845_UPR_FREQ_SEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r13d, %eax
	movzbl	%ah, %edx
	movq	%rbx, %rdi
	callq	_snd_wss_out
	movq	_AD1845_LWR_FREQ_SEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movzbl	%r13b, %edx
	movq	%rbx, %rdi
	callq	_snd_wss_out
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_17
LBB0_8:
	movq	%rbx, %rdi
	callq	_snd_wss_mce_up
	leaq	20(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %eax
	movq	_WSS_HW_INTERWAVE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_13
## %bb.9:
	movq	8(%rbx), %rcx
	movq	_CS4231_IFACE_CTRL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_CS4231_PLAYBACK_ENABLE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rcx,%rdx,4)
	jne	LBB0_13
## %bb.10:
	cmpq	$0, 24(%rbx)
	movq	_CS4231_PLAYBK_FORMAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	jne	LBB0_12
## %bb.11:
	movb	(%rcx,%rsi,4), %al
	andb	$15, %r12b
	andb	$-16, %al
	orb	%r12b, %al
	movl	%eax, %r12d
LBB0_12:
	movzbl	%r12b, %edx
	movq	%rbx, %rdi
	callq	_snd_wss_out
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_snd_wss_mce_down
	movq	%rbx, %rdi
	callq	_snd_wss_mce_up
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %eax
LBB0_13:
	movq	_WSS_HW_AD1848_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jne	LBB0_14
## %bb.15:
	movq	_CS4231_REC_FORMAT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movq	_CS4231_PLAYBK_FORMAT@GOTPCREL(%rip), %rax
LBB0_16:
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_snd_wss_out
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_snd_wss_mce_down
LBB0_17:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WSS_HW_CS4231A,4,2             ## @WSS_HW_CS4231A
	.comm	_WSS_HW_CS4232_MASK,4,2         ## @WSS_HW_CS4232_MASK
	.comm	_CS4231_PLAYBK_FORMAT,8,3       ## @CS4231_PLAYBK_FORMAT
	.comm	_CS4231_IFACE_CTRL,8,3          ## @CS4231_IFACE_CTRL
	.comm	_CS4231_PLAYBACK_ENABLE,4,2     ## @CS4231_PLAYBACK_ENABLE
	.comm	_CS4231_ALT_FEATURE_1,8,3       ## @CS4231_ALT_FEATURE_1
	.comm	_CS4231_REC_FORMAT,8,3          ## @CS4231_REC_FORMAT
	.comm	_WSS_HW_AD1845,4,2              ## @WSS_HW_AD1845
	.comm	_AD1845_UPR_FREQ_SEL,8,3        ## @AD1845_UPR_FREQ_SEL
	.comm	_AD1845_LWR_FREQ_SEL,8,3        ## @AD1845_LWR_FREQ_SEL
	.comm	_WSS_HW_INTERWAVE,4,2           ## @WSS_HW_INTERWAVE
	.comm	_WSS_HW_AD1848_MASK,4,2         ## @WSS_HW_AD1848_MASK
	.no_dead_strip	_snd_wss_capture_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_wss_capture_format
_snd_wss_capture_format:                ; @snd_wss_capture_format
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _WSS_HW_CS4231A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WSS_HW_CS4231A@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x23, _CS4231_PLAYBK_FORMAT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CS4231_PLAYBK_FORMAT@GOTPAGEOFF]
	cmp	w8, w9
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x9, _WSS_HW_CS4232_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WSS_HW_CS4232_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_2:
	add	x22, x20, #20
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	ldr	w9, [x8, x9, lsl #2]
	eor	w9, w9, w21
	tst	w9, #0xf
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x9, _CS4231_IFACE_CTRL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CS4231_IFACE_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
Lloh11:
	adrp	x10, _CS4231_PLAYBACK_ENABLE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CS4231_PLAYBACK_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
LBB0_4:
Lloh14:
	adrp	x23, _CS4231_ALT_FEATURE_1@GOTPAGE
Lloh15:
	ldr	x23, [x23, _CS4231_ALT_FEATURE_1@GOTPAGEOFF]
	ldr	x1, [x23]
	lsl	x9, x1, #2
	ldrb	w8, [x8, x9]
	orr	w2, w8, #0x20
	mov	x0, x20
	bl	_snd_wss_out
Lloh16:
	adrp	x8, _CS4231_REC_FORMAT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CS4231_REC_FORMAT@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x8]
	ldr	x8, [x20, #8]
	str	w21, [x8, x1, lsl #2]
	mov	x0, x20
	mov	x2, x21
	bl	_snd_wss_out
	ldr	x1, [x23]
	ldr	x8, [x20, #8]
	lsl	x9, x1, #2
	ldr	w10, [x8, x9]
	and	w11, w10, #0xffffffdf
	str	w11, [x8, x9]
	mov	w8, #223
	and	w2, w10, w8
	mov	x0, x20
	bl	_snd_wss_out
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	b	LBB0_14
LBB0_5:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_6:
Lloh19:
	adrp	x9, _WSS_HW_AD1845@GOTPAGE
Lloh20:
	ldr	x9, [x9, _WSS_HW_AD1845@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x22
	bl	_params_rate
	mov	x22, x0
	add	x23, x20, #20
	mov	x0, x23
	bl	_spin_lock_irqsave
Lloh22:
	adrp	x8, _CS4231_REC_FORMAT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CS4231_REC_FORMAT@GOTPAGEOFF]
Lloh24:
	ldr	x1, [x8]
	and	w2, w21, #0xf0
	mov	x0, x20
	bl	_snd_wss_out
Lloh25:
	adrp	x8, _AD1845_UPR_FREQ_SEL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AD1845_UPR_FREQ_SEL@GOTPAGEOFF]
Lloh27:
	ldr	x1, [x8]
	ubfx	w2, w22, #8, #8
	mov	x0, x20
	bl	_snd_wss_out
Lloh28:
	adrp	x8, _AD1845_LWR_FREQ_SEL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AD1845_LWR_FREQ_SEL@GOTPAGEOFF]
Lloh30:
	ldr	x1, [x8]
	and	w2, w22, #0xff
	mov	x0, x20
	bl	_snd_wss_out
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	b	LBB0_14
LBB0_8:
	mov	x0, x20
	bl	_snd_wss_mce_up
	add	x22, x20, #20
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh31:
	adrp	x9, _WSS_HW_INTERWAVE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _WSS_HW_INTERWAVE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.9:
	ldr	x9, [x20, #8]
Lloh34:
	adrp	x10, _CS4231_IFACE_CTRL@GOTPAGE
Lloh35:
	ldr	x10, [x10, _CS4231_IFACE_CTRL@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	ldr	w10, [x9, x10, lsl #2]
Lloh37:
	adrp	x11, _CS4231_PLAYBACK_ENABLE@GOTPAGE
Lloh38:
	ldr	x11, [x11, _CS4231_PLAYBACK_ENABLE@GOTPAGEOFF]
Lloh39:
	ldr	w11, [x11]
	tst	w11, w10
	b.ne	LBB0_13
; %bb.10:
	ldr	x10, [x20, #24]
	ldr	x1, [x23]
	mov	x8, x21
	cbnz	x10, LBB0_12
; %bb.11:
	ldr	w8, [x9, x1, lsl #2]
	bfxil	w8, w21, #0, #4
LBB0_12:
	and	w2, w8, #0xff
	mov	x0, x20
	bl	_snd_wss_out
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_snd_wss_mce_down
	mov	x0, x20
	bl	_snd_wss_mce_up
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
LBB0_13:
Lloh40:
	adrp	x9, _WSS_HW_AD1848_MASK@GOTPAGE
Lloh41:
	ldr	x9, [x9, _WSS_HW_AD1848_MASK@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
Lloh43:
	adrp	x10, _CS4231_REC_FORMAT@GOTPAGE
Lloh44:
	ldr	x10, [x10, _CS4231_REC_FORMAT@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x23, eq
	ldr	x1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_snd_wss_out
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_snd_wss_mce_down
LBB0_14:
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_WSS_HW_CS4231A,4,2             ; @WSS_HW_CS4231A
	.comm	_WSS_HW_CS4232_MASK,4,2         ; @WSS_HW_CS4232_MASK
	.comm	_CS4231_PLAYBK_FORMAT,8,3       ; @CS4231_PLAYBK_FORMAT
	.comm	_CS4231_IFACE_CTRL,8,3          ; @CS4231_IFACE_CTRL
	.comm	_CS4231_PLAYBACK_ENABLE,4,2     ; @CS4231_PLAYBACK_ENABLE
	.comm	_CS4231_ALT_FEATURE_1,8,3       ; @CS4231_ALT_FEATURE_1
	.comm	_CS4231_REC_FORMAT,8,3          ; @CS4231_REC_FORMAT
	.comm	_WSS_HW_AD1845,4,2              ; @WSS_HW_AD1845
	.comm	_AD1845_UPR_FREQ_SEL,8,3        ; @AD1845_UPR_FREQ_SEL
	.comm	_AD1845_LWR_FREQ_SEL,8,3        ; @AD1845_LWR_FREQ_SEL
	.comm	_WSS_HW_INTERWAVE,4,2           ; @WSS_HW_INTERWAVE
	.comm	_WSS_HW_AD1848_MASK,4,2         ; @WSS_HW_AD1848_MASK
	.no_dead_strip	_snd_wss_capture_format
.subsections_via_symbols
