	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8523_hw_params
_wm8523_hw_params:                      ## @wm8523_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	8(%rbx), %r15
	movq	_WM8523_AIF_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_soc_read
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_WM8523_AIF_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_soc_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_lrclk_ratios@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ebx
	movq	%r13, %rdi
	callq	_params_rate
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movq	(%r14), %rdi
	cmpl	(%rdi,%r12,8), %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r12
	jl	LBB0_3
LBB0_5:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_1:
	xorl	%r12d, %r12d
LBB0_6:
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r12d
	jne	LBB0_8
## %bb.7:
	movl	(%rbx), %r14d
	movl	(%r15), %ebx
	movq	%r13, %rdi
	callq	_params_rate
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_8:
	movq	_WM8523_SR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	andl	%eax, %r15d
	movq	(%r14), %rax
	movl	%r12d, %ecx
	orl	4(%rax,%rcx,8), %r15d
	movq	_WM8523_WL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	andl	%eax, %r14d
	movq	%r13, %rdi
	callq	_params_format
	cmpl	$128, %eax
	je	LBB0_13
## %bb.9:
	cmpl	$129, %eax
	je	LBB0_12
## %bb.10:
	cmpl	$130, %eax
	jne	LBB0_14
## %bb.11:
	orl	$8, %r14d
	jmp	LBB0_14
LBB0_13:
	orl	$24, %r14d
	jmp	LBB0_14
LBB0_12:
	orl	$16, %r14d
LBB0_14:
	movq	_WM8523_AIF_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_snd_soc_write
	movq	_WM8523_AIF_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_snd_soc_write
	xorl	%eax, %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WM8523_AIF_CTRL1,4,2           ## @WM8523_AIF_CTRL1
	.comm	_WM8523_AIF_CTRL2,4,2           ## @WM8523_AIF_CTRL2
	.comm	_lrclk_ratios,8,3               ## @lrclk_ratios
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MCLK/fs ratio %d unsupported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WM8523_SR_MASK,4,2             ## @WM8523_SR_MASK
	.comm	_WM8523_WL_MASK,4,2             ## @WM8523_WL_MASK
	.no_dead_strip	_wm8523_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8523_hw_params
_wm8523_hw_params:                      ; @wm8523_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	x20, x1
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x19, [x8]
	ldr	x25, [x19, #8]
Lloh0:
	adrp	x23, _WM8523_AIF_CTRL1@GOTPAGE
Lloh1:
	ldr	x23, [x23, _WM8523_AIF_CTRL1@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_snd_soc_read
	mov	x21, x0
Lloh2:
	adrp	x24, _WM8523_AIF_CTRL2@GOTPAGE
Lloh3:
	ldr	x24, [x24, _WM8523_AIF_CTRL2@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_snd_soc_read
	mov	x22, x0
Lloh4:
	adrp	x26, _lrclk_ratios@GOTPAGE
Lloh5:
	ldr	x26, [x26, _lrclk_ratios@GOTPAGEOFF]
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x28, #0
	mov	x27, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x25]
	mov	x0, x20
	bl	_params_rate
	sdiv	w8, w23, w0
	ldr	x0, [x26]
	ldr	w9, [x0, x28]
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x27, x27, #1
	bl	_ARRAY_SIZE
	add	x28, x28, #8
	cmp	x27, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
Lloh6:
	adrp	x23, _WM8523_AIF_CTRL1@GOTPAGE
Lloh7:
	ldr	x23, [x23, _WM8523_AIF_CTRL1@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	w27, #0
LBB0_6:
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	w27, w0
	b.ne	LBB0_8
; %bb.7:
	ldr	w19, [x19]
	ldr	w21, [x25]
	mov	x0, x20
	bl	_params_rate
	sdiv	w2, w21, w0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _WM8523_SR_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WM8523_SR_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	bic	w8, w22, w8
	ldr	x9, [x26]
	add	x9, x9, w27, uxtw #3
	ldr	w9, [x9, #4]
	orr	w22, w9, w8
Lloh16:
	adrp	x8, _WM8523_WL_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WM8523_WL_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	bic	w21, w21, w8
	mov	x0, x20
	bl	_params_format
	orr	w8, w21, #0x18
	orr	w9, w21, #0x10
	orr	w10, w21, #0x8
	cmp	w0, #130
	csel	w10, w21, w10, ne
	cmp	w0, #129
	csel	w9, w9, w10, eq
	cmp	w0, #128
	csel	w2, w8, w9, eq
	ldr	w1, [x23]
	mov	x0, x19
	bl	_snd_soc_write
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x22
	bl	_snd_soc_write
	mov	w0, #0
LBB0_9:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_WM8523_AIF_CTRL1,4,2           ; @WM8523_AIF_CTRL1
	.comm	_WM8523_AIF_CTRL2,4,2           ; @WM8523_AIF_CTRL2
	.comm	_lrclk_ratios,8,3               ; @lrclk_ratios
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MCLK/fs ratio %d unsupported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WM8523_SR_MASK,4,2             ; @WM8523_SR_MASK
	.comm	_WM8523_WL_MASK,4,2             ; @WM8523_WL_MASK
	.no_dead_strip	_wm8523_hw_params
.subsections_via_symbols
