	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_read_snr
_stb0899_read_snr:                      ## @stb0899_read_snr
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r13
	movl	$0, (%rsi)
	movq	_STB0899_VSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_stb0899_read_reg
	movl	(%r13), %ecx
	leal	-129(%rcx), %edx
	cmpl	$2, %edx
	jae	LBB0_1
## %bb.4:
	xorl	%ebx, %ebx
	cmpl	$0, 8(%r13)
	je	LBB0_14
## %bb.5:
	movq	_VSTATUS_LOCKEDVIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_STB0899_GETFIELD
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	movq	_STB0899_NIRM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	_stb0899_read_regs
	movl	-56(%rbp), %edi
	movl	-52(%rbp), %esi
	callq	_MAKEWORD16
	movl	%eax, %r15d
	movq	_stb0899_cn_tab@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %esi
	movl	%ebx, %edi
	movl	%r15d, %edx
	callq	_stb0899_table_lookup
	movq	%rax, %r10
	movl	%r10d, (%r14)
	movl	4(%r13), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %r8d
	movl	-52(%rbp), %r9d
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	movl	$1, %edx
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r15
	callq	_dprintk
	addq	$16, %rsp
	jmp	LBB0_14
LBB0_1:
	cmpl	$128, %ecx
	jne	LBB0_13
## %bb.2:
	cmpl	$0, 8(%r13)
	je	LBB0_3
## %bb.7:
	movq	_STB0899_S2DEMOD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_UWP_CNTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STB0899_READ_S2REG
	movq	_UWP_ESN0_QUANT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_STB0899_GETFIELD
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edi
	movq	_UWP_STAT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STB0899_READ_S2REG
	movq	_ESN0_EST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_STB0899_GETFIELD
	movl	%eax, %r12d
	movl	$-1, %r15d
	cmpl	$1, %eax
	je	LBB0_8
## %bb.9:
	cmpl	$2, %r12d
	jne	LBB0_11
## %bb.10:
	movl	$270, %r11d                     ## imm = 0x10E
	movl	$-1, %r10d
	jmp	LBB0_12
LBB0_13:
	movl	4(%r13), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	xorl	%ebx, %ebx
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_8:
	movl	$301, %r11d                     ## imm = 0x12D
	movl	$-1, %r10d
	jmp	LBB0_12
LBB0_11:
	movq	_stb0899_quant_tab@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %esi
	imull	$100, -60(%rbp), %edx           ## 4-byte Folded Reload
	movl	%ebx, %edi
	callq	_stb0899_table_lookup
	movq	%rax, %r15
	movq	_stb0899_est_tab@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %esi
	movl	%ebx, %edi
	movl	%r12d, %edx
	callq	_stb0899_table_lookup
	movq	%rax, %r10
	movl	%r15d, %eax
	subl	%r10d, %eax
	movl	$3435973837, %r11d              ## imm = 0xCCCCCCCD
	imulq	%rax, %r11
	shrq	$35, %r11
LBB0_12:
	movl	%r11d, (%r14)
	movl	4(%r13), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rcx
	xorl	%ebx, %ebx
	movl	$1, %edx
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	movl	%r15d, %r9d
	xorl	%eax, %eax
	pushq	%r11
	pushq	%r10
	pushq	%r12
	callq	_dprintk
	addq	$32, %rsp
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_STB0899_VSTATUS,4,2            ## @STB0899_VSTATUS
	.comm	_VSTATUS_LOCKEDVIT,4,2          ## @VSTATUS_LOCKEDVIT
	.comm	_STB0899_NIRM,4,2               ## @STB0899_NIRM
	.comm	_stb0899_cn_tab,4,2             ## @stb0899_cn_tab
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NIR = 0x%02x%02x = %u, C/N = %d * 0.1 dBm\n"

	.comm	_STB0899_S2DEMOD,4,2            ## @STB0899_S2DEMOD
	.comm	_UWP_CNTRL1,4,2                 ## @UWP_CNTRL1
	.comm	_UWP_ESN0_QUANT,4,2             ## @UWP_ESN0_QUANT
	.comm	_UWP_STAT2,4,2                  ## @UWP_STAT2
	.comm	_ESN0_EST,4,2                   ## @ESN0_EST
	.comm	_stb0899_quant_tab,4,2          ## @stb0899_quant_tab
	.comm	_stb0899_est_tab,4,2            ## @stb0899_est_tab
L_.str.1:                               ## @.str.1
	.asciz	"Es/N0 quant = %d (%d) estimate = %u (%d), C/N = %d * 0.1 dBm"

L_.str.2:                               ## @.str.2
	.asciz	"Unsupported delivery system"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_stb0899_read_snr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_read_snr
_stb0899_read_snr:                      ; @stb0899_read_snr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x20, [x0]
	str	wzr, [x1]
Lloh3:
	adrp	x8, _STB0899_VSTATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STB0899_VSTATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_stb0899_read_reg
	ldr	w8, [x20]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_4
; %bb.1:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_14
; %bb.2:
	mov	x1, x0
Lloh6:
	adrp	x8, _VSTATUS_LOCKEDVIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VSTATUS_LOCKEDVIT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_STB0899_GETFIELD
	cbz	w0, LBB0_15
; %bb.3:
Lloh9:
	adrp	x8, _STB0899_NIRM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STB0899_NIRM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #48
	mov	x0, x20
	mov	w3, #2
	bl	_stb0899_read_regs
	ldp	w0, w1, [sp, #48]
	bl	_MAKEWORD16
	mov	x21, x0
Lloh12:
	adrp	x8, _stb0899_cn_tab@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stb0899_cn_tab@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	sub	w1, w0, #1
	mov	x0, x22
	mov	x2, x21
	bl	_stb0899_table_lookup
	str	w0, [x19]
	ldr	w8, [x20, #4]
Lloh15:
	adrp	x9, _FE_DEBUG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FE_DEBUG@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	ldp	w9, w10, [sp, #48]
	stp	x21, x0, [sp, #16]
	stp	x9, x10, [sp]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x8
	b	LBB0_13
LBB0_4:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.5:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_14
; %bb.6:
Lloh20:
	adrp	x22, _STB0899_S2DEMOD@GOTPAGE
Lloh21:
	ldr	x22, [x22, _STB0899_S2DEMOD@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh22:
	adrp	x8, _UWP_CNTRL1@GOTPAGE
Lloh23:
	ldr	x8, [x8, _UWP_CNTRL1@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_STB0899_READ_S2REG
	mov	x1, x0
Lloh25:
	adrp	x8, _UWP_ESN0_QUANT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _UWP_ESN0_QUANT@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_STB0899_GETFIELD
	mov	x21, x0
	ldr	w0, [x22]
Lloh28:
	adrp	x8, _UWP_STAT2@GOTPAGE
Lloh29:
	ldr	x8, [x8, _UWP_STAT2@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_STB0899_READ_S2REG
	mov	x1, x0
Lloh31:
	adrp	x8, _ESN0_EST@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ESN0_EST@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_STB0899_GETFIELD
	mov	x22, x0
	cmp	w0, #1
	b.eq	LBB0_10
; %bb.7:
	cmp	w22, #2
	b.ne	LBB0_11
; %bb.8:
	mov	w23, #-1
	mov	w8, #270
	mov	x9, x23
	b	LBB0_12
LBB0_9:
	ldr	w0, [x20, #4]
Lloh34:
	adrp	x8, _FE_DEBUG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FE_DEBUG@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x3, l_.str.2@PAGE
Lloh38:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w2, #1
	bl	_dprintk
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_10:
	mov	w23, #-1
	mov	w8, #301
	mov	x9, x23
	b	LBB0_12
LBB0_11:
Lloh42:
	adrp	x8, _stb0899_quant_tab@GOTPAGE
Lloh43:
	ldr	x8, [x8, _stb0899_quant_tab@GOTPAGEOFF]
Lloh44:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	sub	w1, w0, #1
	mov	w8, #100
	mul	w2, w21, w8
	mov	x0, x23
	bl	_stb0899_table_lookup
	mov	x23, x0
Lloh45:
	adrp	x8, _stb0899_est_tab@GOTPAGE
Lloh46:
	ldr	x8, [x8, _stb0899_est_tab@GOTPAGEOFF]
Lloh47:
	ldr	w24, [x8]
	mov	x0, x24
	bl	_ARRAY_SIZE
	sub	w1, w0, #1
	mov	x0, x24
	mov	x2, x22
	bl	_stb0899_table_lookup
	sub	w8, w23, w0
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #35
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	mov	x9, x0
LBB0_12:
	str	w8, [x19]
	ldr	w0, [x20, #4]
Lloh48:
	adrp	x10, _FE_DEBUG@GOTPAGE
Lloh49:
	ldr	x10, [x10, _FE_DEBUG@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x10]
	stp	x9, x8, [sp, #24]
	stp	x23, x22, [sp, #8]
	str	x21, [sp]
Lloh51:
	adrp	x3, l_.str.1@PAGE
Lloh52:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_13:
	mov	w2, #1
	bl	_dprintk
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldr	x8, [sp, #56]
Lloh53:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh54:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_STB0899_VSTATUS,4,2            ; @STB0899_VSTATUS
	.comm	_VSTATUS_LOCKEDVIT,4,2          ; @VSTATUS_LOCKEDVIT
	.comm	_STB0899_NIRM,4,2               ; @STB0899_NIRM
	.comm	_stb0899_cn_tab,4,2             ; @stb0899_cn_tab
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NIR = 0x%02x%02x = %u, C/N = %d * 0.1 dBm\n"

	.comm	_STB0899_S2DEMOD,4,2            ; @STB0899_S2DEMOD
	.comm	_UWP_CNTRL1,4,2                 ; @UWP_CNTRL1
	.comm	_UWP_ESN0_QUANT,4,2             ; @UWP_ESN0_QUANT
	.comm	_UWP_STAT2,4,2                  ; @UWP_STAT2
	.comm	_ESN0_EST,4,2                   ; @ESN0_EST
	.comm	_stb0899_quant_tab,4,2          ; @stb0899_quant_tab
	.comm	_stb0899_est_tab,4,2            ; @stb0899_est_tab
l_.str.1:                               ; @.str.1
	.asciz	"Es/N0 quant = %d (%d) estimate = %u (%d), C/N = %d * 0.1 dBm"

l_.str.2:                               ; @.str.2
	.asciz	"Unsupported delivery system"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_stb0899_read_snr
.subsections_via_symbols
