	.file	"extr_mt312.c_mt312_get_code_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mt312_get_code_rate, @function
mt312_get_code_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rsi
	sub	rsp, 64
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR FEC_STATUS[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR FEC_1_2[rip]
	lea	rdx, 12[rsp]
	mov	DWORD PTR 16[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 24[rsp], eax
	mov	eax, DWORD PTR FEC_5_6[rip]
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR FEC_6_7[rip]
	mov	DWORD PTR 32[rsp], eax
	mov	eax, DWORD PTR FEC_7_8[rip]
	mov	DWORD PTR 36[rsp], eax
	mov	eax, DWORD PTR FEC_AUTO[rip]
	mov	DWORD PTR 40[rsp], eax
	mov	DWORD PTR 44[rsp], eax
	call	mt312_readreg@PLT
	test	eax, eax
	js	.L1
	mov	eax, DWORD PTR 12[rsp]
	sar	eax, 4
	and	eax, 7
	mov	eax, DWORD PTR 16[rsp+rax*4]
	mov	DWORD PTR [rbx], eax
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L6
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mt312_get_code_rate, .-mt312_get_code_rate
	.comm	FEC_STATUS,4,4
	.comm	FEC_AUTO,4,4
	.comm	FEC_7_8,4,4
	.comm	FEC_6_7,4,4
	.comm	FEC_5_6,4,4
	.comm	FEC_3_4,4,4
	.comm	FEC_2_3,4,4
	.comm	FEC_1_2,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_mt312.c_mt312_get_code_rate.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt312_get_code_rate, %function
mt312_get_code_rate:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L7
	ldr	r4, .L7+4
	ldr	r3, [r3]
	ldr	r6, [r4]
	ldr	lr, .L7+8
	ldr	ip, .L7+12
	mov	r4, r1
	ldr	r1, .L7+16
	sub	sp, sp, #44
	ldr	r2, .L7+20
	ldr	r1, [r1]
	str	r1, [sp, #36]
	mov	r1,#0
	ldr	r5, [lr]
	str	r3, [sp, #4]
	ldr	lr, [ip]
	ldr	r3, .L7+24
	ldr	ip, .L7+28
	ldr	r2, [r2]
	ldr	r1, .L7+32
	ldr	r3, [r3]
	ldr	ip, [ip]
	str	r2, [sp, #20]
	ldr	r1, [r1]
	mov	r2, sp
	str	r6, [sp, #8]
	str	r5, [sp, #12]
	str	lr, [sp, #16]
	str	ip, [sp, #24]
	str	r3, [sp, #28]
	str	r3, [sp, #32]
	bl	mt312_readreg
	cmp	r0, #0
	blt	.L1
	mov	r0, #0
	ldr	r3, [sp]
	add	r2, sp, #40
	lsr	r3, r3, #2
	and	r3, r3, #28
	add	r3, r2, r3
	ldr	r3, [r3, #-36]
	str	r3, [r4]
.L1:
	ldr	r3, .L7+16
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L6
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L6:
	bl	__stack_chk_fail
.L8:
	.align	2
.L7:
	.word	FEC_1_2
	.word	FEC_2_3
	.word	FEC_3_4
	.word	FEC_5_6
	.word	.LC0
	.word	FEC_6_7
	.word	FEC_AUTO
	.word	FEC_7_8
	.word	FEC_STATUS
	.size	mt312_get_code_rate, .-mt312_get_code_rate
	.comm	FEC_STATUS,4,4
	.comm	FEC_AUTO,4,4
	.comm	FEC_7_8,4,4
	.comm	FEC_6_7,4,4
	.comm	FEC_5_6,4,4
	.comm	FEC_3_4,4,4
	.comm	FEC_2_3,4,4
	.comm	FEC_1_2,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
