	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs4270_hw_params
_cs4270_hw_params:                      ## @cs4270_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	movq	8(%r14), %r15
	movq	%rsi, %rdi
	callq	_params_rate
	movl	%eax, %ecx
	movl	(%r15), %eax
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	divl	%ecx
	movq	_NUM_MCLK_RATIOS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.1:
	movq	_cs4270_mode_ratios@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%rdx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	addq	$12, %rdx
	cmpq	%rbx, %rcx
	jne	LBB0_2
	jmp	LBB0_5
LBB0_4:
	cmpl	%ecx, %ebx
	jne	LBB0_7
LBB0_5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
LBB0_6:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_CS4270_MODE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_snd_soc_read
	movq	_CS4270_MODE_SPEED_MASK@GOTPCREL(%rip), %rcx
	movq	_CS4270_MODE_DIV_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_cs4270_mode_ratios@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	orl	4(%rax,%rcx,4), %edx
	cmpq	$0, 8(%r15)
	je	LBB0_8
## %bb.9:
	movq	_CS4270_MODE_SLAVE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	leaq	(%rax,%rcx,4), %rax
	addq	$8, %rax
LBB0_10:
	orl	(%rax), %edx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_snd_soc_write
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movq	_CS4270_FORMAT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_snd_soc_read
	movq	_CS4270_FORMAT_DAC_MASK@GOTPCREL(%rip), %rdx
	movq	_CS4270_FORMAT_ADC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movl	4(%r15), %edx
	cmpl	$129, %edx
	je	LBB0_13
## %bb.14:
	cmpl	$128, %edx
	jne	LBB0_19
## %bb.15:
	movq	_CS4270_FORMAT_ADC_LJ@GOTPCREL(%rip), %rdx
	movq	_CS4270_FORMAT_DAC_LJ@GOTPCREL(%rip), %rsi
	jmp	LBB0_16
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_13:
	movq	_CS4270_FORMAT_ADC_I2S@GOTPCREL(%rip), %rdx
	movq	_CS4270_FORMAT_DAC_I2S@GOTPCREL(%rip), %rsi
LBB0_16:
	notl	%ecx
	andl	%ecx, %eax
	movl	(%rdx), %edx
	orl	(%rsi), %edx
	orl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_snd_soc_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_18
LBB0_17:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_18
LBB0_19:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_MCLK_RATIOS,4,2            ## @NUM_MCLK_RATIOS
	.comm	_cs4270_mode_ratios,8,3         ## @cs4270_mode_ratios
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not find matching ratio\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CS4270_MODE,4,2                ## @CS4270_MODE
	.comm	_CS4270_MODE_SPEED_MASK,4,2     ## @CS4270_MODE_SPEED_MASK
	.comm	_CS4270_MODE_DIV_MASK,4,2       ## @CS4270_MODE_DIV_MASK
	.comm	_CS4270_MODE_SLAVE,4,2          ## @CS4270_MODE_SLAVE
L_.str.1:                               ## @.str.1
	.asciz	"i2c write failed\n"

	.comm	_CS4270_FORMAT,4,2              ## @CS4270_FORMAT
	.comm	_CS4270_FORMAT_DAC_MASK,4,2     ## @CS4270_FORMAT_DAC_MASK
	.comm	_CS4270_FORMAT_ADC_MASK,4,2     ## @CS4270_FORMAT_ADC_MASK
	.comm	_CS4270_FORMAT_DAC_I2S,4,2      ## @CS4270_FORMAT_DAC_I2S
	.comm	_CS4270_FORMAT_ADC_I2S,4,2      ## @CS4270_FORMAT_ADC_I2S
	.comm	_CS4270_FORMAT_DAC_LJ,4,2       ## @CS4270_FORMAT_DAC_LJ
	.comm	_CS4270_FORMAT_ADC_LJ,4,2       ## @CS4270_FORMAT_ADC_LJ
L_.str.2:                               ## @.str.2
	.asciz	"unknown dai format\n"

	.no_dead_strip	_cs4270_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs4270_hw_params
_cs4270_hw_params:                      ; @cs4270_hw_params
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x19, [x8]
	ldr	x21, [x19, #8]
	mov	x0, x1
	bl	_params_rate
Lloh0:
	adrp	x8, _NUM_MCLK_RATIOS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_MCLK_RATIOS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x20, #0
	ldr	w10, [x21]
Lloh3:
	adrp	x9, _cs4270_mode_ratios@GOTPAGE
Lloh4:
	ldr	x9, [x9, _cs4270_mode_ratios@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	udiv	w10, w10, w0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9]
	cmp	w11, w10
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	add	x9, x9, #12
	cmp	x8, x20
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w20, #0
LBB0_5:
	cmp	w20, w8
	b.ne	LBB0_9
LBB0_6:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh11:
	adrp	x22, _CS4270_MODE@GOTPAGE
Lloh12:
	ldr	x22, [x22, _CS4270_MODE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_snd_soc_read
Lloh13:
	adrp	x8, _CS4270_MODE_SPEED_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CS4270_MODE_SPEED_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _CS4270_MODE_DIV_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CS4270_MODE_DIV_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
Lloh19:
	adrp	x9, _cs4270_mode_ratios@GOTPAGE
Lloh20:
	ldr	x9, [x9, _cs4270_mode_ratios@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	mov	w10, #12
	umaddl	x9, w20, w10, x9
	ldr	w10, [x9, #4]
	orr	w8, w8, w10
	ldr	x10, [x21, #8]
Lloh22:
	adrp	x11, _CS4270_MODE_SLAVE@GOTPAGE
Lloh23:
	ldr	x11, [x11, _CS4270_MODE_SLAVE@GOTPAGEOFF]
	add	x9, x9, #8
	cmp	x10, #0
	csel	x9, x9, x11, eq
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_snd_soc_write
	tbnz	w0, #31, LBB0_13
; %bb.10:
Lloh24:
	adrp	x20, _CS4270_FORMAT@GOTPAGE
Lloh25:
	ldr	x20, [x20, _CS4270_FORMAT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_soc_read
Lloh26:
	adrp	x8, _CS4270_FORMAT_DAC_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CS4270_FORMAT_DAC_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _CS4270_FORMAT_ADC_MASK@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CS4270_FORMAT_ADC_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	ldr	w10, [x21, #4]
	cmp	w10, #129
	b.eq	LBB0_14
; %bb.11:
	cmp	w10, #128
	b.ne	LBB0_17
; %bb.12:
Lloh32:
	adrp	x10, _CS4270_FORMAT_ADC_LJ@GOTPAGE
Lloh33:
	ldr	x10, [x10, _CS4270_FORMAT_ADC_LJ@GOTPAGEOFF]
Lloh34:
	adrp	x11, _CS4270_FORMAT_DAC_LJ@GOTPAGE
Lloh35:
	ldr	x11, [x11, _CS4270_FORMAT_DAC_LJ@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	mov	x20, x0
	b	LBB0_16
LBB0_14:
Lloh36:
	adrp	x10, _CS4270_FORMAT_ADC_I2S@GOTPAGE
Lloh37:
	ldr	x10, [x10, _CS4270_FORMAT_ADC_I2S@GOTPAGEOFF]
Lloh38:
	adrp	x11, _CS4270_FORMAT_DAC_I2S@GOTPAGE
Lloh39:
	ldr	x11, [x11, _CS4270_FORMAT_DAC_I2S@GOTPAGEOFF]
LBB0_15:
	orr	w8, w9, w8
	bic	w8, w0, w8
	ldr	w9, [x11]
	ldr	w10, [x10]
	orr	w9, w10, w9
	orr	w2, w9, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_soc_write
	mov	x20, x0
	tbz	w0, #31, LBB0_8
LBB0_16:
	ldr	w0, [x19]
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_17:
	ldr	w0, [x19]
Lloh42:
	adrp	x1, l_.str.2@PAGE
Lloh43:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_MCLK_RATIOS,4,2            ; @NUM_MCLK_RATIOS
	.comm	_cs4270_mode_ratios,8,3         ; @cs4270_mode_ratios
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not find matching ratio\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CS4270_MODE,4,2                ; @CS4270_MODE
	.comm	_CS4270_MODE_SPEED_MASK,4,2     ; @CS4270_MODE_SPEED_MASK
	.comm	_CS4270_MODE_DIV_MASK,4,2       ; @CS4270_MODE_DIV_MASK
	.comm	_CS4270_MODE_SLAVE,4,2          ; @CS4270_MODE_SLAVE
l_.str.1:                               ; @.str.1
	.asciz	"i2c write failed\n"

	.comm	_CS4270_FORMAT,4,2              ; @CS4270_FORMAT
	.comm	_CS4270_FORMAT_DAC_MASK,4,2     ; @CS4270_FORMAT_DAC_MASK
	.comm	_CS4270_FORMAT_ADC_MASK,4,2     ; @CS4270_FORMAT_ADC_MASK
	.comm	_CS4270_FORMAT_DAC_I2S,4,2      ; @CS4270_FORMAT_DAC_I2S
	.comm	_CS4270_FORMAT_ADC_I2S,4,2      ; @CS4270_FORMAT_ADC_I2S
	.comm	_CS4270_FORMAT_DAC_LJ,4,2       ; @CS4270_FORMAT_DAC_LJ
	.comm	_CS4270_FORMAT_ADC_LJ,4,2       ; @CS4270_FORMAT_ADC_LJ
l_.str.2:                               ; @.str.2
	.asciz	"unknown dai format\n"

	.no_dead_strip	_cs4270_hw_params
.subsections_via_symbols
