	.file	"extr_neo1973_gta02_wm8753.c_neo1973_gta02_hifi_hw_params.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	neo1973_gta02_hifi_hw_params, @function
neo1973_gta02_hifi_hw_params:
.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
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR [rdi]
	mov	rax, QWORD PTR [rax]
	mov	rbp, QWORD PTR 8[rax]
	mov	r12, QWORD PTR [rax]
	xor	eax, eax
	call	s3c24xx_i2s_get_clockrate@PLT
	mov	rdi, r13
	mov	rbx, rax
	call	params_rate@PLT
	cmp	eax, 44100
	je	.L2
	jg	.L3
	cmp	eax, 16000
	je	.L12
	jle	.L17
	mov	r14d, DWORD PTR WM8753_BCLK_DIV_8[rip]
	xor	edx, edx
	mov	r13d, 11289600
	cmp	eax, 22050
	cmovne	r13d, edx
	cmovne	r14d, edx
.L4:
	mov	esi, DWORD PTR SND_SOC_DAIFMT_I2S[rip]
	mov	rdi, rbp
	or	esi, DWORD PTR SND_SOC_DAIFMT_NB_NF[rip]
	or	esi, DWORD PTR SND_SOC_DAIFMT_CBM_CFM[rip]
	call	snd_soc_dai_set_fmt@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR SND_SOC_DAIFMT_I2S[rip]
	mov	rdi, r12
	or	esi, DWORD PTR SND_SOC_DAIFMT_NB_NF[rip]
	or	esi, DWORD PTR SND_SOC_DAIFMT_CBM_CFM[rip]
	call	snd_soc_dai_set_fmt@PLT
	test	eax, eax
	js	.L1
	mov	ecx, DWORD PTR SND_SOC_CLOCK_IN[rip]
	mov	esi, DWORD PTR WM8753_MCLK[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	snd_soc_dai_set_sysclk@PLT
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR S3C2410_IISMOD_32FS[rip]
	mov	esi, DWORD PTR S3C24XX_DIV_MCLK[rip]
	mov	rdi, r12
	call	snd_soc_dai_set_clkdiv@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR WM8753_BCLKDIV[rip]
	mov	edx, r14d
	mov	rdi, rbp
	call	snd_soc_dai_set_clkdiv@PLT
	test	eax, eax
	js	.L1
	mov	esi, 4
	mov	edi, 4
	call	S3C24XX_PRESCALE@PLT
	mov	esi, DWORD PTR S3C24XX_DIV_PRESCALER[rip]
	mov	rdi, r12
	mov	edx, eax
	call	snd_soc_dai_set_clkdiv@PLT
	test	eax, eax
	js	.L1
	shr	rbx, 2
	mov	esi, DWORD PTR WM8753_PLL1[rip]
	mov	ecx, r13d
	mov	rdi, rbp
	mov	rdx, rbx
	call	snd_soc_dai_set_pll@PLT
	mov	edx, 0
	test	eax, eax
	cmovg	eax, edx
.L1:
	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
.L17:
	.cfi_restore_state
	cmp	eax, 8000
	je	.L12
	cmp	eax, 11025
	jne	.L13
	mov	r14d, DWORD PTR WM8753_BCLK_DIV_16[rip]
	mov	r13d, 11289600
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	r14d, DWORD PTR WM8753_BCLK_DIV_2[rip]
	mov	r13d, 11289600
	cmp	eax, 88200
	je	.L4
	mov	r13d, 12288000
	cmp	eax, 96000
	je	.L4
	cmp	eax, 48000
	jne	.L13
	mov	r14d, DWORD PTR WM8753_BCLK_DIV_4[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	xor	r14d, r14d
	mov	r13d, 12288000
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	xor	r14d, r14d
	xor	r13d, r13d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r14d, DWORD PTR WM8753_BCLK_DIV_4[rip]
	mov	r13d, 11289600
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	neo1973_gta02_hifi_hw_params, .-neo1973_gta02_hifi_hw_params
	.comm	WM8753_PLL1,4,4
	.comm	WM8753_MCLK,4,4
	.comm	WM8753_BCLK_DIV_8,4,4
	.comm	WM8753_BCLK_DIV_4,4,4
	.comm	WM8753_BCLK_DIV_2,4,4
	.comm	WM8753_BCLK_DIV_16,4,4
	.comm	WM8753_BCLKDIV,4,4
	.comm	SND_SOC_DAIFMT_NB_NF,4,4
	.comm	SND_SOC_DAIFMT_I2S,4,4
	.comm	SND_SOC_DAIFMT_CBM_CFM,4,4
	.comm	SND_SOC_CLOCK_IN,4,4
	.comm	S3C24XX_DIV_PRESCALER,4,4
	.comm	S3C24XX_DIV_MCLK,4,4
	.comm	S3C2410_IISMOD_32FS,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_neo1973_gta02_wm8753.c_neo1973_gta02_hifi_hw_params.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	neo1973_gta02_hifi_hw_params, %function
neo1973_gta02_hifi_hw_params:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	mov	r7, r1
	ldr	r3, [r3]
	ldr	r5, [r3, #4]
	ldr	r6, [r3]
	bl	s3c24xx_i2s_get_clockrate
	mov	r4, r0
	mov	r0, r7
	bl	params_rate
	ldr	r3, .L18
	cmp	r0, r3
	beq	.L2
	bgt	.L3
	cmp	r0, #16000
	beq	.L12
	ble	.L16
	ldr	r3, .L18+4
	cmp	r0, r3
	bne	.L13
	ldr	r3, .L18+8
	ldr	r8, .L18+12
	ldr	r7, [r3]
.L4:
	ldr	fp, .L18+16
	ldr	r10, .L18+20
	ldr	r9, .L18+24
	ldr	r3, [fp]
	ldr	r2, [r10]
	ldr	r1, [r9]
	orr	r3, r3, r2
	mov	r0, r5
	orr	r1, r3, r1
	bl	snd_soc_dai_set_fmt
	cmp	r0, #0
	poplt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, [fp]
	ldr	r2, [r10]
	ldr	r1, [r9]
	orr	r3, r3, r2
	mov	r0, r6
	orr	r1, r3, r1
	bl	snd_soc_dai_set_fmt
	cmp	r0, #0
	poplt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r2, .L18+28
	ldr	r3, .L18+32
	ldr	r1, [r2]
	mov	r0, r5
	mov	r2, r8
	ldr	r3, [r3]
	bl	snd_soc_dai_set_sysclk
	cmp	r0, #0
	poplt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, .L18+36
	ldr	r2, .L18+40
	mov	r0, r6
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	snd_soc_dai_set_clkdiv
	cmp	r0, #0
	poplt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, .L18+44
	mov	r2, r7
	mov	r0, r5
	ldr	r1, [r3]
	bl	snd_soc_dai_set_clkdiv
	cmp	r0, #0
	poplt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r1, #4
	ldr	r3, .L18+48
	mov	r0, r1
	ldr	r7, [r3]
	bl	S3C24XX_PRESCALE
	mov	r1, r7
	mov	r2, r0
	mov	r0, r6
	bl	snd_soc_dai_set_clkdiv
	cmp	r0, #0
	poplt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r1, .L18+52
	mov	r3, r8
	mov	r0, r5
	ldr	r1, [r1]
	lsr	r2, r4, #2
	bl	snd_soc_dai_set_pll
	and	r0, r0, r0, asr #31
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	cmp	r0, #8000
	beq	.L12
	ldr	r3, .L18+56
	cmp	r0, r3
	bne	.L13
	ldr	r3, .L18+60
	ldr	r8, .L18+12
	ldr	r7, [r3]
	b	.L4
.L3:
	ldr	r3, .L18+64
	cmp	r0, r3
	beq	.L8
	ldr	r3, .L18+68
	cmp	r0, r3
	ldreq	r3, .L18+72
	ldreq	r8, .L18+76
	ldreq	r7, [r3]
	beq	.L4
.L17:
	ldr	r3, .L18+80
	cmp	r0, r3
	bne	.L13
	ldr	r3, .L18+84
	ldr	r8, .L18+76
	ldr	r7, [r3]
	b	.L4
.L12:
	mov	r7, #0
	ldr	r8, .L18+76
	b	.L4
.L13:
	mov	r7, #0
	mov	r8, r7
	b	.L4
.L8:
	ldr	r3, .L18+72
	ldr	r8, .L18+12
	ldr	r7, [r3]
	b	.L4
.L2:
	ldr	r3, .L18+84
	ldr	r8, .L18+12
	ldr	r7, [r3]
	b	.L4
.L19:
	.align	2
.L18:
	.word	44100
	.word	22050
	.word	WM8753_BCLK_DIV_8
	.word	11289600
	.word	SND_SOC_DAIFMT_I2S
	.word	SND_SOC_DAIFMT_NB_NF
	.word	SND_SOC_DAIFMT_CBM_CFM
	.word	WM8753_MCLK
	.word	SND_SOC_CLOCK_IN
	.word	S3C24XX_DIV_MCLK
	.word	S3C2410_IISMOD_32FS
	.word	WM8753_BCLKDIV
	.word	S3C24XX_DIV_PRESCALER
	.word	WM8753_PLL1
	.word	11025
	.word	WM8753_BCLK_DIV_16
	.word	88200
	.word	96000
	.word	WM8753_BCLK_DIV_2
	.word	12288000
	.word	48000
	.word	WM8753_BCLK_DIV_4
	.size	neo1973_gta02_hifi_hw_params, .-neo1973_gta02_hifi_hw_params
	.comm	WM8753_PLL1,4,4
	.comm	WM8753_MCLK,4,4
	.comm	WM8753_BCLK_DIV_8,4,4
	.comm	WM8753_BCLK_DIV_4,4,4
	.comm	WM8753_BCLK_DIV_2,4,4
	.comm	WM8753_BCLK_DIV_16,4,4
	.comm	WM8753_BCLKDIV,4,4
	.comm	SND_SOC_DAIFMT_NB_NF,4,4
	.comm	SND_SOC_DAIFMT_I2S,4,4
	.comm	SND_SOC_DAIFMT_CBM_CFM,4,4
	.comm	SND_SOC_CLOCK_IN,4,4
	.comm	S3C24XX_DIV_PRESCALER,4,4
	.comm	S3C24XX_DIV_MCLK,4,4
	.comm	S3C2410_IISMOD_32FS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
