	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function node_cleanup
_node_cleanup:                          ## @node_cleanup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	40(%rdi), %r14
	movq	32(%rdi), %r15
	movl	(%rdi), %eax
	movq	_IEEE80211_NODE_PWR_MGT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.1:
	movq	(%r14), %rdx
	movq	_IEEE80211_M_STA@GOTPCREL(%rip), %rsi
	movl	16(%r14), %r8d
	cmpq	(%rsi), %rdx
	je	LBB0_3
## %bb.2:
	decl	%r8d
	movl	%r8d, 16(%r14)
LBB0_3:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r12)
	movq	_IEEE80211_MSG_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_IEEE80211_NOTE
	movl	(%r12), %eax
LBB0_4:
	movq	_IEEE80211_NODE_VHT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_ieee80211_vht_node_cleanup
	movl	(%r12), %eax
LBB0_6:
	movq	_IEEE80211_NODE_HT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_ieee80211_ht_node_cleanup
LBB0_8:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ieee80211_ageq_drain_node
	movq	_IEEE80211_NODE_AREF@GOTPCREL(%rip), %rax
	movq	_IEEE80211_NODE_ASSOCID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%r12)
	movq	%r12, %rdi
	callq	_ieee80211_node_psq_drain
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_11:
	movq	$0, 24(%r12)
	movq	16(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	movq	_M_80211_NODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IEEE80211_FREE
	movq	$0, 16(%r12)
LBB0_13:
	movq	8(%r12), %rdi
	callq	_nitems
	testl	%eax, %eax
	jle	LBB0_18
## %bb.14:
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	callq	_nitems
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	movq	(%rdi,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%rax, %rdi
	callq	_m_freem
	movq	8(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	movq	8(%r12), %rdi
	jmp	LBB0_17
LBB0_18:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ieee80211_node_delucastkey     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_NODE_PWR_MGT,4,2     ## @IEEE80211_NODE_PWR_MGT
	.comm	_IEEE80211_M_STA,8,3            ## @IEEE80211_M_STA
	.comm	_IEEE80211_MSG_POWER,4,2        ## @IEEE80211_MSG_POWER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"power save mode off, %u sta's in ps mode"

	.comm	_IEEE80211_NODE_VHT,4,2         ## @IEEE80211_NODE_VHT
	.comm	_IEEE80211_NODE_HT,4,2          ## @IEEE80211_NODE_HT
	.comm	_IEEE80211_NODE_AREF,4,2        ## @IEEE80211_NODE_AREF
	.comm	_IEEE80211_NODE_ASSOCID,4,2     ## @IEEE80211_NODE_ASSOCID
	.comm	_M_80211_NODE,4,2               ## @M_80211_NODE
	.comm	_IEEE80211_M_MBSS,8,3           ## @IEEE80211_M_MBSS
	.no_dead_strip	_node_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function node_cleanup
_node_cleanup:                          ; @node_cleanup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldp	x21, x20, [x0, #32]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IEEE80211_NODE_PWR_MGT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_NODE_PWR_MGT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x10, [x20]
Lloh3:
	adrp	x11, _IEEE80211_M_STA@GOTPAGE
Lloh4:
	ldr	x11, [x11, _IEEE80211_M_STA@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	ldr	w4, [x20, #16]
	cmp	x10, x11
	b.eq	LBB0_3
; %bb.2:
	sub	w4, w4, #1
	str	w4, [x20, #16]
LBB0_3:
	bic	w8, w8, w9
	str	w8, [x19]
Lloh6:
	adrp	x8, _IEEE80211_MSG_POWER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_MSG_POWER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_IEEE80211_NOTE
	ldr	w8, [x19]
LBB0_4:
Lloh11:
	adrp	x9, _IEEE80211_NODE_VHT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IEEE80211_NODE_VHT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_ieee80211_vht_node_cleanup
	ldr	w8, [x19]
LBB0_6:
Lloh14:
	adrp	x9, _IEEE80211_NODE_HT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IEEE80211_NODE_HT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_ieee80211_ht_node_cleanup
LBB0_8:
	mov	x0, x21
	mov	x1, x19
	bl	_ieee80211_ageq_drain_node
Lloh17:
	adrp	x8, _IEEE80211_NODE_AREF@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IEEE80211_NODE_AREF@GOTPAGEOFF]
Lloh19:
	adrp	x9, _IEEE80211_NODE_ASSOCID@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IEEE80211_NODE_ASSOCID@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_ieee80211_node_psq_drain
	cbz	x0, LBB0_11
; %bb.9:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_11:
	str	xzr, [x19, #24]
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_13
; %bb.12:
Lloh23:
	adrp	x8, _M_80211_NODE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _M_80211_NODE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_IEEE80211_FREE
	str	xzr, [x19, #16]
LBB0_13:
	ldr	x0, [x19, #8]
	bl	_nitems
	cmp	w0, #1
	b.lt	LBB0_18
; %bb.14:
	mov	x20, #0
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x20, x20, #1
	bl	_nitems
	cmp	x20, w0, sxtw
	b.ge	LBB0_18
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x0, x20, lsl #3]
	cbz	x8, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x8
	bl	_m_freem
	ldr	x8, [x19, #8]
	str	xzr, [x8, x20, lsl #3]
	ldr	x0, [x19, #8]
	b	LBB0_15
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ieee80211_node_delucastkey
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_NODE_PWR_MGT,4,2     ; @IEEE80211_NODE_PWR_MGT
	.comm	_IEEE80211_M_STA,8,3            ; @IEEE80211_M_STA
	.comm	_IEEE80211_MSG_POWER,4,2        ; @IEEE80211_MSG_POWER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"power save mode off, %u sta's in ps mode"

	.comm	_IEEE80211_NODE_VHT,4,2         ; @IEEE80211_NODE_VHT
	.comm	_IEEE80211_NODE_HT,4,2          ; @IEEE80211_NODE_HT
	.comm	_IEEE80211_NODE_AREF,4,2        ; @IEEE80211_NODE_AREF
	.comm	_IEEE80211_NODE_ASSOCID,4,2     ; @IEEE80211_NODE_ASSOCID
	.comm	_M_80211_NODE,4,2               ; @M_80211_NODE
	.comm	_IEEE80211_M_MBSS,8,3           ; @IEEE80211_M_MBSS
	.no_dead_strip	_node_cleanup
.subsections_via_symbols
