	.file	"extr_3945.c_il3945_hw_reg_set_scan_power.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	il3945_hw_reg_set_scan_power, @function
il3945_hw_reg_set_scan_power:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR 16[r8]
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	edi, DWORD PTR [r8]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdx
	lea	rdx, [rsi+rsi*2]
	lea	r13, [rax+rdx*8]
	mov	rax, QWORD PTR RATE_6M_IDX_TBL[rip]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movsx	rbx, r9d
	sal	rbp, 4
	mov	esi, DWORD PTR [rcx+rax*4]
	call	min@PLT
	mov	esi, DWORD PTR [r14]
	mov	edi, eax
	call	min@PLT
	mov	rdx, QWORD PTR RATE_6M_IDX_TBL[rip]
	mov	rcx, QWORD PTR 8[r12]
	mov	DWORD PTR 0[r13], eax
	sal	rdx, 4
	mov	rdi, QWORD PTR [rcx+rbp]
	sub	eax, DWORD PTR 8[rcx+rdx]
	add	eax, eax
	cdqe
	sub	rdi, rax
	call	il3945_hw_reg_fix_power_idx@PLT
	mov	rdx, QWORD PTR power_gain_table[rip]
	mov	QWORD PTR 8[r13], rax
	mov	rdx, QWORD PTR [rdx+rbx*8]
	lea	rax, [rdx+rax*8]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 20[r13], edx
	mov	DWORD PTR 16[r13], eax
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	il3945_hw_reg_set_scan_power, .-il3945_hw_reg_set_scan_power
	.comm	power_gain_table,8,8
	.comm	RATE_6M_IDX_TBL,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_3945.c_il3945_hw_reg_set_scan_power.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	il3945_hw_reg_set_scan_power, %function
il3945_hw_reg_set_scan_power:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r9, r0
	ldr	r10, .L4
	ldr	r8, [sp, #32]
	mov	r6, r1
	ldr	r1, [r10]
	mov	r7, r2
	ldr	r1, [r3, r1, lsl #2]
	ldr	r0, [r8]
	ldr	r4, [r8, #8]
	ldr	r5, [sp, #36]
	bl	min
	ldr	r1, [r9]
	bl	min
	ldr	r3, [r8, #4]
	ldr	r1, [r10]
	ldr	r2, [r3, r7, lsl #3]
	add	r3, r3, r1, lsl #3
	ldr	r3, [r3, #4]
	str	r0, [r4, r6, lsl #4]
	sub	r0, r0, r3
	sub	r0, r2, r0, lsl #1
	bl	il3945_hw_reg_fix_power_idx
	ldr	r3, .L4+4
	add	r1, r4, r6, lsl #4
	ldr	r3, [r3]
	str	r0, [r1, #4]
	ldr	r3, [r3, r5, lsl #2]
	add	r2, r3, r0, lsl #3
	ldr	r2, [r2, #4]
	ldr	r3, [r3, r0, lsl #3]
	str	r2, [r1, #12]
	str	r3, [r1, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	.align	2
.L4:
	.word	RATE_6M_IDX_TBL
	.word	power_gain_table
	.size	il3945_hw_reg_set_scan_power, .-il3945_hw_reg_set_scan_power
	.comm	power_gain_table,4,4
	.comm	RATE_6M_IDX_TBL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
