	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_read_per
_stv090x_read_per:                      ## @stv090x_read_per
	.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	(%rdi), %r12
	leaq	-44(%rbp), %rsi
	callq	_stv090x_read_status
	movq	_FE_HAS_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_1
## %bb.2:
	movq	_ERRCNT22@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movq	_ERR_CNT2_FIELD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	movl	%eax, %r15d
	movq	_ERRCNT21@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movq	_ERR_CNT21_FIELD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	movl	%eax, %ebx
	movq	_ERRCNT20@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movq	_ERR_CNT20_FIELD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	shll	$16, %r15d
	shll	$8, %ebx
	orl	%r15d, %ebx
	orl	%eax, %ebx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, (%r14)
	movq	_FBERCPT4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r15d
	movq	_FBERCPT3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r14d
	movq	_FBERCPT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r13d
	movq	_FBERCPT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %ebx
	movq	_FBERCPT0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	orl	%r15d, %r14d
	jne	LBB0_6
## %bb.3:
	movzbl	%r13b, %ecx
	shll	$16, %ecx
	shll	$8, %ebx
	movzwl	%bx, %edx
	orl	%ecx, %edx
	movzbl	%al, %eax
	orl	%edx, %eax
	jne	LBB0_6
## %bb.4:
	movl	$1, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_1:
	movl	$8388608, %eax                  ## imm = 0x800000
LBB0_5:
	movl	%eax, (%r14)
LBB0_6:
	movq	_FBERCPT4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_8
## %bb.7:
	movq	_ERRCTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$193, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	jns	LBB0_9
LBB0_8:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FE_HAS_LOCK,4,2                ## @FE_HAS_LOCK
	.comm	_ERRCNT22,4,2                   ## @ERRCNT22
	.comm	_ERR_CNT2_FIELD,4,2             ## @ERR_CNT2_FIELD
	.comm	_ERRCNT21,4,2                   ## @ERRCNT21
	.comm	_ERR_CNT21_FIELD,4,2            ## @ERR_CNT21_FIELD
	.comm	_ERRCNT20,4,2                   ## @ERRCNT20
	.comm	_ERR_CNT20_FIELD,4,2            ## @ERR_CNT20_FIELD
	.comm	_FBERCPT4,4,2                   ## @FBERCPT4
	.comm	_FBERCPT3,4,2                   ## @FBERCPT3
	.comm	_FBERCPT2,4,2                   ## @FBERCPT2
	.comm	_FBERCPT1,4,2                   ## @FBERCPT1
	.comm	_FBERCPT0,4,2                   ## @FBERCPT0
	.comm	_ERRCTRL2,4,2                   ## @ERRCTRL2
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_read_per
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_read_per
_stv090x_read_per:                      ; @stv090x_read_per
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	ldr	x19, [x0]
	add	x1, sp, #12
	bl	_stv090x_read_status
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _FE_HAS_LOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FE_HAS_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x25, _FBERCPT4@GOTPAGE
Lloh4:
	ldr	x25, [x25, _FBERCPT4@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _ERRCNT22@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERRCNT22@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
Lloh8:
	adrp	x8, _ERR_CNT2_FIELD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_CNT2_FIELD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_STV090x_GETFIELD_Px
	mov	x21, x0
Lloh11:
	adrp	x8, _ERRCNT21@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERRCNT21@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
Lloh14:
	adrp	x8, _ERR_CNT21_FIELD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_CNT21_FIELD@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_STV090x_GETFIELD_Px
	mov	x22, x0
Lloh17:
	adrp	x8, _ERRCNT20@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERRCNT20@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
Lloh20:
	adrp	x8, _ERR_CNT20_FIELD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERR_CNT20_FIELD@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_STV090x_GETFIELD_Px
	lsl	w8, w22, #8
	orr	w8, w8, w21, lsl #16
	orr	w8, w8, w0
	str	w8, [x20]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x23, x0
Lloh23:
	adrp	x8, _FBERCPT3@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FBERCPT3@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x24, x0
Lloh26:
	adrp	x8, _FBERCPT2@GOTPAGE
Lloh27:
	ldr	x8, [x8, _FBERCPT2@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x21, x0
Lloh29:
	adrp	x8, _FBERCPT1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FBERCPT1@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x22, x0
Lloh32:
	adrp	x8, _FBERCPT0@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FBERCPT0@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	orr	w8, w23, w24
	cbnz	w8, LBB0_6
; %bb.2:
	ubfiz	w8, w21, #16, #8
	bfi	w8, w22, #8, #8
	bfxil	w8, w0, #0, #8
	cbnz	w8, LBB0_6
; %bb.3:
	mov	w8, #1
	b	LBB0_5
LBB0_4:
	mov	w8, #8388608
LBB0_5:
	str	w8, [x20]
LBB0_6:
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_9
; %bb.7:
Lloh35:
	adrp	x8, _ERRCTRL2@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ERRCTRL2@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #193
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh38:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
Lloh41:
	adrp	x2, l_.str@PAGE
Lloh42:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_FE_HAS_LOCK,4,2                ; @FE_HAS_LOCK
	.comm	_ERRCNT22,4,2                   ; @ERRCNT22
	.comm	_ERR_CNT2_FIELD,4,2             ; @ERR_CNT2_FIELD
	.comm	_ERRCNT21,4,2                   ; @ERRCNT21
	.comm	_ERR_CNT21_FIELD,4,2            ; @ERR_CNT21_FIELD
	.comm	_ERRCNT20,4,2                   ; @ERRCNT20
	.comm	_ERR_CNT20_FIELD,4,2            ; @ERR_CNT20_FIELD
	.comm	_FBERCPT4,4,2                   ; @FBERCPT4
	.comm	_FBERCPT3,4,2                   ; @FBERCPT3
	.comm	_FBERCPT2,4,2                   ; @FBERCPT2
	.comm	_FBERCPT1,4,2                   ; @FBERCPT1
	.comm	_FBERCPT0,4,2                   ; @FBERCPT0
	.comm	_ERRCTRL2,4,2                   ; @ERRCTRL2
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_read_per
.subsections_via_symbols
