	.file	"extr_mxl5xx.c_get_frontend.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"freq=%u delsys=%u srate=%u\n"
	.text
	.p2align 4
	.type	get_frontend, @function
get_frontend:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	mov	r12, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MXL_DEMOD_CHAN_PARAMS_BUFF_SIZE[rip]
	mov	rcx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L31:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L31
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L32
.L4:
	mov	rdi, QWORD PTR 8[r12]
	mov	r13, rsp
	call	mutex_lock@PLT
	mov	esi, DWORD PTR 16[r12]
	mov	rdi, r12
	call	HYDRA_DEMOD_STATUS_LOCK@PLT
	mov	eax, DWORD PTR MXL_DEMOD_CHAN_PARAMS_BUFF_SIZE[rip]
	mov	edi, DWORD PTR 16[r12]
	lea	r14d, 0[0+rax*4]
	call	HYDRA_DMD_STATUS_OFFSET@PLT
	mov	rcx, r13
	mov	edx, r14d
	mov	rdi, r12
	add	rax, QWORD PTR HYDRA_DMD_STANDARD_ADDR_OFFSET[rip]
	mov	rsi, rax
	call	read_register_block@PLT
	mov	edi, DWORD PTR 16[r12]
	call	HYDRA_DMD_STATUS_OFFSET@PLT
	add	rax, QWORD PTR HYDRA_DMD_STATUS_CENTER_FREQ_IN_KHZ_ADDR[rip]
	lea	rcx, -44[rbp]
	mov	rdi, r12
	mov	edx, 4
	mov	rsi, rax
	call	read_register_block@PLT
	mov	esi, DWORD PTR 16[r12]
	mov	rdi, r12
	call	HYDRA_DEMOD_STATUS_UNLOCK@PLT
	mov	rdi, QWORD PTR 8[r12]
	call	mutex_unlock@PLT
	mov	rax, QWORD PTR DMD_STANDARD_ADDR[rip]
	mov	edi, DWORD PTR [r12]
	lea	rsi, .LC0[rip]
	imul	edx, DWORD PTR -44[rbp], 1000
	mov	ecx, DWORD PTR 0[r13+rax*4]
	mov	rax, QWORD PTR DMD_SYMBOL_RATE_ADDR[rip]
	mov	r8d, DWORD PTR 0[r13+rax*4]
	call	dev_dbg@PLT
	mov	rax, QWORD PTR DMD_SYMBOL_RATE_ADDR[rip]
	mov	eax, DWORD PTR 0[r13+rax*4]
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR 4[rbx], eax
	mov	rax, QWORD PTR DMD_FEC_CODE_RATE_ADDR[rip]
	mov	edi, DWORD PTR 0[r13+rax*4]
	call	conv_fec@PLT
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR 8[rbx]
	cmp	eax, 129
	je	.L5
	cmp	eax, 130
	je	.L29
	cmp	eax, 128
	je	.L33
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rbx, QWORD PTR -40[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L34
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	rax, QWORD PTR DMD_DVBS2_PILOT_ON_OFF_ADDR[rip]
	mov	eax, DWORD PTR 0[r13+rax*4]
	cmp	eax, 134
	jne	.L35
	mov	eax, DWORD PTR PILOT_ON[rip]
	mov	DWORD PTR 20[rbx], eax
.L5:
	mov	rax, QWORD PTR DMD_MODULATION_SCHEME_ADDR[rip]
	mov	eax, DWORD PTR 0[r13+rax*4]
	cmp	eax, 136
	je	.L11
	cmp	eax, 137
	jne	.L13
	mov	eax, DWORD PTR PSK_8[rip]
	mov	DWORD PTR 16[rbx], eax
.L13:
	mov	rax, QWORD PTR DMD_SPECTRUM_ROLL_OFF_ADDR[rip]
	mov	eax, DWORD PTR 0[r13+rax*4]
	cmp	eax, 132
	je	.L14
	cmp	eax, 133
	je	.L15
	cmp	eax, 131
	je	.L36
.L29:
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	cmp	eax, 135
	jne	.L5
	mov	eax, DWORD PTR PILOT_OFF[rip]
	mov	DWORD PTR 20[rbx], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L36:
	mov	eax, DWORD PTR ROLLOFF_35[rip]
	mov	DWORD PTR 12[rbx], eax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR QPSK[rip]
	mov	DWORD PTR 16[rbx], eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR ROLLOFF_25[rip]
	mov	DWORD PTR 12[rbx], eax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR ROLLOFF_20[rip]
	mov	DWORD PTR 12[rbx], eax
	xor	eax, eax
	jmp	.L1
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_frontend, .-get_frontend
	.comm	ROLLOFF_35,4,4
	.comm	ROLLOFF_25,4,4
	.comm	ROLLOFF_20,4,4
	.comm	QPSK,4,4
	.comm	PSK_8,4,4
	.comm	PILOT_ON,4,4
	.comm	PILOT_OFF,4,4
	.comm	MXL_DEMOD_CHAN_PARAMS_BUFF_SIZE,4,4
	.comm	HYDRA_DMD_STATUS_CENTER_FREQ_IN_KHZ_ADDR,8,8
	.comm	HYDRA_DMD_STANDARD_ADDR_OFFSET,8,8
	.comm	EINVAL,4,4
	.comm	DMD_SYMBOL_RATE_ADDR,8,8
	.comm	DMD_STANDARD_ADDR,8,8
	.comm	DMD_SPECTRUM_ROLL_OFF_ADDR,8,8
	.comm	DMD_MODULATION_SCHEME_ADDR,8,8
	.comm	DMD_FEC_CODE_RATE_ADDR,8,8
	.comm	DMD_DVBS2_PILOT_ON_OFF_ADDR,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_mxl5xx.c_get_frontend.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"freq=%u delsys=%u srate=%u\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_frontend, %function
get_frontend:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	ldr	r6, .L28
	ldr	r4, [r0]
	ldr	r3, [r6]
	ldr	r0, [r4, #4]
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L28+4
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	bl	mutex_lock
	ldr	r1, [r4, #8]
	mov	r0, r4
	bl	HYDRA_DEMOD_STATUS_LOCK
	ldr	r0, [r4, #8]
	bl	HYDRA_DMD_STATUS_OFFSET
	ldr	r3, .L28+8
	ldr	r2, [r6]
	ldr	r1, [r3]
	add	r6, sp, #8
	add	r1, r0, r1
	mov	r3, r6
	lsl	r2, r2, #2
	mov	r0, r4
	bl	read_register_block
	ldr	r0, [r4, #8]
	bl	HYDRA_DMD_STATUS_OFFSET
	mov	r1, r0
	ldr	r3, .L28+12
	mov	r0, r4
	ldr	r2, [r3]
	sub	r3, fp, #28
	add	r1, r1, r2
	mov	r2, #4
	bl	read_register_block
	ldr	r7, .L28+16
	ldr	r1, [r4, #8]
	mov	r0, r4
	bl	HYDRA_DEMOD_STATUS_UNLOCK
	ldr	r0, [r4, #4]
	bl	mutex_unlock
	ldr	r2, [fp, #-28]
	ldr	r1, [r7]
	ldr	r3, .L28+20
	ldr	r1, [r6, r1, lsl #2]
	ldr	r3, [r3]
	rsb	ip, r2, r2, lsl #5
	add	r2, r2, ip, lsl #2
	ldr	r3, [r6, r3, lsl #2]
	ldr	r0, [r4]
	lsl	r2, r2, #3
	str	r1, [sp]
	ldr	r1, .L28+24
	bl	dev_dbg
	ldr	r2, [r7]
	ldr	r3, .L28+28
	ldr	r1, [r6, r2, lsl #2]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r0, [r6, r3, lsl #2]
	stm	r5, {r1, r2}
	bl	conv_fec
	ldr	r3, [r5, #8]
	str	r0, [r5, #24]
	cmp	r3, #129
	beq	.L2
	cmp	r3, #130
	beq	.L3
	cmp	r3, #128
	beq	.L24
	ldr	r3, .L28+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L28+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L24:
	ldr	r3, .L28+36
	ldr	r3, [r3]
	ldr	r3, [r6, r3, lsl #2]
	cmp	r3, #134
	bne	.L26
	ldr	r3, .L28+40
	ldr	r3, [r3]
	str	r3, [r5, #20]
.L2:
	ldr	r3, .L28+44
	ldr	r3, [r3]
	ldr	r3, [r6, r3, lsl #2]
	cmp	r3, #136
	beq	.L8
	cmp	r3, #137
	ldreq	r3, .L28+48
	ldreq	r3, [r3]
	streq	r3, [r5, #16]
.L10:
	ldr	r3, .L28+52
	ldr	r3, [r3]
	ldr	r3, [r6, r3, lsl #2]
	cmp	r3, #132
	beq	.L11
	cmp	r3, #133
	beq	.L12
	cmp	r3, #131
	beq	.L27
.L3:
	mov	r0, #0
	b	.L1
.L26:
	cmp	r3, #135
	ldreq	r3, .L28+56
	ldreq	r3, [r3]
	streq	r3, [r5, #20]
	b	.L2
.L8:
	ldr	r3, .L28+60
	ldr	r3, [r3]
	str	r3, [r5, #16]
	b	.L10
.L27:
	ldr	r3, .L28+64
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [r5, #12]
	b	.L1
.L12:
	ldr	r3, .L28+68
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [r5, #12]
	b	.L1
.L11:
	ldr	r3, .L28+72
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [r5, #12]
	b	.L1
.L25:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	MXL_DEMOD_CHAN_PARAMS_BUFF_SIZE
	.word	.LC1
	.word	HYDRA_DMD_STANDARD_ADDR_OFFSET
	.word	HYDRA_DMD_STATUS_CENTER_FREQ_IN_KHZ_ADDR
	.word	DMD_SYMBOL_RATE_ADDR
	.word	DMD_STANDARD_ADDR
	.word	.LC0
	.word	DMD_FEC_CODE_RATE_ADDR
	.word	EINVAL
	.word	DMD_DVBS2_PILOT_ON_OFF_ADDR
	.word	PILOT_ON
	.word	DMD_MODULATION_SCHEME_ADDR
	.word	PSK_8
	.word	DMD_SPECTRUM_ROLL_OFF_ADDR
	.word	PILOT_OFF
	.word	QPSK
	.word	ROLLOFF_35
	.word	ROLLOFF_20
	.word	ROLLOFF_25
	.size	get_frontend, .-get_frontend
	.comm	ROLLOFF_35,4,4
	.comm	ROLLOFF_25,4,4
	.comm	ROLLOFF_20,4,4
	.comm	QPSK,4,4
	.comm	PSK_8,4,4
	.comm	PILOT_ON,4,4
	.comm	PILOT_OFF,4,4
	.comm	MXL_DEMOD_CHAN_PARAMS_BUFF_SIZE,4,4
	.comm	HYDRA_DMD_STATUS_CENTER_FREQ_IN_KHZ_ADDR,4,4
	.comm	HYDRA_DMD_STANDARD_ADDR_OFFSET,4,4
	.comm	EINVAL,4,4
	.comm	DMD_SYMBOL_RATE_ADDR,4,4
	.comm	DMD_STANDARD_ADDR,4,4
	.comm	DMD_SPECTRUM_ROLL_OFF_ADDR,4,4
	.comm	DMD_MODULATION_SCHEME_ADDR,4,4
	.comm	DMD_FEC_CODE_RATE_ADDR,4,4
	.comm	DMD_DVBS2_PILOT_ON_OFF_ADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
