	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_handle_rx_statistics   ## -- Begin function iwl_mvm_handle_rx_statistics
	.p2align	4, 0x90
_iwl_mvm_handle_rx_statistics:          ## @iwl_mvm_handle_rx_statistics
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	%rdi, -48(%rbp)
	callq	_iwl_mvm_has_new_rx_stats_api
	movl	$40, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_iwl_mvm_has_new_rx_api
	testq	%rax, %rax
	movl	$4, %eax
	movl	$40, %r14d
	cmovel	%eax, %r14d
LBB0_2:
	movq	%r12, %rdi
	callq	_iwl_rx_packet_payload_len
	xorl	%ebx, %ebx
	cmpl	%r14d, %eax
	setne	%bl
	movq	%r12, %rdi
	callq	_iwl_rx_packet_payload_len
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_WARN_ONCE
	testq	%rax, %rax
	je	LBB0_3
LBB0_20:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r13, %rdi
	callq	_iwl_mvm_has_new_rx_stats_api
	leaq	16(%r12), %rbx
	movl	36(%r12), %ecx
	movl	%ecx, -52(%rbp)
	movl	32(%r12), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%ecx, 56(%r13)
	jmp	LBB0_6
LBB0_4:
	movl	%ecx, 60(%r13)
LBB0_6:
	movl	28(%r12), %edi
	callq	_le64_to_cpu
	movq	%rax, 48(%r13)
	movl	24(%r12), %edi
	callq	_le64_to_cpu
	movq	%rax, 40(%r13)
	movl	20(%r12), %edi
	callq	_le64_to_cpu
	movq	%rax, 32(%r13)
	movl	16(%r12), %edi
	callq	_le64_to_cpu
	movq	%rax, 24(%r13)
	movq	%rbx, -64(%rbp)
	movl	12(%r12), %r15d
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_iwl_mvm_rx_stats_check_trigger
	movl	20(%r13), %edi
	movq	_IEEE80211_IFACE_ITER_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_iwl_mvm_stat_iterator@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %rcx
	callq	_ieee80211_iterate_active_interfaces
	movq	%r13, %rdi
	callq	_iwl_mvm_has_new_rx_api
	testq	%rax, %rax
	je	LBB0_20
## %bb.7:
	movq	%r13, %rdi
	callq	_iwl_mvm_has_new_rx_stats_api
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movl	16(%r13), %edi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_13
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movl	16(%r13), %edi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%r12,%rbx,8)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_iwl_mvm_sta_from_staid_rcu
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	(%rbx,%rbx), %rcx
	movq	8(%r12,%rcx,4), %rcx
	movq	%rcx, (%rax)
	jmp	LBB0_12
LBB0_13:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movl	%r15d, %edi
	callq	_le32_to_cpu
	movq	_IWL_STATISTICS_REPLY_FLG_CLEAR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.14:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_spin_lock
	movq	_NUM_MAC_INDEX_DRIVER@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_19
## %bb.15:
	movl	$8, %r14d
	xorl	%r12d, %r12d
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	addl	%r15d, -8(%r13,%r14)
	incq	%r12
	movq	_NUM_MAC_INDEX_DRIVER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$12, %r14
	cmpq	%rax, %r12
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jge	LBB0_19
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r13
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx,%r12,4), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movl	4(%rbx,%r12,4), %edi
	callq	_le32_to_cpu
	addl	%eax, -4(%r13,%r14)
	testl	%r15d, %r15d
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%eax, %ebx
	leaq	(%r14,%r13), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_ewma_rate_init
	shll	$3, %ebx
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_ewma_rate_add
	jmp	LBB0_18
LBB0_19:
	movq	%r13, %rdi
	callq	_spin_unlock
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"received invalid statistics size (%d)!\n"

	.comm	_IEEE80211_IFACE_ITER_NORMAL,4,2 ## @IEEE80211_IFACE_ITER_NORMAL
	.comm	_iwl_mvm_stat_iterator,4,2      ## @iwl_mvm_stat_iterator
	.comm	_IWL_STATISTICS_REPLY_FLG_CLEAR,4,2 ## @IWL_STATISTICS_REPLY_FLG_CLEAR
	.comm	_NUM_MAC_INDEX_DRIVER,4,2       ## @NUM_MAC_INDEX_DRIVER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_handle_rx_statistics   ; -- Begin function iwl_mvm_handle_rx_statistics
	.p2align	2
_iwl_mvm_handle_rx_statistics:          ; @iwl_mvm_handle_rx_statistics
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	stp	xzr, xzr, [sp, #8]
	str	x0, [sp, #24]
	bl	_iwl_mvm_has_new_rx_stats_api
	mov	w21, #40
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_iwl_mvm_has_new_rx_api
	cmp	x0, #0
	mov	w8, #4
	csel	w21, w8, w21, eq
LBB0_2:
	mov	x0, x20
	bl	_iwl_rx_packet_payload_len
	cmp	w0, w21
	cset	w21, ne
	mov	x0, x20
	bl	_iwl_rx_packet_payload_len
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_WARN_ONCE
	cbz	x0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
	mov	x0, x19
	bl	_iwl_mvm_has_new_rx_stats_api
	add	x21, x20, #16
	ldp	w9, w8, [x20, #32]
	stp	w9, w8, [sp, #16]
	cbz	w0, LBB0_6
; %bb.5:
	str	w8, [x19, #56]
	b	LBB0_7
LBB0_6:
	str	w8, [x19, #60]
LBB0_7:
	ldr	w0, [x20, #28]
	bl	_le64_to_cpu
	str	x0, [x19, #48]
	ldr	w0, [x20, #24]
	bl	_le64_to_cpu
	str	x0, [x19, #40]
	ldr	w0, [x20, #20]
	bl	_le64_to_cpu
	str	x0, [x19, #32]
	ldr	w0, [x20, #16]
	bl	_le64_to_cpu
	str	x0, [x19, #24]
	str	x21, [sp, #8]
	ldr	w21, [x20, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_mvm_rx_stats_check_trigger
	ldr	w0, [x19, #20]
Lloh2:
	adrp	x8, _IEEE80211_IFACE_ITER_NORMAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IEEE80211_IFACE_ITER_NORMAL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _iwl_mvm_stat_iterator@GOTPAGE
Lloh6:
	ldr	x8, [x8, _iwl_mvm_stat_iterator@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x3, sp, #8
	bl	_ieee80211_iterate_active_interfaces
	mov	x0, x19
	bl	_iwl_mvm_has_new_rx_api
	cbz	x0, LBB0_3
; %bb.8:
	mov	x0, x19
	bl	_iwl_mvm_has_new_rx_stats_api
	bl	_rcu_read_lock
	ldr	w0, [x19, #16]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.9:
	mov	x22, #0
	add	x23, x20, #8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	ldr	w0, [x19, #16]
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.ge	LBB0_14
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x24, x23, x22, lsl #3
	ldr	x8, [x24]
	cbz	x8, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_iwl_mvm_sta_from_staid_rcu
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x24]
	str	x8, [x0]
	b	LBB0_10
LBB0_14:
	bl	_rcu_read_unlock
	mov	x0, x21
	bl	_le32_to_cpu
Lloh8:
	adrp	x8, _IWL_STATISTICS_REPLY_FLG_CLEAR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IWL_STATISTICS_REPLY_FLG_CLEAR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.15:
	mov	x0, x19
	bl	_spin_lock
Lloh11:
	adrp	x24, _NUM_MAC_INDEX_DRIVER@GOTPAGE
Lloh12:
	ldr	x24, [x24, _NUM_MAC_INDEX_DRIVER@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.16:
	mov	x25, #0
	mov	x26, #0
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w8, [x27, x25]
	add	w8, w8, w21
	str	w8, [x27, x25]
	add	x26, x26, #1
	ldrsw	x8, [x24]
	add	x25, x25, #12
	cmp	x26, x8
	b.ge	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x19, #8]
	add	x22, x20, x26, lsl #2
	ldr	w0, [x22]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x22, #4]
	bl	_le32_to_cpu
	add	x8, x27, x25
	ldr	w9, [x8, #4]
	add	w9, w9, w0
	str	w9, [x8, #4]
	cbz	w21, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x22, x0
	add	x23, x8, #8
	mov	x0, x23
	bl	_ewma_rate_init
	lsl	w8, w22, #3
	sdiv	w1, w8, w21
	mov	x0, x23
	bl	_ewma_rate_add
	b	LBB0_17
LBB0_20:
	mov	x0, x19
	bl	_spin_unlock
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"received invalid statistics size (%d)!\n"

	.comm	_IEEE80211_IFACE_ITER_NORMAL,4,2 ; @IEEE80211_IFACE_ITER_NORMAL
	.comm	_iwl_mvm_stat_iterator,4,2      ; @iwl_mvm_stat_iterator
	.comm	_IWL_STATISTICS_REPLY_FLG_CLEAR,4,2 ; @IWL_STATISTICS_REPLY_FLG_CLEAR
	.comm	_NUM_MAC_INDEX_DRIVER,4,2       ; @NUM_MAC_INDEX_DRIVER
.subsections_via_symbols
