	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8776_hw_params
_wm8776_hw_params:                      ## @wm8776_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	8(%rdx), %r15
	movq	8(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %ebx
	cmpl	$128, %ebx
	je	LBB0_1
## %bb.2:
	cmpl	$129, %ebx
	jne	LBB0_12
## %bb.3:
	movl	$256, %ebx                      ## imm = 0x100
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_WM8776_ADCIFCTRL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movl	$4, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_WM8776_DACIFCTRL@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_params_format
	addl	$-130, %eax
	movl	%eax, %ecx
	shll	$4, %ecx
	movl	$48, %edx
	subl	%ecx, %edx
	xorl	%r12d, %r12d
	cmpl	$3, %eax
	cmovael	%r12d, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	_WM8776_MSTRCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_snd_soc_read
	testl	%ebx, %eax
	je	LBB0_14
## %bb.5:
	movq	_mclk_ratios@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	(%r14), %rcx
	movl	(%rax,%rcx,4), %r15d
	movq	%r13, %rdi
	callq	_params_rate
	movl	%eax, %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	movq	(%rbx), %rdi
	cmpl	(%rdi,%r12,4), %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r12
	jl	LBB0_7
LBB0_9:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_10:
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	movl	(%r15), %edi
	cmpl	%eax, %r12d
	jne	LBB0_13
## %bb.11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	(%r14), %rcx
	movl	(%rax,%rcx,4), %r14d
	movl	%edi, %ebx
	movq	%r13, %rdi
	callq	_params_rate
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_dev_err
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_14:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_15
LBB0_13:
	movq	(%rbx), %rax
	movl	%r12d, %ecx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$7, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %edx
	movq	_WM8776_MSTRCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	movq	%r15, %rdi
	movl	%r12d, %ecx
	callq	_snd_soc_update_bits
LBB0_15:
	movq	%r15, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	$48, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_snd_soc_update_bits
	xorl	%eax, %eax
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WM8776_DACIFCTRL,4,2           ## @WM8776_DACIFCTRL
	.comm	_WM8776_ADCIFCTRL,4,2           ## @WM8776_ADCIFCTRL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WM8776_MSTRCTRL,4,2            ## @WM8776_MSTRCTRL
	.comm	_mclk_ratios,8,3                ## @mclk_ratios
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to configure MCLK ratio %d/%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"MCLK is %dfs\n"

L_.str.2:                               ## @.str.2
	.asciz	"DAI in slave mode\n"

	.no_dead_strip	_wm8776_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8776_hw_params
_wm8776_hw_params:                      ; @wm8776_hw_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x20, x1
	ldr	x19, [x2, #8]
	ldr	x26, [x19, #8]
	ldr	w24, [x2]
	cmp	w24, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w24, #129
	b.ne	LBB0_13
; %bb.2:
	mov	w25, #0
	mov	w24, #256
Lloh0:
	adrp	x8, _WM8776_ADCIFCTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WM8776_ADCIFCTRL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	mov	w25, #4
Lloh2:
	adrp	x8, _WM8776_DACIFCTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WM8776_DACIFCTRL@GOTPAGEOFF]
LBB0_4:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_params_format
	sub	w8, w0, #130
	mov	w9, #48
	sub	w9, w9, w8, lsl #4
	cmp	w8, #3
	csel	w23, w9, wzr, lo
Lloh4:
	adrp	x8, _WM8776_MSTRCTRL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WM8776_MSTRCTRL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_soc_read
	tst	w0, w24
	b.eq	LBB0_9
; %bb.5:
Lloh7:
	adrp	x28, _mclk_ratios@GOTPAGE
Lloh8:
	ldr	x28, [x28, _mclk_ratios@GOTPAGEOFF]
	ldr	x0, [x28]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x27, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldrsw	x9, [x21]
	ldr	w24, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_params_rate
	sdiv	w8, w24, w0
	ldr	x0, [x28]
	ldr	w9, [x0, x27, lsl #2]
	cmp	w8, w9
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x27, x27, #1
	bl	_ARRAY_SIZE
	cmp	x27, w0, sxtw
	b.lt	LBB0_7
	b	LBB0_11
LBB0_9:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	b	LBB0_15
LBB0_10:
	mov	w27, #0
LBB0_11:
	ldr	x0, [x28]
	bl	_ARRAY_SIZE
	ldr	w24, [x19]
	cmp	w27, w0
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x26]
	ldrsw	x9, [x21]
	ldr	w19, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_params_rate
	mov	x3, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x19
	bl	_dev_err
LBB0_13:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_14:
	ldr	x8, [x28]
	ldr	w8, [x8, w27, uxtw #2]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	bl	_dev_dbg
Lloh18:
	adrp	x8, _WM8776_MSTRCTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WM8776_MSTRCTRL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w8, #7
	lsl	w2, w8, w25
	lsl	w3, w27, w25
	mov	x0, x19
	bl	_snd_soc_update_bits
LBB0_15:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #48
	mov	x3, x23
	bl	_snd_soc_update_bits
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_WM8776_DACIFCTRL,4,2           ; @WM8776_DACIFCTRL
	.comm	_WM8776_ADCIFCTRL,4,2           ; @WM8776_ADCIFCTRL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WM8776_MSTRCTRL,4,2            ; @WM8776_MSTRCTRL
	.comm	_mclk_ratios,8,3                ; @mclk_ratios
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to configure MCLK ratio %d/%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"MCLK is %dfs\n"

l_.str.2:                               ; @.str.2
	.asciz	"DAI in slave mode\n"

	.no_dead_strip	_wm8776_hw_params
.subsections_via_symbols
