	.file	"extr_eeprom.c_ath9k_hw_get_legacy_target_powers.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ath9k_hw_get_legacy_target_powers
	.type	ath9k_hw_get_legacy_target_powers, @function
ath9k_hw_get_legacy_target_powers:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	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
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 16[rsp], r8
	lea	rdx, 32[rsp]
	mov	QWORD PTR 24[rsp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	ath9k_hw_get_channel_centers@PLT
	mov	eax, DWORD PTR 128[rsp]
	mov	rdi, r14
	mov	r12, QWORD PTR 32[rsp]
	test	eax, eax
	cmove	r12, QWORD PTR 40[rsp]
	call	IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR [r15]
	mov	esi, eax
	call	ath9k_hw_fbin2freq@PLT
	cmp	rax, r12
	jge	.L3
	test	r13, r13
	jle	.L14
	mov	rbx, r15
	xor	ebp, ebp
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbp, 1
	add	rbx, 16
	cmp	r13, rbp
	je	.L7
.L5:
	mov	DWORD PTR [rsp], ebp
	mov	rax, QWORD PTR AR5416_BCHAN_UNUSED[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L26
	mov	rdi, r14
	call	IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	ath9k_hw_fbin2freq@PLT
	cmp	rax, r12
	je	.L15
	mov	rdi, r14
	call	IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	ath9k_hw_fbin2freq@PLT
	test	ebp, ebp
	je	.L6
	cmp	rax, r12
	jle	.L6
	mov	rdi, r14
	call	IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR -16[rbx]
	mov	esi, eax
	call	ath9k_hw_fbin2freq@PLT
	cmp	rax, r12
	jge	.L6
	mov	ebx, DWORD PTR [rsp]
	sub	ebx, 1
	movsx	rbx, ebx
	sal	rbx, 4
	lea	rbp, 16[r15+rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	mov	r15, rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movdqu	xmm0, XMMWORD PTR [r15]
	mov	rax, QWORD PTR 16[rsp]
	movaps	XMMWORD PTR [rsp], xmm0
	movups	XMMWORD PTR [rax], xmm0
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	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
.L26:
	.cfi_restore_state
	sub	DWORD PTR [rsp], 1
	mov	eax, DWORD PTR [rsp]
	cmp	eax, -1
	je	.L14
.L7:
	movsx	r14, DWORD PTR [rsp]
	sal	r14, 4
	add	r15, r14
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rbp, r15
	mov	rbx, -16
.L4:
	mov	rdi, r14
	add	r15, rbx
	call	IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR [r15]
	mov	esi, eax
	call	ath9k_hw_fbin2freq@PLT
	mov	rdi, r14
	xor	r14d, r14d
	mov	r13, rax
	call	IS_CHAN_2GHZ@PLT
	mov	rdi, QWORD PTR 0[rbp]
	mov	esi, eax
	call	ath9k_hw_fbin2freq@PLT
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 24[rsp]
	lea	rcx, 0[0+rax*8]
	mov	QWORD PTR 24[rsp], rcx
	test	rax, rax
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 8[r15]
	mov	rsi, r13
	mov	rdi, r12
	mov	rbx, 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	rbx, r14
	add	r14, 8
	call	ath9k_hw_interpolate@PLT
	mov	QWORD PTR [rbx], rax
	cmp	r14, QWORD PTR 24[rsp]
	jne	.L11
	jmp	.L1
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ath9k_hw_get_legacy_target_powers, .-ath9k_hw_get_legacy_target_powers
	.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_eeprom.c_ath9k_hw_get_legacy_target_powers.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ath9k_hw_get_legacy_target_powers
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath9k_hw_get_legacy_target_powers, %function
ath9k_hw_get_legacy_target_powers:
	@ 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	r6, r2
	sub	sp, sp, #36
	mov	r9, r3
	ldr	r3, .L24
	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	ath9k_hw_get_channel_centers
	ldr	r3, [sp, #24]
	cmp	r5, #0
	mov	r0, r8
	ldr	r7, [sp, #20]
	ldr	r4, [r6]
	moveq	r7, r3
	bl	IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r4
	bl	ath9k_hw_fbin2freq
	cmp	r0, r7
	bge	.L3
	cmp	r9, #0
	ble	.L13
	mov	r4, #0
	ldr	fp, .L24+4
	sub	r6, r6, #8
	b	.L5
.L6:
	add	r3, r4, #1
	cmp	r9, r3
	beq	.L7
	mov	r4, r3
.L5:
	ldr	r10, [r6, #8]
	ldr	r2, [fp]
	mov	r5, r6
	cmp	r10, r2
	add	r6, r6, #8
	beq	.L22
	mov	r0, r8
	bl	IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r10
	bl	ath9k_hw_fbin2freq
	cmp	r0, r7
	beq	.L14
	mov	r0, r8
	ldr	r10, [r5, #8]
	bl	IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r10
	bl	ath9k_hw_fbin2freq
	cmp	r4, #0
	cmpne	r0, r7
	ble	.L6
	mov	r0, r8
	ldr	r5, [r5]
	bl	IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r5
	bl	ath9k_hw_fbin2freq
	cmp	r0, r7
	bge	.L6
	sub	r3, r4, #1
	ldr	r2, [sp, #8]
	lsl	r3, r3, #3
	add	r6, r3, #8
	add	r6, r2, r6
	b	.L4
.L14:
	str	r6, [sp, #8]
.L3:
	ldr	r3, [sp, #8]
	ldm	r3, {r0, r1}
	ldr	r3, [sp, #12]
	stm	r3, {r0, r1}
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	subs	r4, r4, #1
	bcc	.L13
.L7:
	ldr	r3, [sp, #8]
	add	r3, r3, r4, lsl #3
	str	r3, [sp, #8]
	b	.L3
.L13:
	mvn	r3, #7
	ldr	r6, [sp, #8]
.L4:
	ldr	r2, [sp, #8]
	mov	r0, r8
	ldr	r4, [r2, r3]
	add	r10, r2, r3
	bl	IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r4
	bl	ath9k_hw_fbin2freq
	mov	r3, r0
	mov	r0, r8
	ldr	r4, [r6]
	mov	r8, r3
	bl	IS_CHAN_2GHZ
	mov	r1, r0
	mov	r0, r4
	bl	ath9k_hw_fbin2freq
	ldr	r3, [sp, #76]
	mov	r9, r0
	cmp	r3, #0
	ble	.L1
	mov	r4, #0
.L10:
	ldr	r2, [r6, #4]
	ldr	r3, [r10, #4]
	ldr	r2, [r2, r4, lsl #2]
	ldr	ip, [sp, #12]
	ldr	r3, [r3, r4, lsl #2]
	mov	r1, r8
	str	r2, [sp]
	mov	r0, r7
	mov	r2, r9
	ldr	r5, [ip, #4]
	bl	ath9k_hw_interpolate
	ldr	r3, [sp, #76]
	str	r0, [r5, r4, lsl #2]
	add	r4, r4, #1
	cmp	r3, r4
	bne	.L10
	b	.L1
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	AR5416_BCHAN_UNUSED
	.size	ath9k_hw_get_legacy_target_powers, .-ath9k_hw_get_legacy_target_powers
	.comm	AR5416_BCHAN_UNUSED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
