	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_sw_algo
_stv090x_sw_algo:                       ## @stv090x_sw_algo
	.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	%rdi, %r15
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	callq	_stv090x_get_loop_params
	movl	(%r15), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_4
## %bb.1:
	movq	8(%r15), %rax
	cmpl	$32, (%rax)
	jl	LBB0_3
## %bb.2:
	movq	_CARFREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$59, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_33
LBB0_3:
	movq	_DMDCFGMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$73, %edx
	jmp	LBB0_12
LBB0_4:
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.5:
	movq	8(%r15), %rax
	cmpl	$32, (%rax)
	jl	LBB0_7
## %bb.6:
	movq	_CORRELABS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$121, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_33
LBB0_7:
	movq	_DMDCFGMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$137, %edx
	callq	_STV090x_WRITE_DEMOD
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	testq	%rax, %rax
	jns	LBB0_13
	jmp	LBB0_33
LBB0_8:
	movq	8(%r15), %rax
	cmpl	$32, (%rax)
	jl	LBB0_11
## %bb.9:
	movq	_CARFREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$59, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_33
## %bb.10:
	movq	_CORRELABS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$121, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_33
LBB0_11:
	movq	_DMDCFGMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$201, %edx
LBB0_12:
	callq	_STV090x_WRITE_DEMOD
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	testq	%rax, %rax
	js	LBB0_33
LBB0_13:
	movb	$1, %r13b
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	-56(%rbp), %esi
	movl	-48(%rbp), %edx
	movl	-52(%rbp), %r8d
	movq	%r15, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_stv090x_search_car_loop
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_stv090x_chk_signal
	movl	%eax, %ebx
	testb	$1, %r14b
	movq	_DMDFLYW@GOTPCREL(%rip), %r14
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$0, %eax
	testl	%ebx, %ebx
	je	LBB0_31
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	8(%r15), %rax
	cmpl	$32, (%rax)
	jl	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_CARFREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$73, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_33
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_CORRELABS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$158, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_33
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_DMDSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %edi
	movl	$0, %eax
	testl	%r12d, %r12d
	je	LBB0_31
## %bb.21:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_HEADER_MODE_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STV090x_GETFIELD_Px
	movq	_STV090x_DVBS2@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_36
## %bb.22:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-48(%rbp), %edi
	callq	_msleep
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	movq	_FLYWHEEL_CPT_FIELD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	cmpl	$12, %eax
	jg	LBB0_36
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-48(%rbp), %edi
	callq	_msleep
	movq	_DMDFLYW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	cmpl	$13, %eax
	jge	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%r12d, %r12d
LBB0_25:                                ##   in Loop: Header=BB0_14 Depth=1
	cmpl	$12, %eax
	jg	LBB0_30
## %bb.26:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%r13d, %ecx
	xorb	$1, %cl
	movl	%r12d, %eax
	testb	$1, %cl
	jne	LBB0_31
## %bb.27:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	8(%r15), %rax
	cmpl	$32, (%rax)
	jl	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_CORRELABS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$121, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_33
LBB0_29:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_DMDCFGMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$137, %edx
	callq	_STV090x_WRITE_DEMOD
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_31
	jmp	LBB0_33
LBB0_30:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	%r12d, %eax
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_14 Depth=1
	testl	%eax, %eax
	setne	%cl
	notb	%r13b
	orb	%cl, %r13b
	testb	$1, %r13b
	jne	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_14 Depth=1
	movb	$1, %r14b
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	je	LBB0_14
	jmp	LBB0_34
LBB0_33:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %eax
LBB0_34:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	movl	%r12d, %eax
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_CARFREQ,4,2                    ## @CARFREQ
	.comm	_DMDCFGMD,4,2                   ## @DMDCFGMD
	.comm	_CORRELABS,4,2                  ## @CORRELABS
	.comm	_DMDSTATE,4,2                   ## @DMDSTATE
	.comm	_HEADER_MODE_FIELD,4,2          ## @HEADER_MODE_FIELD
	.comm	_STV090x_DVBS2,4,2              ## @STV090x_DVBS2
	.comm	_DMDFLYW,4,2                    ## @DMDFLYW
	.comm	_FLYWHEEL_CPT_FIELD,4,2         ## @FLYWHEEL_CPT_FIELD
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_sw_algo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_sw_algo
_stv090x_sw_algo:                       ; @stv090x_sw_algo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	bl	_stv090x_get_loop_params
	ldr	w8, [x19]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #32
	b.lt	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _CARFREQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CARFREQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #59
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
LBB0_3:
Lloh3:
	adrp	x8, _DMDCFGMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMDCFGMD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #73
	bl	_STV090x_WRITE_DEMOD
	tbz	x0, #63, LBB0_13
	b	LBB0_31
LBB0_4:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #32
	b.lt	LBB0_7
; %bb.6:
Lloh6:
	adrp	x8, _CORRELABS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CORRELABS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #121
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
LBB0_7:
Lloh9:
	adrp	x8, _DMDCFGMD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMDCFGMD@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #137
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
; %bb.8:
	mov	w20, #1
	b	LBB0_14
LBB0_9:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #32
	b.lt	LBB0_12
; %bb.10:
Lloh12:
	adrp	x8, _CARFREQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CARFREQ@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #59
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
; %bb.11:
Lloh15:
	adrp	x8, _CORRELABS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CORRELABS@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #121
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
LBB0_12:
Lloh18:
	adrp	x8, _DMDCFGMD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DMDCFGMD@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #201
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
LBB0_13:
	mov	w20, #0
LBB0_14:
	mov	w28, #0
	mov	w23, #1
Lloh21:
	adrp	x25, _CORRELABS@GOTPAGE
Lloh22:
	ldr	x25, [x25, _CORRELABS@GOTPAGEOFF]
Lloh23:
	adrp	x26, _DMDSTATE@GOTPAGE
Lloh24:
	ldr	x26, [x26, _DMDSTATE@GOTPAGEOFF]
Lloh25:
	adrp	x24, _DMDFLYW@GOTPAGE
Lloh26:
	ldr	x24, [x24, _DMDFLYW@GOTPAGEOFF]
Lloh27:
	adrp	x27, _FLYWHEEL_CPT_FIELD@GOTPAGE
Lloh28:
	ldr	x27, [x27, _FLYWHEEL_CPT_FIELD@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldp	w2, w1, [sp, #8]
	ldr	w4, [sp, #4]
	mov	x0, x19
	mov	x3, x20
	bl	_stv090x_search_car_loop
	mov	x22, x0
	mov	x0, x19
	bl	_stv090x_chk_signal
	mov	x21, x0
	tbnz	w28, #0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w22, #0
	ccmp	w21, #0, #0, eq
	b.eq	LBB0_28
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #32
	b.lt	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
Lloh29:
	adrp	x8, _CARFREQ@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CARFREQ@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #73
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #158
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	cbz	w22, LBB0_29
; %bb.21:                               ;   in Loop: Header=BB0_15 Depth=1
Lloh32:
	adrp	x8, _HEADER_MODE_FIELD@GOTPAGE
Lloh33:
	ldr	x8, [x8, _HEADER_MODE_FIELD@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	bl	_STV090x_GETFIELD_Px
Lloh35:
	adrp	x8, _STV090x_DVBS2@GOTPAGE
Lloh36:
	ldr	x8, [x8, _STV090x_DVBS2@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_32
; %bb.22:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w0, [sp, #8]
	bl	_msleep
	ldr	w1, [x24]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	ldr	w1, [x27]
	bl	_STV090x_GETFIELD_Px
	cmp	w0, #12
	b.gt	LBB0_32
; %bb.23:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w0, [sp, #8]
	bl	_msleep
	ldr	w1, [x24]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	ldr	w1, [x27]
	bl	_STV090x_GETFIELD_Px
	cmp	w0, #12
	csel	w22, w22, wzr, gt
	b.gt	LBB0_29
; %bb.24:                               ;   in Loop: Header=BB0_15 Depth=1
	eor	w8, w23, #0x1
	tbnz	w8, #0, LBB0_29
; %bb.25:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #32
	b.lt	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #121
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
LBB0_27:                                ;   in Loop: Header=BB0_15 Depth=1
Lloh38:
	adrp	x8, _DMDCFGMD@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DMDCFGMD@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #137
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_31
LBB0_28:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w22, #0
LBB0_29:                                ;   in Loop: Header=BB0_15 Depth=1
	cmp	w22, #0
	cset	w8, ne
	orn	w8, w8, w23
	tbnz	w8, #0, LBB0_32
; %bb.30:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w23, #0
	mov	w28, #1
	cbz	w21, LBB0_15
	b	LBB0_32
LBB0_31:
Lloh41:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x2, l_.str@PAGE
Lloh45:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w22, #-1
LBB0_32:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_CARFREQ,4,2                    ; @CARFREQ
	.comm	_DMDCFGMD,4,2                   ; @DMDCFGMD
	.comm	_CORRELABS,4,2                  ; @CORRELABS
	.comm	_DMDSTATE,4,2                   ; @DMDSTATE
	.comm	_HEADER_MODE_FIELD,4,2          ; @HEADER_MODE_FIELD
	.comm	_STV090x_DVBS2,4,2              ; @STV090x_DVBS2
	.comm	_DMDFLYW,4,2                    ; @DMDFLYW
	.comm	_FLYWHEEL_CPT_FIELD,4,2         ; @FLYWHEEL_CPT_FIELD
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_sw_algo
.subsections_via_symbols
