	.file	"extr_4965-rs.c_il4965_rs_move_siso_to_other.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"LQ: SISO toggle Antenna\n"
.LC1:
	.string	"LQ: SISO switch to MIMO2\n"
.LC2:
	.string	"LQ: SISO toggle SGI/NGI\n"
.LC3:
	.string	"SGI was set in GF+SISO\n"
	.text
	.p2align 4
	.type	il4965_rs_move_siso_to_other, @function
il4965_rs_move_siso_to_other:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, 10
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	eax, DWORD PTR [rsi]
	mov	r14d, DWORD PTR [rdi]
	mov	QWORD PTR [rsp], rcx
	sub	r12d, DWORD PTR RATE_COUNT[rip]
	mov	DWORD PTR 32[rsp], eax
	mov	rax, QWORD PTR 8[rsi]
	mov	r13d, r14d
	sal	r12d, 2
	mov	QWORD PTR 40[rsp], rdx
	mov	rdx, QWORD PTR 32[rsi]
	mov	r14, rsi
	lea	rcx, [rax+rax*4]
	mov	QWORD PTR 24[rsp], rdi
	imul	rax, rax, -40
	lea	r15, [rdx+rcx*8]
	mov	DWORD PTR 36[rsp], r8d
	mov	ebp, DWORD PTR [r15]
	lea	rbx, 40[rdx+rax]
	movsx	rax, r8d
	sal	rax, 2
	lea	rcx, 20[rbx]
	mov	QWORD PTR 48[rsp], rax
	add	rax, QWORD PTR 32[r15]
	mov	QWORD PTR 16[rsp], rax
	mov	eax, DWORD PTR 4[rdi]
	mov	QWORD PTR 56[rsp], rcx
	mov	DWORD PTR 12[rsp], eax
	mov	eax, ebp
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR [rsp]
	mov	r8d, DWORD PTR 24[r15]
	mov	eax, DWORD PTR [rax]
	test	r8d, r8d
	jne	.L17
	test	DWORD PTR IEEE80211_HT_CAP_SGI_20[rip], eax
	je	.L6
.L18:
	lea	rdi, .LC2[rip]
	call	D_RATE@PLT
	mov	rdi, rbx
	mov	edx, r12d
	mov	rsi, r15
	call	memcpy@PLT
	mov	edi, DWORD PTR 32[rsp]
	test	edi, edi
	je	.L19
	mov	esi, DWORD PTR 4[r15]
	test	esi, esi
	jne	.L20
	.p2align 4,,10
	.p2align 3
.L55:
	mov	eax, DWORD PTR [r15]
.L4:
	add	eax, 1
	mov	DWORD PTR [r15], eax
	cmp	eax, 131
	jg	.L6
	cmp	eax, ebp
	je	.L28
.L22:
	add	DWORD PTR 24[r14], 1
	cmp	eax, 131
	je	.L2
	jg	.L3
	lea	edx, -128[rax]
	cmp	edx, 2
	ja	.L4
	lea	rdi, .LC1[rip]
	call	D_RATE@PLT
	mov	edx, r12d
	mov	rsi, r15
	mov	rdi, rbx
	call	memcpy@PLT
	mov	eax, DWORD PTR [r15]
	mov	DWORD PTR 4[rbx], 0
	cmp	eax, 130
	je	.L58
	cmp	eax, 129
	je	.L59
	mov	esi, DWORD PTR ANT_BC[rip]
	mov	DWORD PTR 28[rbx], esi
.L13:
	mov	edi, r13d
	call	il4965_rs_is_valid_ant@PLT
	test	eax, eax
	je	.L55
	mov	r9d, DWORD PTR 36[rsp]
	mov	rcx, QWORD PTR [rsp]
	mov	r8, rbx
	mov	rsi, r14
	mov	rdx, QWORD PTR 40[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	call	il4965_rs_switch_to_mimo2@PLT
	test	eax, eax
	jne	.L55
	mov	eax, DWORD PTR [r15]
	mov	edx, 133
	mov	DWORD PTR 20[r14], 1
	add	eax, 1
	cmp	eax, 131
	cmovg	eax, edx
	mov	DWORD PTR [r15], eax
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L60:
	cmp	DWORD PTR 12[rsp], 1
	jle	.L6
	mov	rax, QWORD PTR 16[rsp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR IL_RS_GOOD_RATIO[rip], eax
	jg	.L30
	.p2align 4,,10
	.p2align 3
.L6:
	mov	DWORD PTR [r15], 133
	cmp	ebp, 133
	je	.L28
.L61:
	add	DWORD PTR 24[r14], 1
.L29:
	lea	rdi, .LC0[rip]
	call	D_RATE@PLT
	mov	eax, DWORD PTR [r15]
	cmp	eax, 133
	je	.L60
	cmp	eax, 132
	jne	.L31
	cmp	DWORD PTR 12[rsp], 2
	jle	.L6
.L31:
	mov	rcx, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR IL_RS_GOOD_RATIO[rip]
	cmp	DWORD PTR [rcx], edi
	jge	.L4
.L30:
	mov	edx, r12d
	mov	rsi, r15
	mov	rdi, rbx
	call	memcpy@PLT
	mov	rsi, QWORD PTR 56[rsp]
	mov	rdx, rbx
	mov	edi, r13d
	call	il4965_rs_toggle_antenna@PLT
	test	eax, eax
	je	.L55
	mov	r13, r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L3:
	sub	eax, 132
	cmp	eax, 1
	jbe	.L29
	mov	DWORD PTR [r15], 133
	cmp	ebp, 133
	jne	.L61
.L28:
	mov	eax, DWORD PTR LQ_NONE[rip]
	mov	DWORD PTR 16[rbx], eax
.L50:
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	test	DWORD PTR IEEE80211_HT_CAP_SGI_40[rip], eax
	je	.L6
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L58:
	mov	esi, DWORD PTR ANT_AB[rip]
	mov	DWORD PTR 28[rbx], esi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rdi, .LC3[rip]
	call	IL_ERR@PLT
.L19:
	mov	edx, DWORD PTR 4[r15]
	xor	eax, eax
	mov	rsi, rbx
	mov	rdi, r14
	test	edx, edx
	sete	al
	mov	DWORD PTR 4[rbx], eax
	call	il4965_rs_set_expected_tpt_table@PLT
	mov	ecx, DWORD PTR 4[r15]
	test	ecx, ecx
	je	.L21
	movsx	rax, DWORD PTR 16[r14]
	mov	rcx, QWORD PTR 8[rbx]
	mov	rsi, QWORD PTR 48[rsp]
	mov	rdx, rax
	imul	rax, rax, 1374389535
	sar	edx, 31
	sar	rax, 37
	sub	eax, edx
	cmp	DWORD PTR [rcx+rsi], eax
	jle	.L55
.L21:
	mov	ecx, DWORD PTR 32[rsp]
	mov	edx, DWORD PTR 36[rsp]
	mov	rsi, rbx
	mov	r13, r14
	mov	rdi, QWORD PTR 24[rsp]
	call	il4965_rate_n_flags_from_tbl@PLT
	mov	DWORD PTR 20[rbx], eax
.L11:
	mov	eax, DWORD PTR [r15]
	mov	DWORD PTR 20[r13], 1
	add	eax, 1
	cmp	eax, 131
	jle	.L62
	mov	eax, 133
	mov	DWORD PTR [r15], 133
	mov	DWORD PTR [rbx], eax
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L59:
	mov	esi, DWORD PTR ANT_AC[rip]
	mov	DWORD PTR 28[rbx], esi
	jmp	.L13
.L62:
	mov	DWORD PTR [r15], eax
	mov	DWORD PTR [rbx], eax
	jmp	.L50
	.cfi_endproc
.LFE0:
	.size	il4965_rs_move_siso_to_other, .-il4965_rs_move_siso_to_other
	.comm	RATE_COUNT,4,4
	.comm	LQ_NONE,4,4
	.comm	IL_RS_GOOD_RATIO,4,4
	.comm	IEEE80211_HT_CAP_SGI_40,4,4
	.comm	IEEE80211_HT_CAP_SGI_20,4,4
	.comm	ANT_BC,4,4
	.comm	ANT_AC,4,4
	.comm	ANT_AB,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_4965-rs.c_il4965_rs_move_siso_to_other.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"LQ: SISO toggle Antenna\012\000"
	.align	2
.LC1:
	.ascii	"LQ: SISO switch to MIMO2\012\000"
	.align	2
.LC2:
	.ascii	"LQ: SISO toggle SGI/NGI\012\000"
	.align	2
.LC3:
	.ascii	"SGI was set in GF+SISO\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	il4965_rs_move_siso_to_other, %function
il4965_rs_move_siso_to_other:
	@ args = 4, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	sub	sp, sp, #52
	ldr	r1, [r1, #20]
	ldr	ip, [r5, #4]
	ldr	r10, [r0]
	str	r0, [sp, #24]
	str	r2, [sp, #28]
	ldr	r0, [r0, #4]
	ldr	r2, .L60
	add	r4, r1, ip, lsl #5
	ldr	r8, [r2]
	str	r0, [sp, #12]
	ldr	r2, [r4, #28]
	ldr	r0, [sp, #88]
	ldr	r7, [r1, ip, lsl #5]
	add	r2, r2, r0, lsl #2
	ldr	lr, [r5]
	str	ip, [sp, #40]
	rsb	r8, r8, #8
	rsb	ip, ip, #1
	str	r2, [sp, #16]
	lsl	r2, r0, #2
	mov	r9, r3
	ldr	fp, .L60+4
	mov	r3, r7
	str	r1, [sp, #36]
	str	ip, [sp, #44]
	str	lr, [sp, #20]
	add	r6, r1, ip, lsl #5
	lsl	r8, r8, #2
	str	r2, [sp, #32]
	b	.L21
.L2:
	ldr	r2, [r4, #20]
	ldr	r3, [r9]
	cmp	r2, #0
	bne	.L16
	ldr	r2, .L60+8
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L6
.L17:
	ldr	r0, .L60+12
	bl	D_RATE
	mov	r2, r8
	mov	r1, r4
	mov	r0, r6
	bl	memcpy
	ldr	r3, [sp, #20]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L19
.L53:
	ldr	r3, [r4]
.L4:
	add	r3, r3, #1
	cmp	r3, #131
	str	r3, [r4]
	bgt	.L6
	cmp	r3, r7
	beq	.L27
.L21:
	ldr	r2, [r5, #16]
	cmp	r3, #131
	add	r2, r2, #1
	str	r2, [r5, #16]
	beq	.L2
	bgt	.L3
	sub	r2, r3, #128
	cmp	r2, #2
	bhi	.L4
	ldr	r0, .L60+16
	bl	D_RATE
	mov	r2, r8
	mov	r1, r4
	mov	r0, r6
	bl	memcpy
	mov	r2, #0
	ldr	r3, [r4]
	str	r2, [r6, #4]
	cmp	r3, #130
	beq	.L56
	cmp	r3, #129
	ldreq	r3, .L60+20
	ldrne	r3, .L60+24
	ldr	r1, [r3]
	str	r1, [r6, #24]
.L12:
	mov	r0, r10
	bl	il4965_rs_is_valid_ant
	cmp	r0, #0
	beq	.L53
	ldr	r3, [sp, #88]
	mov	r1, r5
	str	r3, [sp, #4]
	ldr	r2, [sp, #28]
	mov	r3, r9
	ldr	r0, [sp, #24]
	str	r6, [sp]
	bl	il4965_rs_switch_to_mimo2
	cmp	r0, #0
	bne	.L53
	mov	r2, #1
	ldr	r1, [sp, #36]
	ldr	r0, [sp, #40]
	ldr	r3, [r1, r0, lsl #5]
	str	r2, [r5, #12]
	add	r3, r3, r2
	cmp	r3, #131
	strle	r3, [r1, r0, lsl #5]
	movgt	r3, #133
	ldrgt	r2, [sp, #36]
	ldrgt	r1, [sp, #40]
	strgt	r3, [r2, r1, lsl #5]
	b	.L48
.L57:
	ldr	r3, [sp, #12]
	cmp	r3, #1
	ble	.L6
	ldr	r2, .L60+28
	ldr	r3, [sp, #16]
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L29
.L6:
	mov	r3, #133
	cmp	r7, r3
	str	r3, [r4]
	beq	.L27
.L58:
	ldr	r3, [r5, #16]
	add	r3, r3, #1
	str	r3, [r5, #16]
.L28:
	mov	r0, fp
	bl	D_RATE
	ldr	r3, [r4]
	cmp	r3, #133
	beq	.L57
	ldr	r2, [sp, #12]
	cmp	r2, #2
	cmple	r3, #132
	beq	.L6
	ldr	r2, .L60+28
	ldr	r1, [sp, #16]
	ldr	r2, [r2]
	ldr	r1, [r1]
	cmp	r1, r2
	bge	.L4
.L29:
	mov	r2, r8
	mov	r1, r4
	mov	r0, r6
	bl	memcpy
	mov	r2, r6
	mov	r0, r10
	add	r1, r6, #16
	bl	il4965_rs_toggle_antenna
	cmp	r0, #0
	beq	.L53
	b	.L10
.L3:
	sub	r3, r3, #132
	cmp	r3, #1
	bls	.L28
	mov	r3, #133
	cmp	r7, r3
	str	r3, [r4]
	bne	.L58
.L27:
	ldr	r3, .L60+32
	ldr	r3, [r3]
	str	r3, [r6, #12]
.L48:
	mov	r0, #0
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r2, .L60+36
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L6
	b	.L17
.L56:
	ldr	r3, .L60+40
	ldr	r1, [r3]
	str	r1, [r6, #24]
	b	.L12
.L19:
	ldr	r0, .L60+44
	bl	IL_ERR
.L18:
	ldr	r3, [r4, #4]
	mov	r1, r6
	clz	r3, r3
	lsr	r3, r3, #5
	str	r3, [r6, #4]
	mov	r0, r5
	bl	il4965_rs_set_expected_tpt_table
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [r5, #8]
	ldr	r1, .L60+48
	ldr	r2, [r6, #8]
	smull	r0, r1, r3, r1
	ldr	r0, [sp, #32]
	asr	r3, r3, #31
	ldr	r2, [r2, r0]
	rsb	r3, r3, r1, asr #5
	cmp	r2, r3
	ble	.L53
.L20:
	mov	r1, r6
	ldr	r3, [sp, #20]
	ldr	r2, [sp, #88]
	ldr	r0, [sp, #24]
	bl	il4965_rate_n_flags_from_tbl
	str	r0, [r6, #16]
.L10:
	mov	r2, #1
	ldr	r3, [sp, #36]
	ldr	r1, [sp, #40]
	ldr	r3, [r3, r1, lsl #5]
	str	r2, [r5, #12]
	add	r3, r3, r2
	cmp	r3, #131
	ble	.L59
	mov	r3, #133
	ldr	r2, [sp, #36]
	ldr	r1, [sp, #40]
	str	r3, [r2, r1, lsl #5]
.L23:
	mov	r0, #0
	ldr	r2, [sp, #36]
	ldr	r1, [sp, #44]
	str	r3, [r2, r1, lsl #5]
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L59:
	ldr	r2, [sp, #36]
	ldr	r1, [sp, #40]
	str	r3, [r2, r1, lsl #5]
	b	.L23
.L61:
	.align	2
.L60:
	.word	RATE_COUNT
	.word	.LC0
	.word	IEEE80211_HT_CAP_SGI_20
	.word	.LC2
	.word	.LC1
	.word	ANT_AC
	.word	ANT_BC
	.word	IL_RS_GOOD_RATIO
	.word	LQ_NONE
	.word	IEEE80211_HT_CAP_SGI_40
	.word	ANT_AB
	.word	.LC3
	.word	1374389535
	.size	il4965_rs_move_siso_to_other, .-il4965_rs_move_siso_to_other
	.comm	RATE_COUNT,4,4
	.comm	LQ_NONE,4,4
	.comm	IL_RS_GOOD_RATIO,4,4
	.comm	IEEE80211_HT_CAP_SGI_40,4,4
	.comm	IEEE80211_HT_CAP_SGI_20,4,4
	.comm	ANT_BC,4,4
	.comm	ANT_AC,4,4
	.comm	ANT_AB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
