	.file	"extr_ar5416_reset.c_ar5416GetTargetPowersLeg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ar5416GetTargetPowersLeg
	.type	ar5416GetTargetPowersLeg, @function
ar5416GetTargetPowersLeg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 8[rsp], rdx
	lea	rdx, 32[rsp]
	mov	QWORD PTR [rsp], rcx
	mov	QWORD PTR 16[rsp], r8
	mov	QWORD PTR 24[rsp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	ar5416GetChannelCenters@PLT
	mov	rdi, r15
	mov	r12, QWORD PTR 32[rsp]
	cmp	QWORD PTR 128[rsp], 0
	cmove	r12, QWORD PTR 40[rsp]
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	fbin2freq@PLT
	cmp	rax, r12
	jge	.L3
	xor	r13d, r13d
	test	r14, r14
	jg	.L9
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	add	ebp, 1
	add	r13, 1
	add	rbx, 16
	cmp	QWORD PTR [rsp], r13
	je	.L29
.L9:
	mov	rcx, r13
	mov	rax, QWORD PTR AR5416_BCHAN_UNUSED[rip]
	mov	ebp, r13d
	mov	r14d, r13d
	sal	rcx, 4
	cmp	QWORD PTR [rbx], rax
	je	.L30
	mov	rdi, r15
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	fbin2freq@PLT
	cmp	rax, r12
	je	.L17
	mov	rdi, r15
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	fbin2freq@PLT
	cmp	rax, r12
	jle	.L6
	mov	rdi, r15
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR -16[rbx]
	mov	esi, eax
	call	fbin2freq@PLT
	cmp	rax, r12
	jge	.L6
	lea	eax, -1[rbp]
	test	ebp, ebp
	je	.L7
	movsx	rbx, eax
	mov	rax, QWORD PTR 8[rsp]
	mov	edi, 1
	sal	rbx, 4
	lea	rbp, 16[rax+rbx]
.L5:
	call	HALASSERT@PLT
	mov	rdi, r15
	xor	r14d, r14d
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	add	rbx, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	fbin2freq@PLT
	mov	rdi, r15
	mov	r13, rax
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR 0[rbp]
	mov	esi, eax
	call	fbin2freq@PLT
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 24[rsp]
	lea	rdx, 0[0+rax*8]
	mov	QWORD PTR 8[rsp], rdx
	test	rax, rax
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 8[rbx]
	mov	rsi, r13
	mov	rdi, r12
	mov	r15, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 8[rbp]
	mov	rcx, QWORD PTR [rdx+r14]
	mov	rdx, QWORD PTR [rsp]
	mov	r8, QWORD PTR [rax+r14]
	add	r15, r14
	add	r14, 8
	call	ath_ee_interpolate@PLT
	mov	QWORD PTR [r15], rax
	cmp	QWORD PTR 8[rsp], r14
	jne	.L14
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	QWORD PTR 8[rsp], rbx
.L3:
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	mov	edx, 16
	call	OS_MEMCPY@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L31
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L30:
	.cfi_restore_state
	mov	rdi, r15
	mov	QWORD PTR [rsp], rcx
	lea	r14d, -1[r13]
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rcx, QWORD PTR [rsp]
	mov	esi, eax
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR -16[rax+rcx]
	call	fbin2freq@PLT
	xor	edi, edi
	cmp	rax, r12
	setl	dil
	call	HALASSERT@PLT
	cmp	r14d, -1
	je	.L18
	movsx	r14, r14d
	sal	r14, 4
	add	QWORD PTR 8[rsp], r14
	jmp	.L3
.L18:
	mov	rbp, QWORD PTR 8[rsp]
	mov	rbx, -16
	xor	edi, edi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, r15
	movsx	rbp, ebp
	movsx	r14, r14d
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	sal	rbp, 4
	mov	esi, eax
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR -16[rax+rbp]
	call	fbin2freq@PLT
	xor	edi, edi
	cmp	rax, r12
	setl	dil
	sal	r14, 4
	call	HALASSERT@PLT
	add	QWORD PTR 8[rsp], r14
	jmp	.L3
.L7:
	mov	rdi, r15
	mov	rbx, -16
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rbp, QWORD PTR 8[rsp]
	mov	esi, eax
	mov	rdi, QWORD PTR -16[rbp]
	call	fbin2freq@PLT
	xor	edi, edi
	cmp	r12, rax
	setg	dil
	call	HALASSERT@PLT
	xor	edi, edi
	jmp	.L5
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ar5416GetTargetPowersLeg, .-ar5416GetTargetPowersLeg
	.comm	AR5416_BCHAN_UNUSED,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_ar5416_reset.c_ar5416GetTargetPowersLeg.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ar5416GetTargetPowersLeg
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar5416GetTargetPowersLeg, %function
ar5416GetTargetPowersLeg:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r1
	mov	r4, r2
	sub	sp, sp, #36
	mov	r9, r3
	ldr	r3, .L30
	str	r2, [sp, #8]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r3, [sp, #72]
	add	r2, sp, #20
	ldr	r5, [sp, #80]
	str	r3, [sp, #12]
	bl	ar5416GetChannelCenters
	ldr	r3, [sp, #24]
	cmp	r5, #0
	mov	r0, r8
	ldr	r7, [sp, #20]
	ldr	r4, [r4]
	moveq	r7, r3
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r4
	bl	fbin2freq
	cmp	r0, r7
	bge	.L3
	cmp	r9, #0
	ble	.L7
	ldr	r3, [sp, #8]
	mov	r4, #0
	ldr	r10, .L30+4
	sub	r6, r3, #8
	b	.L9
.L6:
	add	r3, r4, #1
	cmp	r9, r3
	beq	.L27
	mov	r4, r3
.L9:
	ldr	fp, [r6, #8]
	ldr	r3, [r10]
	mov	r5, r6
	cmp	fp, r3
	add	r6, r6, #8
	beq	.L28
	mov	r0, r8
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, fp
	bl	fbin2freq
	cmp	r0, r7
	beq	.L16
	mov	r0, r8
	ldr	fp, [r5, #8]
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, fp
	bl	fbin2freq
	cmp	r0, r7
	ble	.L6
	mov	r0, r8
	ldr	r5, [r5]
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r5
	bl	fbin2freq
	cmp	r0, r7
	bge	.L6
	cmp	r4, #0
	sub	r4, r4, #1
	beq	.L7
	mov	r0, #1
	ldr	r3, [sp, #8]
	lsl	r4, r4, #3
	add	r5, r4, #8
	add	r5, r3, r5
.L5:
	bl	HALASSERT
	ldr	r9, [sp, #8]
	mov	r0, r8
	ldr	r6, [r9, r4]
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r6
	bl	fbin2freq
	mov	r6, r0
	mov	r0, r8
	ldr	r8, [r5]
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r8
	bl	fbin2freq
	ldr	r3, [sp, #76]
	add	fp, r9, r4
	cmp	r3, #0
	mov	r9, r0
	ble	.L1
	mov	r4, #0
	ldr	r10, [sp, #12]
.L13:
	ldr	r1, [r5, #4]
	ldr	r3, [fp, #4]
	ldr	r1, [r1, r4, lsl #2]
	ldr	r3, [r3, r4, lsl #2]
	mov	r2, r9
	str	r1, [sp]
	mov	r0, r7
	mov	r1, r6
	ldr	r8, [r10, #4]
	bl	ath_ee_interpolate
	ldr	r3, [sp, #76]
	str	r0, [r8, r4, lsl #2]
	add	r4, r4, #1
	cmp	r3, r4
	bne	.L13
	b	.L1
.L16:
	str	r6, [sp, #8]
.L3:
	mov	r2, #8
	ldr	r1, [sp, #8]
	ldr	r0, [sp, #12]
	bl	OS_MEMCPY
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	ldr	r3, [sp, #8]
	sub	r2, r4, #-536870911
	mov	r0, r8
	ldr	r5, [r3, r2, lsl #3]
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r5
	bl	fbin2freq
	cmp	r0, r7
	movge	r0, #0
	movlt	r0, #1
	sub	r4, r4, #1
	bl	HALASSERT
	cmn	r4, #1
	ldrne	r3, [sp, #8]
	addne	r3, r3, r4, lsl #3
	strne	r3, [sp, #8]
	bne	.L3
.L18:
	mvn	r4, #7
	mov	r0, #0
	ldr	r5, [sp, #8]
	b	.L5
.L27:
	ldr	r3, [sp, #8]
	mov	r0, r8
	ldr	r5, [r3, r4, lsl #3]
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r5
	bl	fbin2freq
	cmp	r7, r0
	movle	r0, #0
	movgt	r0, #1
	bl	HALASSERT
	ldr	r3, [sp, #8]
	add	r3, r3, r4, lsl #3
	str	r3, [sp, #8]
	b	.L3
.L7:
	ldr	r5, [sp, #8]
	mov	r0, r8
	ldr	r4, [r5, #-8]
	bl	IEEE80211_IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r4
	bl	fbin2freq
	cmp	r7, r0
	movle	r0, #0
	movgt	r0, #1
	bl	HALASSERT
	mvn	r4, #7
	mov	r0, #0
	b	.L5
.L29:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC0
	.word	AR5416_BCHAN_UNUSED
	.size	ar5416GetTargetPowersLeg, .-ar5416GetTargetPowersLeg
	.comm	AR5416_BCHAN_UNUSED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
