	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function playpaq_wm8510_hw_params
_playpaq_wm8510_hw_params:              ## @playpaq_wm8510_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	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	(%r12), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_1
## %bb.3:
	movq	%rsi, %rbx
	movq	_SND_SOC_DAIFMT_I2S@GOTPCREL(%rip), %rcx
	movq	_SND_SOC_DAIFMT_NB_NF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r13d
	orl	(%rcx), %r13d
	movq	8(%rax), %r15
	movq	_SND_SOC_DAIFMT_CBM_CFM@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	%rsi, %rdi
	callq	_params_rate
	cmpl	$22049, %eax                    ## imm = 0x5621
	jg	LBB0_8
## %bb.4:
	cmpl	$8000, %eax                     ## imm = 0x1F40
	je	LBB0_14
## %bb.5:
	cmpl	$11025, %eax                    ## imm = 0x2B11
	je	LBB0_13
## %bb.6:
	cmpl	$16000, %eax                    ## imm = 0x3E80
	jne	LBB0_12
## %bb.7:
	movl	$24576000, -44(%rbp)            ## 4-byte Folded Spill
                                        ## imm = 0x1770000
	movq	_WM8510_MCLKDIV_6@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_warning
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_29
LBB0_8:
	cmpl	$22050, %eax                    ## imm = 0x5622
	je	LBB0_15
## %bb.9:
	movq	_WM8510_MCLKDIV_2@GOTPCREL(%rip), %rcx
	cmpl	$48000, %eax                    ## imm = 0xBB80
	je	LBB0_10
## %bb.11:
	cmpl	$44100, %eax                    ## imm = 0xAC44
	je	LBB0_16
LBB0_12:
	movq	%rbx, %rdi
	callq	_params_rate
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_warning
	jmp	LBB0_2
LBB0_14:
	movl	$24576000, -44(%rbp)            ## 4-byte Folded Spill
                                        ## imm = 0x1770000
	movq	_WM8510_MCLKDIV_12@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_13:
	movq	_WM8510_MCLKDIV_8@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_15:
	movq	_WM8510_MCLKDIV_4@GOTPCREL(%rip), %rcx
LBB0_16:
	movl	$22579200, -44(%rbp)            ## 4-byte Folded Spill
                                        ## imm = 0x1588800
	jmp	LBB0_17
LBB0_10:
	movl	$24576000, -44(%rbp)            ## 4-byte Folded Spill
                                        ## imm = 0x1770000
LBB0_17:
	movl	(%rcx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_WM8510_BCLKDIV_8@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_snd_soc_dai_set_fmt
	testl	%eax, %eax
	js	LBB0_18
## %bb.20:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_snd_soc_dai_set_fmt
	testl	%eax, %eax
	js	LBB0_21
## %bb.22:
	movq	_CODEC_CLK@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_clk_get_rate
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	movl	%r14d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_WM8510_BCLKDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_snd_soc_dai_set_clkdiv
	testl	%eax, %eax
	js	LBB0_23
## %bb.24:
	movl	(%r12), %edi
	callq	_clk_get_rate
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	movl	%r13d, %ecx
	callq	_snd_soc_dai_set_pll
	testl	%eax, %eax
	js	LBB0_25
## %bb.26:
	movq	_WM8510_MCLKDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_snd_soc_dai_set_clkdiv
	testl	%eax, %eax
	jns	LBB0_29
## %bb.27:
	movl	%eax, %r14d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_28
LBB0_18:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_19
LBB0_21:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_19
LBB0_23:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
LBB0_19:
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_warning
LBB0_29:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	%eax, %r14d
	leaq	L_.str.6(%rip), %rdi
LBB0_28:
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_warning
	movl	%r14d, %ebx
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_SND_SOC_DAIFMT_I2S,4,2         ## @SND_SOC_DAIFMT_I2S
	.comm	_SND_SOC_DAIFMT_NB_NF,4,2       ## @SND_SOC_DAIFMT_NB_NF
	.comm	_SND_SOC_DAIFMT_CBM_CFM,4,2     ## @SND_SOC_DAIFMT_CBM_CFM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"playpaq_wm8510_hw_params: ssc is NULL!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WM8510_MCLKDIV_2,4,2           ## @WM8510_MCLKDIV_2
	.comm	_WM8510_BCLKDIV_8,4,2           ## @WM8510_BCLKDIV_8
	.comm	_WM8510_MCLKDIV_4,4,2           ## @WM8510_MCLKDIV_4
	.comm	_WM8510_MCLKDIV_6,4,2           ## @WM8510_MCLKDIV_6
	.comm	_WM8510_MCLKDIV_8,4,2           ## @WM8510_MCLKDIV_8
	.comm	_WM8510_MCLKDIV_12,4,2          ## @WM8510_MCLKDIV_12
L_.str.1:                               ## @.str.1
	.asciz	"playpaq_wm8510: Unsupported sample rate %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"playpaq_wm8510: Failed to set CODEC DAI format (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"playpaq_wm8510: Failed to set CPU DAI format (%d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"playpaq_wm8510: pll_in = %ld, pll_out = %u, bclk = %x, mclk = %x\n"

	.comm	_CODEC_CLK,4,2                  ## @CODEC_CLK
	.comm	_WM8510_BCLKDIV,4,2             ## @WM8510_BCLKDIV
L_.str.5:                               ## @.str.5
	.asciz	"playpaq_wm8510: Failed to set CODEC DAI BCLKDIV (%d)\n"

L_.str.6:                               ## @.str.6
	.asciz	"playpaq_wm8510: Failed to set CODEC DAI PLL (%d)\n"

	.comm	_WM8510_MCLKDIV,4,2             ## @WM8510_MCLKDIV
L_.str.7:                               ## @.str.7
	.asciz	"playpaq_wm8510: Failed to set CODEC MCLKDIV (%d)\n"

	.comm	_AT32_SSC_CMR_DIV,4,2           ## @AT32_SSC_CMR_DIV
	.comm	_AT32_SSC_TCMR_PERIOD,4,2       ## @AT32_SSC_TCMR_PERIOD
	.comm	_SND_SOC_DAIFMT_CBS_CFS,4,2     ## @SND_SOC_DAIFMT_CBS_CFS
	.no_dead_strip	_playpaq_wm8510_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function playpaq_wm8510_hw_params
_playpaq_wm8510_hw_params:              ; @playpaq_wm8510_hw_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x20, [x8]
	ldr	x9, [x20]
	ldr	x9, [x9]
	cbz	x9, LBB0_6
; %bb.1:
	mov	x21, x1
	ldr	x19, [x8, #8]
Lloh0:
	adrp	x8, _SND_SOC_DAIFMT_I2S@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SND_SOC_DAIFMT_I2S@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _SND_SOC_DAIFMT_NB_NF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SND_SOC_DAIFMT_NB_NF@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _SND_SOC_DAIFMT_CBM_CFM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SND_SOC_DAIFMT_CBM_CFM@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
	mov	x0, x1
	bl	_params_rate
	mov	w8, #22049
	cmp	w0, w8
	b.gt	LBB0_8
; %bb.2:
	mov	w8, #8000
	cmp	w0, w8
	b.eq	LBB0_12
; %bb.3:
	mov	w8, #11025
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.4:
	mov	w8, #16000
	cmp	w0, w8
	b.ne	LBB0_26
; %bb.5:
Lloh9:
	adrp	x8, _WM8510_MCLKDIV_6@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WM8510_MCLKDIV_6@GOTPAGEOFF]
	b	LBB0_17
LBB0_6:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_pr_warning
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_31
LBB0_8:
	mov	w8, #22050
	cmp	w0, w8
	b.eq	LBB0_14
; %bb.9:
	mov	w8, #48000
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.10:
	mov	w8, #44100
	cmp	w0, w8
	b.ne	LBB0_26
; %bb.11:
Lloh16:
	adrp	x8, _WM8510_MCLKDIV_2@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WM8510_MCLKDIV_2@GOTPAGEOFF]
	b	LBB0_15
LBB0_12:
Lloh18:
	adrp	x8, _WM8510_MCLKDIV_12@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WM8510_MCLKDIV_12@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
Lloh20:
	adrp	x8, _WM8510_MCLKDIV_8@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WM8510_MCLKDIV_8@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh22:
	adrp	x8, _WM8510_MCLKDIV_4@GOTPAGE
Lloh23:
	ldr	x8, [x8, _WM8510_MCLKDIV_4@GOTPAGEOFF]
LBB0_15:
	mov	w21, #34816
	movk	w21, #344, lsl #16
	b	LBB0_18
LBB0_16:
Lloh24:
	adrp	x8, _WM8510_MCLKDIV_2@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WM8510_MCLKDIV_2@GOTPAGEOFF]
LBB0_17:
	mov	w21, #24576000
LBB0_18:
	orr	w9, w23, w22
	orr	w25, w9, w24
	ldr	w22, [x8]
Lloh26:
	adrp	x8, _WM8510_BCLKDIV_8@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WM8510_BCLKDIV_8@GOTPAGEOFF]
Lloh28:
	ldr	w23, [x8]
	mov	x0, x19
	mov	x1, x25
	bl	_snd_soc_dai_set_fmt
	tbnz	w0, #31, LBB0_24
; %bb.19:
	mov	x0, x20
	mov	x1, x25
	bl	_snd_soc_dai_set_fmt
	tbnz	w0, #31, LBB0_25
; %bb.20:
Lloh29:
	adrp	x20, _CODEC_CLK@GOTPAGE
Lloh30:
	ldr	x20, [x20, _CODEC_CLK@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_clk_get_rate
	mov	x1, x0
	stp	x23, x22, [sp]
Lloh31:
	adrp	x0, l_.str.4@PAGE
Lloh32:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x2, x21
	bl	_pr_debug
Lloh33:
	adrp	x8, _WM8510_BCLKDIV@GOTPAGE
Lloh34:
	ldr	x8, [x8, _WM8510_BCLKDIV@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_snd_soc_dai_set_clkdiv
	tbnz	w0, #31, LBB0_27
; %bb.21:
	ldr	w0, [x20]
	bl	_clk_get_rate
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	mov	x3, x21
	bl	_snd_soc_dai_set_pll
	tbnz	w0, #31, LBB0_28
; %bb.22:
Lloh36:
	adrp	x8, _WM8510_MCLKDIV@GOTPAGE
Lloh37:
	ldr	x8, [x8, _WM8510_MCLKDIV@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_snd_soc_dai_set_clkdiv
	tbnz	w0, #31, LBB0_29
; %bb.23:
	mov	w24, #0
	b	LBB0_31
LBB0_24:
	mov	x24, x0
	str	x24, [sp]
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warning
	b	LBB0_31
LBB0_25:
	mov	x24, x0
	str	x24, [sp]
Lloh41:
	adrp	x0, l_.str.3@PAGE
Lloh42:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_30
LBB0_26:
	mov	x0, x21
	bl	_params_rate
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh43:
	adrp	x0, l_.str.1@PAGE
Lloh44:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_27:
	mov	x24, x0
	str	x24, [sp]
Lloh45:
	adrp	x0, l_.str.5@PAGE
Lloh46:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_30
LBB0_28:
	mov	x24, x0
	str	x24, [sp]
Lloh47:
	adrp	x0, l_.str.6@PAGE
Lloh48:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_30
LBB0_29:
	mov	x24, x0
	str	x24, [sp]
Lloh49:
	adrp	x0, l_.str.7@PAGE
Lloh50:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_30:
	bl	_pr_warning
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
LBB0_31:
	mov	x0, x24
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_SND_SOC_DAIFMT_I2S,4,2         ; @SND_SOC_DAIFMT_I2S
	.comm	_SND_SOC_DAIFMT_NB_NF,4,2       ; @SND_SOC_DAIFMT_NB_NF
	.comm	_SND_SOC_DAIFMT_CBM_CFM,4,2     ; @SND_SOC_DAIFMT_CBM_CFM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"playpaq_wm8510_hw_params: ssc is NULL!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WM8510_MCLKDIV_2,4,2           ; @WM8510_MCLKDIV_2
	.comm	_WM8510_BCLKDIV_8,4,2           ; @WM8510_BCLKDIV_8
	.comm	_WM8510_MCLKDIV_4,4,2           ; @WM8510_MCLKDIV_4
	.comm	_WM8510_MCLKDIV_6,4,2           ; @WM8510_MCLKDIV_6
	.comm	_WM8510_MCLKDIV_8,4,2           ; @WM8510_MCLKDIV_8
	.comm	_WM8510_MCLKDIV_12,4,2          ; @WM8510_MCLKDIV_12
l_.str.1:                               ; @.str.1
	.asciz	"playpaq_wm8510: Unsupported sample rate %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"playpaq_wm8510: Failed to set CODEC DAI format (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"playpaq_wm8510: Failed to set CPU DAI format (%d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"playpaq_wm8510: pll_in = %ld, pll_out = %u, bclk = %x, mclk = %x\n"

	.comm	_CODEC_CLK,4,2                  ; @CODEC_CLK
	.comm	_WM8510_BCLKDIV,4,2             ; @WM8510_BCLKDIV
l_.str.5:                               ; @.str.5
	.asciz	"playpaq_wm8510: Failed to set CODEC DAI BCLKDIV (%d)\n"

l_.str.6:                               ; @.str.6
	.asciz	"playpaq_wm8510: Failed to set CODEC DAI PLL (%d)\n"

	.comm	_WM8510_MCLKDIV,4,2             ; @WM8510_MCLKDIV
l_.str.7:                               ; @.str.7
	.asciz	"playpaq_wm8510: Failed to set CODEC MCLKDIV (%d)\n"

	.comm	_AT32_SSC_CMR_DIV,4,2           ; @AT32_SSC_CMR_DIV
	.comm	_AT32_SSC_TCMR_PERIOD,4,2       ; @AT32_SSC_TCMR_PERIOD
	.comm	_SND_SOC_DAIFMT_CBS_CFS,4,2     ; @SND_SOC_DAIFMT_CBS_CFS
	.no_dead_strip	_playpaq_wm8510_hw_params
.subsections_via_symbols
