	.file	"extr_ar9003_eeprom.c_ar9003_hw_atten_chain_get.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ar9003_hw_atten_chain_get, @function
ar9003_hw_atten_chain_get:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsx	rbx, esi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	ebx, 2
	jbe	.L9
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	r12, rdi
	mov	rdi, rdx
	mov	rbp, rdx
	call	IS_CHAN_2GHZ@PLT
	mov	r8, rax
	lea	rax, 0[0+rbx*4]
	test	r8, r8
	jne	.L11
	mov	rdx, QWORD PTR 8[r12]
	add	rax, QWORD PTR [r12]
	mov	edx, DWORD PTR [rdx+rbx*4]
	test	edx, edx
	jne	.L12
	mov	eax, DWORD PTR [rax]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	DWORD PTR 12[rsp], edx
	mov	rdi, QWORD PTR 0[rbp]
	lea	rdx, 12[rsp]
	mov	rsi, rsp
	mov	DWORD PTR [rsp], 5180
	mov	eax, DWORD PTR [rax]
	mov	ecx, 3
	mov	DWORD PTR 4[rsp], 5500
	mov	DWORD PTR 16[rsp], eax
	mov	rax, QWORD PTR 16[r12]
	mov	eax, DWORD PTR [rax+rbx*4]
	mov	DWORD PTR 8[rsp], 5785
	mov	DWORD PTR 20[rsp], eax
	call	ar9003_hw_power_interpolate@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 24[r12]
	mov	eax, DWORD PTR [rax+rbx*4]
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ar9003_hw_atten_chain_get, .-ar9003_hw_atten_chain_get
	.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_ar9003_eeprom.c_ar9003_hw_atten_chain_get.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar9003_hw_atten_chain_get, %function
ar9003_hw_atten_chain_get:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L12
	sub	sp, sp, #32
	cmp	r1, #2
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	movhi	r0, #0
	bls	.L9
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	mov	r5, r0
	mov	r0, r2
	mov	r4, r1
	mov	r6, r2
	bl	IS_CHAN_2GHZ
	cmp	r0, #0
	bne	.L11
	ldm	r5, {r2, r3}
	ldr	r3, [r3, r4, lsl #2]
	cmp	r3, #0
	ldreq	r0, [r2, r4, lsl #2]
	beq	.L1
	ldr	r1, .L12+4
	str	r3, [sp, #16]
	str	r1, [sp, #4]
	ldr	r1, [r2, r4, lsl #2]
	ldr	r2, .L12+8
	ldr	r3, [r5, #8]
	str	r1, [sp, #20]
	str	r2, [sp, #8]
	ldr	lr, [r3, r4, lsl #2]
	ldr	ip, .L12+12
	mov	r3, #3
	ldr	r0, [r6]
	add	r2, sp, #16
	add	r1, sp, #4
	str	lr, [sp, #24]
	str	ip, [sp, #12]
	bl	ar9003_hw_power_interpolate
	b	.L1
.L11:
	ldr	r3, [r5, #12]
	ldr	r0, [r3, r4, lsl #2]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	5180
	.word	5500
	.word	5785
	.size	ar9003_hw_atten_chain_get, .-ar9003_hw_atten_chain_get
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
