	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aic26_hw_params
_aic26_hw_params:                       ## @aic26_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, %r15
	movq	%rdi, %rdx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	movq	(%r14), %rbx
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r12
	movq	%r15, %rdi
	callq	_params_rate
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_params_format
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_params_rate
	movb	$1, %bl
	cmpl	$22049, %eax                    ## imm = 0x5621
	jle	LBB0_6
## %bb.1:
	cmpl	$31999, %eax                    ## imm = 0x7CFF
	jle	LBB0_10
## %bb.2:
	cmpl	$32000, %eax                    ## imm = 0x7D00
	je	LBB0_16
## %bb.3:
	cmpl	$44100, %eax                    ## imm = 0xAC44
	je	LBB0_17
## %bb.4:
	cmpl	$48000, %eax                    ## imm = 0xBB80
	jne	LBB0_28
## %bb.5:
	movq	_AIC26_DIV_1@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_6:
	cmpl	$11999, %eax                    ## imm = 0x2EDF
	jg	LBB0_13
## %bb.7:
	cmpl	$8000, %eax                     ## imm = 0x1F40
	je	LBB0_18
## %bb.8:
	cmpl	$11025, %eax                    ## imm = 0x2B11
	jne	LBB0_28
## %bb.9:
	movb	$1, %r13b
	movq	_AIC26_DIV_4@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_10:
	cmpl	$22050, %eax                    ## imm = 0x5622
	je	LBB0_19
## %bb.11:
	cmpl	$24000, %eax                    ## imm = 0x5DC0
	jne	LBB0_28
## %bb.12:
	movq	_AIC26_DIV_2@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_13:
	cmpl	$12000, %eax                    ## imm = 0x2EE0
	je	LBB0_21
## %bb.14:
	cmpl	$16000, %eax                    ## imm = 0x3E80
	jne	LBB0_28
## %bb.15:
	movq	_AIC26_DIV_3@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_16:
	movq	_AIC26_DIV_1_5@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_17:
	movb	$1, %r13b
	movq	_AIC26_DIV_1@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_18:
	movq	_AIC26_DIV_6@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_19:
	movb	$1, %r13b
	movq	_AIC26_DIV_2@GOTPCREL(%rip), %rax
LBB0_20:
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_21:
	movq	_AIC26_DIV_4@GOTPCREL(%rip), %rax
LBB0_22:
	xorl	%r13d, %r13d
LBB0_23:
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_params_format
	addl	$-128, %eax
	cmpl	$4, %eax
	jae	LBB0_25
## %bb.24:
	cltq
	leaq	l_switch.table.aic26_hw_params(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	testb	%r13b, %r13b
	movl	$21056, %ecx                    ## imm = 0x5240
	movl	$7680, %r15d                    ## imm = 0x1E00
	cmovnel	%ecx, %r15d
	xorb	$1, %r13b
	movzbl	%r13b, %ecx
	leal	33052(,%rcx,4), %edx
	movq	_AIC26_REG_PLL_PROG1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%ebx, %r13d
	leal	(,%r12,8), %ebx
	orl	%r12d, %ebx
	orl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_aic26_reg_write
	movq	_AIC26_REG_PLL_PROG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_aic26_reg_write
	movq	_AIC26_REG_AUDIO_CTRL3@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_aic26_reg_read_cache
                                        ## kill: def $eax killed $eax def $rax
	andl	$-63489, %eax                   ## imm = 0xFFFF07FF
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	cmpq	$0, 8(%r12)
	leal	2048(%rax), %ecx
	cmovel	%eax, %ecx
	leal	8192(%rcx), %edx
	testb	%r13b, %r13b
	cmovel	%ecx, %edx
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_aic26_reg_write
	movq	_AIC26_REG_AUDIO_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_aic26_reg_read_cache
	andl	$-4096, %eax                    ## imm = 0xF000
	orl	(%r12), %ebx
	orl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_aic26_reg_write
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_25:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
LBB0_26:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aic26_hw_params(substream=%p, params=%p)\n"

L_.str.1:                               ## @.str.1
	.asciz	"rate=%i format=%i\n"

	.comm	_AIC26_DIV_6,4,2                ## @AIC26_DIV_6
	.comm	_AIC26_DIV_4,4,2                ## @AIC26_DIV_4
	.comm	_AIC26_DIV_3,4,2                ## @AIC26_DIV_3
	.comm	_AIC26_DIV_2,4,2                ## @AIC26_DIV_2
	.comm	_AIC26_DIV_1_5,4,2              ## @AIC26_DIV_1_5
	.comm	_AIC26_DIV_1,4,2                ## @AIC26_DIV_1
L_.str.2:                               ## @.str.2
	.asciz	"bad rate\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AIC26_WLEN_16,4,2              ## @AIC26_WLEN_16
	.comm	_AIC26_WLEN_24,4,2              ## @AIC26_WLEN_24
	.comm	_AIC26_WLEN_32,4,2              ## @AIC26_WLEN_32
L_.str.3:                               ## @.str.3
	.asciz	"bad format\n"

	.comm	_AIC26_REG_PLL_PROG1,4,2        ## @AIC26_REG_PLL_PROG1
	.comm	_AIC26_REG_PLL_PROG2,4,2        ## @AIC26_REG_PLL_PROG2
	.comm	_AIC26_REG_AUDIO_CTRL3,4,2      ## @AIC26_REG_AUDIO_CTRL3
	.comm	_AIC26_REG_AUDIO_CTRL1,4,2      ## @AIC26_REG_AUDIO_CTRL1
	.no_dead_strip	_aic26_hw_params
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.aic26_hw_params
l_switch.table.aic26_hw_params:
	.quad	_AIC26_WLEN_16
	.quad	_AIC26_WLEN_32
	.quad	_AIC26_WLEN_24
	.quad	_AIC26_WLEN_16

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aic26_hw_params
_aic26_hw_params:                       ; @aic26_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
	mov	x20, x1
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x19, [x8]
	ldr	x23, [x19]
	ldr	x8, [x23, #16]
	stp	x0, x1, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_dev_dbg
	ldr	x21, [x23, #16]
	mov	x0, x20
	bl	_params_rate
	mov	x22, x0
	mov	x0, x20
	bl	_params_format
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	x0, x20
	bl	_params_rate
	mov	w8, #22049
	cmp	w0, w8
	b.le	LBB0_6
; %bb.1:
	mov	w8, #31999
	cmp	w0, w8
	b.le	LBB0_10
; %bb.2:
	mov	w8, #32000
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.3:
	mov	w8, #44100
	cmp	w0, w8
	b.eq	LBB0_17
; %bb.4:
	mov	w8, #48000
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.5:
	mov	w22, #0
	mov	w21, #1
	b	LBB0_18
LBB0_6:
	mov	w8, #11999
	cmp	w0, w8
	b.gt	LBB0_13
; %bb.7:
	mov	w8, #8000
	cmp	w0, w8
	b.eq	LBB0_19
; %bb.8:
	mov	w8, #11025
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.9:
	mov	w21, #0
	mov	w22, #1
	b	LBB0_23
LBB0_10:
	mov	w8, #22050
	cmp	w0, w8
	b.eq	LBB0_20
; %bb.11:
	mov	w8, #24000
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.12:
	mov	w22, #0
	mov	w21, #1
	b	LBB0_21
LBB0_13:
	mov	w8, #12000
	cmp	w0, w8
	b.eq	LBB0_22
; %bb.14:
	mov	w8, #16000
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.15:
	mov	w22, #0
	mov	w21, #1
Lloh4:
	adrp	x8, _AIC26_DIV_3@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AIC26_DIV_3@GOTPAGEOFF]
	b	LBB0_24
LBB0_16:
	mov	w22, #0
	mov	w21, #1
Lloh6:
	adrp	x8, _AIC26_DIV_1_5@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AIC26_DIV_1_5@GOTPAGEOFF]
	b	LBB0_24
LBB0_17:
	mov	w21, #0
	mov	w22, #1
LBB0_18:
Lloh8:
	adrp	x8, _AIC26_DIV_1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AIC26_DIV_1@GOTPAGEOFF]
	b	LBB0_24
LBB0_19:
	mov	w22, #0
	mov	w21, #1
Lloh10:
	adrp	x8, _AIC26_DIV_6@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AIC26_DIV_6@GOTPAGEOFF]
	b	LBB0_24
LBB0_20:
	mov	w21, #0
	mov	w22, #1
LBB0_21:
Lloh12:
	adrp	x8, _AIC26_DIV_2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AIC26_DIV_2@GOTPAGEOFF]
	b	LBB0_24
LBB0_22:
	mov	w22, #0
	mov	w21, #1
LBB0_23:
Lloh14:
	adrp	x8, _AIC26_DIV_4@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AIC26_DIV_4@GOTPAGEOFF]
LBB0_24:
	ldr	w24, [x8]
	mov	x0, x20
	bl	_params_format
	sub	w8, w0, #128
	cmp	w8, #4
	b.hs	LBB0_26
; %bb.25:
Lloh16:
	adrp	x9, l_switch.table.aic26_hw_params@PAGE
Lloh17:
	add	x9, x9, l_switch.table.aic26_hw_params@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w25, [x8]
	mov	w8, #7680
	mov	w9, #21056
	cmp	w22, #0
	csel	w20, w9, w8, ne
	mov	w8, #33056
	mov	w9, #33052
	csel	w2, w9, w8, ne
Lloh18:
	adrp	x8, _AIC26_REG_PLL_PROG1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AIC26_REG_PLL_PROG1@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_aic26_reg_write
Lloh21:
	adrp	x8, _AIC26_REG_PLL_PROG2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AIC26_REG_PLL_PROG2@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_aic26_reg_write
Lloh24:
	adrp	x20, _AIC26_REG_AUDIO_CTRL3@GOTPAGE
Lloh25:
	ldr	x20, [x20, _AIC26_REG_AUDIO_CTRL3@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_aic26_reg_read_cache
	and	w8, w0, #0xffff07ff
	ldr	x9, [x23, #8]
	orr	w10, w8, #0x800
	cmp	x9, #0
	csel	w8, w8, w10, eq
	orr	w9, w8, #0x2000
	cmp	w21, #0
	csel	w2, w9, w8, ne
	ldr	w1, [x20]
	mov	x0, x19
	bl	_aic26_reg_write
Lloh26:
	adrp	x20, _AIC26_REG_AUDIO_CTRL1@GOTPAGE
Lloh27:
	ldr	x20, [x20, _AIC26_REG_AUDIO_CTRL1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_aic26_reg_read_cache
	and	w8, w0, #0xfffff000
	ldr	w9, [x23]
	orr	w10, w24, w24, lsl #3
	orr	w10, w10, w25
	orr	w9, w10, w9
	orr	w2, w9, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_aic26_reg_write
	mov	w0, #0
	b	LBB0_28
LBB0_26:
	ldr	x0, [x23, #16]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_27:
	bl	_dev_dbg
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_28:
	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
LBB0_29:
	ldr	x0, [x23, #16]
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_27
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aic26_hw_params(substream=%p, params=%p)\n"

l_.str.1:                               ; @.str.1
	.asciz	"rate=%i format=%i\n"

	.comm	_AIC26_DIV_6,4,2                ; @AIC26_DIV_6
	.comm	_AIC26_DIV_4,4,2                ; @AIC26_DIV_4
	.comm	_AIC26_DIV_3,4,2                ; @AIC26_DIV_3
	.comm	_AIC26_DIV_2,4,2                ; @AIC26_DIV_2
	.comm	_AIC26_DIV_1_5,4,2              ; @AIC26_DIV_1_5
	.comm	_AIC26_DIV_1,4,2                ; @AIC26_DIV_1
l_.str.2:                               ; @.str.2
	.asciz	"bad rate\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AIC26_WLEN_16,4,2              ; @AIC26_WLEN_16
	.comm	_AIC26_WLEN_24,4,2              ; @AIC26_WLEN_24
	.comm	_AIC26_WLEN_32,4,2              ; @AIC26_WLEN_32
l_.str.3:                               ; @.str.3
	.asciz	"bad format\n"

	.comm	_AIC26_REG_PLL_PROG1,4,2        ; @AIC26_REG_PLL_PROG1
	.comm	_AIC26_REG_PLL_PROG2,4,2        ; @AIC26_REG_PLL_PROG2
	.comm	_AIC26_REG_AUDIO_CTRL3,4,2      ; @AIC26_REG_AUDIO_CTRL3
	.comm	_AIC26_REG_AUDIO_CTRL1,4,2      ; @AIC26_REG_AUDIO_CTRL1
	.no_dead_strip	_aic26_hw_params
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.aic26_hw_params
l_switch.table.aic26_hw_params:
	.quad	_AIC26_WLEN_16
	.quad	_AIC26_WLEN_32
	.quad	_AIC26_WLEN_24
	.quad	_AIC26_WLEN_16

.subsections_via_symbols
