	.file	"extr_stv090x.c_stv090x_optimize_track.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"I/O error"
	.text
	.p2align 4
	.type	stv090x_optimize_track, @function
stv090x_optimize_track:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR 40[rdi]
	mov	esi, DWORD PTR 4[rax]
	call	stv090x_get_srate@PLT
	mov	rdi, rbp
	mov	esi, eax
	mov	r12d, eax
	call	stv090x_get_tmgoffst@PLT
	mov	edx, DWORD PTR 0[rbp]
	add	r12d, eax
	cmp	edx, 129
	je	.L2
	sub	edx, 130
	cmp	edx, 1
	ja	.L3
	mov	rax, QWORD PTR STV090x_SEARCH_AUTO[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L4
.L7:
	mov	esi, DWORD PTR DEMOD[rip]
	mov	rdi, rbp
	call	STV090x_READ_DEMOD@PLT
	mov	edx, DWORD PTR 16[rbp]
	mov	esi, DWORD PTR ROLLOFF_CONTROL_FIELD[rip]
	mov	edi, eax
	mov	r13d, eax
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR MANUAL_SXROLLOFF_FIELD[rip]
	mov	edx, 1
	mov	edi, r13d
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DEMOD[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	rax, QWORD PTR 40[rbp]
	cmp	DWORD PTR [rax], 47
	jg	.L8
.L11:
	mov	esi, DWORD PTR ERRCTRL1[rip]
	mov	edx, 117
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
.L12:
	mov	esi, DWORD PTR CFR2[rip]
	mov	rdi, rbp
	xor	ebx, ebx
	call	STV090x_READ_DEMOD@PLT
	mov	esi, DWORD PTR CFR1[rip]
	mov	rdi, rbp
	mov	r13d, eax
	call	STV090x_READ_DEMOD@PLT
	mov	esi, DWORD PTR TMGOBS[rip]
	mov	rdi, rbp
	mov	r14d, eax
	call	STV090x_READ_DEMOD@PLT
	mov	rax, QWORD PTR STV090x_BLIND_SEARCH[rip]
	cmp	QWORD PTR 24[rbp], rax
	je	.L71
.L26:
	mov	rax, QWORD PTR 40[rbp]
	cmp	DWORD PTR [rax], 31
	jle	.L30
	mov	rax, QWORD PTR 8[rbp]
	cmp	rax, QWORD PTR STV090x_SEARCH_DVBS1[rip]
	je	.L29
	cmp	rax, QWORD PTR STV090x_SEARCH_DSS[rip]
	je	.L29
	cmp	rax, QWORD PTR STV090x_SEARCH_AUTO[rip]
	je	.L29
.L30:
	mov	esi, DWORD PTR AGC2REF[rip]
	mov	edx, 56
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR SFRUP1[rip]
	mov	edx, 128
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR SFRLOW1[rip]
	mov	edx, 128
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	rax, QWORD PTR 40[rbp]
	and	ebx, 1
	cmp	DWORD PTR [rax], 31
	jg	.L31
	test	bl, bl
	jne	.L31
	cmp	DWORD PTR 32[rbp], 9999999
	jg	.L43
.L31:
	mov	esi, DWORD PTR CFRINIT1[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR CFRINIT0[rip]
	mov	edx, r14d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR 16[rbp]
	mov	edi, r12d
	call	stv090x_car_width@PLT
	add	rax, 10000000
	mov	QWORD PTR 48[rbp], rax
	mov	rax, QWORD PTR 40[rbp]
	cmp	DWORD PTR [rax], 31
	jg	.L34
	test	bl, bl
	je	.L60
.L34:
	mov	rax, QWORD PTR STV090x_WARM_SEARCH[rip]
	cmp	QWORD PTR 24[rbp], rax
	je	.L35
	mov	esi, 1
	mov	rdi, rbp
	call	stv090x_i2c_gate_ctrl@PLT
	test	rax, rax
	js	.L37
	mov	rax, QWORD PTR 56[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L36
	mov	rsi, QWORD PTR 48[rbp]
	lea	rdi, 80[rbp]
	call	rax
	test	rax, rax
	js	.L72
.L36:
	xor	esi, esi
	mov	rdi, rbp
	call	stv090x_i2c_gate_ctrl@PLT
	test	rax, rax
	js	.L37
.L60:
	mov	rax, QWORD PTR 24[rbp]
.L35:
	cmp	QWORD PTR STV090x_BLIND_SEARCH[rip], rax
	je	.L38
	cmp	DWORD PTR 32[rbp], 9999999
	jg	.L39
.L38:
	mov	edi, 50
	call	msleep@PLT
.L40:
	mov	rdi, rbp
	call	stv090x_get_lock_tmg@PLT
	mov	eax, DWORD PTR 36[rbp]
	mov	rdi, rbp
	mov	esi, eax
	shr	esi, 31
	add	esi, eax
	sar	esi
	call	stv090x_get_dmdlock@PLT
	mov	ebx, eax
	test	eax, eax
	je	.L41
.L47:
	mov	rax, QWORD PTR 40[rbp]
	cmp	DWORD PTR [rax], 31
	jg	.L73
.L43:
	mov	eax, DWORD PTR 0[rbp]
	sub	eax, 130
	cmp	eax, 1
	jbe	.L32
.L69:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	rdi, rbp
	call	stv090x_set_vit_thtracq@PLT
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L29:
	mov	esi, DWORD PTR VAVSRVIT[rip]
	mov	edx, 10
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR VITSCALE[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L30
.L37:
	mov	edi, DWORD PTR FE_ERROR[rip]
	lea	rdx, .LC0[rip]
	mov	esi, 1
	call	dprintk@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, -1
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	rdi, rbp
	call	STV090x_READ_DEMOD@PLT
	mov	esi, DWORD PTR DVBS1_ENABLE_FIELD[rip]
	mov	edx, 1
	mov	edi, eax
	mov	r13d, eax
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DVBS2_ENABLE_FIELD[rip]
	mov	edx, 1
	mov	edi, r13d
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L12
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	rdi, rbp
	call	STV090x_READ_DEMOD@PLT
	mov	esi, DWORD PTR DVBS1_ENABLE_FIELD[rip]
	xor	edx, edx
	mov	edi, eax
	mov	r13d, eax
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DVBS2_ENABLE_FIELD[rip]
	mov	edx, 1
	mov	edi, r13d
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	rax, QWORD PTR 40[rbp]
	cmp	DWORD PTR [rax], 47
	jg	.L13
.L16:
	mov	eax, DWORD PTR STV090x_LONG_FRAME[rip]
	cmp	DWORD PTR 72[rbp], eax
	je	.L74
	mov	rdi, rbp
	call	stv090x_optimize_carloop_short@PLT
	mov	r13d, eax
	mov	eax, DWORD PTR 64[rbp]
	cmp	eax, DWORD PTR STV090x_QPSK[rip]
	je	.L75
	cmp	eax, DWORD PTR STV090x_8PSK[rip]
	je	.L76
	cmp	eax, DWORD PTR STV090x_16APSK[rip]
	je	.L77
	cmp	eax, DWORD PTR STV090x_32APSK[rip]
	je	.L78
.L21:
	mov	esi, DWORD PTR ERRCTRL1[rip]
	mov	edx, 103
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L73:
	mov	esi, DWORD PTR CARFREQ[rip]
	mov	edx, 73
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L43
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L41:
	mov	esi, DWORD PTR DMDISTATE[rip]
	mov	edx, 31
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR CFRINIT1[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR CFRINIT0[rip]
	mov	edx, r14d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR DMDISTATE[rip]
	mov	edx, 24
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
.L44:
	mov	eax, DWORD PTR 36[rbp]
	mov	rdi, rbp
	mov	esi, eax
	shr	esi, 31
	add	esi, eax
	sar	esi
	call	stv090x_get_dmdlock@PLT
	cmp	ebx, 3
	je	.L47
	test	eax, eax
	jne	.L47
	mov	esi, DWORD PTR DMDISTATE[rip]
	mov	edx, 31
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR CFRINIT1[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR CFRINIT0[rip]
	mov	edx, r14d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR DMDISTATE[rip]
	mov	edx, 24
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	add	ebx, 1
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, rbp
	call	stv090x_get_viterbi@PLT
	test	eax, eax
	js	.L37
	mov	esi, DWORD PTR GAUSSR0[rip]
	mov	eax, DWORD PTR STV090x_PR12[rip]
	cmp	DWORD PTR 76[rbp], eax
	je	.L79
	mov	edx, 24
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
.L62:
	mov	esi, DWORD PTR CCIR0[rip]
	mov	edx, 24
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L11
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L71:
	mov	esi, DWORD PTR SFRSTEP[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	rdi, rbp
	call	STV090x_READ_DEMOD@PLT
	mov	esi, DWORD PTR SCAN_ENABLE_FIELD[rip]
	xor	edx, edx
	mov	edi, eax
	mov	r15d, eax
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR CFR_AUTOSCAN_FIELD[rip]
	xor	edx, edx
	mov	edi, r15d
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	edx, r15d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR TMGCFG2[rip]
	mov	edx, 193
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, r12d
	mov	rdi, rbp
	call	stv090x_set_srate@PLT
	test	rax, rax
	js	.L37
	mov	rdi, rbp
	call	stv090x_dvbs_track_crl@PLT
	test	rax, rax
	js	.L37
	mov	ebx, 1
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L39:
	mov	edi, 5
	call	msleep@PLT
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	rdi, rbp
	call	STV090x_READ_DEMOD@PLT
	mov	esi, DWORD PTR DVBS1_ENABLE_FIELD[rip]
	mov	edx, 1
	mov	edi, eax
	mov	r13d, eax
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DVBS2_ENABLE_FIELD[rip]
	xor	edx, edx
	mov	edi, r13d
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR DMDCFGMD[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L7
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L74:
	mov	esi, DWORD PTR DMDMODCOD[rip]
	mov	rdi, rbp
	call	STV090x_READ_DEMOD@PLT
	mov	esi, DWORD PTR DEMOD_MODCOD_FIELD[rip]
	mov	edi, eax
	mov	r13d, eax
	call	STV090x_GETFIELD_Px@PLT
	mov	esi, DWORD PTR DEMOD_TYPE_FIELD[rip]
	mov	edi, r13d
	mov	ebx, eax
	call	STV090x_GETFIELD_Px@PLT
	mov	esi, ebx
	mov	rdi, rbp
	and	eax, 1
	mov	edx, eax
	call	stv090x_optimize_carloop@PLT
	cmp	DWORD PTR STV090x_QPSK_910[rip], ebx
	mov	r13d, eax
	jnb	.L80
	cmp	DWORD PTR STV090x_8PSK_910[rip], ebx
	jnb	.L81
	mov	eax, DWORD PTR 68[rbp]
	cmp	DWORD PTR STV090x_SINGLE[rip], eax
	jne	.L21
.L48:
	cmp	DWORD PTR STV090x_16APSK_910[rip], ebx
	mov	esi, DWORD PTR ACLC2S2Q[rip]
	mov	edx, 42
	mov	rdi, rbp
	jnb	.L65
.L68:
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR ACLC2S232A[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L21
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR ACLC[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR BCLC[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L16
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L79:
	mov	edx, 152
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L62
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L75:
	mov	esi, DWORD PTR ACLC2S2Q[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L21
	jmp	.L37
.L72:
	xor	esi, esi
	mov	rdi, rbp
	call	stv090x_i2c_gate_ctrl@PLT
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L77:
	mov	esi, DWORD PTR ACLC2S2Q[rip]
	mov	edx, 42
	mov	rdi, rbp
.L65:
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR ACLC2S216A[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L21
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L80:
	mov	esi, DWORD PTR ACLC2S2Q[rip]
	mov	edx, eax
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
.L18:
	mov	eax, DWORD PTR STV090x_SINGLE[rip]
	cmp	DWORD PTR 68[rbp], eax
	jne	.L21
	cmp	DWORD PTR STV090x_8PSK_910[rip], ebx
	jnb	.L21
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L76:
	mov	esi, DWORD PTR ACLC2S2Q[rip]
	mov	edx, 42
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR ACLC2S28[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L21
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L81:
	mov	esi, DWORD PTR ACLC2S2Q[rip]
	mov	edx, 42
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	js	.L37
	mov	esi, DWORD PTR ACLC2S28[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	STV090x_WRITE_DEMOD@PLT
	test	rax, rax
	jns	.L18
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L78:
	mov	esi, DWORD PTR ACLC2S2Q[rip]
	mov	edx, 42
	mov	rdi, rbp
	jmp	.L68
	.cfi_endproc
.LFE0:
	.size	stv090x_optimize_track, .-stv090x_optimize_track
	.comm	VITSCALE,4,4
	.comm	VAVSRVIT,4,4
	.comm	TMGOBS,4,4
	.comm	TMGCFG2,4,4
	.comm	STV090x_WARM_SEARCH,8,8
	.comm	STV090x_SINGLE,4,4
	.comm	STV090x_SEARCH_DVBS1,8,8
	.comm	STV090x_SEARCH_DSS,8,8
	.comm	STV090x_SEARCH_AUTO,8,8
	.comm	STV090x_QPSK_910,4,4
	.comm	STV090x_QPSK,4,4
	.comm	STV090x_PR12,4,4
	.comm	STV090x_LONG_FRAME,4,4
	.comm	STV090x_BLIND_SEARCH,8,8
	.comm	STV090x_8PSK_910,4,4
	.comm	STV090x_8PSK,4,4
	.comm	STV090x_32APSK,4,4
	.comm	STV090x_16APSK_910,4,4
	.comm	STV090x_16APSK,4,4
	.comm	SFRUP1,4,4
	.comm	SFRSTEP,4,4
	.comm	SFRLOW1,4,4
	.comm	SCAN_ENABLE_FIELD,4,4
	.comm	ROLLOFF_CONTROL_FIELD,4,4
	.comm	MANUAL_SXROLLOFF_FIELD,4,4
	.comm	GAUSSR0,4,4
	.comm	FE_ERROR,4,4
	.comm	ERRCTRL1,4,4
	.comm	DVBS2_ENABLE_FIELD,4,4
	.comm	DVBS1_ENABLE_FIELD,4,4
	.comm	DMDMODCOD,4,4
	.comm	DMDISTATE,4,4
	.comm	DMDCFGMD,4,4
	.comm	DEMOD_TYPE_FIELD,4,4
	.comm	DEMOD_MODCOD_FIELD,4,4
	.comm	DEMOD,4,4
	.comm	CFR_AUTOSCAN_FIELD,4,4
	.comm	CFRINIT1,4,4
	.comm	CFRINIT0,4,4
	.comm	CFR2,4,4
	.comm	CFR1,4,4
	.comm	CCIR0,4,4
	.comm	CARFREQ,4,4
	.comm	BCLC,4,4
	.comm	AGC2REF,4,4
	.comm	ACLC2S2Q,4,4
	.comm	ACLC2S28,4,4
	.comm	ACLC2S232A,4,4
	.comm	ACLC2S216A,4,4
	.comm	ACLC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_stv090x.c_stv090x_optimize_track.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"I/O error\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stv090x_optimize_track, %function
stv090x_optimize_track:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0, #24]
	mov	r4, r0
	ldr	r1, [r3, #4]
	bl	stv090x_get_srate
	mov	r5, r0
	mov	r0, r4
	mov	r1, r5
	bl	stv090x_get_tmgoffst
	ldr	r3, [r4]
	add	r5, r5, r0
	cmp	r3, #129
	beq	.L2
	sub	r3, r3, #130
	cmp	r3, #1
	bhi	.L3
	ldr	r3, .L82
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L4
.L7:
	ldr	r7, .L82+4
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_READ_DEMOD
	mov	r6, r0
	ldr	r3, .L82+8
	ldr	r2, [r4, #8]
	ldr	r1, [r3]
	bl	STV090x_SETFIELD_Px
	ldr	r3, .L82+12
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r6
	bl	STV090x_SETFIELD_Px
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, [r4, #24]
	ldr	r3, [r3]
	cmp	r3, #47
	bgt	.L8
.L11:
	ldr	r3, .L82+16
	mov	r2, #117
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
.L12:
	ldr	r3, .L82+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_READ_DEMOD
	ldr	r3, .L82+24
	mov	r7, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	STV090x_READ_DEMOD
	ldr	r3, .L82+28
	ldr	r10, .L82+32
	ldr	r1, [r3]
	mov	r8, r0
	mov	r0, r4
	bl	STV090x_READ_DEMOD
	ldr	r3, [r10]
	ldr	r2, [r4, #12]
	cmp	r2, r3
	movne	r6, #0
	beq	.L70
.L26:
	ldr	r3, [r4, #24]
	ldr	r3, [r3]
	cmp	r3, #31
	ble	.L30
	ldr	r2, .L82+36
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L29
	ldr	r2, .L82+40
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L29
	ldr	r2, .L82
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L29
.L30:
	ldr	r3, .L82+44
	mov	r2, #56
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+48
	mov	r2, #128
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+52
	mov	r2, #128
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, [r4, #24]
	and	r9, r6, #1
	ldr	r3, [r3]
	cmp	r3, #31
	orrgt	r6, r6, #1
	cmp	r6, #0
	beq	.L71
.L31:
	ldr	r6, .L82+56
	mov	r2, r7
	mov	r0, r4
	ldr	r1, [r6]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	fp, .L82+60
	mov	r2, r8
	mov	r0, r4
	ldr	r1, [fp]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r0, r5
	ldr	r1, [r4, #8]
	bl	stv090x_car_width
	ldr	r2, [r4, #24]
	ldr	r3, .L82+64
	ldr	r2, [r2]
	add	r3, r0, r3
	cmp	r2, #31
	orrgt	r9, r9, #1
	cmp	r9, #0
	str	r3, [r4, #28]
	beq	.L57
	ldr	r3, .L82+68
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L35
	mov	r1, #1
	mov	r0, r4
	bl	stv090x_i2c_gate_ctrl
	cmp	r0, #0
	blt	.L37
	ldr	r3, [r4, #32]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L36
	ldr	r1, [r4, #28]
	add	r0, r4, #52
	blx	r3
	cmp	r0, #0
	blt	.L72
.L36:
	mov	r1, #0
	mov	r0, r4
	bl	stv090x_i2c_gate_ctrl
	cmp	r0, #0
	blt	.L37
.L57:
	ldr	r3, [r4, #12]
.L35:
	ldr	r2, [r10]
	cmp	r2, r3
	beq	.L38
	ldr	r3, .L82+72
	ldr	r2, [r4, #16]
	cmp	r2, r3
	bgt	.L39
.L38:
	mov	r0, #50
	bl	msleep
.L40:
	mov	r0, r4
	bl	stv090x_get_lock_tmg
	ldr	r1, [r4, #20]
	mov	r0, r4
	add	r1, r1, r1, lsr #31
	asr	r1, r1, #1
	bl	stv090x_get_dmdlock
	subs	r5, r0, #0
	beq	.L41
.L46:
	ldr	r3, [r4, #24]
	ldr	r3, [r3]
	cmp	r3, #31
	bgt	.L73
.L43:
	ldr	r3, [r4]
	sub	r3, r3, #130
	cmp	r3, #1
	bls	.L32
.L68:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	ldr	r3, .L82+76
	mov	r2, #10
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+80
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L30
.L37:
	ldr	r3, .L82+84
	mov	r1, #1
	ldr	r2, .L82+88
	ldr	r0, [r3]
	bl	dprintk
	mvn	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L71:
	ldr	r3, .L82+72
	ldr	r2, [r4, #16]
	cmp	r2, r3
	ble	.L31
	ldr	r3, [r4]
	sub	r3, r3, #130
	cmp	r3, #1
	bhi	.L68
.L32:
	mov	r0, r4
	bl	stv090x_set_vit_thtracq
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r7, .L82+92
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_READ_DEMOD
	mov	r6, r0
	ldr	r3, .L82+96
	mov	r2, #1
	ldr	r1, [r3]
	bl	STV090x_SETFIELD_Px
	ldr	r3, .L82+100
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r6
	bl	STV090x_SETFIELD_Px
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L12
	b	.L37
.L2:
	ldr	r7, .L82+92
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_READ_DEMOD
	mov	r6, r0
	ldr	r3, .L82+96
	mov	r2, #0
	ldr	r1, [r3]
	bl	STV090x_SETFIELD_Px
	ldr	r3, .L82+100
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r6
	bl	STV090x_SETFIELD_Px
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, [r4, #24]
	ldr	r3, [r3]
	cmp	r3, #47
	bgt	.L13
.L16:
	ldr	r3, .L82+104
	ldr	r2, [r4, #44]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L74
	mov	r0, r4
	bl	stv090x_optimize_carloop_short
	ldr	r2, .L82+108
	ldr	r3, [r4, #36]
	ldr	r1, [r2]
	mov	r6, r0
	cmp	r3, r1
	beq	.L75
	ldr	r2, .L82+112
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L76
	ldr	r2, .L82+116
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L77
	ldr	r2, .L82+120
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L78
.L21:
	ldr	r3, .L82+16
	mov	r2, #103
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	b	.L12
.L73:
	ldr	r3, .L82+124
	mov	r2, #73
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L43
	b	.L37
.L41:
	ldr	r9, .L82+128
	mov	r2, #31
	mov	r0, r4
	ldr	r1, [r9]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r2, r7
	mov	r0, r4
	ldr	r1, [r6]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r2, r8
	mov	r0, r4
	ldr	r1, [fp]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r2, #24
	mov	r0, r4
	ldr	r1, [r9]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
.L44:
	ldr	r1, [r4, #20]
	mov	r0, r4
	add	r1, r1, r1, lsr #31
	asr	r1, r1, #1
	bl	stv090x_get_dmdlock
	subs	r3, r5, #3
	movne	r3, #1
	cmp	r0, #0
	movne	r3, #0
	cmp	r3, #0
	beq	.L46
	mov	r2, #31
	mov	r0, r4
	ldr	r1, [r9]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r2, r7
	mov	r0, r4
	ldr	r1, [r6]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r2, r8
	mov	r0, r4
	ldr	r1, [fp]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r2, #24
	mov	r0, r4
	ldr	r1, [r9]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	add	r5, r5, #1
	b	.L44
.L8:
	mov	r0, r4
	bl	stv090x_get_viterbi
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+132
	ldr	r1, [r4, #48]
	ldr	r2, [r3]
	ldr	r3, .L82+136
	cmp	r1, r2
	ldr	r1, [r3]
	beq	.L79
	mov	r2, #24
	mov	r0, r4
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
.L59:
	ldr	r3, .L82+140
	mov	r2, #24
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L11
	b	.L37
.L70:
	ldr	r3, .L82+144
	ldr	r9, .L82+92
	ldr	r1, [r3]
	mov	r2, #0
	mov	r0, r4
	bl	STV090x_WRITE_DEMOD
	ldr	r1, [r9]
	mov	r0, r4
	bl	STV090x_READ_DEMOD
	mov	r6, r0
	ldr	r3, .L82+148
	mov	r2, #0
	ldr	r1, [r3]
	bl	STV090x_SETFIELD_Px
	ldr	r3, .L82+152
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r6
	bl	STV090x_SETFIELD_Px
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r9]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+156
	mov	r2, #193
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	mov	r1, r5
	mov	r0, r4
	bl	stv090x_set_srate
	cmp	r0, #0
	blt	.L37
	mov	r0, r4
	bl	stv090x_dvbs_track_crl
	cmp	r0, #0
	blt	.L37
	mov	r6, #1
	b	.L26
.L39:
	mov	r0, #5
	bl	msleep
	b	.L40
.L4:
	ldr	r7, .L82+92
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_READ_DEMOD
	mov	r6, r0
	ldr	r3, .L82+96
	mov	r2, #1
	ldr	r1, [r3]
	bl	STV090x_SETFIELD_Px
	ldr	r3, .L82+100
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r6
	bl	STV090x_SETFIELD_Px
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L7
	b	.L37
.L74:
	ldr	r3, .L82+160
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_READ_DEMOD
	ldr	r3, .L82+164
	mov	r7, r0
	ldr	r1, [r3]
	bl	STV090x_GETFIELD_Px
	ldr	r3, .L82+168
	mov	r6, r0
	ldr	r1, [r3]
	mov	r0, r7
	bl	STV090x_GETFIELD_Px
	mov	r1, r6
	and	r2, r0, #1
	mov	r0, r4
	bl	stv090x_optimize_carloop
	ldr	r3, .L82+172
	mov	r7, r0
	ldr	r3, [r3]
	cmp	r3, r6
	bcs	.L80
	ldr	r3, .L82+176
	ldr	r3, [r3]
	cmp	r3, r6
	bcs	.L81
	ldr	r2, .L82+180
	ldr	r3, [r4, #40]
	ldr	r2, [r2]
	cmp	r2, r3
	ldreq	r8, .L82+184
	bne	.L21
.L47:
	ldr	r3, .L82+188
	mov	r2, #42
	ldr	r3, [r3]
	mov	r0, r4
	cmp	r3, r6
	ldr	r1, [r8]
	bcc	.L22
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+192
.L61:
	mov	r2, r7
	b	.L63
.L13:
	ldr	r3, .L82+196
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+200
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L16
	b	.L37
.L79:
	mov	r2, #152
	mov	r0, r4
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L59
	b	.L37
.L75:
	ldr	r3, .L82+184
.L65:
	mov	r2, r6
.L63:
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L21
	b	.L37
.L72:
	mov	r0, r4
	mov	r1, #0
	bl	stv090x_i2c_gate_ctrl
	b	.L37
.L80:
	ldr	r8, .L82+184
	mov	r2, r0
	ldr	r1, [r8]
	mov	r0, r4
	bl	STV090x_WRITE_DEMOD
.L18:
	ldr	r3, .L82+180
	ldr	r2, [r4, #40]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L21
	ldr	r3, .L82+176
	ldr	r3, [r3]
	cmp	r3, r6
	bcs	.L21
	b	.L47
.L76:
	ldr	r3, .L82+184
	mov	r2, #42
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+204
	b	.L65
.L77:
	ldr	r3, .L82+184
	mov	r2, #42
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+192
	b	.L65
.L81:
	ldr	r8, .L82+184
	mov	r2, #42
	mov	r0, r4
	ldr	r1, [r8]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+204
	mov	r2, r7
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	bge	.L18
	b	.L37
.L78:
	ldr	r3, .L82+184
	mov	r2, #42
	mov	r0, r4
	ldr	r1, [r3]
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+208
	b	.L65
.L22:
	bl	STV090x_WRITE_DEMOD
	cmp	r0, #0
	blt	.L37
	ldr	r3, .L82+208
	b	.L61
.L83:
	.align	2
.L82:
	.word	STV090x_SEARCH_AUTO
	.word	DEMOD
	.word	ROLLOFF_CONTROL_FIELD
	.word	MANUAL_SXROLLOFF_FIELD
	.word	ERRCTRL1
	.word	CFR2
	.word	CFR1
	.word	TMGOBS
	.word	STV090x_BLIND_SEARCH
	.word	STV090x_SEARCH_DVBS1
	.word	STV090x_SEARCH_DSS
	.word	AGC2REF
	.word	SFRUP1
	.word	SFRLOW1
	.word	CFRINIT1
	.word	CFRINIT0
	.word	10000000
	.word	STV090x_WARM_SEARCH
	.word	9999999
	.word	VAVSRVIT
	.word	VITSCALE
	.word	FE_ERROR
	.word	.LC0
	.word	DMDCFGMD
	.word	DVBS1_ENABLE_FIELD
	.word	DVBS2_ENABLE_FIELD
	.word	STV090x_LONG_FRAME
	.word	STV090x_QPSK
	.word	STV090x_8PSK
	.word	STV090x_16APSK
	.word	STV090x_32APSK
	.word	CARFREQ
	.word	DMDISTATE
	.word	STV090x_PR12
	.word	GAUSSR0
	.word	CCIR0
	.word	SFRSTEP
	.word	SCAN_ENABLE_FIELD
	.word	CFR_AUTOSCAN_FIELD
	.word	TMGCFG2
	.word	DMDMODCOD
	.word	DEMOD_MODCOD_FIELD
	.word	DEMOD_TYPE_FIELD
	.word	STV090x_QPSK_910
	.word	STV090x_8PSK_910
	.word	STV090x_SINGLE
	.word	ACLC2S2Q
	.word	STV090x_16APSK_910
	.word	ACLC2S216A
	.word	ACLC
	.word	BCLC
	.word	ACLC2S28
	.word	ACLC2S232A
	.size	stv090x_optimize_track, .-stv090x_optimize_track
	.comm	VITSCALE,4,4
	.comm	VAVSRVIT,4,4
	.comm	TMGOBS,4,4
	.comm	TMGCFG2,4,4
	.comm	STV090x_WARM_SEARCH,4,4
	.comm	STV090x_SINGLE,4,4
	.comm	STV090x_SEARCH_DVBS1,4,4
	.comm	STV090x_SEARCH_DSS,4,4
	.comm	STV090x_SEARCH_AUTO,4,4
	.comm	STV090x_QPSK_910,4,4
	.comm	STV090x_QPSK,4,4
	.comm	STV090x_PR12,4,4
	.comm	STV090x_LONG_FRAME,4,4
	.comm	STV090x_BLIND_SEARCH,4,4
	.comm	STV090x_8PSK_910,4,4
	.comm	STV090x_8PSK,4,4
	.comm	STV090x_32APSK,4,4
	.comm	STV090x_16APSK_910,4,4
	.comm	STV090x_16APSK,4,4
	.comm	SFRUP1,4,4
	.comm	SFRSTEP,4,4
	.comm	SFRLOW1,4,4
	.comm	SCAN_ENABLE_FIELD,4,4
	.comm	ROLLOFF_CONTROL_FIELD,4,4
	.comm	MANUAL_SXROLLOFF_FIELD,4,4
	.comm	GAUSSR0,4,4
	.comm	FE_ERROR,4,4
	.comm	ERRCTRL1,4,4
	.comm	DVBS2_ENABLE_FIELD,4,4
	.comm	DVBS1_ENABLE_FIELD,4,4
	.comm	DMDMODCOD,4,4
	.comm	DMDISTATE,4,4
	.comm	DMDCFGMD,4,4
	.comm	DEMOD_TYPE_FIELD,4,4
	.comm	DEMOD_MODCOD_FIELD,4,4
	.comm	DEMOD,4,4
	.comm	CFR_AUTOSCAN_FIELD,4,4
	.comm	CFRINIT1,4,4
	.comm	CFRINIT0,4,4
	.comm	CFR2,4,4
	.comm	CFR1,4,4
	.comm	CCIR0,4,4
	.comm	CARFREQ,4,4
	.comm	BCLC,4,4
	.comm	AGC2REF,4,4
	.comm	ACLC2S2Q,4,4
	.comm	ACLC2S28,4,4
	.comm	ACLC2S232A,4,4
	.comm	ACLC2S216A,4,4
	.comm	ACLC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
