	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_check_data
_stb0899_check_data:                    ## @stb0899_check_data
	.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	%rdi, %rbx
	movq	_NODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rdi)
	movq	_STB0899_TSTRES@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movq	_FRESACS@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_stb0899_write_reg
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r13d
	movl	(%r14), %edi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r15), %esi
	movq	%rbx, %r14
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_stb0899_write_reg
	movl	4(%rbx), %eax
	movl	$2000, %r13d                    ## imm = 0x7D0
	cmpl	$2000001, %eax                  ## imm = 0x1E8481
	jl	LBB0_3
## %bb.1:
	movl	$1500, %r13d                    ## imm = 0x5DC
	cmpl	$5000001, %eax                  ## imm = 0x4C4B41
	jb	LBB0_3
## %bb.2:
	cmpl	$15000001, %eax                 ## imm = 0xE4E1C1
	movl	$1000, %eax                     ## imm = 0x3E8
	movl	$500, %r13d                     ## imm = 0x1F4
	cmovbl	%eax, %r13d
LBB0_3:
	movq	_STB0899_VSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stb0899_read_reg
	movq	_STB0899_DSTATUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_stb0899_write_reg
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_STB0899_VSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r15d
	movq	_VSTATUS_LOCKEDVIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_STB0899_GETFIELD
	movl	%eax, %ebx
	movq	_VSTATUS_END_LOOPVIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_STB0899_GETFIELD
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r12), %eax
	cmpl	%r13d, %r12d
	movl	%eax, %r12d
	jbe	LBB0_4
LBB0_7:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	movq	_DATAOK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movl	(%r14), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edx
	callq	_dprintk
LBB0_9:
	movl	8(%r14), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NODATA,4,2                     ## @NODATA
	.comm	_STB0899_TSTRES,4,2             ## @STB0899_TSTRES
	.comm	_FRESACS,4,2                    ## @FRESACS
	.comm	_STB0899_VSTATUS,4,2            ## @STB0899_VSTATUS
	.comm	_STB0899_DSTATUS2,4,2           ## @STB0899_DSTATUS2
	.comm	_VSTATUS_LOCKEDVIT,4,2          ## @VSTATUS_LOCKEDVIT
	.comm	_VSTATUS_END_LOOPVIT,4,2        ## @VSTATUS_END_LOOPVIT
	.comm	_DATAOK,4,2                     ## @DATAOK
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-----------------> DATA OK !"

	.no_dead_strip	_stb0899_check_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_check_data
_stb0899_check_data:                    ; @stb0899_check_data
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _NODATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NODATA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #8]
Lloh3:
	adrp	x21, _STB0899_TSTRES@GOTPAGE
Lloh4:
	ldr	x21, [x21, _STB0899_TSTRES@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_stb0899_read_reg
	mov	x20, x0
Lloh5:
	adrp	x22, _FRESACS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _FRESACS@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x20
	mov	w2, #1
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stb0899_write_reg
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stb0899_read_reg
	mov	x20, x0
	ldr	w0, [x22]
	mov	x1, x20
	mov	w2, #0
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stb0899_write_reg
	ldr	w8, [x19, #4]
	mov	w9, #2000
	mov	w10, #33921
	movk	w10, #30, lsl #16
	mov	w11, #1500
	mov	w12, #19265
	movk	w12, #76, lsl #16
	mov	w13, #57793
	movk	w13, #228, lsl #16
	mov	w14, #500
	mov	w15, #1000
	cmp	w8, w13
	csel	w13, w15, w14, lo
	cmp	w8, w12
	csel	w11, w11, w13, lo
	cmp	w8, w10
	csel	w22, w9, w11, lt
Lloh7:
	adrp	x23, _STB0899_VSTATUS@GOTPAGE
Lloh8:
	ldr	x23, [x23, _STB0899_VSTATUS@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_stb0899_read_reg
Lloh9:
	adrp	x8, _STB0899_DSTATUS2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STB0899_DSTATUS2@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_stb0899_write_reg
	mov	w24, #0
Lloh12:
	adrp	x25, _VSTATUS_LOCKEDVIT@GOTPAGE
Lloh13:
	ldr	x25, [x25, _VSTATUS_LOCKEDVIT@GOTPAGEOFF]
Lloh14:
	adrp	x26, _VSTATUS_END_LOOPVIT@GOTPAGE
Lloh15:
	ldr	x26, [x26, _VSTATUS_END_LOOPVIT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_stb0899_read_reg
	mov	x21, x0
	ldr	w0, [x25]
	mov	x1, x21
	bl	_STB0899_GETFIELD
	mov	x20, x0
	ldr	w0, [x26]
	mov	x1, x21
	bl	_STB0899_GETFIELD
	cmp	w20, #0
	ccmp	w0, #0, #0, eq
	ccmp	w24, w22, #2, eq
	add	w24, w24, #1
	b.ls	LBB0_1
; %bb.2:
	cbz	w20, LBB0_4
; %bb.3:
Lloh16:
	adrp	x8, _DATAOK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DATAOK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	w0, [x19]
Lloh19:
	adrp	x8, _FE_DEBUG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FE_DEBUG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x3, l_.str@PAGE
Lloh23:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #1
	bl	_dprintk
LBB0_4:
	ldr	w0, [x19, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NODATA,4,2                     ; @NODATA
	.comm	_STB0899_TSTRES,4,2             ; @STB0899_TSTRES
	.comm	_FRESACS,4,2                    ; @FRESACS
	.comm	_STB0899_VSTATUS,4,2            ; @STB0899_VSTATUS
	.comm	_STB0899_DSTATUS2,4,2           ; @STB0899_DSTATUS2
	.comm	_VSTATUS_LOCKEDVIT,4,2          ; @VSTATUS_LOCKEDVIT
	.comm	_VSTATUS_END_LOOPVIT,4,2        ; @VSTATUS_END_LOOPVIT
	.comm	_DATAOK,4,2                     ; @DATAOK
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-----------------> DATA OK !"

	.no_dead_strip	_stb0899_check_data
.subsections_via_symbols
