	.file	"extr_stb0899_algo.c_stb0899_dvbs_algo.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Set the timing loop to acquisition"
	.align 8
.LC1:
	.string	"Derot Percent=%d Srate=%d mclk=%d"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"RESET stream merger"
.LC3:
	.string	"Tuner set frequency"
.LC4:
	.string	"current derot freq=%d"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"TIMING OK ! Derot freq=%d, mclk=%d"
	.align 8
.LC6:
	.string	"CARRIER OK ! Derot freq=%d, mclk=%d"
	.align 8
.LC7:
	.string	"DATA OK ! Derot freq=%d, mclk=%d"
	.align 8
.LC8:
	.string	"RANGE OK ! derot freq=%d, mclk=%d"
	.align 8
.LC9:
	.string	"freq=%d, internal resultant freq=%d"
	.section	.rodata.str1.1
.LC10:
	.string	"internal puncture rate=%d"
.LC11:
	.string	"Locked & Range OK !"
.LC12:
	.string	"Unsupported Puncture Rate"
	.text
	.p2align 4
	.globl	stb0899_dvbs_algo
	.type	stb0899_dvbs_algo, @function
stb0899_dvbs_algo:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 248
	.cfi_def_cfa_offset 304
	mov	r13, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 232[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 16[rdi], 1
	mov	DWORD PTR 4[rsp], 0
	mov	QWORD PTR 64[rsp], 37
	mov	QWORD PTR 72[rsp], 34
	mov	QWORD PTR 80[rsp], 32
	mov	QWORD PTR 88[rsp], 31
	mov	QWORD PTR 96[rsp], 37
	mov	QWORD PTR 104[rsp], 35
	mov	QWORD PTR 112[rsp], 33
	mov	QWORD PTR 120[rsp], 31
	mov	QWORD PTR 128[rsp], 37
	mov	QWORD PTR 136[rsp], 35
	mov	QWORD PTR 144[rsp], 33
	mov	QWORD PTR 152[rsp], 31
	mov	QWORD PTR 160[rsp], 37
	mov	QWORD PTR 168[rsp], 36
	mov	QWORD PTR 176[rsp], 33
	mov	QWORD PTR 184[rsp], 32
	mov	QWORD PTR 192[rsp], 37
	mov	QWORD PTR 200[rsp], 36
	mov	QWORD PTR 208[rsp], 33
	mov	QWORD PTR 216[rsp], 32
	mov	edx, DWORD PTR 120[rdi]
	mov	esi, DWORD PTR 112[rdi]
	call	stb0899_set_srate@PLT
	mov	eax, DWORD PTR 120[rbx]
	cmp	eax, 5000000
	jle	.L44
	mov	esi, DWORD PTR STB0899_ACLC[rip]
	cmp	eax, 15000000
	jle	.L45
	cmp	eax, 25000000
	jg	.L5
	mov	edx, 137
	mov	rdi, rbx
	mov	r14d, 2
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR BETA[rip]
	mov	edx, 39
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
.L3:
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 1
	xor	eax, eax
	lea	rcx, .LC0[rip]
	lea	rbp, 4[rbx]
	call	dprintk@PLT
	mov	esi, DWORD PTR STB0899_RTC[rip]
	mov	edx, 70
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_CFD[rip]
	mov	edx, 238
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 312
	push	QWORD PTR 32[rbx]
	.cfi_def_cfa_offset 320
	mov	r9d, DWORD PTR 120[rbx]
	mov	edi, DWORD PTR [rbx]
	lea	rcx, .LC1[rip]
	mov	edx, 1
	xor	eax, eax
	mov	r8, QWORD PTR 24[rbx]
	mov	esi, DWORD PTR FE_DEBUG[rip]
	call	dprintk@PLT
	movsx	rdi, DWORD PTR 120[rbx]
	imul	rax, rdi, 274877907
	mov	rdx, rdi
	sar	edx, 31
	sar	rax, 38
	sub	eax, edx
	cdqe
	imul	rax, QWORD PTR 24[rbx]
	cqo
	idiv	QWORD PTR 32[rbx]
	mov	QWORD PTR 40[rbx], rax
	call	stb0899_calc_derot_time@PLT
	mov	DWORD PTR 48[rbx], 500
	mov	edi, DWORD PTR [rbx]
	lea	rcx, .LC2[rip]
	mov	QWORD PTR 80[rbx], rax
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edx, 1
	xor	eax, eax
	call	dprintk@PLT
	mov	esi, DWORD PTR STB0899_TSTRES[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR FRESRS[rip]
	mov	edx, 1
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_TSTRES[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR DEMAPVIT_KDIVIDER[rip]
	mov	edx, 60
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_EQON[rip]
	mov	edx, 1
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_VITSYNC[rip]
	mov	edx, 25
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rdi, rbx
	call	stb0899_first_subrange@PLT
	pop	rax
	.cfi_def_cfa_offset 312
	pop	rdx
	.cfi_def_cfa_offset 304
	lea	r12, 8[rsp]
	.p2align 4,,10
	.p2align 3
.L17:
	mov	esi, DWORD PTR STB0899_CFRM[rip]
	mov	ecx, 2
	mov	rdx, r12
	mov	rdi, rbx
	mov	QWORD PTR 8[rsp], 0
	call	stb0899_write_regs@PLT
	mov	esi, DWORD PTR STB0899_RTF[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_CFD[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR CFD_ON[rip]
	mov	edx, 1
	mov	esi, eax
	mov	r15d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_CFD[rip]
	mov	edx, r15d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rax, QWORD PTR NOAGC1[rip]
	mov	esi, 1
	mov	rdi, rbp
	mov	DWORD PTR 64[rbx], 0
	mov	QWORD PTR 56[rbx], rax
	call	stb0899_i2c_gate_ctrl@PLT
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edi, DWORD PTR [rbx]
	xor	eax, eax
	mov	edx, 1
	lea	rcx, .LC3[rip]
	call	dprintk@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR 16[rax]
	test	rdx, rdx
	je	.L6
	mov	rsi, QWORD PTR 72[rbx]
	mov	rdi, rbp
	call	rdx
	mov	rax, QWORD PTR 8[rbx]
.L6:
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L7
	lea	rsi, 72[rbx]
	mov	rdi, rbp
	call	rax
.L7:
	mov	rdi, QWORD PTR 88[rbx]
	add	rdi, QWORD PTR 96[rbx]
	add	rdi, QWORD PTR 80[rbx]
	call	msleep@PLT
	mov	r8d, DWORD PTR 64[rbx]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 1
	mov	esi, DWORD PTR FE_DEBUG[rip]
	lea	rcx, .LC4[rip]
	xor	eax, eax
	call	dprintk@PLT
	mov	rax, QWORD PTR AGC1OK[rip]
	mov	QWORD PTR 56[rbx], rax
	mov	rax, QWORD PTR 0[r13]
	test	rax, rax
	je	.L8
	lea	rsi, 4[rsp]
	mov	rdi, rbp
	call	rax
.L8:
	mov	rdi, rbp
	xor	esi, esi
	call	stb0899_i2c_gate_ctrl@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	rdi, rbx
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR 120[rbx], eax
	jg	.L9
	call	stb0899_search_tmg@PLT
	mov	rax, QWORD PTR 56[rbx]
	cmp	rax, QWORD PTR TIMINGOK[rip]
	je	.L11
.L41:
	mov	rdx, QWORD PTR RANGEOK[rip]
.L12:
	cmp	rax, rdx
	jne	.L46
.L16:
	mov	esi, DWORD PTR STB0899_RTC[rip]
	mov	edx, 51
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_CFD[rip]
	mov	edx, 247
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rax, QWORD PTR 56[rbx]
	cmp	rax, QWORD PTR RANGEOK[rip]
	je	.L47
.L18:
	mov	rcx, QWORD PTR 232[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L48
	add	rsp, 248
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L45:
	.cfi_restore_state
	mov	edx, 201
	mov	rdi, rbx
	mov	r14d, 1
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR BETA[rip]
	mov	edx, 34
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	call	stb0899_check_tmg@PLT
	mov	rax, QWORD PTR 56[rbx]
	cmp	rax, QWORD PTR TIMINGOK[rip]
	jne	.L41
.L11:
	mov	r9, QWORD PTR 32[rbx]
	mov	r8d, DWORD PTR 64[rbx]
	mov	edx, 1
	xor	eax, eax
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edi, DWORD PTR [rbx]
	lea	rcx, .LC5[rip]
	call	dprintk@PLT
	mov	rdi, rbx
	call	stb0899_search_carrier@PLT
	cmp	rax, QWORD PTR CARRIEROK[rip]
	je	.L13
.L40:
	mov	rax, QWORD PTR 56[rbx]
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L46:
	mov	rdi, rbx
	call	next_sub_range@PLT
	cmp	QWORD PTR 104[rbx], 0
	je	.L16
	mov	rax, QWORD PTR RANGEOK[rip]
	cmp	QWORD PTR 56[rbx], rax
	jne	.L17
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L13:
	mov	r9, QWORD PTR 32[rbx]
	mov	r8d, DWORD PTR 64[rbx]
	mov	edx, 1
	xor	eax, eax
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edi, DWORD PTR [rbx]
	lea	rcx, .LC6[rip]
	call	dprintk@PLT
	mov	rdi, rbx
	call	stb0899_search_data@PLT
	cmp	rax, QWORD PTR DATAOK[rip]
	jne	.L40
	mov	r9, QWORD PTR 32[rbx]
	mov	r8d, DWORD PTR 64[rbx]
	mov	edx, 1
	xor	eax, eax
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edi, DWORD PTR [rbx]
	lea	rcx, .LC7[rip]
	call	dprintk@PLT
	mov	rdi, rbx
	call	stb0899_check_range@PLT
	mov	rdx, QWORD PTR RANGEOK[rip]
	cmp	rax, rdx
	je	.L15
	mov	rax, QWORD PTR 56[rbx]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L44:
	mov	esi, DWORD PTR STB0899_ACLC[rip]
	mov	edx, 137
	mov	rdi, rbx
	xor	r14d, r14d
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR BETA[rip]
	mov	edx, 28
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, 200
	mov	rdi, rbx
	mov	r14d, 3
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR BETA[rip]
	mov	edx, 41
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L47:
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 1
	xor	eax, eax
	lea	rcx, .LC11[rip]
	call	dprintk@PLT
	mov	esi, DWORD PTR STB0899_EQON[rip]
	mov	edx, 65
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_VITSYNC[rip]
	mov	edx, 57
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	r12d, eax
	mov	eax, DWORD PTR 68[rbx]
	add	eax, -128
	cmp	eax, 5
	ja	.L19
	lea	rdx, .L21[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L21:
	.long	.L26-.L21
	.long	.L25-.L21
	.long	.L24-.L21
	.long	.L23-.L21
	.long	.L22-.L21
	.long	.L20-.L21
	.text
.L22:
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	edx, 44
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rdx, QWORD PTR 96[rsp+r14*8]
.L42:
	mov	edi, DWORD PTR BETA[rip]
	mov	esi, r12d
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
.L27:
	mov	esi, DWORD PTR STB0899_TSTRES[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR FRESRS[rip]
	xor	edx, edx
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_TSTRES[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_CFD[rip]
	mov	rdi, rbx
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR CFD_ON[rip]
	xor	edx, edx
	mov	esi, eax
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	esi, DWORD PTR STB0899_CFD[rip]
	mov	edx, r12d
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_EQUAI1[rip]
	lea	rdx, 16[rsp]
	mov	rdi, rbx
	mov	ecx, 10
	call	stb0899_read_regs@PLT
	mov	rax, QWORD PTR 56[rbx]
	jmp	.L18
.L20:
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	edx, 26
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rdx, QWORD PTR 64[rsp+r14*8]
	jmp	.L42
.L26:
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	edx, 94
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rdx, QWORD PTR 192[rsp+r14*8]
	jmp	.L42
.L25:
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	rdi, rbx
	mov	edx, 88
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_ACLC[rip]
	mov	rdi, rbx
	mov	edx, 136
	call	stb0899_write_reg@PLT
	mov	esi, DWORD PTR STB0899_BCLC[rip]
	mov	edx, 154
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	jmp	.L27
.L24:
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	edx, 75
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rdx, QWORD PTR 160[rsp+r14*8]
	jmp	.L42
.L23:
	mov	esi, DWORD PTR STB0899_DEMAPVIT[rip]
	mov	edx, 60
	mov	rdi, rbx
	call	stb0899_write_reg@PLT
	mov	rdx, QWORD PTR 128[rsp+r14*8]
	jmp	.L42
.L19:
	mov	esi, DWORD PTR FE_DEBUG[rip]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 1
	xor	eax, eax
	lea	rcx, .LC12[rip]
	call	dprintk@PLT
	jmp	.L27
.L15:
	mov	r9, QWORD PTR 32[rbx]
	mov	r8d, DWORD PTR 64[rbx]
	mov	edx, 1
	xor	eax, eax
	mov	edi, DWORD PTR [rbx]
	mov	esi, DWORD PTR FE_DEBUG[rip]
	lea	rcx, .LC8[rip]
	call	dprintk@PLT
	movsx	rcx, DWORD PTR 64[rbx]
	imul	rcx, QWORD PTR 32[rbx]
	mov	rdi, rbx
	movabs	rax, 2361183241434822607
	mov	esi, DWORD PTR STB0899_PLPARM[rip]
	imul	rcx
	sar	rcx, 63
	mov	rax, rdx
	sar	rax, 7
	sub	rax, rcx
	add	rax, QWORD PTR 128[rbx]
	mov	QWORD PTR 72[rbx], rax
	call	stb0899_read_reg@PLT
	mov	edi, DWORD PTR VITCURPUN[rip]
	mov	esi, eax
	call	STB0899_GETFIELD@PLT
	mov	edi, DWORD PTR [rbx]
	mov	r9, QWORD PTR 72[rbx]
	mov	edx, 1
	mov	DWORD PTR 68[rbx], eax
	mov	r8, QWORD PTR 128[rbx]
	lea	rcx, .LC9[rip]
	xor	eax, eax
	mov	esi, DWORD PTR FE_DEBUG[rip]
	call	dprintk@PLT
	mov	r8d, DWORD PTR 68[rbx]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 1
	mov	esi, DWORD PTR FE_DEBUG[rip]
	lea	rcx, .LC10[rip]
	xor	eax, eax
	call	dprintk@PLT
	jmp	.L40
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	stb0899_dvbs_algo, .-stb0899_dvbs_algo
	.comm	VITCURPUN,4,4
	.comm	TIMINGOK,8,8
	.comm	STB0899_VITSYNC,4,4
	.comm	STB0899_TSTRES,4,4
	.comm	STB0899_RTF,4,4
	.comm	STB0899_RTC,4,4
	.comm	STB0899_PLPARM,4,4
	.comm	STB0899_EQUAI1,4,4
	.comm	STB0899_EQON,4,4
	.comm	STB0899_DEMAPVIT,4,4
	.comm	STB0899_CFRM,4,4
	.comm	STB0899_CFD,4,4
	.comm	STB0899_BCLC,4,4
	.comm	STB0899_ACLC,4,4
	.comm	RANGEOK,8,8
	.comm	NOAGC1,8,8
	.comm	FRESRS,4,4
	.comm	FE_DEBUG,4,4
	.comm	DEMAPVIT_KDIVIDER,4,4
	.comm	DATAOK,8,8
	.comm	CFD_ON,4,4
	.comm	CARRIEROK,8,8
	.comm	BETA,4,4
	.comm	AGC1OK,8,8
	.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_stb0899_algo.c_stb0899_dvbs_algo.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC1:
	.ascii	"Set the timing loop to acquisition\000"
	.align	2
.LC2:
	.ascii	"Derot Percent=%d Srate=%d mclk=%d\000"
	.global	__aeabi_idiv
	.align	2
.LC3:
	.ascii	"RESET stream merger\000"
	.align	2
.LC4:
	.ascii	"Tuner set frequency\000"
	.align	2
.LC5:
	.ascii	"current derot freq=%d\000"
	.align	2
.LC6:
	.ascii	"TIMING OK ! Derot freq=%d, mclk=%d\000"
	.align	2
.LC7:
	.ascii	"CARRIER OK ! Derot freq=%d, mclk=%d\000"
	.align	2
.LC8:
	.ascii	"DATA OK ! Derot freq=%d, mclk=%d\000"
	.align	2
.LC9:
	.ascii	"RANGE OK ! derot freq=%d, mclk=%d\000"
	.align	2
.LC10:
	.ascii	"freq=%d, internal resultant freq=%d\000"
	.align	2
.LC11:
	.ascii	"internal puncture rate=%d\000"
	.align	2
.LC12:
	.ascii	"Locked & Range OK !\000"
	.align	2
.LC13:
	.ascii	"Unsupported Puncture Rate\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	stb0899_dvbs_algo
	.syntax unified
	.arm
	.fpu softvfp
	.type	stb0899_dvbs_algo, %function
stb0899_dvbs_algo:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	mov	r5, #0
	mov	r6, #1
	ldr	r3, .L52
	sub	sp, sp, #188
	ldr	r3, [r3]
	str	r3, [sp, #180]
	mov	r3,#0
	ldr	r3, [r4, #8]
	mov	r2, #80
	ldr	r1, .L52+4
	add	r0, sp, #100
	str	r3, [sp, #24]
	str	r5, [sp, #48]
	bl	memcpy
	ldr	r2, [r4, #68]
	mov	r0, r4
	ldr	r1, [r4, #64]
	str	r6, [r4, #12]
	bl	stb0899_set_srate
	ldr	r3, [r4, #68]
	ldr	r2, .L52+8
	cmp	r3, r2
	ble	.L47
	ldr	r2, .L52+12
	ldr	r1, .L52+16
	cmp	r3, r2
	str	r1, [sp, #40]
	ldr	r1, [r1]
	ble	.L48
	ldr	r2, .L52+20
	ldr	r6, .L52+24
	cmp	r3, r2
	str	r6, [sp, #28]
	bgt	.L5
	mov	r2, #137
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r1, [r6]
	mov	r0, r4
	bl	stb0899_read_reg
	mov	r5, r0
	ldr	r3, .L52+28
	mov	r1, r0
	mov	r2, #39
	ldr	r0, [r3]
	str	r3, [sp, #36]
	bl	STB0899_SETFIELD_VAL
	mov	r2, r5
	mov	r0, r4
	ldr	r1, [r6]
	bl	stb0899_write_reg
	mov	r3, #2
	str	r3, [sp, #32]
.L3:
	ldr	r7, .L52+32
	mov	r2, #1
	ldr	r1, [r7]
	ldr	r3, .L52+36
	ldr	r0, [r4]
	bl	dprintk
	ldr	r3, .L52+40
	ldr	r9, .L52+44
	ldr	r1, [r3]
	mov	r2, #70
	mov	r0, r4
	bl	stb0899_write_reg
	mov	r2, #238
	ldr	r1, [r9]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r0, [r4, #20]
	ldr	r2, [r4, #68]
	ldr	r3, [r4, #16]
	ldr	r1, [r7]
	str	r2, [sp, #4]
	str	r3, [sp]
	str	r0, [sp, #8]
	ldr	r3, .L52+48
	mov	r2, #1
	ldr	r0, [r4]
	bl	dprintk
	ldr	r5, .L52+52
	ldr	r6, [r4, #68]
	ldr	r0, [r4, #16]
	smull	r3, r2, r5, r6
	asr	r3, r6, #31
	rsb	r3, r3, r2, asr #6
	ldr	r1, [r4, #20]
	mul	r0, r3, r0
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r0, r6
	str	r3, [r4, #24]
	bl	stb0899_calc_derot_time
	mov	r3, #500
	ldr	r8, .L52+56
	mov	r2, #1
	ldr	r1, [r7]
	str	r0, [r4, #48]
	str	r3, [r4, #28]
	ldr	r0, [r4]
	ldr	r3, .L52+60
	bl	dprintk
	ldr	r1, [r8]
	mov	r0, r4
	bl	stb0899_read_reg
	mov	r6, r0
	ldr	r3, .L52+64
	mov	r1, r0
	mov	r2, #1
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r1, [r8]
	ldr	r8, .L52+68
	mov	r2, r6
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r1, [r8]
	mov	r0, r4
	bl	stb0899_read_reg
	mov	r6, r0
	ldr	r3, .L52+72
	mov	r1, r0
	mov	r2, #60
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	mov	r2, r6
	ldr	r1, [r8]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r3, .L52+76
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r3, .L52+80
	mov	r2, #25
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	mov	r0, r4
	str	r5, [sp, #44]
	bl	stb0899_first_subrange
	ldr	fp, .L52+84
	ldr	r10, .L52+88
	ldr	r8, .L52+92
	add	r6, r4, #4
.L17:
	mov	r5, #0
	ldr	r1, .L52+96
	mov	r3, #2
	ldr	r1, [r1]
	add	r2, sp, #52
	mov	r0, r4
	str	r5, [sp, #56]
	str	r5, [sp, #52]
	bl	stb0899_write_regs
	ldr	r3, .L52+100
	mov	r2, r5
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r1, [r9]
	mov	r0, r4
	bl	stb0899_read_reg
	ldr	r3, .L52+104
	mov	r1, r0
	mov	r2, #1
	str	r0, [sp, #20]
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r1, [sp, #20]
	mov	r0, r4
	mov	r2, r1
	ldr	r1, [r9]
	bl	stb0899_write_reg
	ldr	r3, [fp]
	mov	r1, #1
	str	r3, [r4, #32]
	mov	r0, r6
	str	r5, [r4, #36]
	bl	stb0899_i2c_gate_ctrl
	mov	r2, #1
	ldr	r3, .L52+108
	ldr	r1, [r7]
	ldr	r0, [r4]
	bl	dprintk
	ldr	r3, [r4, #8]
	ldr	r2, [r3, #8]
	cmp	r2, r5
	beq	.L6
	mov	r0, r6
	ldr	r1, [r4, #44]
	blx	r2
	ldr	r3, [r4, #8]
.L6:
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L7
	mov	r0, r6
	add	r1, r4, #44
	blx	r3
.L7:
	add	r0, r4, #48
	ldm	r0, {r0, r2, r3}
	add	r3, r3, r2
	add	r0, r3, r0
	bl	msleep
	ldr	r2, [r4, #36]
	ldr	r3, .L52+112
	str	r2, [sp]
	ldr	r1, [r7]
	mov	r2, #1
	ldr	r0, [r4]
	bl	dprintk
	ldr	r3, [sp, #24]
	ldr	r2, [r10]
	ldr	r3, [r3]
	str	r2, [r4, #32]
	cmp	r3, #0
	beq	.L8
	mov	r0, r6
	add	r1, sp, #48
	blx	r3
.L8:
	mov	r1, #0
	mov	r0, r6
	bl	stb0899_i2c_gate_ctrl
	ldr	r3, [sp, #48]
	ldr	r2, [r4, #68]
	add	r3, r3, r3, lsr #31
	cmp	r2, r3, asr #1
	mov	r0, r4
	bgt	.L9
	bl	stb0899_search_tmg
.L10:
	ldr	r2, .L52+116
	ldr	r3, [r4, #32]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L11
.L44:
	ldr	r2, [r8]
.L12:
	cmp	r3, r2
	bne	.L49
.L16:
	ldr	r3, .L52+40
	mov	r2, #51
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	mov	r2, #247
	mov	r0, r4
	ldr	r1, [r9]
	bl	stb0899_write_reg
	ldr	r3, [r8]
	ldr	r0, [r4, #32]
	cmp	r0, r3
	beq	.L50
.L18:
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, [sp, #180]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L51
	add	sp, sp, #188
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L48:
	ldr	r7, .L52+24
	mov	r2, #201
	mov	r0, r4
	str	r7, [sp, #28]
	bl	stb0899_write_reg
	ldr	r1, [r7]
	mov	r0, r4
	bl	stb0899_read_reg
	mov	r5, r0
	ldr	r3, .L52+28
	mov	r1, r0
	mov	r2, #34
	ldr	r0, [r3]
	str	r3, [sp, #36]
	bl	STB0899_SETFIELD_VAL
	mov	r2, r5
	mov	r0, r4
	ldr	r1, [r7]
	str	r6, [sp, #32]
	bl	stb0899_write_reg
	b	.L3
.L9:
	bl	stb0899_check_tmg
	b	.L10
.L49:
	mov	r0, r4
	bl	next_sub_range
	ldr	r3, [r4, #60]
	cmp	r3, #0
	beq	.L16
	ldr	r2, [r4, #32]
	ldr	r3, [r8]
	cmp	r2, r3
	bne	.L17
	b	.L16
.L11:
	ldr	r2, [r4, #20]
	ldr	r3, [r4, #36]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r2, #1
	ldr	r3, .L52+120
	ldr	r1, [r7]
	ldr	r0, [r4]
	bl	dprintk
	mov	r0, r4
	bl	stb0899_search_carrier
	ldr	r3, .L52+124
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L13
.L43:
	ldr	r3, [r4, #32]
	b	.L44
.L13:
	ldr	r2, [r4, #20]
	ldr	r3, [r4, #36]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r2, #1
	ldr	r3, .L52+128
	ldr	r1, [r7]
	ldr	r0, [r4]
	bl	dprintk
	mov	r0, r4
	bl	stb0899_search_data
	ldr	r3, .L52+132
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L43
	ldr	r2, [r4, #20]
	ldr	r3, [r4, #36]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r2, #1
	ldr	r3, .L52+136
	ldr	r1, [r7]
	ldr	r0, [r4]
	bl	dprintk
	mov	r0, r4
	bl	stb0899_check_range
	ldr	r2, [r8]
	cmp	r0, r2
	beq	.L15
	ldr	r3, [r4, #32]
	b	.L12
.L47:
	ldr	r3, .L52+16
	ldr	r7, .L52+24
	ldr	r1, [r3]
	mov	r2, #137
	mov	r0, r4
	str	r3, [sp, #40]
	str	r7, [sp, #28]
	bl	stb0899_write_reg
	ldr	r1, [r7]
	mov	r0, r4
	bl	stb0899_read_reg
	mov	r6, r0
	ldr	r3, .L52+28
	mov	r1, r0
	mov	r2, #28
	ldr	r0, [r3]
	str	r3, [sp, #36]
	bl	STB0899_SETFIELD_VAL
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7]
	str	r5, [sp, #32]
	bl	stb0899_write_reg
	b	.L3
.L5:
	mov	r2, #200
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r1, [r6]
	mov	r0, r4
	bl	stb0899_read_reg
	mov	r5, r0
	ldr	r3, .L52+28
	mov	r1, r0
	mov	r2, #41
	ldr	r0, [r3]
	str	r3, [sp, #36]
	bl	STB0899_SETFIELD_VAL
	mov	r2, r5
	mov	r0, r4
	ldr	r1, [r6]
	bl	stb0899_write_reg
	mov	r3, #3
	str	r3, [sp, #32]
	b	.L3
.L50:
	mov	r2, #1
	ldr	r3, .L52+140
	ldr	r1, [r7]
	ldr	r0, [r4]
	bl	dprintk
	ldr	r3, .L52+76
	mov	r2, #65
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r3, .L52+80
	mov	r2, #57
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r3, [sp, #28]
	mov	r0, r4
	ldr	r1, [r3]
	bl	stb0899_read_reg
	ldr	r3, [r4, #40]
	mov	r5, r0
	sub	r3, r3, #128
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L19
.L21:
	.word	.L26
	.word	.L25
	.word	.L24
	.word	.L23
	.word	.L22
	.word	.L20
.L20:
	ldr	r3, .L52+68
	mov	r2, #26
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r2, [sp, #32]
	add	r3, sp, #184
	add	r3, r3, r2, lsl #2
	ldr	r2, [r3, #-84]
.L45:
	ldr	r3, [sp, #36]
	mov	r1, r5
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, [sp, #28]
	mov	r2, r5
	mov	r0, r4
	ldr	r1, [r3]
	bl	stb0899_write_reg
.L27:
	ldr	r6, .L52+56
	mov	r0, r4
	ldr	r1, [r6]
	bl	stb0899_read_reg
	mov	r5, r0
	ldr	r3, .L52+64
	mov	r1, r5
	ldr	r0, [r3]
	mov	r2, #0
	bl	STB0899_SETFIELD_VAL
	mov	r2, r5
	ldr	r1, [r6]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r1, [r9]
	mov	r0, r4
	bl	stb0899_read_reg
	mov	r5, r0
	ldr	r3, .L52+104
	mov	r1, r5
	ldr	r0, [r3]
	mov	r2, #0
	bl	STB0899_SETFIELD_VAL
	mov	r2, r5
	ldr	r1, [r9]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r2, .L52+144
	mov	r3, #10
	ldr	r1, [r2]
	mov	r0, r4
	add	r2, sp, #60
	bl	stb0899_read_regs
	ldr	r0, [r4, #32]
	b	.L18
.L26:
	ldr	r3, .L52+68
	mov	r2, #94
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r2, [sp, #32]
	add	r3, sp, #184
	add	r3, r3, r2, lsl #2
	ldr	r2, [r3, #-20]
	b	.L45
.L25:
	ldr	r3, .L52+68
	mov	r2, #88
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r3, [sp, #40]
	mov	r2, #136
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r3, [sp, #28]
	mov	r2, #154
	mov	r0, r4
	ldr	r1, [r3]
	bl	stb0899_write_reg
	b	.L27
.L24:
	ldr	r3, .L52+68
	mov	r2, #75
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r2, [sp, #32]
	add	r3, sp, #184
	add	r3, r3, r2, lsl #2
	ldr	r2, [r3, #-36]
	b	.L45
.L23:
	ldr	r3, .L52+68
	mov	r2, #60
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r2, [sp, #32]
	add	r3, sp, #184
	add	r3, r3, r2, lsl #2
	ldr	r2, [r3, #-52]
	b	.L45
.L22:
	ldr	r3, .L52+68
	mov	r2, #44
	ldr	r1, [r3]
	mov	r0, r4
	bl	stb0899_write_reg
	ldr	r2, [sp, #32]
	add	r3, sp, #184
	add	r3, r3, r2, lsl #2
	ldr	r2, [r3, #-68]
	b	.L45
.L15:
	ldr	r2, [r4, #20]
	ldr	r3, [r4, #36]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r1, [r7]
	mov	r2, #1
	ldr	r3, .L52+148
	ldr	r0, [r4]
	bl	dprintk
	ldr	r2, [r4, #20]
	ldr	r3, [r4, #36]
	ldr	r1, [r4, #72]
	mul	r3, r2, r3
	ldr	r2, [sp, #44]
	smull	r0, r2, r3, r2
	asr	r3, r3, #31
	rsb	r3, r3, r2, asr #6
	ldr	r2, .L52+152
	add	r3, r3, r1
	str	r3, [r4, #44]
	ldr	r1, [r2]
	mov	r0, r4
	bl	stb0899_read_reg
	ldr	r3, .L52+156
	mov	r1, r0
	ldr	r0, [r3]
	bl	STB0899_GETFIELD
	ldr	r2, [r4, #44]
	ldr	r3, [r4, #72]
	str	r0, [r4, #40]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r1, [r7]
	mov	r2, #1
	ldr	r3, .L52+160
	ldr	r0, [r4]
	bl	dprintk
	ldr	r2, [r4, #40]
	ldr	r3, .L52+164
	str	r2, [sp]
	ldr	r1, [r7]
	mov	r2, #1
	ldr	r0, [r4]
	bl	dprintk
	b	.L43
.L51:
	bl	__stack_chk_fail
.L19:
	mov	r2, #1
	ldr	r1, [r7]
	ldr	r3, .L52+168
	ldr	r0, [r4]
	bl	dprintk
	b	.L27
.L53:
	.align	2
.L52:
	.word	.LC14
	.word	.LANCHOR0
	.word	5000000
	.word	15000000
	.word	STB0899_ACLC
	.word	25000000
	.word	STB0899_BCLC
	.word	BETA
	.word	FE_DEBUG
	.word	.LC1
	.word	STB0899_RTC
	.word	STB0899_CFD
	.word	.LC2
	.word	274877907
	.word	STB0899_TSTRES
	.word	.LC3
	.word	FRESRS
	.word	STB0899_DEMAPVIT
	.word	DEMAPVIT_KDIVIDER
	.word	STB0899_EQON
	.word	STB0899_VITSYNC
	.word	NOAGC1
	.word	AGC1OK
	.word	RANGEOK
	.word	STB0899_CFRM
	.word	STB0899_RTF
	.word	CFD_ON
	.word	.LC4
	.word	.LC5
	.word	TIMINGOK
	.word	.LC6
	.word	CARRIEROK
	.word	.LC7
	.word	DATAOK
	.word	.LC8
	.word	.LC12
	.word	STB0899_EQUAI1
	.word	.LC9
	.word	STB0899_PLPARM
	.word	VITCURPUN
	.word	.LC10
	.word	.LC11
	.word	.LC13
	.size	stb0899_dvbs_algo, .-stb0899_dvbs_algo
	.comm	VITCURPUN,4,4
	.comm	TIMINGOK,4,4
	.comm	STB0899_VITSYNC,4,4
	.comm	STB0899_TSTRES,4,4
	.comm	STB0899_RTF,4,4
	.comm	STB0899_RTC,4,4
	.comm	STB0899_PLPARM,4,4
	.comm	STB0899_EQUAI1,4,4
	.comm	STB0899_EQON,4,4
	.comm	STB0899_DEMAPVIT,4,4
	.comm	STB0899_CFRM,4,4
	.comm	STB0899_CFD,4,4
	.comm	STB0899_BCLC,4,4
	.comm	STB0899_ACLC,4,4
	.comm	RANGEOK,4,4
	.comm	NOAGC1,4,4
	.comm	FRESRS,4,4
	.comm	FE_DEBUG,4,4
	.comm	DEMAPVIT_KDIVIDER,4,4
	.comm	DATAOK,4,4
	.comm	CFD_ON,4,4
	.comm	CARRIEROK,4,4
	.comm	BETA,4,4
	.comm	AGC1OK,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC0:
	.word	37
	.word	34
	.word	32
	.word	31
	.word	37
	.word	35
	.word	33
	.word	31
	.word	37
	.word	35
	.word	33
	.word	31
	.word	37
	.word	36
	.word	33
	.word	32
	.word	37
	.word	36
	.word	33
	.word	32
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
