	.file	"extr_phy.c_ath5k_hw_get_median_noise_floor.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cal %d:%d\n"
	.text
	.p2align 4
	.type	ath5k_hw_get_median_noise_floor, @function
ath5k_hw_get_median_noise_floor:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR ATH5K_NF_CAL_HIST_MAX[rip]
	mov	rdi, rsp
	mov	rdx, rax
	lea	rax, 15[0+rax*8]
	mov	rcx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rcx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L25
.L4:
	mov	esi, DWORD PTR [rbx]
	mov	r13, rsp
	sal	edx, 3
	mov	rdi, r13
	call	memcpy@PLT
	mov	r10d, DWORD PTR ATH5K_NF_CAL_HIST_MAX[rip]
	lea	r8d, -1[r10]
	test	r8d, r8d
	jle	.L5
	mov	edi, r10d
	lea	r9, 8[r13]
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	edi, 1
	jle	.L10
	lea	edx, -2[rdi]
	mov	rax, r13
	lea	rsi, [r9+rdx*8]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, QWORD PTR 8[rax]
	mov	rcx, QWORD PTR [rax]
	cmp	rdx, rcx
	jle	.L7
	mov	QWORD PTR 8[rax], rcx
	mov	QWORD PTR [rax], rdx
.L7:
	add	rax, 8
	cmp	rsi, rax
	jne	.L8
.L10:
	sub	edi, 1
	cmp	edi, 1
	jne	.L6
.L5:
	test	r10d, r10d
	jle	.L11
	xor	r12d, r12d
	lea	r14, .LC0[rip]
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r8, QWORD PTR 0[r13+r12*8]
	mov	ecx, r12d
	mov	rdx, r14
	mov	rdi, rbx
	mov	esi, DWORD PTR ATH5K_DEBUG_CALIBRATE[rip]
	add	r12, 1
	call	ATH5K_DBG@PLT
	mov	eax, DWORD PTR ATH5K_NF_CAL_HIST_MAX[rip]
	cmp	eax, r12d
	jg	.L12
	lea	r8d, -1[rax]
.L11:
	mov	eax, r8d
	shr	eax, 31
	add	eax, r8d
	sar	eax
	mov	rbx, QWORD PTR -40[rbp]
	xor	rbx, QWORD PTR fs:40
	cdqe
	mov	rax, QWORD PTR 0[r13+rax*8]
	jne	.L26
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L25:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ath5k_hw_get_median_noise_floor, .-ath5k_hw_get_median_noise_floor
	.comm	ATH5K_NF_CAL_HIST_MAX,4,4
	.comm	ATH5K_DEBUG_CALIBRATE,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_phy.c_ath5k_hw_get_median_noise_floor.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cal %d:%d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath5k_hw_get_median_noise_floor, %function
ath5k_hw_get_median_noise_floor:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r5, .L19
	ldr	r3, .L19+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	lsl	r2, r2, #2
	add	r3, r2, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r6, sp, #8
	ldr	r1, [r0]
	mov	r4, r0
	mov	r0, r6
	bl	memcpy
	ldr	r7, [r5]
	sub	lr, r7, #1
	cmp	lr, #0
	ble	.L2
	mov	r0, r7
.L3:
	cmp	r0, #1
	movgt	r3, r6
	movgt	r2, #1
	ble	.L7
.L5:
	ldr	r1, [r3, #4]
	ldr	ip, [r3], #4
	add	r2, r2, #1
	cmp	r1, ip
	stmdagt	r3, {r1, ip}
	cmp	r0, r2
	bne	.L5
.L7:
	sub	r0, r0, #1
	cmp	r0, #1
	bne	.L3
.L2:
	cmp	r7, #0
	ble	.L8
	mov	r7, #0
	ldr	r9, .L19+8
	ldr	r10, .L19+12
	sub	r8, r6, #4
.L9:
	ldr	r2, [r8, #4]!
	mov	r3, r7
	str	r2, [sp]
	mov	r0, r4
	mov	r2, r10
	ldr	r1, [r9]
	bl	ATH5K_DBG
	ldr	r3, [r5]
	add	r7, r7, #1
	cmp	r3, r7
	bgt	.L9
	sub	lr, r3, #1
.L8:
	add	r3, lr, lr, lsr #31
	asr	r3, r3, #1
	ldr	r0, [r6, r3, lsl #2]
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	ATH5K_NF_CAL_HIST_MAX
	.word	.LC1
	.word	ATH5K_DEBUG_CALIBRATE
	.word	.LC0
	.size	ath5k_hw_get_median_noise_floor, .-ath5k_hw_get_median_noise_floor
	.comm	ATH5K_NF_CAL_HIST_MAX,4,4
	.comm	ATH5K_DEBUG_CALIBRATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
