	.file	"extr_dvb-bt8xx.c_advbt771_samsung_tdtc9251dh0_tuner_calc_regs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	advbt771_samsung_tdtc9251dh0_tuner_calc_regs, @function
advbt771_samsung_tdtc9251dh0_tuner_calc_regs:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	ecx, 4
	jle	.L17
	mov	ecx, DWORD PTR [rsi]
	lea	esi, 249999[rcx+rcx*2]
	movsx	rax, esi
	sar	esi, 31
	imul	rax, rax, 1125899907
	sar	rax, 49
	sub	eax, esi
	add	eax, DWORD PTR IF_FREQUENCYx6[rip]
	cmp	ecx, 149999999
	jg	.L18
	mov	ecx, 1
	mov	esi, 180
.L4:
	mov	edi, eax
	and	eax, 255
	mov	DWORD PTR [rdx], 97
	sar	edi, 8
	mov	DWORD PTR 8[rdx], eax
	mov	eax, 5
	mov	DWORD PTR 4[rdx], edi
	mov	DWORD PTR 12[rdx], esi
	mov	DWORD PTR 16[rdx], ecx
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	cmp	ecx, 172999999
	jle	.L8
	cmp	ecx, 249999999
	jle	.L9
	cmp	ecx, 399999999
	jle	.L10
	cmp	ecx, 419999999
	jle	.L11
	cmp	ecx, 469999999
	jle	.L12
	mov	esi, 188
	cmp	ecx, 599999999
	jle	.L6
	xor	esi, esi
	cmp	ecx, 729999999
	setg	sil
	lea	esi, 244[0+rsi*8]
.L6:
	mov	ecx, 8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	mov	ecx, 1
	mov	esi, 188
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, 180
.L5:
	cmp	ecx, 470000000
	mov	edi, 8
	mov	ecx, 2
	cmovge	ecx, edi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, 188
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, 244
	jmp	.L5
.L12:
	mov	ecx, 2
	mov	esi, 252
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	advbt771_samsung_tdtc9251dh0_tuner_calc_regs, .-advbt771_samsung_tdtc9251dh0_tuner_calc_regs
	.comm	IF_FREQUENCYx6,4,4
	.comm	EINVAL,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_dvb-bt8xx.c_advbt771_samsung_tdtc9251dh0_tuner_calc_regs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	advbt771_samsung_tdtc9251dh0_tuner_calc_regs, %function
advbt771_samsung_tdtc9251dh0_tuner_calc_regs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r3, #4
	ble	.L20
	ldr	r1, [r1]
	ldr	r3, .L22
	ldr	r0, .L22+4
	add	r3, r1, r3
	add	r3, r3, r3, lsl #1
	smull	ip, r0, r3, r0
	ldr	ip, .L22+8
	str	lr, [sp, #-4]!
	ldr	lr, .L22+12
	ldr	ip, [ip]
	asr	r3, r3, #31
	cmp	r1, lr
	rsb	r3, r3, r0, asr #17
	movle	r1, #1
	movle	r0, #180
	add	r3, r3, ip
	bgt	.L21
.L4:
	mov	lr, #97
	asr	ip, r3, #8
	and	r3, r3, #255
	str	r0, [r2, #12]
	str	r1, [r2, #16]
	mov	r0, #5
	str	lr, [r2]
	str	ip, [r2, #4]
	str	r3, [r2, #8]
	ldr	pc, [sp], #4
.L21:
	ldr	r0, .L22+16
	cmp	r1, r0
	movlt	r1, #1
	movlt	r0, #188
	blt	.L4
	ldr	r0, .L22+20
	cmp	r1, r0
	ble	.L9
	ldr	r0, .L22+24
	cmp	r1, r0
	ble	.L10
	ldr	r0, .L22+28
	cmp	r1, r0
	ble	.L11
	ldr	r0, .L22+32
	cmp	r1, r0
	movle	r1, #2
	movle	r0, #252
	ble	.L4
	ldr	r0, .L22+36
	cmp	r1, r0
	movle	r0, #188
	ble	.L6
	ldr	r0, .L22+40
	cmp	r1, r0
	movgt	r0, #252
	movle	r0, #244
.L6:
	mov	r1, #8
	b	.L4
.L20:
	ldr	r3, .L22+44
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L9:
	mov	r0, #180
.L5:
	ldr	ip, .L22+32
	cmp	r1, ip
	movle	r1, #2
	movgt	r1, #8
	b	.L4
.L10:
	mov	r0, #188
	b	.L5
.L11:
	mov	r0, #244
	b	.L5
.L23:
	.align	2
.L22:
	.word	83333
	.word	1125899907
	.word	IF_FREQUENCYx6
	.word	149999999
	.word	173000000
	.word	249999999
	.word	399999999
	.word	419999999
	.word	469999999
	.word	599999999
	.word	729999999
	.word	EINVAL
	.size	advbt771_samsung_tdtc9251dh0_tuner_calc_regs, .-advbt771_samsung_tdtc9251dh0_tuner_calc_regs
	.comm	IF_FREQUENCYx6,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
