	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_search
_stv090x_search:                        ## @stv090x_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_DVBFE_ALGO_SEARCH_INVALID@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r12
	movl	8(%rdi), %ecx
	addl	$-128, %ecx
	cmpl	$2, %ecx
	ja	LBB0_3
## %bb.2:
	movq	24(%r12), %r14
	movslq	%ecx, %rcx
	leaq	l_switch.table.stv090x_search(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r14)
	movq	%rax, (%r14)
	movl	12(%r12), %eax
	movl	%eax, 8(%r14)
	movq	_STV090x_SEARCH_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%r14)
	movq	_STV090x_COLD_SEARCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%r14)
	movq	_STV090x_PRERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r14)
	cmpl	$10000001, %eax                 ## imm = 0x989681
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmovgeq	%rax, %rdx
	movl	$10000000, %eax                 ## imm = 0x989680
	movl	$5000000, %ebx                  ## imm = 0x4C4B40
	cmovgel	%eax, %ebx
	movq	_FE_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	$1, %esi
	callq	_dprintk
	movl	%ebx, 12(%r14)
	movl	20(%r12), %esi
	movq	%r14, %rdi
	callq	_stv090x_set_pls
	movl	16(%r12), %esi
	movq	%r14, %rdi
	callq	_stv090x_set_mis
	movq	%r14, %rdi
	callq	_stv090x_algo
	movq	_STV090x_RANGEOK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	_DVBFE_ALGO_SEARCH_FAILED@GOTPCREL(%rip), %rbx
	cmoveq	_DVBFE_ALGO_SEARCH_SUCCESS@GOTPCREL(%rip), %rbx
	movl	(%r15), %edi
	movl	$1, %esi
	callq	_dprintk
LBB0_3:
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DVBFE_ALGO_SEARCH_INVALID,4,2  ## @DVBFE_ALGO_SEARCH_INVALID
	.comm	_STV090x_DSS,4,2                ## @STV090x_DSS
	.comm	_STV090x_DVBS1,4,2              ## @STV090x_DVBS1
	.comm	_STV090x_DVBS2,4,2              ## @STV090x_DVBS2
	.comm	_STV090x_SEARCH_AUTO,4,2        ## @STV090x_SEARCH_AUTO
	.comm	_STV090x_COLD_SEARCH,4,2        ## @STV090x_COLD_SEARCH
	.comm	_STV090x_PRERR,4,2              ## @STV090x_PRERR
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Search range: 10 MHz"

L_.str.1:                               ## @.str.1
	.asciz	"Search range: 5 MHz"

	.comm	_STV090x_RANGEOK,8,3            ## @STV090x_RANGEOK
L_.str.2:                               ## @.str.2
	.asciz	"Search success!"

	.comm	_DVBFE_ALGO_SEARCH_SUCCESS,4,2  ## @DVBFE_ALGO_SEARCH_SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"Search failed!"

	.comm	_DVBFE_ALGO_SEARCH_FAILED,4,2   ## @DVBFE_ALGO_SEARCH_FAILED
	.comm	_DVBFE_ALGO_SEARCH_ERROR,4,2    ## @DVBFE_ALGO_SEARCH_ERROR
	.no_dead_strip	_stv090x_search
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.stv090x_search
l_switch.table.stv090x_search:
	.quad	_STV090x_DVBS2
	.quad	_STV090x_DVBS1
	.quad	_STV090x_DSS

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_search
_stv090x_search:                        ; @stv090x_search
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w9, [x0, #8]
	sub	w9, w9, #128
	cmp	w9, #2
	b.hi	LBB0_3
; %bb.2:
Lloh0:
	adrp	x10, l_switch.table.stv090x_search@PAGE
Lloh1:
	add	x10, x10, l_switch.table.stv090x_search@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	x20, [x19, #24]
	ldr	w9, [x9]
	str	x8, [x20]
	ldr	w8, [x19, #12]
Lloh2:
	adrp	x10, _STV090x_SEARCH_AUTO@GOTPAGE
Lloh3:
	ldr	x10, [x10, _STV090x_SEARCH_AUTO@GOTPAGEOFF]
	str	w8, [x20, #8]
Lloh4:
	ldr	w10, [x10]
	stp	w10, w9, [x20, #24]
Lloh5:
	adrp	x9, _STV090x_COLD_SEARCH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _STV090x_COLD_SEARCH@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _STV090x_PRERR@GOTPAGE
Lloh9:
	ldr	x10, [x10, _STV090x_PRERR@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	stp	w10, w9, [x20, #16]
Lloh11:
	adrp	x9, l_.str.1@PAGE
Lloh12:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh13:
	adrp	x10, l_.str@PAGE
Lloh14:
	add	x10, x10, l_.str@PAGEOFF
	mov	w11, #38528
	movk	w11, #152, lsl #16
	mov	w12, #19264
	movk	w12, #76, lsl #16
	cmp	w8, w11
	csel	w21, w11, w12, gt
	csel	x2, x10, x9, gt
Lloh15:
	adrp	x22, _FE_DEBUG@GOTPAGE
Lloh16:
	ldr	x22, [x22, _FE_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #1
	bl	_dprintk
	str	w21, [x20, #12]
	ldr	w1, [x19, #20]
	mov	x0, x20
	bl	_stv090x_set_pls
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_stv090x_set_mis
	mov	x0, x20
	bl	_stv090x_algo
Lloh17:
	adrp	x8, _STV090x_RANGEOK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STV090x_RANGEOK@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, l_.str.3@PAGE
Lloh21:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh22:
	adrp	x10, l_.str.2@PAGE
Lloh23:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x0, x8
	csel	x2, x10, x9, eq
Lloh24:
	adrp	x8, _DVBFE_ALGO_SEARCH_FAILED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DVBFE_ALGO_SEARCH_FAILED@GOTPAGEOFF]
Lloh26:
	adrp	x9, _DVBFE_ALGO_SEARCH_SUCCESS@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DVBFE_ALGO_SEARCH_SUCCESS@GOTPAGEOFF]
	csel	x19, x9, x8, eq
	ldr	w0, [x22]
	mov	w1, #1
	bl	_dprintk
	b	LBB0_4
LBB0_3:
Lloh28:
	adrp	x19, _DVBFE_ALGO_SEARCH_INVALID@GOTPAGE
Lloh29:
	ldr	x19, [x19, _DVBFE_ALGO_SEARCH_INVALID@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_DVBFE_ALGO_SEARCH_INVALID,4,2  ; @DVBFE_ALGO_SEARCH_INVALID
	.comm	_STV090x_DSS,4,2                ; @STV090x_DSS
	.comm	_STV090x_DVBS1,4,2              ; @STV090x_DVBS1
	.comm	_STV090x_DVBS2,4,2              ; @STV090x_DVBS2
	.comm	_STV090x_SEARCH_AUTO,4,2        ; @STV090x_SEARCH_AUTO
	.comm	_STV090x_COLD_SEARCH,4,2        ; @STV090x_COLD_SEARCH
	.comm	_STV090x_PRERR,4,2              ; @STV090x_PRERR
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Search range: 10 MHz"

l_.str.1:                               ; @.str.1
	.asciz	"Search range: 5 MHz"

	.comm	_STV090x_RANGEOK,8,3            ; @STV090x_RANGEOK
l_.str.2:                               ; @.str.2
	.asciz	"Search success!"

	.comm	_DVBFE_ALGO_SEARCH_SUCCESS,4,2  ; @DVBFE_ALGO_SEARCH_SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"Search failed!"

	.comm	_DVBFE_ALGO_SEARCH_FAILED,4,2   ; @DVBFE_ALGO_SEARCH_FAILED
	.comm	_DVBFE_ALGO_SEARCH_ERROR,4,2    ; @DVBFE_ALGO_SEARCH_ERROR
	.no_dead_strip	_stv090x_search
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.stv090x_search
l_switch.table.stv090x_search:
	.quad	_STV090x_DVBS2
	.quad	_STV090x_DVBS1
	.quad	_STV090x_DSS

.subsections_via_symbols
