	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_read_signal_strength
_stv090x_read_signal_strength:          ## @stv090x_read_signal_strength
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	_AGCIQIN1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_STV090x_READ_DEMOD
	movq	_AGCIQ_VALUE_FIELD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	movq	%rax, %r15
	movq	_AGCIQIN0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_STV090x_READ_DEMOD
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_MAKEWORD16
	movq	%rax, %r12
	movq	_stv090x_rf_tab@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_stv090x_table_lookup
	movq	(%r13), %rbx
	movl	$65535, %edx                    ## imm = 0xFFFF
	cmpq	(%rbx), %r12
	jg	LBB0_4
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	-8(%rbx,%rax,8), %r12
	jge	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	jmp	LBB0_4
LBB0_3:
	movq	%r15, %rcx
	shlq	$16, %rcx
	subq	%r15, %rcx
	addq	$6553500, %rcx                  ## imm = 0x63FF9C
	movabsq	$-6640827866535438581, %rdx     ## imm = 0xA3D70A3D70A3D70B
	movq	%rcx, %rax
	imulq	%rdx
	addq	%rcx, %rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$6, %rdx
	addq	%rax, %rdx
LBB0_4:
	movq	%rdx, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AGCIQIN1,4,2                   ## @AGCIQIN1
	.comm	_AGCIQ_VALUE_FIELD,4,2          ## @AGCIQ_VALUE_FIELD
	.comm	_AGCIQIN0,4,2                   ## @AGCIQIN0
	.comm	_stv090x_rf_tab,8,3             ## @stv090x_rf_tab
	.no_dead_strip	_stv090x_read_signal_strength
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_read_signal_strength
_stv090x_read_signal_strength:          ; @stv090x_read_signal_strength
	.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, x1
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _AGCIQIN1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AGCIQIN1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_STV090x_READ_DEMOD
Lloh3:
	adrp	x22, _AGCIQ_VALUE_FIELD@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AGCIQ_VALUE_FIELD@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_STV090x_GETFIELD_Px
	mov	x21, x0
Lloh5:
	adrp	x8, _AGCIQIN0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AGCIQIN0@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_STV090x_READ_DEMOD
	ldr	w1, [x22]
	bl	_STV090x_GETFIELD_Px
	mov	x1, x0
	mov	x0, x21
	bl	_MAKEWORD16
	mov	x20, x0
Lloh8:
	adrp	x22, _stv090x_rf_tab@GOTPAGE
Lloh9:
	ldr	x22, [x22, _stv090x_rf_tab@GOTPAGEOFF]
	ldr	x21, [x22]
	mov	x0, x21
	bl	_ARRAY_SIZE
	sub	w1, w0, #1
	mov	x0, x21
	mov	x2, x20
	bl	_stv090x_table_lookup
	ldr	x22, [x22]
	ldr	x8, [x22]
	cmp	x20, x8
	b.le	LBB0_2
; %bb.1:
	mov	w8, #65535
	b	LBB0_3
LBB0_2:
	mov	x21, x0
	mov	x0, x22
	bl	_ARRAY_SIZE
	add	x8, x22, w0, sxtw #3
	ldur	x8, [x8, #-8]
	lsl	x9, x21, #16
	sub	x9, x9, x21
	add	x9, x9, #1599, lsl #12          ; =6549504
	add	x9, x9, #3996
	mov	x10, #55051
	movk	x10, #28835, lsl #16
	movk	x10, #2621, lsl #32
	movk	x10, #41943, lsl #48
	smulh	x10, x9, x10
	add	x9, x10, x9
	asr	x10, x9, #6
	add	x9, x10, x9, lsr #63
	cmp	x20, x8
	csel	x8, xzr, x9, lt
LBB0_3:
	str	x8, [x19]
	mov	w0, #0
	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	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AGCIQIN1,4,2                   ; @AGCIQIN1
	.comm	_AGCIQ_VALUE_FIELD,4,2          ; @AGCIQ_VALUE_FIELD
	.comm	_AGCIQIN0,4,2                   ; @AGCIQIN0
	.comm	_stv090x_rf_tab,8,3             ; @stv090x_rf_tab
	.no_dead_strip	_stv090x_read_signal_strength
.subsections_via_symbols
