	.file	"extr_madera.c_madera_hw_params_rate.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Unsupported sample rate %dHz\n"
.LC1:
	.string	"Invalid clock %d\n"
.LC2:
	.string	"Failed to check rate: %d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"Cannot change rate while active\n"
	.text
	.p2align 4
	.type	madera_hw_params_rate, @function
madera_hw_params_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 16[rdx]
	mov	rdi, rax
	mov	QWORD PTR 24[rsp], rax
	call	snd_soc_component_get_drvdata@PLT
	movsx	rdx, DWORD PTR 0[r13]
	mov	r14, rax
	mov	rax, QWORD PTR 16[rax]
	lea	rax, -4[rax+rdx*4]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 8[r13]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 12[rsp], eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR madera_sr_vals[rip]
	mov	rdi, rbp
	mov	rbx, QWORD PTR [rax+r15*8]
	call	params_rate@PLT
	lea	rcx, 1[r15]
	cdqe
	cmp	rbx, rax
	je	.L6
	mov	r15, rcx
.L2:
	mov	rdi, QWORD PTR madera_sr_vals[rip]
	mov	r12d, r15d
	call	ARRAY_SIZE@PLT
	cmp	eax, r15d
	jg	.L5
.L6:
	mov	rdi, QWORD PTR madera_sr_vals[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, r12d
	je	.L29
	mov	rax, QWORD PTR 16[rsp]
	mov	edx, DWORD PTR [rax]
	lea	eax, -128[rdx]
	cmp	eax, 4
	ja	.L8
	lea	rcx, .L10[rip]
	movsx	rax, DWORD PTR [rcx+rax*4]
	add	rax, rcx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L10:
	.long	.L14-.L10
	.long	.L13-.L10
	.long	.L12-.L10
	.long	.L11-.L10
	.long	.L9-.L10
	.text
	.p2align 4,,10
	.p2align 3
.L11:
	mov	ecx, DWORD PTR MADERA_AIF1_RATE_SHIFT[rip]
	mov	r12d, 9
	mov	esi, DWORD PTR MADERA_ASYNC_SAMPLE_RATE_2[rip]
	sal	r12d, cl
.L15:
	mov	edx, DWORD PTR MADERA_SAMPLE_RATE_1_MASK[rip]
	mov	rdi, QWORD PTR 24[rsp]
	mov	ecx, r15d
	call	snd_soc_component_update_bits@PLT
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR 8[r14]
	mov	esi, DWORD PTR 12[rsp]
	lea	rdx, 36[rsp]
	add	esi, DWORD PTR MADERA_AIF_RATE_CTRL[rip]
	mov	edi, DWORD PTR [rax]
	call	regmap_read@PLT
	mov	ebx, eax
	test	eax, eax
	jne	.L30
	mov	eax, DWORD PTR 36[rsp]
	xor	eax, r12d
	test	DWORD PTR MADERA_AIF1_RATE_MASK[rip], eax
	je	.L18
	mov	rdi, r14
	call	mutex_lock@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	rdi, r14
	add	esi, DWORD PTR MADERA_AIF_RATE_CTRL[rip]
	call	madera_can_change_grp_rate@PLT
	test	eax, eax
	je	.L31
	mov	rdi, r14
	call	madera_spin_sysclk@PLT
	mov	rdi, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR 12[rsp]
	mov	ecx, r12d
	mov	edx, DWORD PTR MADERA_AIF1_RATE_MASK[rip]
	add	esi, DWORD PTR MADERA_AIF_RATE_CTRL[rip]
	call	snd_soc_component_update_bits@PLT
	mov	rdi, r14
	call	madera_spin_sysclk@PLT
.L20:
	mov	rdi, r14
	call	mutex_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L32
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, ebx
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	ecx, DWORD PTR MADERA_AIF1_RATE_SHIFT[rip]
	mov	r12d, 8
	mov	esi, DWORD PTR MADERA_ASYNC_SAMPLE_RATE_1[rip]
	sal	r12d, cl
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	mov	ecx, DWORD PTR MADERA_AIF1_RATE_SHIFT[rip]
	mov	r12d, 2
	mov	esi, DWORD PTR MADERA_SAMPLE_RATE_3[rip]
	sal	r12d, cl
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L13:
	mov	ecx, DWORD PTR MADERA_AIF1_RATE_SHIFT[rip]
	mov	r12d, 1
	mov	esi, DWORD PTR MADERA_SAMPLE_RATE_2[rip]
	sal	r12d, cl
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR MADERA_SAMPLE_RATE_1[rip]
	xor	r12d, r12d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L18:
	xor	ebx, ebx
	jmp	.L1
.L8:
	lea	rsi, .LC1[rip]
	mov	rdi, r13
	call	madera_aif_err@PLT
	mov	ebx, DWORD PTR EINVAL[rip]
	neg	ebx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, rbp
	call	params_rate@PLT
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	mov	edx, eax
	call	madera_aif_err@PLT
	mov	ebx, DWORD PTR EINVAL[rip]
	neg	ebx
	jmp	.L1
.L30:
	mov	edx, eax
	lea	rsi, .LC2[rip]
	mov	rdi, r13
	call	madera_aif_err@PLT
	jmp	.L1
.L31:
	lea	rsi, .LC3[rip]
	mov	rdi, r13
	call	madera_aif_warn@PLT
	mov	ebx, DWORD PTR EBUSY[rip]
	neg	ebx
	jmp	.L20
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	madera_hw_params_rate, .-madera_hw_params_rate
	.comm	madera_sr_vals,8,8
	.comm	MADERA_SAMPLE_RATE_3,4,4
	.comm	MADERA_SAMPLE_RATE_2,4,4
	.comm	MADERA_SAMPLE_RATE_1_MASK,4,4
	.comm	MADERA_SAMPLE_RATE_1,4,4
	.comm	MADERA_ASYNC_SAMPLE_RATE_2,4,4
	.comm	MADERA_ASYNC_SAMPLE_RATE_1,4,4
	.comm	MADERA_AIF_RATE_CTRL,4,4
	.comm	MADERA_AIF1_RATE_SHIFT,4,4
	.comm	MADERA_AIF1_RATE_MASK,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_madera.c_madera_hw_params_rate.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unsupported sample rate %dHz\012\000"
	.align	2
.LC1:
	.ascii	"Invalid clock %d\012\000"
	.align	2
.LC2:
	.ascii	"Failed to check rate: %d\012\000"
	.align	2
.LC3:
	.ascii	"Cannot change rate while active\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	madera_hw_params_rate, %function
madera_hw_params_rate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, [r2, #8]
	mov	r6, r2
	ldr	r3, .L33
	sub	sp, sp, #20
	mov	r0, r9
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r1
	bl	snd_soc_component_get_drvdata
	ldr	r3, [r6, #4]
	ldr	r8, [r6]
	ldr	r10, [r3]
	ldr	r3, [r0, #8]
	sub	r2, r8, #-1073741823
	mov	r7, r0
	mov	fp, #0
	ldr	r4, .L33+4
	str	r2, [sp]
	str	r3, [sp, #4]
	b	.L2
.L6:
	ldr	r2, [r4]
	mov	r0, r5
	ldr	r8, [r2, fp, lsl #2]
	bl	params_rate
	cmp	r8, r0
	beq	.L7
	add	fp, fp, #1
.L2:
	ldr	r0, [r4]
	bl	ARRAY_SIZE
	cmp	r0, fp
	bgt	.L6
.L7:
	ldr	r0, [r4]
	bl	ARRAY_SIZE
	cmp	r0, fp
	beq	.L29
	ldm	sp, {r2, r3}
	ldr	r2, [r3, r2, lsl #2]
	sub	r1, r2, #128
	cmp	r1, #4
	ldrls	pc, [pc, r1, asl #2]
	b	.L9
.L11:
	.word	.L15
	.word	.L14
	.word	.L13
	.word	.L12
	.word	.L10
.L10:
	mov	r5, #8
	ldr	r2, .L33+8
	ldr	r1, .L33+12
	ldr	r2, [r2]
	ldr	r1, [r1]
	lsl	r5, r5, r2
.L16:
	ldr	r2, .L33+16
	mov	r3, fp
	mov	r0, r9
	ldr	r2, [r2]
	bl	snd_soc_component_update_bits
	cmp	r10, #0
	beq	.L19
	ldr	r8, .L33+20
	ldr	r3, [r7, #4]
	ldr	r1, [r8]
	ldr	r0, [r3]
	add	r1, r10, r1
	add	r2, sp, #8
	bl	regmap_read
	subs	r4, r0, #0
	bne	.L30
	ldr	fp, .L33+24
	ldr	r3, [sp, #8]
	ldr	r2, [fp]
	eor	r3, r3, r5
	tst	r3, r2
	beq	.L19
	mov	r0, r7
	bl	mutex_lock
	ldr	r1, [r8]
	mov	r0, r7
	add	r1, r10, r1
	bl	madera_can_change_grp_rate
	cmp	r0, #0
	beq	.L31
	mov	r0, r7
	bl	madera_spin_sysclk
	ldr	r1, [r8]
	mov	r3, r5
	mov	r0, r9
	ldr	r2, [fp]
	add	r1, r10, r1
	bl	snd_soc_component_update_bits
	mov	r0, r7
	bl	madera_spin_sysclk
.L21:
	mov	r0, r7
	bl	mutex_unlock
.L1:
	ldr	r3, .L33
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r5, #2
	ldr	r2, .L33+8
	ldr	r1, .L33+28
	ldr	r2, [r2]
	ldr	r1, [r1]
	lsl	r5, r5, r2
	b	.L16
.L14:
	mov	r5, #1
	ldr	r2, .L33+8
	ldr	r1, .L33+32
	ldr	r2, [r2]
	ldr	r1, [r1]
	lsl	r5, r5, r2
	b	.L16
.L13:
	ldr	r2, .L33+36
	mov	r5, #0
	ldr	r1, [r2]
	b	.L16
.L12:
	mov	r5, #9
	ldr	r2, .L33+8
	ldr	r1, .L33+40
	ldr	r2, [r2]
	ldr	r1, [r1]
	lsl	r5, r5, r2
	b	.L16
.L19:
	mov	r4, #0
	b	.L1
.L29:
	mov	r0, r5
	bl	params_rate
	ldr	r1, .L33+44
	mov	r2, r0
	mov	r0, r6
	bl	madera_aif_err
	ldr	r3, .L33+48
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L30:
	mov	r0, r6
	mov	r2, r4
	ldr	r1, .L33+52
	bl	madera_aif_err
	b	.L1
.L31:
	mov	r0, r6
	ldr	r1, .L33+56
	bl	madera_aif_warn
	ldr	r3, .L33+60
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L21
.L32:
	bl	__stack_chk_fail
.L9:
	mov	r0, r6
	ldr	r1, .L33+64
	bl	madera_aif_err
	ldr	r3, .L33+48
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L34:
	.align	2
.L33:
	.word	.LC4
	.word	madera_sr_vals
	.word	MADERA_AIF1_RATE_SHIFT
	.word	MADERA_ASYNC_SAMPLE_RATE_1
	.word	MADERA_SAMPLE_RATE_1_MASK
	.word	MADERA_AIF_RATE_CTRL
	.word	MADERA_AIF1_RATE_MASK
	.word	MADERA_SAMPLE_RATE_3
	.word	MADERA_SAMPLE_RATE_2
	.word	MADERA_SAMPLE_RATE_1
	.word	MADERA_ASYNC_SAMPLE_RATE_2
	.word	.LC0
	.word	EINVAL
	.word	.LC2
	.word	.LC3
	.word	EBUSY
	.word	.LC1
	.size	madera_hw_params_rate, .-madera_hw_params_rate
	.comm	madera_sr_vals,4,4
	.comm	MADERA_SAMPLE_RATE_3,4,4
	.comm	MADERA_SAMPLE_RATE_2,4,4
	.comm	MADERA_SAMPLE_RATE_1_MASK,4,4
	.comm	MADERA_SAMPLE_RATE_1,4,4
	.comm	MADERA_ASYNC_SAMPLE_RATE_2,4,4
	.comm	MADERA_ASYNC_SAMPLE_RATE_1,4,4
	.comm	MADERA_AIF_RATE_CTRL,4,4
	.comm	MADERA_AIF1_RATE_SHIFT,4,4
	.comm	MADERA_AIF1_RATE_MASK,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
