	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function advbt771_samsung_tdtc9251dh0_tuner_calc_regs
_advbt771_samsung_tdtc9251dh0_tuner_calc_regs: ## @advbt771_samsung_tdtc9251dh0_tuner_calc_regs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$4, %ecx
	jg	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_2:
	movl	(%rsi), %ecx
	leal	(%rcx,%rcx,2), %eax
	addl	$249999, %eax                   ## imm = 0x3D08F
	cltq
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rsi
	shrq	$63, %rsi
	sarq	$49, %rax
	addl	%esi, %eax
	movq	_IF_FREQUENCYx6@GOTPCREL(%rip), %rsi
	addl	(%rsi), %eax
	movl	$1, %edi
	movl	$180, %esi
	cmpl	$150000000, %ecx                ## imm = 0x8F0D180
	jl	LBB0_11
## %bb.3:
	movl	$188, %esi
	cmpl	$173000000, %ecx                ## imm = 0xA4FC540
	jb	LBB0_11
## %bb.4:
	movl	$180, %esi
	cmpl	$250000000, %ecx                ## imm = 0xEE6B280
	jb	LBB0_10
## %bb.5:
	movl	$188, %esi
	cmpl	$400000000, %ecx                ## imm = 0x17D78400
	jb	LBB0_10
## %bb.6:
	movl	$244, %esi
	cmpl	$420000000, %ecx                ## imm = 0x1908B100
	jb	LBB0_10
## %bb.7:
	movl	$252, %esi
	cmpl	$470000000, %ecx                ## imm = 0x1C03A180
	jb	LBB0_10
## %bb.8:
	movl	$188, %esi
	cmpl	$600000000, %ecx                ## imm = 0x23C34600
	jb	LBB0_10
## %bb.9:
	xorl	%esi, %esi
	cmpl	$730000000, %ecx                ## imm = 0x2B82EA80
	setae	%sil
	leal	244(,%rsi,8), %esi
LBB0_10:
	cmpl	$470000000, %ecx                ## imm = 0x1C03A180
	movl	$2, %ecx
	movl	$8, %edi
	cmovbl	%ecx, %edi
LBB0_11:
	movl	$97, (%rdx)
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, 4(%rdx)
	movzbl	%al, %eax
	movl	%eax, 8(%rdx)
	movl	%esi, 12(%rdx)
	movl	%edi, 16(%rdx)
	movl	$5, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IF_FREQUENCYx6,4,2             ## @IF_FREQUENCYx6
	.no_dead_strip	_advbt771_samsung_tdtc9251dh0_tuner_calc_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function advbt771_samsung_tdtc9251dh0_tuner_calc_regs
_advbt771_samsung_tdtc9251dh0_tuner_calc_regs: ; @advbt771_samsung_tdtc9251dh0_tuner_calc_regs
	.cfi_startproc
; %bb.0:
	cmp	w3, #4
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_2:
	ldr	w9, [x1]
	add	w8, w9, w9, lsl #1
	add	w8, w8, #61, lsl #12            ; =249856
	add	w8, w8, #143
	mov	w10, #56963
	movk	w10, #17179, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #63
Lloh3:
	adrp	x11, _IF_FREQUENCYx6@GOTPAGE
Lloh4:
	ldr	x11, [x11, _IF_FREQUENCYx6@GOTPAGEOFF]
	asr	x8, x8, #49
Lloh5:
	ldr	w11, [x11]
	add	w8, w8, w10
	add	w8, w8, w11
	mov	w10, #53632
	movk	w10, #2288, lsl #16
	cmp	w9, w10
	b.ge	LBB0_4
; %bb.3:
	mov	w9, #1
	mov	w11, #180
	b	LBB0_17
LBB0_4:
	mov	w10, #50496
	movk	w10, #2639, lsl #16
	cmp	w9, w10
	b.hs	LBB0_6
; %bb.5:
	mov	w9, #1
	mov	w11, #188
	b	LBB0_17
LBB0_6:
	mov	w10, #41344
	movk	w10, #7171, lsl #16
	mov	w11, #45696
	movk	w11, #3814, lsl #16
	cmp	w9, w11
	b.hs	LBB0_8
; %bb.7:
	mov	w11, #180
	b	LBB0_16
LBB0_8:
	mov	w11, #33792
	movk	w11, #6103, lsl #16
	cmp	w9, w11
	b.hs	LBB0_10
LBB0_9:
	mov	w11, #188
	b	LBB0_16
LBB0_10:
	mov	w11, #45312
	movk	w11, #6408, lsl #16
	cmp	w9, w11
	b.hs	LBB0_12
; %bb.11:
	mov	w11, #244
	b	LBB0_16
LBB0_12:
	cmp	w9, w10
	b.hs	LBB0_14
; %bb.13:
	mov	w11, #252
	b	LBB0_16
LBB0_14:
	mov	w11, #17920
	movk	w11, #9155, lsl #16
	cmp	w9, w11
	b.lo	LBB0_9
; %bb.15:
	mov	w11, #60032
	movk	w11, #11138, lsl #16
	mov	w12, #252
	mov	w13, #244
	cmp	w9, w11
	csel	w11, w13, w12, lo
LBB0_16:
	mov	w12, #8
	mov	w13, #2
	cmp	w9, w10
	csel	w9, w13, w12, lo
LBB0_17:
	mov	w10, #97
	asr	w12, w8, #8
	stp	w10, w12, [x2]
	and	w8, w8, #0xff
	stp	w8, w11, [x2, #8]
	mov	w0, #5
	str	w9, [x2, #16]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IF_FREQUENCYx6,4,2             ; @IF_FREQUENCYx6
	.no_dead_strip	_advbt771_samsung_tdtc9251dh0_tuner_calc_regs
.subsections_via_symbols
