	.file	"extr_calib.c_ath9k_init_nfcal_hist_buffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ath9k_init_nfcal_hist_buffer
	.type	ath9k_init_nfcal_hist_buffer, @function
ath9k_init_nfcal_hist_buffer:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR [rdi]
	mov	edx, DWORD PTR 4[rsi]
	mov	ecx, DWORD PTR NUM_NF_READINGS[rip]
	mov	DWORD PTR 12[rax], edx
	mov	edx, DWORD PTR [rsi]
	mov	rbx, QWORD PTR [rax]
	mov	DWORD PTR 8[rax], edx
	test	ecx, ecx
	jle	.L1
	mov	rbp, rdi
	mov	r15, rsi
	xor	r13d, r13d
	xor	r14d, r14d
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L6:
	mov	QWORD PTR 24[rbx], 0
	mov	edx, r13d
	mov	rsi, r15
	mov	rdi, rbp
	call	ath9k_hw_get_default_nf@PLT
	mov	DWORD PTR [rbx], eax
	mov	edx, DWORD PTR AR_PHY_CCA_FILTERWINDOW_LENGTH[rip]
	mov	DWORD PTR 16[rbx], edx
	mov	edx, DWORD PTR ATH9K_NF_CAL_HIST_MAX[rip]
	test	edx, edx
	jle	.L3
	mov	rcx, QWORD PTR 8[rbx]
	xor	edx, edx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR [rbx]
.L4:
	mov	DWORD PTR [rcx+rdx*4], eax
	add	rdx, 1
	cmp	DWORD PTR ATH9K_NF_CAL_HIST_MAX[rip], edx
	jg	.L12
.L3:
	add	r13d, 1
	cmp	DWORD PTR AR5416_MAX_CHAINS[rip], r13d
	cmovle	r13d, r12d
	add	r14d, 1
	add	rbx, 32
	cmp	DWORD PTR NUM_NF_READINGS[rip], r14d
	jg	.L6
.L1:
	add	rsp, 8
	.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
	.cfi_endproc
.LFE0:
	.size	ath9k_init_nfcal_hist_buffer, .-ath9k_init_nfcal_hist_buffer
	.comm	NUM_NF_READINGS,4,4
	.comm	ATH9K_NF_CAL_HIST_MAX,4,4
	.comm	AR_PHY_CCA_FILTERWINDOW_LENGTH,4,4
	.comm	AR5416_MAX_CHAINS,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_calib.c_ath9k_init_nfcal_hist_buffer.c"
	.text
	.align	2
	.global	ath9k_init_nfcal_hist_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath9k_init_nfcal_hist_buffer, %function
ath9k_init_nfcal_hist_buffer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, .L13
	ldr	r3, [r0]
	ldr	r2, [r8]
	mov	r7, r0
	cmp	r2, #0
	ldr	r0, [r1, #4]
	ldr	r2, [r1]
	ldr	r6, [r3]
	sub	sp, sp, #20
	str	r0, [r3, #8]
	str	r2, [r3, #4]
	ble	.L1
	mov	r2, #0
	add	r3, r6, #12
	add	fp, r6, #4
	str	r3, [sp, #4]
	str	fp, [sp, #12]
	add	r3, r6, #8
	mov	fp, r6
	mov	r4, r2
	mov	r6, r2
	ldr	r10, .L13+4
	ldr	r5, .L13+8
	ldr	r9, .L13+12
	str	r3, [sp, #8]
.L2:
	mov	r2, #0
	ldr	r3, [sp, #4]
	mov	r0, r7
	str	r2, [r3, r4, lsl #4]
	mov	r2, r6
	str	r1, [sp]
	bl	ath9k_hw_get_default_nf
	str	r0, [fp, r4, lsl #4]
	ldr	ip, [r10]
	ldr	r3, [sp, #8]
	ldr	r1, [sp]
	str	ip, [r3, r4, lsl #4]
	ldr	ip, [r5]
	cmp	ip, #0
	ble	.L3
	ldr	r3, [sp, #12]
	mov	ip, #0
	ldr	lr, [r3, r4, lsl #4]
	sub	lr, lr, #4
	b	.L4
.L12:
	ldr	r0, [fp, r4, lsl #4]
.L4:
	str	r0, [lr, #4]!
	ldr	r3, [r5]
	add	ip, ip, #1
	cmp	r3, ip
	bgt	.L12
.L3:
	ldr	ip, [r9]
	add	r6, r6, #1
	ldr	r0, [r8]
	cmp	ip, r6
	add	r4, r4, #1
	movle	r6, #0
	cmp	r0, r4
	bgt	.L2
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	.align	2
.L13:
	.word	NUM_NF_READINGS
	.word	AR_PHY_CCA_FILTERWINDOW_LENGTH
	.word	ATH9K_NF_CAL_HIST_MAX
	.word	AR5416_MAX_CHAINS
	.size	ath9k_init_nfcal_hist_buffer, .-ath9k_init_nfcal_hist_buffer
	.comm	NUM_NF_READINGS,4,4
	.comm	ATH9K_NF_CAL_HIST_MAX,4,4
	.comm	AR_PHY_CCA_FILTERWINDOW_LENGTH,4,4
	.comm	AR5416_MAX_CHAINS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
