	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath_update_survey_stats        ## -- Begin function ath_update_survey_stats
	.p2align	4, 0x90
_ath_update_survey_stats:               ## @ath_update_survey_stats
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_ath9k_hw_common
	movq	%rax, %r13
	movq	8(%r14), %r15
	movl	$-1, %eax
	testq	%r15, %r15
	je	LBB0_9
## %bb.1:
	subq	16(%r14), %r15
	shrq	$2, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %ebx
	movq	%r13, %r12
	addq	$4, %r12
	movq	(%r14), %rax
	movq	_ATH9K_PM_AWAKE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	callq	_ath_hw_cycle_counters_update
LBB0_3:
	movl	(%r12), %r11d
	testl	%r11d, %r11d
	je	LBB0_4
## %bb.6:
	movq	_SURVEY_INFO_TIME@GOTPCREL(%rip), %rax
	movq	_SURVEY_INFO_TIME_BUSY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movslq	%r15d, %rax
	movq	_SURVEY_INFO_TIME_RX@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	imull	$1000, %ebx, %edi               ## imm = 0x3E8
	movq	_SURVEY_INFO_TIME_TX@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	leaq	(%rax,%rax,4), %r14
	movl	%r11d, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r9d
	movl	8(%r13), %r8d
	movl	12(%r13), %esi
	movl	%r8d, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r10d
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
	movd	%ecx, %xmm0
	movdqa	%xmm0, %xmm1
	pinsrd	$1, %r9d, %xmm1
	pinsrd	$2, %r10d, %xmm1
	pinsrd	$3, %eax, %xmm1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movdqu	(%rcx,%r14,4), %xmm2
	por	%xmm2, %xmm0
	paddd	%xmm2, %xmm1
	pblendw	$3, %xmm0, %xmm1                ## xmm1 = xmm0[0,1],xmm1[2,3,4,5,6,7]
	movdqu	%xmm1, (%rcx,%r14,4)
	movl	16(%r13), %eax
	xorl	%edx, %edx
	divl	%edi
	addl	%eax, 16(%rcx,%r14,4)
	cmpl	%edi, %r11d
	movl	$-1, %eax
	jb	LBB0_9
## %bb.7:
	imull	$100, %r8d, %eax
	xorl	%edx, %edx
	divl	%r11d
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_4:
	testl	%ebx, %ebx
	movl	$-1, %eax
	jne	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_ath_update_survey_nf
	movl	%ebx, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH9K_PM_AWAKE,8,3             ## @ATH9K_PM_AWAKE
	.comm	_SURVEY_INFO_TIME,4,2           ## @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ## @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_TIME_RX,4,2        ## @SURVEY_INFO_TIME_RX
	.comm	_SURVEY_INFO_TIME_TX,4,2        ## @SURVEY_INFO_TIME_TX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath_update_survey_stats        ; -- Begin function ath_update_survey_stats
	.p2align	2
_ath_update_survey_stats:               ; @ath_update_survey_stats
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x22, [x0, #8]
	mov	x0, x22
	bl	_ath9k_hw_common
	ldr	x25, [x22, #8]
	cbz	x25, LBB0_7
; %bb.1:
	mov	x21, x0
	ldr	x26, [x22, #16]
	mov	x20, x0
	ldr	w24, [x20], #4
	ldr	x23, [x19]
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _ATH9K_PM_AWAKE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATH9K_PM_AWAKE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_ath_hw_cycle_counters_update
LBB0_3:
	sub	x8, x25, x26
	ldr	w9, [x20]
	cbz	w9, LBB0_6
; %bb.4:
	mov	w10, #1000
	sbfx	x11, x8, #2, #32
	mul	w12, w24, w10
Lloh3:
	adrp	x10, _SURVEY_INFO_TIME@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SURVEY_INFO_TIME@GOTPAGEOFF]
Lloh5:
	adrp	x13, _SURVEY_INFO_TIME_BUSY@GOTPAGE
Lloh6:
	ldr	x13, [x13, _SURVEY_INFO_TIME_BUSY@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	ldr	w13, [x13]
	orr	w10, w13, w10
Lloh9:
	adrp	x13, _SURVEY_INFO_TIME_RX@GOTPAGE
Lloh10:
	ldr	x13, [x13, _SURVEY_INFO_TIME_RX@GOTPAGEOFF]
Lloh11:
	ldr	w13, [x13]
	orr	w10, w10, w13
Lloh12:
	adrp	x13, _SURVEY_INFO_TIME_TX@GOTPAGE
Lloh13:
	ldr	x13, [x13, _SURVEY_INFO_TIME_TX@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	orr	w10, w10, w13
	mov	w13, #20
	madd	x11, x11, x13, x23
	ldp	w13, w14, [x11]
	orr	w10, w10, w13
	udiv	w13, w9, w12
	add	w13, w14, w13
	stp	w10, w13, [x11]
	ldp	w10, w13, [x21, #8]
	udiv	w14, w10, w12
	ldp	w15, w16, [x11, #8]
	add	w14, w15, w14
	udiv	w13, w13, w12
	add	w13, w16, w13
	stp	w14, w13, [x11, #8]
	ldr	w13, [x21, #16]
	ldr	w14, [x11, #16]
	udiv	w13, w13, w12
	add	w13, w14, w13
	str	w13, [x11, #16]
	cmp	w9, w12
	b.lo	LBB0_7
; %bb.5:
	mov	w11, #100
	mul	w10, w10, w11
	udiv	w21, w10, w9
	b	LBB0_9
LBB0_6:
	cbz	w24, LBB0_8
LBB0_7:
	mov	w21, #-1
	b	LBB0_10
LBB0_8:
	mov	w21, #0
LBB0_9:
	lsr	x22, x8, #2
	mov	x0, x20
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, x19
	mov	x1, x22
	bl	_ath_update_survey_nf
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH9K_PM_AWAKE,8,3             ; @ATH9K_PM_AWAKE
	.comm	_SURVEY_INFO_TIME,4,2           ; @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ; @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_TIME_RX,4,2        ; @SURVEY_INFO_TIME_RX
	.comm	_SURVEY_INFO_TIME_TX,4,2        ; @SURVEY_INFO_TIME_TX
.subsections_via_symbols
