	.file	"extr_stv090x.c_stv090x_setup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Initializing STV0900"
.LC1:
	.string	"Initializing STV0903"
.LC2:
	.string	"Setting up initial values"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"Setting up Cut 2.0 initial values"
	.align 8
.LC4:
	.string	"ERROR: Unsupported Cut: 0x%02x!"
	.section	.rodata.str1.1
.LC5:
	.string	"I/O error"
	.text
	.p2align 4
	.type	stv090x_setup, @function
stv090x_setup:
.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
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbp, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rdi
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR STV0900[rip]
	mov	r15, QWORD PTR 16[rbp]
	je	.L24
	cmp	rax, QWORD PTR STV0903[rip]
	je	.L25
	mov	QWORD PTR [rsp], 0
	xor	r12d, r12d
	xor	r13d, r13d
	xor	ebx, ebx
.L3:
	mov	esi, DWORD PTR STV090x_P1_DMDISTATE[rip]
	mov	edx, 92
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	esi, DWORD PTR STV090x_P2_DMDISTATE[rip]
	mov	edx, 92
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	edi, 5
	call	msleep@PLT
	mov	esi, DWORD PTR STV090x_P1_TNRCFG[rip]
	mov	edx, 108
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	esi, DWORD PTR STV090x_P2_TNRCFG[rip]
	mov	edx, 108
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	edx, DWORD PTR 32[r15]
	mov	esi, DWORD PTR ENARPT_LEVEL_FIELD[rip]
	xor	edi, edi
	call	STV090x_SETFIELD_Px@PLT
	mov	esi, DWORD PTR STV090x_P1_I2CRPT[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	esi, DWORD PTR STV090x_P2_I2CRPT[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	esi, DWORD PTR STV090x_NCOARSE[rip]
	mov	edx, 19
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	edi, 5
	call	msleep@PLT
	mov	esi, DWORD PTR STV090x_I2CCFG[rip]
	mov	edx, 8
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	edx, DWORD PTR [r15]
	mov	esi, DWORD PTR STV090x_SYNTCTRL[rip]
	mov	rdi, rbp
	or	edx, 32
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	edi, 5
	call	msleep@PLT
	mov	edi, DWORD PTR FE_DEBUG[rip]
	xor	eax, eax
	lea	rdx, .LC2[rip]
	mov	esi, 1
	call	dprintk@PLT
	test	r12, r12
	je	.L5
	xor	r14d, r14d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	add	r14, 1
	cmp	r12, r14
	je	.L5
.L6:
	mov	edx, DWORD PTR [rbx+r14*8]
	mov	esi, DWORD PTR 4[rbx+r14*8]
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	jns	.L26
.L10:
	mov	edi, DWORD PTR FE_ERROR[rip]
	lea	rdx, .LC5[rip]
	mov	esi, 1
	xor	eax, eax
	mov	r12d, -1
	call	dprintk@PLT
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L5:
	.cfi_restore_state
	mov	esi, DWORD PTR STV090x_MID[rip]
	mov	rdi, rbp
	call	stv090x_read_reg@PLT
	mov	rdx, QWORD PTR 8[rbp]
	mov	DWORD PTR [rdx], eax
	cmp	eax, 31
	jle	.L7
	mov	esi, DWORD PTR STV090x_TSGENERAL[rip]
	mov	edx, 12
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	edi, DWORD PTR FE_DEBUG[rip]
	xor	eax, eax
	mov	esi, 1
	lea	rdx, .LC3[rip]
	call	dprintk@PLT
	cmp	QWORD PTR [rsp], 0
	je	.L8
	xor	ebx, ebx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	add	rbx, 1
	cmp	QWORD PTR [rsp], rbx
	je	.L8
.L9:
	mov	edx, DWORD PTR 0[r13+rbx*8]
	mov	esi, DWORD PTR 4[r13+rbx*8]
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	jns	.L27
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR STV090x_TSTTNR1[rip]
	mov	rdi, rbp
	call	stv090x_read_reg@PLT
	mov	esi, DWORD PTR ADC1_INMODE_FIELD[rip]
	xor	edx, edx
	mov	rbx, rax
	mov	rax, QWORD PTR STV090x_ADC_1Vpp[rip]
	cmp	QWORD PTR 8[r15], rax
	setne	dl
	mov	edi, ebx
	call	STV090x_SETFIELD@PLT
	mov	esi, DWORD PTR STV090x_TSTTNR1[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	esi, DWORD PTR STV090x_TSTTNR3[rip]
	mov	rdi, rbp
	call	stv090x_read_reg@PLT
	mov	esi, DWORD PTR ADC2_INMODE_FIELD[rip]
	xor	edx, edx
	mov	rbx, rax
	mov	rax, QWORD PTR STV090x_ADC_1Vpp[rip]
	cmp	QWORD PTR 16[r15], rax
	setne	dl
	mov	edi, ebx
	call	STV090x_SETFIELD@PLT
	mov	esi, DWORD PTR STV090x_TSTTNR3[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	esi, DWORD PTR STV090x_TSTRES0[rip]
	mov	edx, 128
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	mov	esi, DWORD PTR STV090x_TSTRES0[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	stv090x_write_reg@PLT
	test	rax, rax
	js	.L10
	xor	r12d, r12d
	cmp	QWORD PTR 24[r15], 0
	je	.L1
	mov	esi, DWORD PTR SEC_MINI_A[rip]
	mov	rdi, QWORD PTR 8[rsp]
	call	stv090x_send_diseqc_burst@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR FE_DEBUG[rip]
	lea	rdx, .LC0[rip]
	mov	esi, 1
	xor	eax, eax
	call	dprintk@PLT
	mov	rbx, QWORD PTR stv0900_initval[rip]
	mov	rdi, rbx
	call	ARRAY_SIZE@PLT
	mov	r13, QWORD PTR stv0900_cut20_val[rip]
	mov	r12, rax
	mov	rdi, r13
	call	ARRAY_SIZE@PLT
	mov	QWORD PTR [rsp], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR FE_DEBUG[rip]
	lea	rdx, .LC1[rip]
	mov	esi, 1
	xor	eax, eax
	call	dprintk@PLT
	mov	rbx, QWORD PTR stv0903_initval[rip]
	mov	rdi, rbx
	call	ARRAY_SIZE@PLT
	mov	r13, QWORD PTR stv0903_cut20_val[rip]
	mov	r12, rax
	mov	rdi, r13
	call	ARRAY_SIZE@PLT
	mov	QWORD PTR [rsp], rax
	jmp	.L3
.L7:
	mov	edi, DWORD PTR FE_ERROR[rip]
	mov	ecx, eax
	mov	esi, 1
	xor	eax, eax
	lea	rdx, .LC4[rip]
	call	dprintk@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	stv090x_setup, .-stv090x_setup
	.comm	stv0903_initval,8,8
	.comm	stv0903_cut20_val,8,8
	.comm	stv0900_initval,8,8
	.comm	stv0900_cut20_val,8,8
	.comm	STV090x_TSTTNR3,4,4
	.comm	STV090x_TSTTNR1,4,4
	.comm	STV090x_TSTRES0,4,4
	.comm	STV090x_TSGENERAL,4,4
	.comm	STV090x_SYNTCTRL,4,4
	.comm	STV090x_P2_TNRCFG,4,4
	.comm	STV090x_P2_I2CRPT,4,4
	.comm	STV090x_P2_DMDISTATE,4,4
	.comm	STV090x_P1_TNRCFG,4,4
	.comm	STV090x_P1_I2CRPT,4,4
	.comm	STV090x_P1_DMDISTATE,4,4
	.comm	STV090x_NCOARSE,4,4
	.comm	STV090x_MID,4,4
	.comm	STV090x_I2CCFG,4,4
	.comm	STV090x_ADC_1Vpp,8,8
	.comm	STV0903,8,8
	.comm	STV0900,8,8
	.comm	SEC_MINI_A,4,4
	.comm	FE_ERROR,4,4
	.comm	FE_DEBUG,4,4
	.comm	ENARPT_LEVEL_FIELD,4,4
	.comm	ADC2_INMODE_FIELD,4,4
	.comm	ADC1_INMODE_FIELD,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_setup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Initializing STV0900\000"
	.align	2
.LC1:
	.ascii	"Initializing STV0903\000"
	.align	2
.LC2:
	.ascii	"Setting up initial values\000"
	.align	2
.LC3:
	.ascii	"Setting up Cut 2.0 initial values\000"
	.align	2
.LC4:
	.ascii	"ERROR: Unsupported Cut: 0x%02x!\000"
	.align	2
.LC5:
	.ascii	"I/O error\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stv090x_setup, %function
stv090x_setup:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L63
	ldr	r5, [r0]
	ldr	r2, [r3]
	ldr	r3, [r5]
	mov	r9, r0
	cmp	r3, r2
	ldr	r10, [r5, #8]
	sub	sp, sp, #12
	beq	.L61
	ldr	r2, .L63+4
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L62
	mov	r8, #0
	mov	r7, r8
	mov	r4, r8
	str	r8, [sp, #4]
.L3:
	ldr	r3, .L63+8
	mov	r2, #92
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r3, .L63+12
	mov	r2, #92
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	mov	r0, #5
	bl	msleep
	ldr	r3, .L63+16
	mov	r2, #108
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r3, .L63+20
	mov	r2, #108
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r3, .L63+24
	ldr	r2, [r10, #16]
	ldr	r1, [r3]
	mov	r0, #0
	bl	STV090x_SETFIELD_Px
	ldr	r3, .L63+28
	mov	r2, #0
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r3, .L63+32
	mov	r2, #0
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r3, .L63+36
	mov	r2, #19
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	mov	r0, #5
	bl	msleep
	ldr	r3, .L63+40
	mov	r2, #8
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r2, [r10]
	ldr	r3, .L63+44
	mov	r0, r5
	ldr	r1, [r3]
	orr	r2, r2, #32
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	fp, .L63+48
	mov	r0, #5
	bl	msleep
	mov	r1, #1
	ldr	r0, [fp]
	ldr	r2, .L63+52
	bl	dprintk
	cmp	r7, #0
	beq	.L5
	mov	r6, #0
	add	r4, r4, #4
	b	.L6
.L49:
	cmp	r6, r7
	add	r4, r4, #8
	beq	.L5
.L6:
	mov	r0, r5
	ldr	r2, [r4, #-4]
	ldr	r1, [r4]
	bl	stv090x_write_reg
	cmp	r0, #0
	add	r6, r6, #1
	bge	.L49
.L59:
	ldr	r4, .L63+56
.L10:
	mov	r1, #1
	ldr	r0, [r4]
	ldr	r2, .L63+60
	bl	dprintk
	mvn	r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r3, .L63+64
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_read_reg
	ldr	r3, [r5, #4]
	cmp	r0, #31
	str	r0, [r3]
	ble	.L7
	ldr	r3, .L63+68
	mov	r2, #12
	mov	r0, r5
	ldr	r1, [r3]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	mov	r1, #1
	ldr	r0, [fp]
	ldr	r2, .L63+72
	bl	dprintk
	cmp	r8, #0
	beq	.L8
	ldr	r3, [sp, #4]
	mov	r4, #0
	add	r6, r3, #4
	b	.L9
.L51:
	cmp	r8, r4
	add	r6, r6, #8
	beq	.L8
.L9:
	mov	r0, r5
	ldr	r2, [r6, #-4]
	ldr	r1, [r6]
	bl	stv090x_write_reg
	cmp	r0, #0
	add	r4, r4, #1
	bge	.L51
	b	.L59
.L8:
	ldr	r6, .L63+76
	mov	r0, r5
	ldr	r1, [r6]
	bl	stv090x_read_reg
	mov	r4, r0
	ldr	r7, .L63+80
	ldr	r1, [r10, #4]
	ldr	r2, [r7]
	ldr	r3, .L63+84
	subs	r2, r1, r2
	movne	r2, #1
	ldr	r1, [r3]
	bl	STV090x_SETFIELD
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r6]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r6, .L63+88
	mov	r0, r5
	ldr	r1, [r6]
	bl	stv090x_read_reg
	mov	r4, r0
	ldr	r1, [r10, #8]
	ldr	r2, [r7]
	ldr	r3, .L63+92
	subs	r2, r1, r2
	movne	r2, #1
	ldr	r1, [r3]
	bl	STV090x_SETFIELD
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r6]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r4, .L63+96
	mov	r2, #128
	mov	r0, r5
	ldr	r1, [r4]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	mov	r0, r5
	mov	r2, #0
	ldr	r1, [r4]
	bl	stv090x_write_reg
	cmp	r0, #0
	blt	.L59
	ldr	r0, [r10, #12]
	cmp	r0, #0
	beq	.L1
	ldr	r3, .L63+100
	mov	r0, r9
	ldr	r1, [r3]
	bl	stv090x_send_diseqc_burst
	mov	r0, #0
	b	.L1
.L61:
	ldr	r3, .L63+48
	mov	r1, #1
	ldr	r2, .L63+104
	ldr	r0, [r3]
	bl	dprintk
	ldr	r3, .L63+108
	ldr	r4, [r3]
	mov	r0, r4
	bl	ARRAY_SIZE
	ldr	r3, .L63+112
.L57:
	ldr	r3, [r3]
	mov	r7, r0
	mov	r0, r3
	str	r3, [sp, #4]
	bl	ARRAY_SIZE
	mov	r8, r0
	b	.L3
.L62:
	ldr	r3, .L63+48
	mov	r1, #1
	ldr	r2, .L63+116
	ldr	r0, [r3]
	bl	dprintk
	ldr	r3, .L63+120
	ldr	r4, [r3]
	mov	r0, r4
	bl	ARRAY_SIZE
	ldr	r3, .L63+124
	b	.L57
.L7:
	ldr	r4, .L63+56
	mov	r3, r0
	mov	r1, #1
	ldr	r0, [r4]
	ldr	r2, .L63+128
	bl	dprintk
	b	.L10
.L64:
	.align	2
.L63:
	.word	STV0900
	.word	STV0903
	.word	STV090x_P1_DMDISTATE
	.word	STV090x_P2_DMDISTATE
	.word	STV090x_P1_TNRCFG
	.word	STV090x_P2_TNRCFG
	.word	ENARPT_LEVEL_FIELD
	.word	STV090x_P1_I2CRPT
	.word	STV090x_P2_I2CRPT
	.word	STV090x_NCOARSE
	.word	STV090x_I2CCFG
	.word	STV090x_SYNTCTRL
	.word	FE_DEBUG
	.word	.LC2
	.word	FE_ERROR
	.word	.LC5
	.word	STV090x_MID
	.word	STV090x_TSGENERAL
	.word	.LC3
	.word	STV090x_TSTTNR1
	.word	STV090x_ADC_1Vpp
	.word	ADC1_INMODE_FIELD
	.word	STV090x_TSTTNR3
	.word	ADC2_INMODE_FIELD
	.word	STV090x_TSTRES0
	.word	SEC_MINI_A
	.word	.LC0
	.word	stv0900_initval
	.word	stv0900_cut20_val
	.word	.LC1
	.word	stv0903_initval
	.word	stv0903_cut20_val
	.word	.LC4
	.size	stv090x_setup, .-stv090x_setup
	.comm	stv0903_initval,4,4
	.comm	stv0903_cut20_val,4,4
	.comm	stv0900_initval,4,4
	.comm	stv0900_cut20_val,4,4
	.comm	STV090x_TSTTNR3,4,4
	.comm	STV090x_TSTTNR1,4,4
	.comm	STV090x_TSTRES0,4,4
	.comm	STV090x_TSGENERAL,4,4
	.comm	STV090x_SYNTCTRL,4,4
	.comm	STV090x_P2_TNRCFG,4,4
	.comm	STV090x_P2_I2CRPT,4,4
	.comm	STV090x_P2_DMDISTATE,4,4
	.comm	STV090x_P1_TNRCFG,4,4
	.comm	STV090x_P1_I2CRPT,4,4
	.comm	STV090x_P1_DMDISTATE,4,4
	.comm	STV090x_NCOARSE,4,4
	.comm	STV090x_MID,4,4
	.comm	STV090x_I2CCFG,4,4
	.comm	STV090x_ADC_1Vpp,4,4
	.comm	STV0903,4,4
	.comm	STV0900,4,4
	.comm	SEC_MINI_A,4,4
	.comm	FE_ERROR,4,4
	.comm	FE_DEBUG,4,4
	.comm	ENARPT_LEVEL_FIELD,4,4
	.comm	ADC2_INMODE_FIELD,4,4
	.comm	ADC1_INMODE_FIELD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
