	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8940_i2s_hw_params
_wm8940_i2s_hw_params:                  ## @wm8940_i2s_hw_params
	.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	%rsi, %r12
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	movq	_WM8940_IFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_snd_soc_read
	movl	%eax, %r14d
	andl	$64927, %r14d                   ## imm = 0xFD9F
	movq	_WM8940_ADDCNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_snd_soc_read
	movl	%eax, %ebx
	movq	_WM8940_COMPANDINGCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_snd_soc_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rax
	movq	_SNDRV_PCM_STREAM_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_params_channels
	movl	%r14d, %ecx
	orl	$512, %ecx                      ## imm = 0x200
	cmpl	$2, %eax
	cmovel	%ecx, %r14d
LBB0_2:
	andl	$65521, %ebx                    ## imm = 0xFFF1
	movq	%r12, %rdi
	callq	_params_rate
	cmpl	$15999, %eax                    ## imm = 0x3E7F
	jle	LBB0_3
## %bb.6:
	cmpl	$16000, %eax                    ## imm = 0x3E80
	je	LBB0_11
## %bb.7:
	cmpl	$22050, %eax                    ## imm = 0x5622
	je	LBB0_12
## %bb.8:
	cmpl	$32000, %eax                    ## imm = 0x7D00
	jne	LBB0_13
## %bb.9:
	orl	$2, %ebx
	jmp	LBB0_13
LBB0_3:
	cmpl	$8000, %eax                     ## imm = 0x1F40
	je	LBB0_10
## %bb.4:
	cmpl	$11025, %eax                    ## imm = 0x2B11
	jne	LBB0_13
## %bb.5:
	orl	$8, %ebx
	jmp	LBB0_13
LBB0_11:
	orl	$6, %ebx
	jmp	LBB0_13
LBB0_12:
	orl	$4, %ebx
	jmp	LBB0_13
LBB0_10:
	orl	$10, %ebx
LBB0_13:
	movq	_WM8940_ADDCNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_snd_soc_write
	testl	%eax, %eax
	jne	LBB0_21
## %bb.14:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	andl	$65503, %ebx                    ## imm = 0xFFDF
	movq	%r12, %rdi
	callq	_params_format
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_20
## %bb.15:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_16:
	orl	$32, %ebx
	jmp	LBB0_20
LBB0_19:
	orl	$96, %r14d
	jmp	LBB0_20
LBB0_18:
	orl	$64, %r14d
	jmp	LBB0_20
LBB0_17:
	orl	$32, %r14d
LBB0_20:
	movq	_WM8940_COMPANDINGCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_snd_soc_write
	testl	%eax, %eax
	je	LBB0_22
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_WM8940_IFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_soc_write                  ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_19
	.long	L0_0_set_18
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_WM8940_IFACE,4,2               ## @WM8940_IFACE
	.comm	_WM8940_ADDCNTRL,4,2            ## @WM8940_ADDCNTRL
	.comm	_WM8940_COMPANDINGCTL,4,2       ## @WM8940_COMPANDINGCTL
	.comm	_SNDRV_PCM_STREAM_CAPTURE,8,3   ## @SNDRV_PCM_STREAM_CAPTURE
	.no_dead_strip	_wm8940_i2s_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8940_i2s_hw_params
_wm8940_i2s_hw_params:                  ; @wm8940_i2s_hw_params
	.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, x1
	mov	x23, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x19, [x8]
Lloh0:
	adrp	x24, _WM8940_IFACE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _WM8940_IFACE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_snd_soc_read
	mov	w8, #64927
	and	w20, w0, w8
Lloh2:
	adrp	x26, _WM8940_ADDCNTRL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _WM8940_ADDCNTRL@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_snd_soc_read
	mov	w8, #65521
	and	w27, w0, w8
Lloh4:
	adrp	x25, _WM8940_COMPANDINGCTL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _WM8940_COMPANDINGCTL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_snd_soc_read
	mov	x22, x0
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_params_channels
	orr	w8, w20, #0x200
	cmp	w0, #2
	csel	w20, w8, w20, eq
LBB0_2:
	mov	x0, x21
	bl	_params_rate
	mov	w8, #15999
	mov	w9, #16000
	orr	w10, w27, #0x6
	mov	w11, #22050
	orr	w12, w27, #0x4
	mov	w13, #32000
	orr	w14, w27, #0x2
	cmp	w0, w13
	csel	w13, w14, w27, eq
	cmp	w0, w11
	csel	w11, w12, w13, eq
	cmp	w0, w9
	csel	w9, w10, w11, eq
	mov	w10, #8000
	mov	w11, #10
	orr	w11, w27, w11
	mov	w12, #11025
	orr	w13, w27, #0x8
	cmp	w0, w12
	csel	w12, w13, w27, eq
	cmp	w0, w10
	csel	w10, w11, w12, eq
	ldr	w1, [x26]
	cmp	w0, w8
	csel	w2, w9, w10, gt
	mov	x0, x19
	bl	_snd_soc_write
	cbnz	w0, LBB0_10
; %bb.3:
	mov	w8, #65503
	and	w22, w22, w8
	mov	x0, x21
	bl	_params_format
	sub	w8, w0, #128
	cmp	w8, #3
	b.hi	LBB0_9
; %bb.4:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	orr	w22, w22, #0x20
	b	LBB0_9
LBB0_6:
	orr	w20, w20, #0x60
	b	LBB0_9
LBB0_7:
	orr	w20, w20, #0x40
	b	LBB0_9
LBB0_8:
	orr	w20, w20, #0x20
LBB0_9:
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x22
	bl	_snd_soc_write
	cbz	w0, LBB0_11
LBB0_10:
	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
LBB0_11:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	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
	b	_snd_soc_write
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
                                        ; -- End function
	.comm	_WM8940_IFACE,4,2               ; @WM8940_IFACE
	.comm	_WM8940_ADDCNTRL,4,2            ; @WM8940_ADDCNTRL
	.comm	_WM8940_COMPANDINGCTL,4,2       ; @WM8940_COMPANDINGCTL
	.comm	_SNDRV_PCM_STREAM_CAPTURE,8,3   ; @SNDRV_PCM_STREAM_CAPTURE
	.no_dead_strip	_wm8940_i2s_hw_params
.subsections_via_symbols
