	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thomson_dtt7579_tuner_calc_regs
_thomson_dtt7579_tuner_calc_regs:       ## @thomson_dtt7579_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, %edx
	jg	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_2:
	movl	(%rdi), %ecx
	leal	(%rcx,%rcx,2), %eax
	addl	$249999, %eax                   ## imm = 0x3D08F
	cltq
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$49, %rax
	addl	%edx, %eax
	movq	_IF_FREQUENCYx6@GOTPCREL(%rip), %rdx
	addl	(%rdx), %eax
	cmpl	$771000000, %ecx                ## imm = 0x2DF486C0
	movl	$188, %edx
	movl	$244, %edi
	cmovll	%edx, %edi
	cmpl	$542000000, %ecx                ## imm = 0x204E4380
	movl	$180, %edx
	cmovgel	%edi, %edx
	cmpl	$443250000, %ecx                ## imm = 0x1A6B7550
	movl	$2, %r8d
	movl	$8, %edi
	cmovll	%r8d, %edi
	testl	%ecx, %ecx
	movl	$3, %ecx
	cmovnel	%edi, %ecx
	movl	$96, (%rsi)
	movzbl	%al, %edi
                                        ## kill: def $eax killed $eax killed $rax
	sarl	$8, %eax
	movl	%eax, 4(%rsi)
	movl	%edi, 8(%rsi)
	movl	%edx, 12(%rsi)
	movl	%ecx, 16(%rsi)
	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	_thomson_dtt7579_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 thomson_dtt7579_tuner_calc_regs
_thomson_dtt7579_tuner_calc_regs:       ; @thomson_dtt7579_tuner_calc_regs
	.cfi_startproc
; %bb.0:
	cmp	w2, #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	w8, [x0]
	add	w9, w8, w8, lsl #1
	add	w9, w9, #61, lsl #12            ; =249856
	add	w9, w9, #143
	mov	w10, #56963
	movk	w10, #17179, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
Lloh3:
	adrp	x11, _IF_FREQUENCYx6@GOTPAGE
Lloh4:
	ldr	x11, [x11, _IF_FREQUENCYx6@GOTPAGEOFF]
	asr	x9, x9, #49
Lloh5:
	ldr	w11, [x11]
	add	w9, w9, w10
	add	w9, w9, w11
	mov	w10, #34496
	movk	w10, #11764, lsl #16
	mov	w11, #244
	mov	w12, #188
	cmp	w8, w10
	csel	w10, w12, w11, lt
	mov	w11, #17280
	movk	w11, #8270, lsl #16
	mov	w12, #180
	cmp	w8, w11
	csel	w10, w12, w10, lt
	mov	w11, #30032
	movk	w11, #6763, lsl #16
	mov	w12, #8
	mov	w13, #2
	cmp	w8, w11
	csel	w11, w13, w12, lt
	mov	w12, #3
	cmp	w8, #0
	csel	w8, w12, w11, eq
	mov	w11, #96
	asr	w12, w9, #8
	stp	w11, w12, [x1]
	and	w9, w9, #0xff
	stp	w9, w10, [x1, #8]
	str	w8, [x1, #16]
	mov	w0, #5
	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	_thomson_dtt7579_tuner_calc_regs
.subsections_via_symbols
