	.file	"extr_r92ce_calib.c_r92ce_iq_calib.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	r92ce_iq_calib
	.type	r92ce_iq_calib, @function
r92ce_iq_calib:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR RTWN_IQ_CAL_NRUN[rip]
	mov	rdi, rsp
	mov	rcx, rax
	sal	rax, 4
	lea	rdx, 15[rax]
	mov	rsi, rdx
	and	rsi, -4096
	sub	rdi, rsi
	mov	rsi, rdi
	cmp	rsp, rsi
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rsi
	jne	.L24
.L3:
	and	eax, 4095
	sub	rsp, rax
	test	rax, rax
	jne	.L25
.L4:
	mov	rax, rdx
	mov	rdi, rsp
	and	rdx, -4096
	mov	QWORD PTR -72[rbp], rsp
	sub	rdi, rdx
	and	rax, -16
	mov	rdx, rdi
	cmp	rsp, rdx
	je	.L6
.L26:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L26
.L6:
	and	eax, 4095
	sub	rsp, rax
	test	rax, rax
	jne	.L27
.L7:
	mov	QWORD PTR -104[rbp], rsp
	test	ecx, ecx
	jle	.L1
	mov	r15, QWORD PTR -72[rbp]
	mov	rbx, QWORD PTR -104[rbp]
	lea	rax, -60[rbp]
	xor	esi, esi
	mov	r8, rax
	mov	rdi, r12
	xor	r14d, r14d
	mov	QWORD PTR -80[rbp], rax
	mov	rcx, rbx
	mov	rdx, r15
	lea	rbx, 16[rbx]
	call	r92ce_iq_calib_run@PLT
	mov	rax, r15
	mov	r15d, r14d
	mov	r14, rax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r13d, 16
	sub	r13, QWORD PTR -72[rbp]
	mov	rcx, rbx
	mov	esi, r15d
	lea	rax, 0[r13+r14]
	mov	r8, QWORD PTR -80[rbp]
	lea	r13, 16[r14]
	mov	rdi, r12
	mov	rdx, r13
	mov	QWORD PTR -88[rbp], rbx
	mov	QWORD PTR -96[rbp], rax
	call	r92ce_iq_calib_run@PLT
	lea	rdx, -16[rbx]
	mov	r8, rbx
	mov	rcx, r13
	mov	rsi, r14
	mov	rdi, r12
	add	rbx, 16
	call	r92ce_iq_calib_compare_results@PLT
	test	eax, eax
	jne	.L10
	mov	r14, r13
.L14:
	add	r15d, 1
	cmp	DWORD PTR RTWN_IQ_CAL_NRUN[rip], r15d
	jg	.L11
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L28
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rax], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, QWORD PTR -88[rbp]
	xor	ecx, ecx
	mov	rsi, r13
	mov	rdi, r12
	call	r92ce_iq_calib_write_results@PLT
	cmp	DWORD PTR [r12], 1
	jle	.L1
	mov	rax, QWORD PTR -96[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	mov	ecx, 1
	mov	rdi, r12
	mov	rsi, QWORD PTR -72[rbp]
	add	rax, 8
	add	rdx, rax
	add	rsi, rax
	call	r92ce_iq_calib_write_results@PLT
	jmp	.L1
.L27:
	or	QWORD PTR -8[rsp+rax], 0
	jmp	.L7
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	r92ce_iq_calib, .-r92ce_iq_calib
	.comm	RTWN_IQ_CAL_NRUN,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_r92ce_calib.c_r92ce_iq_calib.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	r92ce_iq_calib
	.syntax unified
	.arm
	.fpu softvfp
	.type	r92ce_iq_calib, %function
r92ce_iq_calib:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	mov	r2, sp
	ldr	r3, .L13
	ldr	r8, .L13+4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r3, [r8]
	sub	r2, r2, r3, lsl #4
	mov	sp, r2
	add	r2, sp, #8
	str	r2, [fp, #-48]
	mov	r2, sp
	cmp	r3, #0
	sub	r3, r2, r3, lsl #4
	mov	sp, r3
	add	r3, sp, #8
	str	r3, [fp, #-52]
	ble	.L1
	sub	r9, fp, #44
	str	r9, [sp]
	ldr	r6, [fp, #-52]
	ldr	r4, [fp, #-48]
	mov	r3, r6
	mov	r2, r4
	mov	r1, #0
	mov	r7, r0
	add	r5, r4, #16
	bl	r92ce_iq_calib_run
	add	r4, r6, #16
	mov	r6, #0
	b	.L8
.L5:
	mov	r3, r4
	mov	r2, r5
	mov	r1, r6
	mov	r0, r7
	str	r9, [sp]
	bl	r92ce_iq_calib_run
	sub	r2, r4, #16
	sub	r1, r5, #16
	mov	r3, r5
	str	r4, [sp]
	mov	r0, r7
	bl	r92ce_iq_calib_compare_results
	cmp	r0, #0
	mov	r1, r5
	mov	r2, r4
	add	r5, r5, #16
	add	r4, r4, #16
	lsl	r10, r6, #4
	bne	.L4
.L8:
	ldr	r3, [r8]
	add	r6, r6, #1
	cmp	r3, r6
	bgt	.L5
.L1:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r3, #0
	mov	r0, r7
	bl	r92ce_iq_calib_write_results
	ldr	r3, [r7]
	cmp	r3, #1
	ble	.L1
	ldr	r3, [fp, #-52]
	add	r1, r10, #8
	add	r2, r3, r1
	ldr	r3, [fp, #-48]
	mov	r0, r7
	add	r1, r3, r1
	mov	r3, #1
	bl	r92ce_iq_calib_write_results
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	RTWN_IQ_CAL_NRUN
	.size	r92ce_iq_calib, .-r92ce_iq_calib
	.comm	RTWN_IQ_CAL_NRUN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
