	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0900_search_carr_sw_loop
_stv0900_search_carr_sw_loop:           ## @stv0900_search_carr_sw_loop
	.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
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	%r9d, -72(%rbp)                 ## 4-byte Spill
	movl	%r9d, %edx
	movslq	(%rax,%rdx,4), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rdx
	shrq	$63, %rdx
	sarq	$38, %rdi
	addl	%edx, %edi
	imulq	$1759218605, %rax, %rdx         ## imm = 0x68DB8BAD
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$44, %rdx
	addl	%eax, %edx
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	andl	$-2, %eax
	shll	$15, %eax
	movslq	8(%rbx), %rdx
	imulq	$274877907, %rdx, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rdx
	shrq	$63, %rdx
	sarq	$38, %rdi
	addl	%edx, %edi
	cltd
	idivl	%edi
	cmpl	$16384, %eax                    ## imm = 0x4000
	movl	$16384, %edx                    ## imm = 0x4000
	cmovll	%eax, %edx
	movq	_TRUE@GOTPCREL(%rip), %rdi
	movl	%esi, %r15d
	subl	%edx, %r15d
	xorl	%eax, %eax
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, (%rdi)
	cmovel	%eax, %r15d
	leal	(%rsi,%rsi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	negl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	negl	%edx
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DMDISTATE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$28, %edx
	callq	_stv0900_write_reg
	movq	_CFRINIT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	255(%r15), %eax
	testl	%r15d, %r15d
	cmovnsl	%r15d, %eax
	movzbl	%ah, %edx
	movq	%rbx, %rdi
	callq	_stv0900_write_reg
	movq	_CFRINIT0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r15b, %edx
	movq	%rbx, %rdi
	callq	_stv0900_write_reg
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$24, %edx
	callq	_stv0900_write_reg
	movq	_ALGOSWRST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_stv0900_write_bits
	cmpl	$18, 12(%rbx)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_RST_HWARE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_stv0900_write_bits
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_stv0900_write_bits
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movq	_TRUE@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r15d, %r15d
	js	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	subl	%r15d, %eax
	movl	%eax, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	-48(%rbp), %r15d                ## 4-byte Folded Reload
	jmp	LBB0_8
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	negl	%r15d
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_stv0900_get_demod_lock
	movl	%eax, %r13d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_stv0900_check_signal_presence
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %r13d
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%ecx, %eax
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %eax
	subl	%edx, %eax
	cmpl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	leal	(%r15,%rdx), %eax
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r14), %eax
	cmpl	-52(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%eax, %r14d
	jl	LBB0_1
LBB0_13:
	movq	_ALGOSWRST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_stv0900_write_bits
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_DMDISTATE,4,2                  ## @DMDISTATE
	.comm	_CFRINIT1,4,2                   ## @CFRINIT1
	.comm	_CFRINIT0,4,2                   ## @CFRINIT0
	.comm	_ALGOSWRST,4,2                  ## @ALGOSWRST
	.comm	_RST_HWARE,4,2                  ## @RST_HWARE
	.no_dead_strip	_stv0900_search_carr_sw_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0900_search_carr_sw_loop
_stv0900_search_carr_sw_loop:           ; @stv0900_search_carr_sw_loop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x5
	str	w4, [sp, #12]                   ; 4-byte Folded Spill
	str	w2, [sp, #4]                    ; 4-byte Folded Spill
	mov	x24, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldrsw	x8, [x8, w5, uxtw #2]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x10, x8, x9
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	mov	w11, #35757
	movk	w11, #26843, lsl #16
	mul	x8, x8, x11
	lsr	x11, x8, #63
	asr	x8, x8, #44
	add	w8, w8, w11
	add	w8, w10, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	lsl	w8, w8, #15
	and	w8, w8, #0xffff0000
	ldrsw	x10, [x0, #8]
	mul	x9, x10, x9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	sdiv	w8, w8, w9
	mov	w9, #16384
	cmp	w8, #4, lsl #12                 ; =16384
	csel	w26, w8, w9, lt
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w1, w26
	str	w3, [sp, #8]                    ; 4-byte Folded Spill
	cmp	w8, w3
	csel	w27, wzr, w9, eq
	lsl	w28, w1, #1
	neg	w8, w28
	str	w8, [sp]                        ; 4-byte Folded Spill
	neg	w23, w26
	mov	w22, #1
Lloh3:
	adrp	x21, _DMDISTATE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DMDISTATE@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh5:
	adrp	x8, _TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	add	w9, w27, w28
	ldp	w10, w2, [sp]                   ; 8-byte Folded Reload
	sub	w10, w10, w27
	tst	w27, #0x80000000
	csneg	w10, w10, w27, eq
	ldr	w11, [sp, #8]                   ; 4-byte Folded Reload
	cmp	w8, w11
	csel	w27, w9, w10, ne
	mov	x0, x19
	mov	x1, x20
	bl	_stv0900_get_demod_lock
	mov	x25, x0
	mov	x0, x19
	mov	x1, x20
	bl	_stv0900_check_signal_presence
Lloh8:
	adrp	x8, _FALSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	sub	w9, w27, w24
	cmp	w25, w8
	ccmp	w0, w8, #0, eq
	ccmp	w9, w26, #0, eq
	add	w8, w27, w24
	ccmp	w8, w23, #4, lt
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	ccmp	w22, w8, #0, gt
	add	w22, w22, #1
	b.ge	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #28
	bl	_stv0900_write_reg
Lloh11:
	adrp	x8, _CFRINIT1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CFRINIT1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	w8, w27, #255
	cmp	w27, #0
	csel	w8, w8, w27, lt
	ubfx	w2, w8, #8, #8
	mov	x0, x19
	bl	_stv0900_write_reg
Lloh14:
	adrp	x8, _CFRINIT0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CFRINIT0@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	and	w2, w27, #0xff
	mov	x0, x19
	bl	_stv0900_write_reg
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #24
	bl	_stv0900_write_reg
Lloh17:
	adrp	x8, _ALGOSWRST@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ALGOSWRST@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_stv0900_write_bits
	ldr	w8, [x19, #12]
	cmp	w8, #18
	b.ne	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh20:
	adrp	x25, _RST_HWARE@GOTPAGE
Lloh21:
	ldr	x25, [x25, _RST_HWARE@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #1
	bl	_stv0900_write_bits
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_stv0900_write_bits
	b	LBB0_1
LBB0_4:
Lloh22:
	adrp	x8, _ALGOSWRST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ALGOSWRST@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_stv0900_write_bits
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_DMDISTATE,4,2                  ; @DMDISTATE
	.comm	_CFRINIT1,4,2                   ; @CFRINIT1
	.comm	_CFRINIT0,4,2                   ; @CFRINIT0
	.comm	_ALGOSWRST,4,2                  ; @ALGOSWRST
	.comm	_RST_HWARE,4,2                  ; @RST_HWARE
	.no_dead_strip	_stv0900_search_carr_sw_loop
.subsections_via_symbols
