	.file	"extr_dib0700_devices.c_dib8096_set_param_override.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"tuning in CBAND - soft-AGC startup\n"
	.align 8
.LC1:
	.string	"not tuning in CBAND - standard AGC startup\n"
	.text
	.p2align 4
	.type	dib8096_set_param_override, @function
dib8096_set_param_override:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	movsx	rdi, DWORD PTR [rsi]
	mov	rax, QWORD PTR [rax]
	mov	r13, QWORD PTR [rax]
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	BAND_OF_FREQUENCY@PLT
	mov	rsi, r12
	mov	rdi, rbp
	mov	ebx, eax
	call	[QWORD PTR 0[r13]]
	test	eax, eax
	js	.L1
	mov	r12d, 100
	cmp	ebx, 128
	je	.L3
	cmp	ebx, 129
	mov	r12d, 550
	mov	esi, 0
	cmovne	r12d, esi
.L3:
	mov	rdi, rbp
	call	dib0090_get_wbd_offset@PLT
	mov	rdi, rbp
	lea	edx, [rax+rax*8]
	sal	edx, 4
	movsx	rax, edx
	sar	edx, 31
	imul	rax, rax, 1041204193
	sar	rax, 35
	sub	eax, edx
	add	eax, 1
	mov	esi, eax
	shr	esi, 31
	add	esi, eax
	mov	eax, esi
	sar	eax
	lea	esi, [rax+r12]
	call	dib8000_set_wbd_ref@PLT
	cmp	DWORD PTR BAND_CBAND[rip], ebx
	je	.L17
	lea	rdi, .LC1[rip]
	call	deb_info@PLT
	mov	rdi, rbp
	call	dib0090_pwm_gain_reset@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L18
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	mov	r12, rsp
	call	deb_info@PLT
	mov	esi, DWORD PTR CT_AGC_START[rip]
	mov	rdi, rbp
	call	dib0090_set_tune_state@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	eax, DWORD PTR CT_AGC_STEP_1[rip]
	je	.L19
.L6:
	cmp	DWORD PTR CT_AGC_STOP[rip], ebx
	jbe	.L20
.L9:
	mov	rdi, rbp
	call	dib0090_gain_control@PLT
	mov	edi, eax
	call	msleep@PLT
	mov	rdi, rbp
	call	dib0090_get_tune_state@PLT
	cmp	eax, DWORD PTR CT_AGC_STEP_0[rip]
	mov	ebx, eax
	jne	.L5
	xor	edx, edx
	mov	ecx, 1
	mov	esi, 6
	mov	rdi, rbp
	call	dib8000_set_gpio@PLT
	cmp	DWORD PTR CT_AGC_STOP[rip], ebx
	ja	.L9
.L20:
	mov	rdi, rbp
	call	dib0090_pwm_gain_reset@PLT
	mov	rdi, rbp
	call	dib8000_pwm_agc_reset@PLT
	mov	esi, DWORD PTR CT_DEMOD_START[rip]
	mov	rdi, rbp
	call	dib8000_set_tune_state@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rcx, 4[rsp]
	mov	r8, r12
	xor	edx, edx
	xor	esi, esi
	mov	rdi, rbp
	call	dib0090_get_current_gain@PLT
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	jne	.L6
	xor	ecx, ecx
	xor	edx, edx
	mov	esi, 6
	mov	rdi, rbp
	call	dib8000_set_gpio@PLT
	jmp	.L6
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dib8096_set_param_override, .-dib8096_set_param_override
	.comm	CT_SHUTDOWN,4,4
	.comm	CT_DEMOD_START,4,4
	.comm	CT_AGC_STOP,4,4
	.comm	CT_AGC_STEP_1,4,4
	.comm	CT_AGC_STEP_0,4,4
	.comm	CT_AGC_START,4,4
	.comm	BAND_CBAND,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_dib0700_devices.c_dib8096_set_param_override.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"tuning in CBAND - soft-AGC startup\012\000"
	.align	2
.LC1:
	.ascii	"not tuning in CBAND - standard AGC startup\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dib8096_set_param_override, %function
dib8096_set_param_override:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, [r1]
	ldr	r0, .L20
	mov	r6, r1
	smull	r1, r0, r3, r0
	ldr	r2, [r4]
	asr	r3, r3, #31
	ldr	r2, [r2]
	rsb	r0, r3, r0, asr #6
	ldr	r3, .L20+4
	sub	sp, sp, #24
	ldr	r7, [r2]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	BAND_OF_FREQUENCY
	mov	r1, r6
	mov	r5, r0
	ldr	r3, [r7]
	mov	r0, r4
	blx	r3
	cmp	r0, #0
	blt	.L1
	cmp	r5, #128
	moveq	r6, #100
	beq	.L3
	cmp	r5, #129
	ldr	r6, .L20+8
	movne	r6, #0
.L3:
	mov	r0, r4
	bl	dib0090_get_wbd_offset
	ldr	r3, .L20+12
	add	r0, r0, r0, lsl #3
	lsl	r2, r0, #4
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	rsb	r3, r3, r1, asr #3
	add	r3, r3, #1
	add	r3, r3, r3, lsr #31
	add	r1, r6, r3, asr #1
	mov	r0, r4
	bl	dib8000_set_wbd_ref
	ldr	r3, .L20+16
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L16
	ldr	r0, .L20+20
	bl	deb_info
	mov	r0, r4
	bl	dib0090_pwm_gain_reset
	mov	r0, #0
.L1:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldr	r0, .L20+24
	bl	deb_info
	ldr	r3, .L20+28
	mov	r0, r4
	ldr	r1, [r3]
	bl	dib0090_set_tune_state
	ldr	r7, .L20+32
	ldr	r6, .L20+36
	ldr	r8, .L20+40
	b	.L9
.L5:
	ldr	r3, [r8]
	cmp	r0, r3
	beq	.L18
.L6:
	ldr	r3, [r6]
	cmp	r3, r5
	bls	.L19
.L9:
	mov	r0, r4
	bl	dib0090_gain_control
	bl	msleep
	mov	r0, r4
	bl	dib0090_get_tune_state
	ldr	r3, [r7]
	mov	r5, r0
	cmp	r0, r3
	bne	.L5
	mov	r3, #1
	mov	r2, #0
	mov	r1, #6
	mov	r0, r4
	bl	dib8000_set_gpio
	ldr	r3, [r6]
	cmp	r3, r5
	bhi	.L9
.L19:
	mov	r0, r4
	bl	dib0090_pwm_gain_reset
	mov	r0, r4
	bl	dib8000_pwm_agc_reset
	ldr	r3, .L20+44
	mov	r0, r4
	ldr	r1, [r3]
	bl	dib8000_set_tune_state
	mov	r0, #0
	b	.L1
.L18:
	mov	r2, #0
	add	r3, sp, #12
	str	r3, [sp]
	mov	r1, r2
	add	r3, sp, #16
	mov	r0, r4
	bl	dib0090_get_current_gain
	ldr	r3, [sp, #16]
	cmp	r3, #0
	bne	.L6
	mov	r2, r3
	mov	r1, #6
	mov	r0, r4
	bl	dib8000_set_gpio
	b	.L6
.L17:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	274877907
	.word	.LC2
	.word	550
	.word	1041204193
	.word	BAND_CBAND
	.word	.LC1
	.word	.LC0
	.word	CT_AGC_START
	.word	CT_AGC_STEP_0
	.word	CT_AGC_STOP
	.word	CT_AGC_STEP_1
	.word	CT_DEMOD_START
	.size	dib8096_set_param_override, .-dib8096_set_param_override
	.comm	CT_SHUTDOWN,4,4
	.comm	CT_DEMOD_START,4,4
	.comm	CT_AGC_STOP,4,4
	.comm	CT_AGC_STEP_1,4,4
	.comm	CT_AGC_STEP_0,4,4
	.comm	CT_AGC_START,4,4
	.comm	BAND_CBAND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
