	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0900_search_srate_coarse
_stv0900_search_srate_coarse:           ## @stv0900_search_srate_coarse
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rax), %r13
	movl	(%rax), %ebx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpl	$48, (%r13)
	movl	$11776, %eax                    ## imm = 0x2E00
	movl	$7936, %ecx                     ## imm = 0x1F00
	cmovgel	%eax, %ecx
	movl	%ecx, -76(%rbp)                 ## 4-byte Spill
	movq	_DEMOD_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$31, %edx
	callq	_stv0900_write_bits
	movq	_TMGCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$18, %edx
	callq	_stv0900_write_reg
	movq	_TMGTHRISE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$240, %edx
	callq	_stv0900_write_reg
	movq	_TMGTHFALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$224, %edx
	callq	_stv0900_write_reg
	movq	_SCAN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_stv0900_write_bits
	movq	_CFR_AUTOSCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_stv0900_write_bits
	movq	_SFRUP1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$131, %edx
	callq	_stv0900_write_reg
	movq	_SFRUP0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$192, %edx
	callq	_stv0900_write_reg
	movq	_SFRLOW1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$130, %edx
	callq	_stv0900_write_reg
	movq	_SFRLOW0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$160, %edx
	callq	_stv0900_write_reg
	movq	_DMDT0M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_stv0900_write_reg
	movq	_AGC2REF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$80, %edx
	callq	_stv0900_write_reg
	movl	(%r13), %eax
	cmpl	$48, %eax
	jl	LBB0_2
## %bb.1:
	movq	_CARFREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$153, %edx
	callq	_stv0900_write_reg
	movl	$152, %edx
	jmp	LBB0_5
LBB0_2:
	movq	_CARFREQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r13, %rdi
	cmpl	$32, %eax
	jl	LBB0_4
## %bb.3:
	movl	$106, %edx
	callq	_stv0900_write_reg
	movl	$149, %edx
	jmp	LBB0_5
LBB0_4:
	movl	$237, %edx
	callq	_stv0900_write_reg
	movl	$115, %edx
LBB0_5:
	movq	_SFRSTEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_stv0900_write_reg
	movq	8(%r13), %rax
	movq	%rbx, %r8
	movl	(%rax,%rbx,4), %eax
	movl	$1000, %esi                     ## imm = 0x3E8
	cmpl	$2000001, %eax                  ## imm = 0x1E8481
	jl	LBB0_8
## %bb.6:
	movl	$2000, %esi                     ## imm = 0x7D0
	cmpl	$5000001, %eax                  ## imm = 0x4C4B41
	jb	LBB0_8
## %bb.7:
	cmpl	$12000001, %eax                 ## imm = 0xB71B01
	movl	$3000, %eax                     ## imm = 0xBB8
	movl	$5000, %esi                     ## imm = 0x1388
	cmovbl	%eax, %esi
LBB0_8:
	movq	16(%r13), %rax
	movslq	(%rax,%r8,4), %rcx
	imulq	$274877907, %rcx, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$38, %rax
	addl	%edx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%esi
	decl	%eax
	movzwl	%ax, %eax
	movl	%eax, %edx
	shrl	$15, %edx
	addl	%eax, %edx
	movswl	%dx, %ebx
	andl	$-2, %ebx
	orl	$1, %ebx
	js	LBB0_9
## %bb.10:
	cmpl	$11, %ebx
	jb	LBB0_12
## %bb.11:
	movslq	%ecx, %rax
	imulq	$1759218605, %rax, %rsi         ## imm = 0x68DB8BAD
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$44, %rsi
	addl	%eax, %esi
	movl	$11, %ebx
	jmp	LBB0_12
LBB0_9:
	movl	$1, %ebx
LBB0_12:
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	sete	%cl
	jne	LBB0_28
## %bb.13:
	movq	24(%r13), %rax
	movl	(%rax,%r8,4), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$-1, -56(%rbp)                  ## 4-byte Folded Spill
	movl	$1, %eax
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	xorl	%r15d, %r15d
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	_DMDISTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$95, %edx
	callq	_stv0900_write_reg
	movq	_DEMOD_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_stv0900_write_bits
	movl	$50, %edi
	callq	_msleep
	movl	$10, %r14d
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_TMGLOCK_QUALITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_stv0900_get_bits
	xorl	%ecx, %ecx
	cmpl	$2, %eax
	setge	%cl
	addl	%ecx, %r15d
	movq	_AGC2I1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_stv0900_read_reg
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	_AGC2I0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_stv0900_read_reg
	orl	%ebx, %eax
	addl	%eax, %r12d
	decl	%r14d
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movslq	%r12d, %rax
	imulq	$1717986919, %rax, %r12         ## imm = 0x66666667
	movq	%r12, %rax
	shrq	$63, %rax
	sarq	$34, %r12
	addl	%eax, %r12d
	movl	40(%r13), %esi
	movq	%r13, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_stv0900_get_symbol_rate
	movl	%eax, %ebx
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	leaq	L_.str(%rip), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	%eax, %ecx
	movl	%r15d, %r8d
	callq	_dprintk
	cmpl	$5, %r15d
	jl	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	-76(%rbp), %r12d                ## 4-byte Folded Reload
	jge	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	addl	$-850001, %ebx                  ## imm = 0xFFF307AF
	cmpl	$54149998, %ebx                 ## imm = 0x33A436E
	ja	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	cmpl	%ebx, %edi
	jge	LBB0_25
## %bb.21:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%edi, %eax
	imull	-96(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, %ecx
	negl	%ecx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	cmovgl	%eax, %ecx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	addl	%ecx, %esi
	movq	32(%r13), %rax
	movq	48(%r13), %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$3, (%rax,%rcx,4)
	movl	(%rdx,%rcx,4), %edx
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_stv0900_set_tuner_auto
	jmp	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_stv0900_set_tuner
LBB0_24:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
LBB0_25:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	sete	%cl
	jne	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	cmpl	%ebx, %edi
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	jl	LBB0_14
LBB0_28:
	testb	%cl, %cl
	je	LBB0_30
LBB0_29:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	testb	%cl, %cl
	jne	LBB0_29
LBB0_30:
	movl	40(%r13), %esi
	movq	%r13, %rdi
	movl	%r8d, %edx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stv0900_get_symbol_rate        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_DEMOD_MODE,4,2                 ## @DEMOD_MODE
	.comm	_TMGCFG,4,2                     ## @TMGCFG
	.comm	_TMGTHRISE,4,2                  ## @TMGTHRISE
	.comm	_TMGTHFALL,4,2                  ## @TMGTHFALL
	.comm	_SCAN_ENABLE,4,2                ## @SCAN_ENABLE
	.comm	_CFR_AUTOSCAN,4,2               ## @CFR_AUTOSCAN
	.comm	_SFRUP1,4,2                     ## @SFRUP1
	.comm	_SFRUP0,4,2                     ## @SFRUP0
	.comm	_SFRLOW1,4,2                    ## @SFRLOW1
	.comm	_SFRLOW0,4,2                    ## @SFRLOW0
	.comm	_DMDT0M,4,2                     ## @DMDT0M
	.comm	_AGC2REF,4,2                    ## @AGC2REF
	.comm	_CARFREQ,4,2                    ## @CARFREQ
	.comm	_SFRSTEP,4,2                    ## @SFRSTEP
	.comm	_DMDISTATE,4,2                  ## @DMDISTATE
	.comm	_TMGLOCK_QUALITY,4,2            ## @TMGLOCK_QUALITY
	.comm	_AGC2I1,4,2                     ## @AGC2I1
	.comm	_AGC2I0,4,2                     ## @AGC2I0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lock: I2C_DEMOD_MODE_FIELD =0. Search started. tuner freq=%d agc2=0x%x srate_coarse=%d tmg_cpt=%d\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_stv0900_search_srate_coarse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0900_search_srate_coarse
_stv0900_search_srate_coarse:           ; @stv0900_search_srate_coarse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x0, [sp]                        ; 8-byte Folded Spill
	ldr	x8, [x0]
	ldr	x19, [x8, #8]
	ldr	w8, [x8]
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
	ldr	w8, [x19]
	mov	w9, #7936
	mov	w10, #11776
	cmp	w8, #47
	csel	w8, w10, w9, gt
	stp	w8, w11, [sp, #24]              ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _DEMOD_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEMOD_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #31
	bl	_stv0900_write_bits
Lloh6:
	adrp	x8, _TMGCFG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TMGCFG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #18
	bl	_stv0900_write_reg
Lloh9:
	adrp	x8, _TMGTHRISE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TMGTHRISE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #240
	bl	_stv0900_write_reg
Lloh12:
	adrp	x8, _TMGTHFALL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TMGTHFALL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #224
	bl	_stv0900_write_reg
Lloh15:
	adrp	x8, _SCAN_ENABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SCAN_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_stv0900_write_bits
Lloh18:
	adrp	x8, _CFR_AUTOSCAN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CFR_AUTOSCAN@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_stv0900_write_bits
Lloh21:
	adrp	x8, _SFRUP1@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SFRUP1@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #131
	bl	_stv0900_write_reg
Lloh24:
	adrp	x8, _SFRUP0@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SFRUP0@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #192
	bl	_stv0900_write_reg
Lloh27:
	adrp	x8, _SFRLOW1@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SFRLOW1@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #130
	bl	_stv0900_write_reg
Lloh30:
	adrp	x8, _SFRLOW0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SFRLOW0@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #160
	bl	_stv0900_write_reg
Lloh33:
	adrp	x8, _DMDT0M@GOTPAGE
Lloh34:
	ldr	x8, [x8, _DMDT0M@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_stv0900_write_reg
Lloh36:
	adrp	x8, _AGC2REF@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AGC2REF@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #80
	bl	_stv0900_write_reg
	ldr	w8, [x19]
	cmp	w8, #48
	b.lt	LBB0_2
; %bb.1:
Lloh39:
	adrp	x8, _CARFREQ@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CARFREQ@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #153
	bl	_stv0900_write_reg
	mov	w2, #152
	b	LBB0_5
LBB0_2:
Lloh42:
	adrp	x9, _CARFREQ@GOTPAGE
Lloh43:
	ldr	x9, [x9, _CARFREQ@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x9]
	mov	x0, x19
	cmp	w8, #32
	b.lt	LBB0_4
; %bb.3:
	mov	w2, #106
	bl	_stv0900_write_reg
	mov	w2, #149
	b	LBB0_5
LBB0_4:
	mov	w2, #237
	bl	_stv0900_write_reg
	mov	w2, #115
LBB0_5:
Lloh45:
	adrp	x8, _SFRSTEP@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SFRSTEP@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stv0900_write_reg
	ldp	x8, x9, [x19, #8]
	ldr	x16, [sp, #32]                  ; 8-byte Folded Reload
	ldr	w10, [x8, x16, lsl #2]
	mov	w11, #1000
	mov	w12, #33921
	movk	w12, #30, lsl #16
	mov	w8, #2000
	mov	w13, #6913
	movk	w13, #183, lsl #16
	mov	w14, #5000
	mov	w15, #3000
	cmp	w10, w13
	csel	w13, w15, w14, lo
	mov	w14, #19265
	movk	w14, #76, lsl #16
	cmp	w10, w14
	csel	w13, w8, w13, lo
	ldrsw	x8, [x9, x16, lsl #2]
	cmp	w10, w12
	csel	w11, w11, w13, lt
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x9, x8, x9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	str	w11, [sp, #16]                  ; 4-byte Folded Spill
	sdiv	w9, w9, w11
	sub	w9, w9, #1
	and	w10, w9, #0x8000
	add	w9, w9, w10, lsr #15
	sxth	w9, w9
	orr	w23, w9, #0x1
	tbnz	w23, #31, LBB0_8
; %bb.6:
	cmp	w23, #11
	b.lo	LBB0_9
; %bb.7:
	mov	w9, #35757
	movk	w9, #26843, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #44
	add	w8, w8, w9
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	mov	w23, #11
	b	LBB0_9
LBB0_8:
	mov	w23, #1
LBB0_9:
Lloh48:
	adrp	x8, _FALSE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w9, w8
	cset	w9, eq
	b.ne	LBB0_21
; %bb.10:
	mov	w24, #0
	mov	w21, #0
	mov	w22, #0
	ldr	x8, [x19, #24]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [sp, #40]                   ; 4-byte Folded Spill
	mov	w25, #-1
	mov	w8, #1
Lloh51:
	adrp	x28, _TMGLOCK_QUALITY@GOTPAGE
Lloh52:
	ldr	x28, [x28, _TMGLOCK_QUALITY@GOTPAGEOFF]
Lloh53:
	adrp	x20, _AGC2I1@GOTPAGE
Lloh54:
	ldr	x20, [x20, _AGC2I1@GOTPAGEOFF]
Lloh55:
	adrp	x27, _AGC2I0@GOTPAGE
Lloh56:
	ldr	x27, [x27, _AGC2I0@GOTPAGEOFF]
	lsl	x9, x9, #2
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	str	w23, [sp, #20]                  ; 4-byte Folded Spill
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
Lloh57:
	adrp	x8, _DMDISTATE@GOTPAGE
Lloh58:
	ldr	x8, [x8, _DMDISTATE@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #95
	bl	_stv0900_write_reg
Lloh60:
	adrp	x8, _DEMOD_MODE@GOTPAGE
Lloh61:
	ldr	x8, [x8, _DEMOD_MODE@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_stv0900_write_bits
	mov	w0, #50
	bl	_msleep
	mov	w23, #10
LBB0_12:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x28]
	mov	x0, x19
	bl	_stv0900_get_bits
	cmp	w0, #1
	cinc	w22, w22, gt
	ldr	w1, [x20]
	mov	x0, x19
	bl	_stv0900_read_reg
	mov	x26, x0
	ldr	w1, [x27]
	mov	x0, x19
	bl	_stv0900_read_reg
	orr	w8, w0, w26, lsl #8
	add	w24, w8, w24
	subs	w23, w23, #1
	b.ne	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	smull	x8, w24, w8
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w24, w8, w9
	ldr	w1, [x19, #40]
	mov	x0, x19
	ldr	x2, [sp, #32]                   ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_stv0900_get_symbol_rate
	mov	x26, x0
	add	w21, w21, #1
Lloh63:
	adrp	x0, l_.str@PAGE
Lloh64:
	add	x0, x0, l_.str@PAGEOFF
	ldr	w1, [sp, #40]                   ; 4-byte Folded Reload
	mov	x2, x24
	mov	x3, x26
	mov	x4, x22
	bl	_dprintk
	cmp	w22, #5
	mov	w8, #1967
	movk	w8, #65523, lsl #16
	add	w8, w26, w8
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	ccmp	w24, w9, #0, ge
	mov	w9, #17262
	movk	w9, #826, lsl #16
	ccmp	w8, w9, #2, lt
	b.ls	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w23, [sp, #20]                  ; 4-byte Folded Reload
	cmp	w21, w23
	b.ge	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	mul	w8, w21, w8
	cmp	w25, #0
	cneg	w8, w8, le
	ldr	w1, [sp, #40]                   ; 4-byte Folded Reload
	add	w1, w8, w1
	ldr	x8, [x19, #32]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w8, [x8, x10]
	ldr	x9, [x19, #48]
	ldr	w2, [x9, x10]
	cmp	w8, #3
	str	w1, [sp, #40]                   ; 4-byte Folded Spill
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	ldr	x3, [sp, #32]                   ; 8-byte Folded Reload
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_stv0900_set_tuner_auto
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh65:
	adrp	x8, _TRUE@GOTPAGE
Lloh66:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh67:
	ldr	w8, [x8]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	ldr	w23, [sp, #20]                  ; 4-byte Folded Reload
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_stv0900_set_tuner
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh68:
	adrp	x8, _FALSE@GOTPAGE
Lloh69:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh70:
	ldr	w8, [x8]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w9, w8
	cset	w9, eq
	b.ne	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, x25
	ldr	w25, [sp, #44]                  ; 4-byte Folded Reload
	cmp	w21, w23
	b.lt	LBB0_11
LBB0_21:
	tbz	w9, #0, LBB0_23
; %bb.22:
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_23:
	ldr	w1, [x19, #40]
	mov	x0, x19
	ldr	x2, [sp, #32]                   ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_stv0900_get_symbol_rate
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_DEMOD_MODE,4,2                 ; @DEMOD_MODE
	.comm	_TMGCFG,4,2                     ; @TMGCFG
	.comm	_TMGTHRISE,4,2                  ; @TMGTHRISE
	.comm	_TMGTHFALL,4,2                  ; @TMGTHFALL
	.comm	_SCAN_ENABLE,4,2                ; @SCAN_ENABLE
	.comm	_CFR_AUTOSCAN,4,2               ; @CFR_AUTOSCAN
	.comm	_SFRUP1,4,2                     ; @SFRUP1
	.comm	_SFRUP0,4,2                     ; @SFRUP0
	.comm	_SFRLOW1,4,2                    ; @SFRLOW1
	.comm	_SFRLOW0,4,2                    ; @SFRLOW0
	.comm	_DMDT0M,4,2                     ; @DMDT0M
	.comm	_AGC2REF,4,2                    ; @AGC2REF
	.comm	_CARFREQ,4,2                    ; @CARFREQ
	.comm	_SFRSTEP,4,2                    ; @SFRSTEP
	.comm	_DMDISTATE,4,2                  ; @DMDISTATE
	.comm	_TMGLOCK_QUALITY,4,2            ; @TMGLOCK_QUALITY
	.comm	_AGC2I1,4,2                     ; @AGC2I1
	.comm	_AGC2I0,4,2                     ; @AGC2I0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lock: I2C_DEMOD_MODE_FIELD =0. Search started. tuner freq=%d agc2=0x%x srate_coarse=%d tmg_cpt=%d\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_stv0900_search_srate_coarse
.subsections_via_symbols
