	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_blind_search
_stv090x_blind_search:                  ## @stv090x_blind_search
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_stv090x_get_agc2_min_level
	movq	%rax, %rbx
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_STV090x_SEARCH_AGC2_TH
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	%rcx, %rbx
	jg	LBB0_26
## %bb.1:
	movq	8(%r15), %rax
	cmpl	$32, (%rax)
	movq	_CARCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	jg	LBB0_3
## %bb.2:
	movl	$196, %edx
	jmp	LBB0_4
LBB0_3:
	movl	$6, %edx
LBB0_4:
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_25
## %bb.5:
	movq	_RTCS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$68, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_25
## %bb.6:
	movq	8(%r15), %rax
	cmpl	$32, (%rax)
	jl	LBB0_11
## %bb.7:
	movq	_EQUALCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$65, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_25
## %bb.8:
	movq	_FFECFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$65, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_25
## %bb.9:
	movq	_VITSCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$130, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_25
## %bb.10:
	movq	_VAVSRVIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_25
LBB0_11:
	movl	$110, %r12d
	movq	_KREFTMG@GOTPCREL(%rip), %r13
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_25
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r15, %rdi
	callq	_stv090x_srate_srch_coarse
	testq	%rax, %rax
	je	LBB0_14
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r15, %rdi
	callq	_stv090x_srate_srch_fine
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r15, %rdi
	callq	_stv090x_get_lock_tmg
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_stv090x_get_dmdlock
	cmpl	$30, %r12d
	jae	LBB0_23
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	xorl	%r13d, %r13d
	movl	$10, %r15d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=2
	movzbl	-41(%rbp), %eax                 ## 1-byte Folded Reload
	movb	%al, %r14b
	addl	%r14d, %r13d
	decl	%r15d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_18
LBB0_15:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %r14
	movq	_AGC2I1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	_AGC2I0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	orl	%ebx, %eax
	cltq
	addq	%r14, %rax
	xorl	%r14d, %r14d
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	$65280, %rax                    ## imm = 0xFF00
	setge	-41(%rbp)                       ## 1-byte Folded Spill
	movq	_DSTATUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movslq	%eax, %rbx
	movq	_CFR_OVERFLOW_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_STV090x_GETFIELD_Px
	cmpl	$1, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	_DEMOD_DELOCK_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_STV090x_GETFIELD_Px
	xorl	%ecx, %ecx
	cmpl	$1, %eax
	sete	%cl
	addl	%ecx, -48(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$8, -48(%rbp)                   ## 4-byte Folded Reload
	setge	%al
	cmpl	$8, %r13d
	setae	%cl
	orb	%al, %cl
	movzbl	%cl, %r14d
	xorl	%eax, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	_KREFTMG@GOTPCREL(%rip), %r13
	cmpl	$30, %r12d
	jae	LBB0_23
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_12 Depth=1
	xorl	%eax, %eax
	cmpl	$30, %r12d
	jb	LBB0_26
LBB0_23:                                ##   in Loop: Header=BB0_12 Depth=1
	testl	%eax, %eax
	jne	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_12 Depth=1
	addl	$-20, %r12d
	testl	%r14d, %r14d
	je	LBB0_12
	jmp	LBB0_26
LBB0_25:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %eax
LBB0_26:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CARCFG,4,2                     ## @CARCFG
	.comm	_RTCS2,4,2                      ## @RTCS2
	.comm	_EQUALCFG,4,2                   ## @EQUALCFG
	.comm	_FFECFG,4,2                     ## @FFECFG
	.comm	_VITSCALE,4,2                   ## @VITSCALE
	.comm	_VAVSRVIT,4,2                   ## @VAVSRVIT
	.comm	_KREFTMG,4,2                    ## @KREFTMG
	.comm	_AGC2I1,4,2                     ## @AGC2I1
	.comm	_AGC2I0,4,2                     ## @AGC2I0
	.comm	_DSTATUS2,4,2                   ## @DSTATUS2
	.comm	_CFR_OVERFLOW_FIELD,4,2         ## @CFR_OVERFLOW_FIELD
	.comm	_DEMOD_DELOCK_FIELD,4,2         ## @DEMOD_DELOCK_FIELD
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_blind_search
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_blind_search
_stv090x_blind_search:                  ; @stv090x_blind_search
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	bl	_stv090x_get_agc2_min_level
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_STV090x_SEARCH_AGC2_TH
	cmp	x20, x0
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_25
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _CARCFG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CARCFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x19
	cmp	w8, #32
	b.gt	LBB0_4
; %bb.3:
	mov	w2, #196
	bl	_STV090x_WRITE_DEMOD
	tbz	x0, #63, LBB0_5
	b	LBB0_24
LBB0_4:
	mov	w2, #6
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_24
LBB0_5:
Lloh3:
	adrp	x8, _RTCS2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTCS2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #68
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_24
; %bb.6:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #32
	b.lt	LBB0_11
; %bb.7:
Lloh6:
	adrp	x8, _EQUALCFG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EQUALCFG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_24
; %bb.8:
Lloh9:
	adrp	x8, _FFECFG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FFECFG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_24
; %bb.9:
Lloh12:
	adrp	x8, _VITSCALE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VITSCALE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #130
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_24
; %bb.10:
Lloh15:
	adrp	x8, _VAVSRVIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VAVSRVIT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_24
LBB0_11:
Lloh18:
	adrp	x22, _KREFTMG@GOTPAGE
Lloh19:
	ldr	x22, [x22, _KREFTMG@GOTPAGEOFF]
	mov	w21, #110
	mov	w26, #65279
Lloh20:
	adrp	x27, _DSTATUS2@GOTPAGE
Lloh21:
	ldr	x27, [x27, _DSTATUS2@GOTPAGEOFF]
Lloh22:
	adrp	x28, _CFR_OVERFLOW_FIELD@GOTPAGE
Lloh23:
	ldr	x28, [x28, _CFR_OVERFLOW_FIELD@GOTPAGEOFF]
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_stv090x_srate_srch_coarse
	cbz	x0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_stv090x_srate_srch_fine
	cbz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_stv090x_get_lock_tmg
	ldr	w1, [x19]
	mov	x0, x19
	bl	_stv090x_get_dmdlock
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w8, #0
	cmp	w21, #30
	b.hs	LBB0_22
	b	LBB0_25
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w23, #0
	mov	w24, #0
	mov	w25, #10
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=2
	subs	w25, w25, #1
	b.eq	LBB0_21
LBB0_19:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
Lloh24:
	adrp	x8, _AGC2I1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AGC2I1@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x22, x0
Lloh27:
	adrp	x8, _AGC2I0@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AGC2I0@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	orr	w8, w0, w22, lsl #8
	add	x20, x20, w8, sxtw
	cmp	x20, x26
	cinc	w23, w23, gt
	ldr	w1, [x27]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
	ldr	w1, [x28]
	mov	x0, x22
	bl	_STV090x_GETFIELD_Px
	cmp	w0, #1
	b.ne	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
Lloh30:
	adrp	x8, _DEMOD_DELOCK_FIELD@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DEMOD_DELOCK_FIELD@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_STV090x_GETFIELD_Px
	cmp	w0, #1
	cinc	w24, w24, eq
	b	LBB0_18
LBB0_21:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #0
	cmp	w24, #7
	ccmp	w23, #7, #2, le
	cset	w8, hi
Lloh33:
	adrp	x22, _KREFTMG@GOTPAGE
Lloh34:
	ldr	x22, [x22, _KREFTMG@GOTPAGEOFF]
	cmp	w21, #30
	b.lo	LBB0_25
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	cbnz	w0, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=1
	sub	w21, w21, #20
	cbz	w8, LBB0_12
	b	LBB0_25
LBB0_24:
Lloh35:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x2, l_.str@PAGE
Lloh39:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
LBB0_25:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_CARCFG,4,2                     ; @CARCFG
	.comm	_RTCS2,4,2                      ; @RTCS2
	.comm	_EQUALCFG,4,2                   ; @EQUALCFG
	.comm	_FFECFG,4,2                     ; @FFECFG
	.comm	_VITSCALE,4,2                   ; @VITSCALE
	.comm	_VAVSRVIT,4,2                   ; @VAVSRVIT
	.comm	_KREFTMG,4,2                    ; @KREFTMG
	.comm	_AGC2I1,4,2                     ; @AGC2I1
	.comm	_AGC2I0,4,2                     ; @AGC2I0
	.comm	_DSTATUS2,4,2                   ; @DSTATUS2
	.comm	_CFR_OVERFLOW_FIELD,4,2         ; @CFR_OVERFLOW_FIELD
	.comm	_DEMOD_DELOCK_FIELD,4,2         ; @DEMOD_DELOCK_FIELD
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_blind_search
.subsections_via_symbols
