	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r820t_sysfreq_sel
_r820t_sysfreq_sel:                     ## @r820t_sysfreq_sel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_tuner_dbg
	xorl	%r15d, %r15d
	movl	$36, %r14d
	cmpl	$128, %r13d
	je	LBB0_8
## %bb.1:
	cmpl	$131, %r13d
	je	LBB0_9
## %bb.2:
	cmpl	$130, %r13d
	jne	LBB0_7
## %bb.3:
	cmpl	$506000000, %r12d               ## imm = 0x1E28F280
	je	LBB0_4
## %bb.5:
	cmpl	$666000000, %r12d               ## imm = 0x27B25A80
	je	LBB0_4
## %bb.6:
	cmpl	$818000000, %r12d               ## imm = 0x30C1B080
	jne	LBB0_7
LBB0_4:
	movl	$83, %r13d
	movl	$20, %r14d
	movl	$40, -48(%rbp)                  ## 4-byte Folded Spill
	movl	$32, -44(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_7:
	movl	$83, %r13d
	movl	$56, -48(%rbp)                  ## 4-byte Folded Spill
	movl	$48, -44(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_8:
	movl	$56, -48(%rbp)                  ## 4-byte Folded Spill
	movl	$48, -44(%rbp)                  ## 4-byte Folded Spill
	movl	$117, %r13d
	jmp	LBB0_10
LBB0_9:
	movl	$56, -48(%rbp)                  ## 4-byte Folded Spill
	movl	$48, -44(%rbp)                  ## 4-byte Folded Spill
	movl	$96, %r15d
	movl	$98, %r13d
LBB0_10:
	movq	(%rbx), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_15
## %bb.11:
	movq	(%rax), %rcx
	movq	_CHIP_R820T@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
## %bb.12:
	movq	_CHIP_R828S@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
## %bb.13:
	movq	_CHIP_R820C@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
LBB0_15:
	cmpq	$0, 8(%rax)
	jne	LBB0_16
	jmp	LBB0_17
LBB0_14:
	movq	_DIP_FREQ@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	%r12d, (%rcx)
	movl	$96, %r15d
	cmovll	%edx, %r15d
	cmpq	$0, 8(%rax)
	je	LBB0_17
LBB0_16:
	movq	%rbx, %rdi
	movl	$6, %esi
	movl	$64, %edx
	movl	$64, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
LBB0_17:
	movq	%rbx, %rdi
	movl	$29, %esi
	movl	$229, %edx
	movl	$199, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.18:
	movq	%rbx, %rdi
	movl	$28, %esi
	movl	%r14d, %edx
	movl	$248, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.19:
	movq	%rbx, %rdi
	movl	$13, %esi
	movl	%r13d, %edx
	callq	_r820t_write_reg
	testl	%eax, %eax
	js	LBB0_43
## %bb.20:
	movq	%rbx, %rdi
	movl	$14, %esi
	movl	$117, %edx
	callq	_r820t_write_reg
	testl	%eax, %eax
	js	LBB0_43
## %bb.21:
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	%r15d, %edx
	movl	$96, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.22:
	movq	%rbx, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	movl	$8, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.23:
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	$56, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.24:
	movq	%rbx, %rdi
	movl	$23, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	$48, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.25:
	movq	%rbx, %rdi
	movl	$10, %esi
	movl	$64, %edx
	movl	$96, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.26:
	leaq	L_.str.1(%rip), %rdi
	callq	_tuner_dbg
	movq	_V4L2_TUNER_ANALOG_TV@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_27
## %bb.35:
	movq	%rbx, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	movl	$64, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.36:
	movq	%rbx, %rdi
	movl	$29, %esi
	movl	$229, %edx
	movl	$56, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.37:
	movq	%rbx, %rdi
	movl	$28, %esi
	movl	%r14d, %edx
	movl	$4, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.38:
	movq	%rbx, %rdi
	movl	$30, %esi
	movl	$14, %edx
	movl	$31, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.39:
	movq	%rbx, %rdi
	movl	$26, %esi
	xorl	%edx, %edx
	movl	$48, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.40:
	movq	%rbx, %rdi
	movl	$16, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	jmp	LBB0_41
LBB0_27:
	movq	%rbx, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	movl	$56, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.28:
	movq	%rbx, %rdi
	movl	$28, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.29:
	movq	%rbx, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	movl	$64, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.30:
	movq	%rbx, %rdi
	movl	$26, %esi
	movl	$48, %edx
	movl	$48, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.31:
	movl	$250, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	$29, %esi
	movl	$24, %edx
	movl	$56, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.32:
	movq	%rbx, %rdi
	movl	$28, %esi
	movl	%r14d, %edx
	movl	$4, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.33:
	movq	%rbx, %rdi
	movl	$30, %esi
	movl	$14, %edx
	movl	$31, %ecx
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.34:
	movq	%rbx, %rdi
	movl	$26, %esi
	movl	$32, %edx
	movl	$48, %ecx
LBB0_41:
	callq	_r820t_write_reg_mask
	testl	%eax, %eax
	js	LBB0_43
## %bb.42:
	xorl	%eax, %eax
LBB0_43:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adjusting tuner parameters for the standard\n"

	.comm	_CHIP_R820T,8,3                 ## @CHIP_R820T
	.comm	_CHIP_R828S,8,3                 ## @CHIP_R828S
	.comm	_CHIP_R820C,8,3                 ## @CHIP_R820C
	.comm	_DIP_FREQ,4,2                   ## @DIP_FREQ
L_.str.1:                               ## @.str.1
	.asciz	"adjusting LNA parameters\n"

	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ## @V4L2_TUNER_ANALOG_TV
	.no_dead_strip	_r820t_sysfreq_sel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r820t_sysfreq_sel
_r820t_sysfreq_sel:                     ; @r820t_sysfreq_sel
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x21, x2
	mov	x26, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tuner_dbg
	cmp	w20, #128
	b.eq	LBB0_7
; %bb.1:
	cmp	w20, #131
	b.eq	LBB0_8
; %bb.2:
	cmp	w20, #130
	b.ne	LBB0_6
; %bb.3:
	mov	w24, #0
	mov	w25, #83
	mov	w22, #32
	mov	w23, #40
	mov	w20, #20
	mov	w8, #62080
	movk	w8, #7720, lsl #16
	cmp	w26, w8
	b.eq	LBB0_10
; %bb.4:
	mov	w8, #23168
	movk	w8, #10162, lsl #16
	cmp	w26, w8
	b.eq	LBB0_10
; %bb.5:
	mov	w8, #45184
	movk	w8, #12481, lsl #16
	cmp	w26, w8
	b.eq	LBB0_10
LBB0_6:
	mov	w24, #0
	mov	w25, #83
	b	LBB0_9
LBB0_7:
	mov	w24, #0
	mov	w25, #117
	b	LBB0_9
LBB0_8:
	mov	w24, #96
	mov	w25, #98
LBB0_9:
	mov	w22, #48
	mov	w23, #56
	mov	w20, #36
LBB0_10:
	ldr	x8, [x19]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_13
; %bb.11:
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _CHIP_R820T@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CHIP_R820T@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	adrp	x11, _CHIP_R828S@GOTPAGE
Lloh6:
	ldr	x11, [x11, _CHIP_R828S@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
Lloh8:
	adrp	x12, _CHIP_R820C@GOTPAGE
Lloh9:
	ldr	x12, [x12, _CHIP_R820C@GOTPAGEOFF]
Lloh10:
	ldr	x12, [x12]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	ccmp	x9, x12, #4, ne
	b.ne	LBB0_13
; %bb.12:
Lloh11:
	adrp	x9, _DIP_FREQ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DIP_FREQ@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mov	w10, #96
	cmp	w9, w26
	csel	w24, wzr, w10, lt
LBB0_13:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x0, x19
	mov	w1, #6
	mov	w2, #64
	mov	w3, #64
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
LBB0_15:
	mov	x0, x19
	mov	w1, #29
	mov	w2, #229
	mov	w3, #199
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.16:
	mov	x0, x19
	mov	w1, #28
	mov	x2, x20
	mov	w3, #248
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.17:
	mov	x0, x19
	mov	w1, #13
	mov	x2, x25
	bl	_r820t_write_reg
	tbnz	w0, #31, LBB0_41
; %bb.18:
	mov	x0, x19
	mov	w1, #14
	mov	w2, #117
	bl	_r820t_write_reg
	tbnz	w0, #31, LBB0_41
; %bb.19:
	mov	x0, x19
	mov	w1, #5
	mov	x2, x24
	mov	w3, #96
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.20:
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
	mov	w3, #8
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.21:
	mov	x0, x19
	mov	w1, #17
	mov	x2, x23
	mov	w3, #56
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.22:
	mov	x0, x19
	mov	w1, #23
	mov	x2, x22
	mov	w3, #48
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.23:
	mov	x0, x19
	mov	w1, #10
	mov	w2, #64
	mov	w3, #96
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.24:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_tuner_dbg
Lloh16:
	adrp	x8, _V4L2_TUNER_ANALOG_TV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_TUNER_ANALOG_TV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	mov	x0, x19
	cmp	w8, w21
	b.ne	LBB0_31
; %bb.25:
	mov	w1, #6
	mov	w2, #0
	mov	w3, #64
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.26:
	mov	x0, x19
	mov	w1, #29
	mov	w2, #229
	mov	w3, #56
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.27:
	mov	x0, x19
	mov	w1, #28
	mov	x2, x20
	mov	w3, #4
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.28:
	mov	x0, x19
	mov	w1, #30
	mov	w2, #14
	mov	w3, #31
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.29:
	mov	x0, x19
	mov	w1, #26
	mov	w2, #0
	mov	w3, #48
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.30:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #0
	mov	w3, #4
	b	LBB0_39
LBB0_31:
	mov	w1, #29
	mov	w2, #0
	mov	w3, #56
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.32:
	mov	x0, x19
	mov	w1, #28
	mov	w2, #0
	mov	w3, #4
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.33:
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
	mov	w3, #64
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.34:
	mov	x0, x19
	mov	w1, #26
	mov	w2, #48
	mov	w3, #48
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.35:
	mov	w0, #250
	bl	_msleep
	mov	x0, x19
	mov	w1, #29
	mov	w2, #24
	mov	w3, #56
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.36:
	mov	x0, x19
	mov	w1, #28
	mov	x2, x20
	mov	w3, #4
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.37:
	mov	x0, x19
	mov	w1, #30
	mov	w2, #14
	mov	w3, #31
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.38:
	mov	x0, x19
	mov	w1, #26
	mov	w2, #32
	mov	w3, #48
LBB0_39:
	bl	_r820t_write_reg_mask
	tbnz	w0, #31, LBB0_41
; %bb.40:
	mov	w0, #0
LBB0_41:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adjusting tuner parameters for the standard\n"

	.comm	_CHIP_R820T,8,3                 ; @CHIP_R820T
	.comm	_CHIP_R828S,8,3                 ; @CHIP_R828S
	.comm	_CHIP_R820C,8,3                 ; @CHIP_R820C
	.comm	_DIP_FREQ,4,2                   ; @DIP_FREQ
l_.str.1:                               ; @.str.1
	.asciz	"adjusting LNA parameters\n"

	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ; @V4L2_TUNER_ANALOG_TV
	.no_dead_strip	_r820t_sysfreq_sel
.subsections_via_symbols
