	.file	"extr_gina24_dsp.c_set_sample_rate.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"set_sample_rate: Cannot set sample rate - clock not set to CLK_CLOCKININTERNAL\n"
	.text
	.p2align 4
	.type	set_sample_rate, @function
set_sample_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	cmp	esi, 49999
	jle	.L2
	xor	edi, edi
	mov	rax, QWORD PTR DIGITAL_MODE_ADAT[rip]
	cmp	QWORD PTR 0[rbp], rax
	sete	dil
.L2:
	call	snd_BUG_ON@PLT
	test	rax, rax
	jne	.L26
	mov	rax, QWORD PTR ECHO_CLOCK_INTERNAL[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L5
	lea	rdi, .LC0[rip]
	call	DE_ACT@PLT
	mov	r12, QWORD PTR 24[rbp]
	mov	edi, ebx
	call	cpu_to_le32@PLT
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	mov	DWORD PTR 16[rbp], ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 8[rax]
	call	le32_to_cpu@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR GML_CLOCK_CLEAR_MASK[rip]
	and	eax, DWORD PTR GML_SPDIF_RATE_CLEAR_MASK[rip]
	and	eax, r8d
	cmp	ebx, 32000
	je	.L6
	jle	.L28
	cmp	ebx, 88200
	je	.L14
	jle	.L29
	cmp	ebx, 96000
	jne	.L12
	mov	r13d, DWORD PTR GML_96KHZ[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L28:
	cmp	ebx, 16000
	je	.L8
	jle	.L30
	mov	r13d, DWORD PTR GML_22KHZ[rip]
	cmp	ebx, 22050
	jne	.L12
.L18:
	mov	r14, QWORD PTR 24[rbp]
	or	eax, r13d
	mov	edi, ebx
	mov	r12d, eax
	call	cpu_to_le32@PLT
	movsx	rdi, r13d
	mov	QWORD PTR [r14], rax
	mov	DWORD PTR 16[rbp], ebx
	call	DE_ACT@PLT
	mov	edx, DWORD PTR FALSE[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	esi, r12d
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	write_control_reg@PLT
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	cmp	ebx, 8000
	je	.L10
	cmp	ebx, 11025
	jne	.L12
	mov	r13d, DWORD PTR GML_11KHZ[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L29:
	cmp	ebx, 44100
	je	.L16
	cmp	ebx, 48000
	jne	.L12
	mov	r13d, DWORD PTR GML_48KHZ[rip]
	or	r13d, DWORD PTR GML_SPDIF_SAMPLE_RATE1[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L12:
	movsx	rdi, ebx
	call	DE_ACT@PLT
.L26:
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	r13d, DWORD PTR GML_44KHZ[rip]
	test	DWORD PTR GML_SPDIF_PRO_MODE[rip], eax
	je	.L18
	or	r13d, DWORD PTR GML_SPDIF_SAMPLE_RATE0[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r13d, DWORD PTR GML_8KHZ[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r13d, DWORD PTR GML_32KHZ[rip]
	or	r13d, DWORD PTR GML_SPDIF_SAMPLE_RATE0[rip]
	or	r13d, DWORD PTR GML_SPDIF_SAMPLE_RATE1[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r13d, DWORD PTR GML_16KHZ[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r13d, DWORD PTR GML_88KHZ[rip]
	jmp	.L18
	.cfi_endproc
.LFE0:
	.size	set_sample_rate, .-set_sample_rate
	.comm	GML_SPDIF_SAMPLE_RATE1,4,4
	.comm	GML_SPDIF_SAMPLE_RATE0,4,4
	.comm	GML_SPDIF_RATE_CLEAR_MASK,4,4
	.comm	GML_SPDIF_PRO_MODE,4,4
	.comm	GML_CLOCK_CLEAR_MASK,4,4
	.comm	GML_96KHZ,4,4
	.comm	GML_8KHZ,4,4
	.comm	GML_88KHZ,4,4
	.comm	GML_48KHZ,4,4
	.comm	GML_44KHZ,4,4
	.comm	GML_32KHZ,4,4
	.comm	GML_22KHZ,4,4
	.comm	GML_16KHZ,4,4
	.comm	GML_11KHZ,4,4
	.comm	FALSE,4,4
	.comm	EINVAL,4,4
	.comm	ECHO_CLOCK_INTERNAL,8,8
	.comm	DIGITAL_MODE_ADAT,8,8
	.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_gina24_dsp.c_set_sample_rate.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"set_sample_rate: Cannot set sample rate - clock not"
	.ascii	" set to CLK_CLOCKININTERNAL\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_sample_rate, %function
set_sample_rate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L29
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r1, r3
	ldrgt	r3, .L29+4
	mov	r5, r0
	ldrgt	r3, [r3]
	ldrgt	r0, [r0]
	movle	r0, #0
	subgt	r0, r0, r3
	clzgt	r0, r0
	lsrgt	r0, r0, #5
	mov	r4, r1
	bl	snd_BUG_ON
	subs	r6, r0, #0
	bne	.L24
	ldr	r3, .L29+8
	ldr	r2, [r5, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L5
	ldr	r0, .L29+12
	bl	DE_ACT
	mov	r0, r4
	ldr	r7, [r5, #12]
	bl	cpu_to_le32
	str	r0, [r7]
	mov	r0, r6
	str	r4, [r5, #8]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r3, [r5, #12]
	ldr	r0, [r3, #4]
	bl	le32_to_cpu
	ldr	r2, .L29+16
	ldr	r3, .L29+20
	ldr	r1, [r2]
	ldr	r3, [r3]
	cmp	r4, #32000
	and	r1, r1, r3
	and	r1, r1, r0
	beq	.L6
	ble	.L26
	ldr	r3, .L29+24
	cmp	r4, r3
	beq	.L14
	ble	.L27
	ldr	r3, .L29+28
	cmp	r4, r3
	bne	.L12
	ldr	r3, .L29+32
	ldr	r7, [r3]
.L18:
	mov	r0, r4
	orr	r6, r7, r1
	ldr	r8, [r5, #12]
	bl	cpu_to_le32
	mov	r3, r0
	mov	r0, r7
	str	r3, [r8]
	str	r4, [r5, #8]
	bl	DE_ACT
	ldr	r3, .L29+36
	mov	r1, r6
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r2, [r3]
	b	write_control_reg
.L26:
	cmp	r4, #16000
	beq	.L8
	ble	.L28
	ldr	r3, .L29+40
	cmp	r4, r3
	bne	.L12
	ldr	r3, .L29+44
	ldr	r7, [r3]
	b	.L18
.L28:
	cmp	r4, #8000
	beq	.L10
	ldr	r3, .L29+48
	cmp	r4, r3
	bne	.L12
	ldr	r3, .L29+52
	ldr	r7, [r3]
	b	.L18
.L27:
	ldr	r3, .L29+56
	cmp	r4, r3
	beq	.L16
	ldr	r3, .L29+60
	cmp	r4, r3
	bne	.L12
	ldr	r2, .L29+64
	ldr	r3, .L29+68
	ldr	r7, [r2]
	ldr	r3, [r3]
	orr	r7, r7, r3
	b	.L18
.L12:
	mov	r0, r4
	bl	DE_ACT
.L24:
	ldr	r3, .L29+72
	ldr	r0, [r3]
	rsb	r6, r0, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldr	r3, .L29+76
	ldr	r2, .L29+80
	ldr	r3, [r3]
	ldr	r7, [r2]
	tst	r1, r3
	ldrne	r3, .L29+84
	ldrne	r3, [r3]
	orrne	r7, r7, r3
	b	.L18
.L10:
	ldr	r3, .L29+88
	ldr	r7, [r3]
	b	.L18
.L6:
	ldr	r0, .L29+92
	ldr	r2, .L29+84
	ldr	r3, .L29+68
	ldr	r7, [r0]
	ldr	r2, [r2]
	ldr	r3, [r3]
	orr	r7, r7, r2
	orr	r7, r7, r3
	b	.L18
.L8:
	ldr	r3, .L29+96
	ldr	r7, [r3]
	b	.L18
.L14:
	ldr	r3, .L29+100
	ldr	r7, [r3]
	b	.L18
.L30:
	.align	2
.L29:
	.word	49999
	.word	DIGITAL_MODE_ADAT
	.word	ECHO_CLOCK_INTERNAL
	.word	.LC0
	.word	GML_CLOCK_CLEAR_MASK
	.word	GML_SPDIF_RATE_CLEAR_MASK
	.word	88200
	.word	96000
	.word	GML_96KHZ
	.word	FALSE
	.word	22050
	.word	GML_22KHZ
	.word	11025
	.word	GML_11KHZ
	.word	44100
	.word	48000
	.word	GML_48KHZ
	.word	GML_SPDIF_SAMPLE_RATE1
	.word	EINVAL
	.word	GML_SPDIF_PRO_MODE
	.word	GML_44KHZ
	.word	GML_SPDIF_SAMPLE_RATE0
	.word	GML_8KHZ
	.word	GML_32KHZ
	.word	GML_16KHZ
	.word	GML_88KHZ
	.size	set_sample_rate, .-set_sample_rate
	.comm	GML_SPDIF_SAMPLE_RATE1,4,4
	.comm	GML_SPDIF_SAMPLE_RATE0,4,4
	.comm	GML_SPDIF_RATE_CLEAR_MASK,4,4
	.comm	GML_SPDIF_PRO_MODE,4,4
	.comm	GML_CLOCK_CLEAR_MASK,4,4
	.comm	GML_96KHZ,4,4
	.comm	GML_8KHZ,4,4
	.comm	GML_88KHZ,4,4
	.comm	GML_48KHZ,4,4
	.comm	GML_44KHZ,4,4
	.comm	GML_32KHZ,4,4
	.comm	GML_22KHZ,4,4
	.comm	GML_16KHZ,4,4
	.comm	GML_11KHZ,4,4
	.comm	FALSE,4,4
	.comm	EINVAL,4,4
	.comm	ECHO_CLOCK_INTERNAL,4,4
	.comm	DIGITAL_MODE_ADAT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
