	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0900_get_ber
_stv0900_get_ber:                       ## @stv0900_get_ber
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_HEADER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_stv0900_get_bits
	cmpl	$131, %eax
	je	LBB0_3
## %bb.1:
	movl	$10000000, %ebx                 ## imm = 0x989680
	cmpl	$130, %eax
	jne	LBB0_6
## %bb.2:
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %r12d
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %ebx
	addl	%r12d, %ebx
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %r12d
	addl	%ebx, %r12d
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %ebx
	addl	%r12d, %ebx
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	addl	%ebx, %eax
	cltq
	imulq	$1717986919, %rax, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$33, %rbx
	addl	%eax, %ebx
	movq	_PRFVIT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %r12d
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %ebx
	addl	%r12d, %ebx
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %r12d
	addl	%ebx, %r12d
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	movl	%eax, %ebx
	addl	%r12d, %ebx
	movl	$5, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_stv0900_get_err_count
	addl	%ebx, %eax
	cltq
	imulq	$1717986919, %rax, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$33, %rbx
	addl	%eax, %ebx
	movq	_PKTDELIN_LOCK@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_stv0900_get_bits
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	imull	$9766, %ebx, %ebx               ## imm = 0x2626
	sarl	$13, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEADER_MODE,4,2                ## @HEADER_MODE
	.comm	_PRFVIT,4,2                     ## @PRFVIT
	.comm	_PKTDELIN_LOCK,4,2              ## @PKTDELIN_LOCK
	.no_dead_strip	_stv0900_get_ber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0900_get_ber
_stv0900_get_ber:                       ; @stv0900_get_ber
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _HEADER_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEADER_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_stv0900_get_bits
	cmp	w0, #131
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #130
	b.ne	LBB0_6
; %bb.2:
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	mov	x21, x0
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w21, w0, w21
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w21, w0, w21
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w21, w0, w21
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w8, w0, w21
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w20, w8, w9
Lloh3:
	adrp	x8, _PRFVIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRFVIT@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	mov	x21, x0
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w21, w0, w21
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w21, w0, w21
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w21, w0, w21
	mov	w0, #5
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_stv0900_get_err_count
	add	w8, w0, w21
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w20, w8, w9
Lloh5:
	adrp	x8, _PKTDELIN_LOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PKTDELIN_LOCK@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stv0900_get_bits
	cbz	w0, LBB0_7
; %bb.5:
	mov	w8, #9766
	mul	w8, w20, w8
	asr	w20, w8, #13
	b	LBB0_7
LBB0_6:
	mov	w20, #38528
	movk	w20, #152, lsl #16
LBB0_7:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HEADER_MODE,4,2                ; @HEADER_MODE
	.comm	_PRFVIT,4,2                     ; @PRFVIT
	.comm	_PKTDELIN_LOCK,4,2              ; @PKTDELIN_LOCK
	.no_dead_strip	_stv0900_get_ber
.subsections_via_symbols
