	.file	"extr_dib7000m.c_dib7000m_autosearch_start.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dib7000m_autosearch_start, @function
dib7000m_autosearch_start:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	edx, 7
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	r12, QWORD PTR [rdi]
	movdqu	xmm0, XMMWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 40[rdi]
	mov	rsi, rsp
	mov	rdi, r12
	movaps	XMMWORD PTR [rsp], xmm0
	mov	QWORD PTR 32[rsp], rax
	mov	eax, DWORD PTR QAM_64[rip]
	mov	QWORD PTR 8[rsp], 0
	mov	DWORD PTR 32[rsp], eax
	mov	eax, DWORD PTR GUARD_INTERVAL_1_32[rip]
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR TRANSMISSION_MODE_8K[rip]
	mov	DWORD PTR 24[rsp], eax
	mov	eax, DWORD PTR FEC_2_3[rip]
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR FEC_3_4[rip]
	mov	DWORD PTR 16[rsp], eax
	call	dib7000m_set_channel@PLT
	mov	edi, DWORD PTR [rsp]
	call	BANDWIDTH_TO_KHZ@PLT
	mov	r13d, DWORD PTR [r12]
	mov	esi, 6
	mov	rdi, r12
	cmp	eax, 4999
	setle	bl
	lea	ebx, 1[rbx+rbx*4]
	imul	r13d, ebx
	imul	r13d, r13d, 30
	mov	edx, r13d
	shr	edx, 16
	call	dib7000m_write_word@PLT
	movzx	edx, r13w
	mov	esi, 7
	mov	rdi, r12
	mov	ebp, eax
	call	dib7000m_write_word@PLT
	mov	r13d, DWORD PTR [r12]
	mov	esi, 8
	mov	rdi, r12
	or	ebp, eax
	imul	r13d, ebx
	imul	r13d, r13d, 100
	mov	edx, r13d
	shr	edx, 16
	call	dib7000m_write_word@PLT
	movzx	edx, r13w
	mov	esi, 9
	mov	rdi, r12
	or	ebp, eax
	call	dib7000m_write_word@PLT
	imul	ebx, DWORD PTR [r12]
	mov	esi, 10
	mov	rdi, r12
	or	ebp, eax
	imul	ebx, ebx, 500
	mov	edx, ebx
	shr	edx, 16
	call	dib7000m_write_word@PLT
	movzx	edx, bx
	mov	esi, 11
	mov	rdi, r12
	or	ebp, eax
	call	dib7000m_write_word@PLT
	mov	ebx, ebp
	xor	esi, esi
	mov	rdi, r12
	or	ebx, eax
	call	dib7000m_read_word@PLT
	xor	esi, esi
	mov	rdi, r12
	mov	edx, eax
	mov	r13d, eax
	or	dh, 2
	call	dib7000m_write_word@PLT
	or	ebx, eax
	cmp	DWORD PTR 4[r12], 16384
	je	.L9
	mov	esi, 537
	mov	rdi, r12
	call	dib7000m_read_word@PLT
.L4:
	xor	esi, esi
	mov	edx, r13d
	mov	rdi, r12
	call	dib7000m_write_word@PLT
	or	eax, ebx
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 56
	.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
.L9:
	.cfi_restore_state
	xor	edx, edx
	mov	esi, 1793
	mov	rdi, r12
	call	dib7000m_write_word@PLT
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dib7000m_autosearch_start, .-dib7000m_autosearch_start
	.comm	TRANSMISSION_MODE_8K,4,4
	.comm	QAM_64,4,4
	.comm	GUARD_INTERVAL_1_32,4,4
	.comm	FEC_3_4,4,4
	.comm	FEC_2_3,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_dib7000m.c_dib7000m_autosearch_start.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dib7000m_autosearch_start, %function
dib7000m_autosearch_start:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	ip, r0
	sub	sp, sp, #36
	mov	lr, sp
	mov	r7, #0
	ldr	r5, [ip], #4
	ldr	r8, .L11
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldm	ip, {r0, r1, r2}
	ldr	r6, .L11+4
	stm	lr, {r0, r1, r2}
	ldr	r4, .L11+8
	ldr	ip, .L11+12
	ldr	r3, .L11+16
	ldr	ip, [ip]
	ldr	lr, .L11+20
	ldr	r6, [r6]
	ldr	r3, [r3]
	ldr	r8, [r8]
	ldr	r4, [r4]
	mov	r2, #7
	mov	r1, sp
	mov	r0, r5
	ldr	lr, [lr]
	str	lr, [sp, #28]
	mov	lr,#0
	str	ip, [sp, #12]
	str	r6, [sp, #20]
	str	r3, [sp, #8]
	str	r8, [sp, #24]
	str	r4, [sp, #16]
	str	r7, [sp, #4]
	bl	dib7000m_set_channel
	ldr	r0, [sp]
	bl	BANDWIDTH_TO_KHZ
	ldr	r3, .L11+24
	ldr	r8, [r5]
	cmp	r0, r3
	movgt	r6, #1
	movle	r6, #6
	mul	r8, r6, r8
	rsb	r8, r8, r8, lsl #4
	lsl	r8, r8, #1
	lsr	r2, r8, #16
	mov	r1, #6
	mov	r0, r5
	bl	dib7000m_write_word
	ldr	r9, .L11+28
	mov	r4, r0
	and	r2, r8, r9
	mov	r1, #7
	mov	r0, r5
	bl	dib7000m_write_word
	mov	r3, r0
	ldr	r8, [r5]
	mov	r1, #8
	mul	r8, r6, r8
	add	r8, r8, r8, lsl #2
	add	r8, r8, r8, lsl #2
	lsl	r8, r8, #2
	lsr	r2, r8, #16
	mov	r0, r5
	orr	r4, r4, r3
	bl	dib7000m_write_word
	mov	r3, r0
	mov	r1, #9
	and	r2, r8, r9
	mov	r0, r5
	orr	r4, r4, r3
	bl	dib7000m_write_word
	mov	r3, r0
	ldr	r2, [r5]
	mov	r1, #10
	mul	r6, r2, r6
	rsb	r2, r6, r6, lsl #5
	add	r6, r6, r2, lsl #2
	lsl	r6, r6, #2
	lsr	r2, r6, #16
	mov	r0, r5
	orr	r4, r4, r3
	bl	dib7000m_write_word
	mov	r3, r0
	and	r2, r6, r9
	mov	r1, #11
	mov	r0, r5
	orr	r4, r4, r3
	bl	dib7000m_write_word
	mov	r3, r0
	mov	r1, r7
	mov	r0, r5
	orr	r4, r4, r3
	bl	dib7000m_read_word
	mov	r6, r0
	mov	r1, r7
	mov	r0, r5
	orr	r2, r6, #512
	bl	dib7000m_write_word
	ldr	r3, [r5, #4]
	orr	r4, r4, r0
	cmp	r3, #16384
	beq	.L9
	mov	r0, r5
	ldr	r1, .L11+32
	bl	dib7000m_read_word
.L4:
	mov	r2, r6
	mov	r0, r5
	mov	r1, #0
	bl	dib7000m_write_word
	ldr	r3, .L11+20
	orr	r0, r4, r0
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L9:
	mov	r2, r7
	mov	r0, r5
	ldr	r1, .L11+36
	bl	dib7000m_write_word
	b	.L4
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	QAM_64
	.word	GUARD_INTERVAL_1_32
	.word	TRANSMISSION_MODE_8K
	.word	FEC_2_3
	.word	FEC_3_4
	.word	.LC0
	.word	4999
	.word	65535
	.word	537
	.word	1793
	.size	dib7000m_autosearch_start, .-dib7000m_autosearch_start
	.comm	TRANSMISSION_MODE_8K,4,4
	.comm	QAM_64,4,4
	.comm	GUARD_INTERVAL_1_32,4,4
	.comm	FEC_3_4,4,4
	.comm	FEC_2_3,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
