	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_chk_signal
_stv090x_chk_signal:                    ## @stv090x_chk_signal
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_CFR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	_CFR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	orl	%eax, %ebx
	movl	%ebx, %edi
	movl	$16, %esi
	callq	_comp2
	movl	%eax, %r14d
	movq	_AGC2I1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	_AGC2I0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %ecx
	orl	%ebx, %ecx
	movslq	(%r15), %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rsi
	shrq	$63, %rsi
	shrq	$38, %rdx
	addl	%esi, %edx
	imulq	$1759218605, %rax, %rax         ## imm = 0x68DB8BAD
	movq	%rax, %rsi
	shrq	$63, %rsi
	shrq	$44, %rax
	addl	%esi, %eax
	addl	%edx, %eax
	shll	$15, %eax
	movq	8(%r15), %rdx
	movslq	(%rdx), %rdx
	imulq	$274877907, %rdx, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rdx
	shrq	$63, %rdx
	sarq	$38, %rsi
	addl	%edx, %esi
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%esi
	cmpl	$16384, %eax                    ## imm = 0x4000
	movl	$16384, %edx                    ## imm = 0x4000
	cmovll	%eax, %edx
	cmpl	$8193, %ecx                     ## imm = 0x2001
	setge	%al
	addl	%edx, %edx
	cmpl	%edx, %r14d
	setg	%cl
	orb	%al, %cl
	negl	%edx
	cmpl	%edx, %r14d
	setl	%al
	orb	%cl, %al
	movq	_FE_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rcx
	leaq	L_.str.1(%rip), %rdx
	cmovneq	%rcx, %rdx
	movzbl	%al, %ebx
	movl	$1, %esi
	callq	_dprintk
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFR2,4,2                       ## @CFR2
	.comm	_CFR1,4,2                       ## @CFR1
	.comm	_AGC2I1,4,2                     ## @AGC2I1
	.comm	_AGC2I0,4,2                     ## @AGC2I0
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No Signal"

L_.str.1:                               ## @.str.1
	.asciz	"Found Signal"

	.no_dead_strip	_stv090x_chk_signal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_chk_signal
_stv090x_chk_signal:                    ; @stv090x_chk_signal
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _CFR2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CFR2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_STV090x_READ_DEMOD
	mov	x20, x0
Lloh3:
	adrp	x8, _CFR1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CFR1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	orr	w0, w0, w20, lsl #8
	mov	w1, #16
	bl	_comp2
	mov	x20, x0
Lloh6:
	adrp	x8, _AGC2I1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AGC2I1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x21, x0
Lloh9:
	adrp	x8, _AGC2I0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AGC2I0@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	orr	w8, w0, w21, lsl #8
	ldrsw	x9, [x19]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x11, x9, x10
	lsr	x12, x11, #63
	lsr	x11, x11, #38
	add	w11, w11, w12
	mov	w12, #35757
	movk	w12, #26843, lsl #16
	mul	x9, x9, x12
	lsr	x12, x9, #63
	lsr	x9, x9, #44
	add	w9, w9, w12
	add	w9, w11, w9
	lsl	w9, w9, #15
	ldr	x11, [x19, #8]
	ldrsw	x11, [x11]
	mul	x10, x11, x10
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	sdiv	w9, w9, w10
	mov	w10, #16384
	cmp	w9, #4, lsl #12                 ; =16384
	csel	w9, w9, w10, lt
	lsl	w9, w9, #1
	neg	w10, w9
	cmp	w8, #2, lsl #12                 ; =8192
	ccmp	w20, w9, #0, le
	ccmp	w20, w10, #8, le
	cset	w19, lt
Lloh12:
	adrp	x8, _FE_DEBUG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FE_DEBUG@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, l_.str.1@PAGE
Lloh16:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh17:
	adrp	x9, l_.str@PAGE
Lloh18:
	add	x9, x9, l_.str@PAGEOFF
	cmp	w19, #0
	csel	x2, x9, x8, ne
	mov	w1, #1
	bl	_dprintk
	mov	x0, 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 AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_CFR2,4,2                       ; @CFR2
	.comm	_CFR1,4,2                       ; @CFR1
	.comm	_AGC2I1,4,2                     ; @AGC2I1
	.comm	_AGC2I0,4,2                     ; @AGC2I0
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No Signal"

l_.str.1:                               ; @.str.1
	.asciz	"Found Signal"

	.no_dead_strip	_stv090x_chk_signal
.subsections_via_symbols
