	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_read_ber
_stb0899_read_ber:                      ## @stb0899_read_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	%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, %r15
	movq	(%rdi), %rbx
	movl	$0, (%rsi)
	movl	(%rbx), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_4
## %bb.1:
	xorl	%r14d, %r14d
	cmpl	$0, 12(%rbx)
	je	LBB0_9
## %bb.2:
	movl	$100, %edi
	callq	_msleep
	movq	_STB0899_ECNT1L@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movq	_STB0899_ECNT1M@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	(%r15), %eax
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$33, %rax
	addl	%ecx, %eax
	movl	%eax, (%r15)
	movq	_VSTATUS_PRFVIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %esi
	callq	_STB0899_GETFIELD
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	imull	$9766, (%r15), %eax             ## imm = 0x2626
	movl	%eax, (%r15)
	movq	_NOE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_STB0899_GETFIELD
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %ecx
	movl	$-1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	notl	%esi
	movl	(%r15), %eax
	cltd
	idivl	%esi
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	%ecx, (%r15)
LBB0_8:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_4:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.5:
	xorl	%r14d, %r14d
	cmpl	$0, 12(%rbx)
	je	LBB0_9
## %bb.6:
	movl	$100, %edi
	callq	_msleep
	movq	_STB0899_ECNT1L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movq	_STB0899_ECNT1M@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movq	_STB0899_ECNT1L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movq	_STB0899_ECNT1L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movq	_STB0899_ECNT1L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	%eax, (%r15)
	movl	$100, %edi
	callq	_msleep
	movq	_STB0899_ECNT1L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_MAKEWORD16
	addl	(%r15), %eax
	imull	$10000000, %eax, %eax           ## imm = 0x989680
	movl	%eax, (%r15)
	movq	_NOE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_STB0899_GETFIELD
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %ecx
	addb	$4, %cl
	movl	$-1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	notl	%esi
	movl	(%r15), %eax
	cltd
	idivl	%esi
	movl	%eax, (%r15)
	jmp	LBB0_9
LBB0_7:
	movl	4(%rbx), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edx
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STB0899_ECNT1L,4,2             ## @STB0899_ECNT1L
	.comm	_STB0899_ECNT1M,4,2             ## @STB0899_ECNT1M
	.comm	_VSTATUS_PRFVIT,4,2             ## @VSTATUS_PRFVIT
	.comm	_NOE,4,2                        ## @NOE
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported delivery system"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_read_ber
_stb0899_read_ber:                      ; @stb0899_read_ber
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x20, [x0]
	str	wzr, [x1]
	ldr	w8, [x20]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_4
; %bb.1:
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_7
; %bb.2:
	mov	w0, #100
	bl	_msleep
Lloh0:
	adrp	x22, _STB0899_ECNT1L@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STB0899_ECNT1L@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
Lloh2:
	adrp	x23, _STB0899_ECNT1M@GOTPAGE
Lloh3:
	ldr	x23, [x23, _STB0899_ECNT1M@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	str	w8, [x19]
Lloh4:
	adrp	x8, _VSTATUS_PRFVIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VSTATUS_PRFVIT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w1, [x20, #16]
	bl	_STB0899_GETFIELD
	cbz	w0, LBB0_9
; %bb.3:
	ldr	w8, [x19]
	mov	w9, #9766
	mul	w8, w8, w9
	str	w8, [x19]
Lloh7:
	adrp	x8, _NOE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NOE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w1, [x20, #8]
	bl	_STB0899_GETFIELD
	mov	x8, x0
	mov	w0, #0
	lsl	w8, w8, #1
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w8, w8
	ldr	w9, [x19]
	sdiv	w8, w9, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x19]
	b	LBB0_9
LBB0_4:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.5:
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_7
; %bb.6:
	mov	w0, #100
	bl	_msleep
Lloh10:
	adrp	x22, _STB0899_ECNT1L@GOTPAGE
Lloh11:
	ldr	x22, [x22, _STB0899_ECNT1L@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
Lloh12:
	adrp	x23, _STB0899_ECNT1M@GOTPAGE
Lloh13:
	ldr	x23, [x23, _STB0899_ECNT1M@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_stb0899_read_reg
	mov	x1, x21
	bl	_MAKEWORD16
	ldr	w8, [x19]
	add	w8, w8, w0
	mov	w9, #38528
	movk	w9, #152, lsl #16
	mul	w8, w8, w9
	str	w8, [x19]
Lloh14:
	adrp	x8, _NOE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NOE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [x20, #8]
	bl	_STB0899_GETFIELD
	mov	x8, x0
	mov	w0, #0
	lsl	w8, w8, #1
	add	w8, w8, #4
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w8, w8
	ldr	w9, [x19]
	sdiv	w8, w9, w8
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20, #4]
Lloh17:
	adrp	x8, _FE_DEBUG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FE_DEBUG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x3, l_.str@PAGE
Lloh21:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #1
	bl	_dprintk
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_STB0899_ECNT1L,4,2             ; @STB0899_ECNT1L
	.comm	_STB0899_ECNT1M,4,2             ; @STB0899_ECNT1M
	.comm	_VSTATUS_PRFVIT,4,2             ; @VSTATUS_PRFVIT
	.comm	_NOE,4,2                        ; @NOE
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported delivery system"

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