	.file	"extr_wm5100.c_wm5100_alloc_sr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Unsupported sample rate: %dHz\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"SR %dHz, slot %d, ref %d\n"
.LC2:
	.string	"All SR slots already in use\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"Allocating SR slot %d for %dHz\n"
	.align 8
.LC4:
	.string	"SR %dHz incompatible with %dHz SYSCLK and %dHz ASYNCCLK\n"
	.text
	.p2align 4
	.type	wm5100_alloc_sr, @function
wm5100_alloc_sr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xor	ebx, ebx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	snd_soc_component_get_drvdata@PLT
	mov	rdi, QWORD PTR wm5100_sr_code[rip]
	mov	rbp, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR [rdi+rbx*4]
	add	rbx, 1
	cmp	eax, r13d
	je	.L3
.L2:
	call	ARRAY_SIZE@PLT
	mov	r12d, ebx
	mov	rdi, QWORD PTR wm5100_sr_code[rip]
	cmp	eax, ebx
	jg	.L4
.L3:
	call	ARRAY_SIZE@PLT
	cmp	eax, r12d
	je	.L25
	mov	ecx, DWORD PTR 0[rbp]
	mov	eax, ecx
	cdq
	idiv	r13d
	test	edx, edx
	jne	.L7
	mov	rdi, QWORD PTR wm5100_sr_regs[rip]
	xor	ebx, ebx
	mov	r15d, -1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR [rdi+rcx]
	mov	rdi, r14
	call	snd_soc_component_read32@PLT
	and	eax, DWORD PTR WM5100_SAMPLE_RATE_1_MASK[rip]
	cmp	eax, r12d
	je	.L15
	mov	rdi, QWORD PTR wm5100_sr_regs[rip]
.L9:
	add	rbx, 1
.L8:
	mov	DWORD PTR 12[rsp], ebx
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jle	.L15
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR wm5100_sr_regs[rip]
	lea	rcx, 0[0+rbx*4]
	mov	eax, DWORD PTR [rax+rbx*4]
	test	eax, eax
	jne	.L18
	cmp	r15d, -1
	jne	.L18
	mov	r15d, ebx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, QWORD PTR wm5100_sr_regs[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, DWORD PTR 12[rsp]
	jg	.L26
	mov	edi, DWORD PTR [r14]
	cmp	r15d, -1
	je	.L27
	mov	ecx, r13d
	mov	edx, r15d
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	rdx, QWORD PTR 8[rbp]
	movsx	rax, r15d
	mov	ecx, r12d
	mov	rdi, r14
	add	DWORD PTR [rdx+rax*4], 1
	mov	rdx, QWORD PTR wm5100_sr_regs[rip]
	mov	esi, DWORD PTR [rdx+rax*4]
	mov	edx, DWORD PTR WM5100_SAMPLE_RATE_1_MASK[rip]
	call	snd_soc_component_update_bits@PLT
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L27:
	.cfi_restore_state
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	r15d, DWORD PTR EBUSY[rip]
	neg	r15d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r8d, DWORD PTR 4[rbp]
	mov	edi, DWORD PTR [r14]
	mov	edx, r13d
	xor	eax, eax
	lea	rsi, .LC4[rip]
	call	dev_err@PLT
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	r15d, DWORD PTR 12[rsp]
	mov	rax, QWORD PTR 8[rbp]
	lea	rsi, .LC1[rip]
	movsx	rdx, r15d
	lea	rax, [rax+rdx*4]
	mov	rcx, rdx
	mov	edx, DWORD PTR [rax]
	lea	r8d, 1[rdx]
	mov	edx, r13d
	mov	DWORD PTR [rax], r8d
	mov	edi, DWORD PTR [r14]
	xor	eax, eax
	call	dev_dbg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR [r14]
	mov	edx, r13d
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	wm5100_alloc_sr, .-wm5100_alloc_sr
	.comm	wm5100_sr_regs,8,8
	.comm	wm5100_sr_code,8,8
	.comm	WM5100_SAMPLE_RATE_1_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_wm5100.c_wm5100_alloc_sr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unsupported sample rate: %dHz\012\000"
	.global	__aeabi_idivmod
	.align	2
.LC1:
	.ascii	"SR %dHz, slot %d, ref %d\012\000"
	.align	2
.LC2:
	.ascii	"All SR slots already in use\012\000"
	.align	2
.LC3:
	.ascii	"Allocating SR slot %d for %dHz\012\000"
	.align	2
.LC4:
	.ascii	"SR %dHz incompatible with %dHz SYSCLK and %dHz ASYN"
	.ascii	"CCLK\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wm5100_alloc_sr, %function
wm5100_alloc_sr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r7, r1
	mov	r10, r0
	bl	snd_soc_component_get_drvdata
	ldr	r5, .L24
	mov	r9, r0
	mov	r4, #0
	ldr	r0, [r5]
	b	.L2
.L4:
	ldr	r3, [r0, r4, lsl #2]
	cmp	r3, r7
	beq	.L3
	add	r4, r4, #1
.L2:
	bl	ARRAY_SIZE
	cmp	r0, r4
	ldr	r0, [r5]
	bgt	.L4
.L3:
	bl	ARRAY_SIZE
	cmp	r0, r4
	beq	.L20
	ldr	r6, [r9]
	mov	r1, r7
	mov	r0, r6
	bl	__aeabi_idivmod
	subs	r5, r1, #0
	bne	.L7
	ldr	r6, .L24+4
	mvn	r8, #0
	ldr	r0, [r6]
	ldr	fp, .L24+8
	b	.L8
.L21:
	ldr	r1, [r0, r5, lsl #2]
	mov	r0, r10
	bl	snd_soc_component_read32
	ldr	r3, [fp]
	and	r0, r0, r3
	cmp	r0, r4
	beq	.L14
	ldr	r0, [r6]
.L9:
	add	r5, r5, #1
.L8:
	bl	ARRAY_SIZE
	cmp	r0, r5
	ble	.L14
	ldr	r3, [r9, #8]
	ldr	r0, [r6]
	ldr	r3, [r3, r5, lsl #2]
	cmp	r3, #0
	cmneq	r8, #1
	bne	.L21
	mov	r8, r5
	b	.L9
.L14:
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	cmp	r0, r5
	bgt	.L22
	cmn	r8, #1
	ldr	r0, [r10]
	beq	.L23
	mov	r3, r7
	mov	r2, r8
	ldr	r1, .L24+12
	bl	dev_dbg
	ldr	r2, [r9, #8]
	ldr	r1, [r6]
	ldr	r3, [r2, r8, lsl #2]
	ldr	ip, .L24+8
	add	r3, r3, #1
	str	r3, [r2, r8, lsl #2]
	mov	r0, r10
	mov	r3, r4
	ldr	r1, [r1, r8, lsl #2]
	ldr	r2, [ip]
	bl	snd_soc_component_update_bits
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	ldr	r1, .L24+16
	bl	dev_err
	ldr	r3, .L24+20
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r2, [r9, #4]
	mov	r3, r6
	str	r2, [sp]
	ldr	r0, [r10]
	mov	r2, r7
	ldr	r1, .L24+24
	bl	dev_err
	ldr	r3, .L24+28
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	mov	r8, r5
	ldr	r0, [r9, #8]
	mov	r2, r7
	ldr	r1, [r0, r5, lsl #2]
	mov	r3, r5
	add	r1, r1, #1
	str	r1, [r0, r5, lsl #2]
	ldr	r0, [r10]
	str	r1, [sp]
	ldr	r1, .L24+32
	bl	dev_dbg
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	mov	r2, r7
	ldr	r0, [r10]
	ldr	r1, .L24+36
	bl	dev_err
	ldr	r3, .L24+28
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	.align	2
.L24:
	.word	wm5100_sr_code
	.word	wm5100_sr_regs
	.word	WM5100_SAMPLE_RATE_1_MASK
	.word	.LC3
	.word	.LC2
	.word	EBUSY
	.word	.LC4
	.word	EINVAL
	.word	.LC1
	.word	.LC0
	.size	wm5100_alloc_sr, .-wm5100_alloc_sr
	.comm	wm5100_sr_regs,4,4
	.comm	wm5100_sr_code,4,4
	.comm	WM5100_SAMPLE_RATE_1_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
