	.file	"extr_stb0899_algo.c_stb0899_dvbs2_init_csm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	stb0899_dvbs2_init_csm, @function
stb0899_dvbs2_init_csm:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	mov	ecx, edx
	cdq
	idiv	DWORD PTR 4[rdi]
	cmp	eax, 4
	jg	.L1
	cmp	ecx, 11
	ja	.L1
	cmp	esi, 1
	je	.L13
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	esi, DWORD PTR CSM_CNTRL1[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	mov	edi, DWORD PTR STB0899_S2DEMOD[rip]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	STB0899_READ_S2REG@PLT
	mov	edi, DWORD PTR CSM_AUTO_PARAM[rip]
	xor	edx, edx
	mov	esi, eax
	mov	ebx, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	ecx, DWORD PTR STB0899_OFF0_CSM_CNTRL1[rip]
	mov	r8d, ebx
	mov	rdi, rbp
	mov	edx, DWORD PTR STB0899_BASE_CSM_CNTRL1[rip]
	mov	esi, DWORD PTR STB0899_S2DEMOD[rip]
	call	stb0899_write_s2reg@PLT
	mov	esi, DWORD PTR CSM_CNTRL1[rip]
	mov	edi, DWORD PTR STB0899_S2DEMOD[rip]
	call	STB0899_READ_S2REG@PLT
	mov	esi, DWORD PTR CSM_CNTRL2[rip]
	mov	edi, DWORD PTR STB0899_S2DEMOD[rip]
	mov	ebx, eax
	call	STB0899_READ_S2REG@PLT
	mov	esi, DWORD PTR CSM_CNTRL3[rip]
	mov	edi, DWORD PTR STB0899_S2DEMOD[rip]
	mov	r14d, eax
	call	STB0899_READ_S2REG@PLT
	mov	esi, DWORD PTR CSM_CNTRL4[rip]
	mov	edi, DWORD PTR STB0899_S2DEMOD[rip]
	mov	r13d, eax
	call	STB0899_READ_S2REG@PLT
	mov	edi, DWORD PTR CSM_DVT_TABLE[rip]
	mov	esi, ebx
	mov	edx, 1
	mov	r12d, eax
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_TWO_PASS[rip]
	mov	esi, ebx
	xor	edx, edx
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_AGC_GAIN[rip]
	mov	esi, ebx
	mov	edx, 6
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_AGC_SHIFT[rip]
	mov	esi, ebx
	xor	edx, edx
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR FE_LOOP_SHIFT[rip]
	mov	esi, ebx
	xor	edx, edx
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_GAMMA_ACQ[rip]
	mov	esi, r14d
	mov	edx, 66
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_GAMMA_RHOACQ[rip]
	mov	esi, r14d
	mov	edx, 29634
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_GAMMA_TRACK[rip]
	mov	esi, r13d
	mov	edx, 24
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_GAMMA_RHOTRACK[rip]
	mov	esi, r13d
	mov	edx, 1176
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_LOCKCOUNT_THRESH[rip]
	mov	esi, r12d
	mov	edx, 8
	call	STB0899_SETFIELD_VAL@PLT
	mov	edi, DWORD PTR CSM_PHASEDIFF_THRESH[rip]
	mov	esi, r12d
	mov	edx, 128
	call	STB0899_SETFIELD_VAL@PLT
	mov	ecx, DWORD PTR STB0899_OFF0_CSM_CNTRL1[rip]
	mov	r8d, ebx
	mov	rdi, rbp
	mov	edx, DWORD PTR STB0899_BASE_CSM_CNTRL1[rip]
	mov	esi, DWORD PTR STB0899_S2DEMOD[rip]
	call	stb0899_write_s2reg@PLT
	mov	ecx, DWORD PTR STB0899_OFF0_CSM_CNTRL2[rip]
	mov	r8d, r14d
	mov	rdi, rbp
	mov	edx, DWORD PTR STB0899_BASE_CSM_CNTRL2[rip]
	mov	esi, DWORD PTR STB0899_S2DEMOD[rip]
	call	stb0899_write_s2reg@PLT
	mov	ecx, DWORD PTR STB0899_OFF0_CSM_CNTRL3[rip]
	mov	r8d, r13d
	mov	rdi, rbp
	mov	edx, DWORD PTR STB0899_BASE_CSM_CNTRL3[rip]
	mov	esi, DWORD PTR STB0899_S2DEMOD[rip]
	call	stb0899_write_s2reg@PLT
	mov	ecx, DWORD PTR STB0899_OFF0_CSM_CNTRL4[rip]
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 40
	mov	r8d, r12d
	mov	edx, DWORD PTR STB0899_BASE_CSM_CNTRL4[rip]
	mov	esi, DWORD PTR STB0899_S2DEMOD[rip]
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 8
	jmp	stb0899_write_s2reg@PLT
	.cfi_endproc
.LFE0:
	.size	stb0899_dvbs2_init_csm, .-stb0899_dvbs2_init_csm
	.comm	STB0899_S2DEMOD,4,4
	.comm	STB0899_OFF0_CSM_CNTRL4,4,4
	.comm	STB0899_OFF0_CSM_CNTRL3,4,4
	.comm	STB0899_OFF0_CSM_CNTRL2,4,4
	.comm	STB0899_OFF0_CSM_CNTRL1,4,4
	.comm	STB0899_BASE_CSM_CNTRL4,4,4
	.comm	STB0899_BASE_CSM_CNTRL3,4,4
	.comm	STB0899_BASE_CSM_CNTRL2,4,4
	.comm	STB0899_BASE_CSM_CNTRL1,4,4
	.comm	FE_LOOP_SHIFT,4,4
	.comm	CSM_TWO_PASS,4,4
	.comm	CSM_PHASEDIFF_THRESH,4,4
	.comm	CSM_LOCKCOUNT_THRESH,4,4
	.comm	CSM_GAMMA_TRACK,4,4
	.comm	CSM_GAMMA_RHOTRACK,4,4
	.comm	CSM_GAMMA_RHOACQ,4,4
	.comm	CSM_GAMMA_ACQ,4,4
	.comm	CSM_DVT_TABLE,4,4
	.comm	CSM_CNTRL4,4,4
	.comm	CSM_CNTRL3,4,4
	.comm	CSM_CNTRL2,4,4
	.comm	CSM_CNTRL1,4,4
	.comm	CSM_AUTO_PARAM,4,4
	.comm	CSM_AGC_SHIFT,4,4
	.comm	CSM_AGC_GAIN,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_stb0899_algo.c_stb0899_dvbs2_init_csm.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stb0899_dvbs2_init_csm, %function
stb0899_dvbs2_init_csm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	mov	r5, r1
	ldm	r0, {r0, r1}
	sub	sp, sp, #12
	mov	r6, r2
	bl	__aeabi_idiv
	cmp	r0, #4
	bgt	.L1
	cmp	r6, #11
	cmpls	r5, #1
	beq	.L8
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	ldr	r5, .L9
	ldr	r7, .L9+4
	ldr	r0, [r5]
	ldr	r1, [r7]
	bl	STB0899_READ_S2REG
	mov	r6, r0
	ldr	r3, .L9+8
	mov	r1, r0
	ldr	fp, .L9+12
	ldr	r10, .L9+16
	mov	r2, #0
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	str	r6, [sp]
	ldr	r2, [r10]
	ldr	r3, [fp]
	ldr	r1, [r5]
	mov	r0, r4
	bl	stb0899_write_s2reg
	ldr	r1, [r7]
	ldr	r0, [r5]
	bl	STB0899_READ_S2REG
	ldr	r3, .L9+20
	mov	r6, r0
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	STB0899_READ_S2REG
	ldr	r3, .L9+24
	mov	r9, r0
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	STB0899_READ_S2REG
	ldr	r3, .L9+28
	mov	r8, r0
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	STB0899_READ_S2REG
	mov	r7, r0
	ldr	r3, .L9+32
	mov	r1, r6
	mov	r2, #1
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+36
	mov	r1, r6
	mov	r2, #0
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+40
	mov	r1, r6
	mov	r2, #6
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+44
	mov	r1, r6
	mov	r2, #0
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+48
	mov	r1, r6
	mov	r2, #0
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+52
	mov	r1, r9
	mov	r2, #66
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+56
	mov	r1, r9
	ldr	r0, [r3]
	ldr	r2, .L9+60
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+64
	mov	r1, r8
	mov	r2, #24
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+68
	mov	r1, r8
	ldr	r0, [r3]
	ldr	r2, .L9+72
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+76
	mov	r1, r7
	mov	r2, #8
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	ldr	r3, .L9+80
	mov	r1, r7
	mov	r2, #128
	ldr	r0, [r3]
	bl	STB0899_SETFIELD_VAL
	str	r6, [sp]
	ldr	r3, [fp]
	ldr	r2, [r10]
	ldr	r1, [r5]
	mov	r0, r4
	bl	stb0899_write_s2reg
	ldr	r3, .L9+84
	ldr	r2, .L9+88
	str	r9, [sp]
	ldr	r1, [r5]
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	stb0899_write_s2reg
	ldr	r3, .L9+92
	ldr	r2, .L9+96
	str	r8, [sp]
	ldr	r1, [r5]
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	stb0899_write_s2reg
	ldr	r3, .L9+100
	ldr	r2, .L9+104
	str	r7, [sp]
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	stb0899_write_s2reg
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	.align	2
.L9:
	.word	STB0899_S2DEMOD
	.word	CSM_CNTRL1
	.word	CSM_AUTO_PARAM
	.word	STB0899_OFF0_CSM_CNTRL1
	.word	STB0899_BASE_CSM_CNTRL1
	.word	CSM_CNTRL2
	.word	CSM_CNTRL3
	.word	CSM_CNTRL4
	.word	CSM_DVT_TABLE
	.word	CSM_TWO_PASS
	.word	CSM_AGC_GAIN
	.word	CSM_AGC_SHIFT
	.word	FE_LOOP_SHIFT
	.word	CSM_GAMMA_ACQ
	.word	CSM_GAMMA_RHOACQ
	.word	29634
	.word	CSM_GAMMA_TRACK
	.word	CSM_GAMMA_RHOTRACK
	.word	1176
	.word	CSM_LOCKCOUNT_THRESH
	.word	CSM_PHASEDIFF_THRESH
	.word	STB0899_OFF0_CSM_CNTRL2
	.word	STB0899_BASE_CSM_CNTRL2
	.word	STB0899_OFF0_CSM_CNTRL3
	.word	STB0899_BASE_CSM_CNTRL3
	.word	STB0899_OFF0_CSM_CNTRL4
	.word	STB0899_BASE_CSM_CNTRL4
	.size	stb0899_dvbs2_init_csm, .-stb0899_dvbs2_init_csm
	.comm	STB0899_S2DEMOD,4,4
	.comm	STB0899_OFF0_CSM_CNTRL4,4,4
	.comm	STB0899_OFF0_CSM_CNTRL3,4,4
	.comm	STB0899_OFF0_CSM_CNTRL2,4,4
	.comm	STB0899_OFF0_CSM_CNTRL1,4,4
	.comm	STB0899_BASE_CSM_CNTRL4,4,4
	.comm	STB0899_BASE_CSM_CNTRL3,4,4
	.comm	STB0899_BASE_CSM_CNTRL2,4,4
	.comm	STB0899_BASE_CSM_CNTRL1,4,4
	.comm	FE_LOOP_SHIFT,4,4
	.comm	CSM_TWO_PASS,4,4
	.comm	CSM_PHASEDIFF_THRESH,4,4
	.comm	CSM_LOCKCOUNT_THRESH,4,4
	.comm	CSM_GAMMA_TRACK,4,4
	.comm	CSM_GAMMA_RHOTRACK,4,4
	.comm	CSM_GAMMA_RHOACQ,4,4
	.comm	CSM_GAMMA_ACQ,4,4
	.comm	CSM_DVT_TABLE,4,4
	.comm	CSM_CNTRL4,4,4
	.comm	CSM_CNTRL3,4,4
	.comm	CSM_CNTRL2,4,4
	.comm	CSM_CNTRL1,4,4
	.comm	CSM_AUTO_PARAM,4,4
	.comm	CSM_AGC_SHIFT,4,4
	.comm	CSM_AGC_GAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
