	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ctrl_sig_quality
_ctrl_sig_quality:                      ## @ctrl_sig_quality
	.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	%esi, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %r14
	movq	(%r14), %r12
	movl	(%rax), %r13d
	movq	$0, -64(%rbp)
	leaq	-64(%rbp), %rsi
	callq	_get_sig_strength
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_FE_SCALE_RELATIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	56(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	-64(%rbp), %rdx
	movq	%rdx, %rax
	shlq	$16, %rax
	subq	%rdx, %rax
	shrq	$2, %rax
	movabsq	$2951479051793528259, %rdx      ## imm = 0x28F5C28F5C28F5C3
	mulq	%rdx
	shrq	$2, %rdx
	movq	%rdx, (%rcx)
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	56(%r12), %rcx
	movq	%rax, 8(%rcx)
LBB0_3:
	leal	-128(%r13), %eax
	cmpl	$3, %eax
	jae	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_ctrl_get_qam_sig_quality
	testl	%eax, %eax
	je	LBB0_26
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_27
LBB0_6:
	cmpl	$131, %r13d
	jne	LBB0_11
## %bb.7:
	movq	_DRXJ_DEMOD_LOCK@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_12
## %bb.8:
	movq	_DRX_LOCKED@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_12
## %bb.9:
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	32(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	8(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	16(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	40(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	48(%r12), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_23
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_12:
	leaq	-56(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	callq	_get_vsb_post_rs_pck_err
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	48(%r12), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_15
LBB0_14:
	movq	_FE_SCALE_COUNTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	48(%r12), %rcx
	movq	%rax, 8(%rcx)
	movl	-56(%rbp), %edx
	addl	%edx, (%rcx)
	movq	40(%r12), %rcx
	movq	%rax, 8(%rcx)
	movl	-52(%rbp), %eax
	addl	%eax, (%rcx)
LBB0_15:
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_get_vs_bpre_viterbi_ber
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	32(%r12), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_18
LBB0_17:
	movq	_FE_SCALE_COUNTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	32(%r12), %rcx
	movq	%rax, 8(%rcx)
	movl	-48(%rbp), %edx
	addl	%edx, (%rcx)
	movq	24(%r12), %rcx
	movq	%rax, 8(%rcx)
	movl	-44(%rbp), %eax
	addl	%eax, (%rcx)
LBB0_18:
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_get_vs_bpost_viterbi_ber
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r12), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_21
LBB0_20:
	movq	_FE_SCALE_COUNTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r12), %rcx
	movq	%rax, 8(%rcx)
	movl	-48(%rbp), %edx
	addl	%edx, (%rcx)
	movq	8(%r12), %rcx
	movq	%rax, 8(%rcx)
	movl	-44(%rbp), %eax
	addl	%eax, (%rcx)
LBB0_21:
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	callq	_get_vsbmer
	testl	%eax, %eax
	je	LBB0_24
## %bb.22:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_23:
	movq	(%r12), %rcx
	jmp	LBB0_25
LBB0_24:
	imulq	$100, -72(%rbp), %rax
	movq	(%r12), %rcx
	movq	%rax, (%rcx)
	movq	_FE_SCALE_DECIBEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_25:
	movq	%rax, 8(%rcx)
LBB0_26:
	xorl	%ebx, %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error getting signal strength %d\n"

	.comm	_FE_SCALE_NOT_AVAILABLE,8,3     ## @FE_SCALE_NOT_AVAILABLE
	.comm	_FE_SCALE_RELATIVE,8,3          ## @FE_SCALE_RELATIVE
	.comm	_DRXJ_DEMOD_LOCK,4,2            ## @DRXJ_DEMOD_LOCK
	.comm	_DRX_LOCKED,4,2                 ## @DRX_LOCKED
L_.str.1:                               ## @.str.1
	.asciz	"error %d getting UCB\n"

	.comm	_FE_SCALE_COUNTER,8,3           ## @FE_SCALE_COUNTER
L_.str.2:                               ## @.str.2
	.asciz	"error %d getting pre-ber\n"

L_.str.3:                               ## @.str.3
	.asciz	"error %d getting post-ber\n"

L_.str.4:                               ## @.str.4
	.asciz	"error %d getting MER\n"

	.comm	_FE_SCALE_DECIBEL,8,3           ## @FE_SCALE_DECIBEL
L_.str.5:                               ## @.str.5
	.asciz	"error %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ctrl_sig_quality
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ctrl_sig_quality
_ctrl_sig_quality:                      ; @ctrl_sig_quality
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x21, x0
	ldp	x8, x19, [x0]
	ldr	x22, [x19]
	ldr	w23, [x8]
	str	xzr, [sp]
	mov	x1, sp
	bl	_get_sig_strength
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _FE_SCALE_RELATIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FE_SCALE_RELATIVE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x22, #56]
	ldr	x10, [sp]
	lsl	x11, x10, #16
	sub	x10, x11, x10
	lsr	x10, x10, #2
	mov	x11, #62915
	movk	x11, #23592, lsl #16
	movk	x11, #49807, lsl #32
	movk	x11, #10485, lsl #48
	umulh	x10, x10, x11
	lsr	x10, x10, #2
	stp	x10, x8, [x9]
	b	LBB0_3
LBB0_2:
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh5:
	adrp	x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x22, #56]
	str	x8, [x9, #8]
LBB0_3:
	sub	w8, w23, #128
	cmp	w8, #3
	b.hs	LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_ctrl_get_qam_sig_quality
	mov	x19, x0
	cbz	w0, LBB0_24
; %bb.5:
Lloh8:
	adrp	x0, l_.str.5@PAGE
Lloh9:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x19
	bl	_pr_err
	b	LBB0_24
LBB0_6:
	cmp	w23, #131
	b.ne	LBB0_10
; %bb.7:
Lloh10:
	adrp	x8, _DRXJ_DEMOD_LOCK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRXJ_DEMOD_LOCK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _DRX_LOCKED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DRX_LOCKED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_11
; %bb.8:
	add	x1, sp, #20
	add	x2, sp, #16
	mov	x0, x19
	bl	_get_vsb_post_rs_pck_err
	cbz	w0, LBB0_12
; %bb.9:
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh18:
	adrp	x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	x9, [x22, #48]
	str	x8, [x9, #8]
	b	LBB0_13
LBB0_10:
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_24
LBB0_11:
	mov	w19, #0
Lloh24:
	adrp	x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	x9, [x22, #24]
	str	x8, [x9, #8]
	ldr	x9, [x22, #32]
	str	x8, [x9, #8]
	ldr	x9, [x22, #8]
	str	x8, [x9, #8]
	ldr	x9, [x22, #16]
	str	x8, [x9, #8]
	ldr	x9, [x22, #40]
	str	x8, [x9, #8]
	ldr	x9, [x22, #48]
	str	x8, [x9, #8]
	b	LBB0_21
LBB0_12:
Lloh27:
	adrp	x8, _FE_SCALE_COUNTER@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FE_SCALE_COUNTER@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	x9, [x22, #48]
	str	x8, [x9, #8]
	ldr	w10, [sp, #20]
	ldr	w11, [x9]
	add	w10, w11, w10
	str	w10, [x9]
	ldr	x9, [x22, #40]
	str	x8, [x9, #8]
	ldr	w8, [sp, #16]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
LBB0_13:
	add	x1, sp, #28
	add	x2, sp, #24
	mov	x0, x19
	bl	_get_vs_bpre_viterbi_ber
	cbz	w0, LBB0_15
; %bb.14:
	mov	x1, x0
Lloh30:
	adrp	x0, l_.str.2@PAGE
Lloh31:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
Lloh32:
	adrp	x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	ldr	x9, [x22, #32]
	str	x8, [x9, #8]
	b	LBB0_16
LBB0_15:
Lloh35:
	adrp	x8, _FE_SCALE_COUNTER@GOTPAGE
Lloh36:
	ldr	x8, [x8, _FE_SCALE_COUNTER@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	ldr	x9, [x22, #32]
	str	x8, [x9, #8]
	ldr	w10, [sp, #28]
	ldr	w11, [x9]
	add	w10, w11, w10
	str	w10, [x9]
	ldr	x9, [x22, #24]
	str	x8, [x9, #8]
	ldr	w8, [sp, #24]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
LBB0_16:
	add	x1, sp, #28
	add	x2, sp, #24
	mov	x0, x19
	bl	_get_vs_bpost_viterbi_ber
	cbz	w0, LBB0_18
; %bb.17:
	mov	x1, x0
Lloh38:
	adrp	x0, l_.str.3@PAGE
Lloh39:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
Lloh40:
	adrp	x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	ldr	x9, [x22, #16]
	str	x8, [x9, #8]
	b	LBB0_19
LBB0_18:
Lloh43:
	adrp	x8, _FE_SCALE_COUNTER@GOTPAGE
Lloh44:
	ldr	x8, [x8, _FE_SCALE_COUNTER@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	ldr	x9, [x22, #16]
	str	x8, [x9, #8]
	ldr	w10, [sp, #28]
	ldr	w11, [x9]
	add	w10, w11, w10
	str	w10, [x9]
	ldr	x9, [x22, #8]
	str	x8, [x9, #8]
	ldr	w8, [sp, #24]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
LBB0_19:
	add	x1, sp, #8
	mov	x0, x19
	bl	_get_vsbmer
	cbz	w0, LBB0_22
; %bb.20:
	mov	x1, x0
Lloh46:
	adrp	x0, l_.str.4@PAGE
Lloh47:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
	mov	w19, #0
Lloh48:
	adrp	x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
LBB0_21:
	ldr	x9, [x22]
	b	LBB0_23
LBB0_22:
	mov	w19, #0
	ldr	x8, [sp, #8]
	mov	w9, #100
	mul	x8, x8, x9
	ldr	x9, [x22]
	str	x8, [x9]
Lloh51:
	adrp	x8, _FE_SCALE_DECIBEL@GOTPAGE
Lloh52:
	ldr	x8, [x8, _FE_SCALE_DECIBEL@GOTPAGEOFF]
Lloh53:
	ldr	x8, [x8]
LBB0_23:
	str	x8, [x9, #8]
LBB0_24:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error getting signal strength %d\n"

	.comm	_FE_SCALE_NOT_AVAILABLE,8,3     ; @FE_SCALE_NOT_AVAILABLE
	.comm	_FE_SCALE_RELATIVE,8,3          ; @FE_SCALE_RELATIVE
	.comm	_DRXJ_DEMOD_LOCK,4,2            ; @DRXJ_DEMOD_LOCK
	.comm	_DRX_LOCKED,4,2                 ; @DRX_LOCKED
l_.str.1:                               ; @.str.1
	.asciz	"error %d getting UCB\n"

	.comm	_FE_SCALE_COUNTER,8,3           ; @FE_SCALE_COUNTER
l_.str.2:                               ; @.str.2
	.asciz	"error %d getting pre-ber\n"

l_.str.3:                               ; @.str.3
	.asciz	"error %d getting post-ber\n"

l_.str.4:                               ; @.str.4
	.asciz	"error %d getting MER\n"

	.comm	_FE_SCALE_DECIBEL,8,3           ; @FE_SCALE_DECIBEL
l_.str.5:                               ; @.str.5
	.asciz	"error %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ctrl_sig_quality
.subsections_via_symbols
