	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_close
_prism2_close:                          ## @prism2_close
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_DEBUG_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
	movq	%r14, %rdi
	callq	_netdev_priv
	movq	(%rax), %rbx
	cmpq	%r14, 88(%rbx)
	je	LBB0_1
## %bb.2:
	cmpl	$0, 80(%rbx)
	jne	LBB0_10
	jmp	LBB0_3
LBB0_1:
	movq	_WLAN_REASON_DEAUTH_LEAVING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_prism2_sta_deauth
	cmpl	$0, 80(%rbx)
	jne	LBB0_10
LBB0_3:
	cmpq	%r14, 16(%rbx)
	je	LBB0_4
LBB0_10:
	cmpq	%r14, 16(%rbx)
	jne	LBB0_12
## %bb.11:
	movq	56(%rbx), %rax
	movq	_HOSTAP_HW_ENABLE_CMDCOMPL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	callq	*(%rax)
LBB0_12:
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%r14, %rdi
	callq	_netif_device_detach
LBB0_14:
	leaq	52(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	48(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	44(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	40(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	36(%rbx), %rdi
	callq	_cancel_work_sync
	movl	32(%rbx), %edi
	callq	_module_put
	movl	8(%rbx), %eax
	decl	%eax
	movl	%eax, 8(%rbx)
	movq	16(%rbx), %rdi
	cmpq	%r14, %rdi
	je	LBB0_19
## %bb.15:
	movq	_IFF_UP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi)
	je	LBB0_19
## %bb.16:
	cmpq	$0, 24(%rbx)
	je	LBB0_19
## %bb.17:
	cmpl	$1, %eax
	jne	LBB0_19
## %bb.18:
	callq	_dev_close
LBB0_19:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	56(%rbx), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	*%rax
	testq	%rax, %rax
	je	LBB0_10
LBB0_6:
	cmpq	$0, 72(%rbx)
	je	LBB0_10
## %bb.7:
	movq	64(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:
	movq	(%rbx), %rax
	movq	_IW_MODE_MASTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_hostap_deauth_all_stas
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_FLOW,4,2                 ## @DEBUG_FLOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: prism2_close\n"

	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ## @WLAN_REASON_DEAUTH_LEAVING
	.comm	_IW_MODE_MASTER,8,3             ## @IW_MODE_MASTER
	.comm	_HOSTAP_HW_ENABLE_CMDCOMPL,4,2  ## @HOSTAP_HW_ENABLE_CMDCOMPL
	.comm	_IFF_UP,4,2                     ## @IFF_UP
	.no_dead_strip	_prism2_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_close
_prism2_close:                          ; @prism2_close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _DEBUG_FLOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_FLOW@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x19, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	mov	x0, x19
	bl	_netdev_priv
	ldr	x20, [x0]
	ldr	x8, [x20, #88]
	cmp	x8, x19
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x20, #80]
	cbnz	w8, LBB0_4
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_prism2_sta_deauth
	ldr	w8, [x20, #80]
	cbnz	w8, LBB0_4
LBB0_3:
	ldr	x8, [x20, #16]
	cmp	x8, x19
	b.eq	LBB0_14
LBB0_4:
	ldr	x8, [x20, #16]
	cmp	x8, x19
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x20, #56]
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _HOSTAP_HW_ENABLE_CMDCOMPL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HOSTAP_HW_ENABLE_CMDCOMPL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
LBB0_6:
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x19
	bl	_netif_device_detach
LBB0_8:
	add	x0, x20, #52
	bl	_cancel_work_sync
	add	x0, x20, #48
	bl	_cancel_work_sync
	add	x0, x20, #44
	bl	_cancel_work_sync
	add	x0, x20, #40
	bl	_cancel_work_sync
	add	x0, x20, #36
	bl	_cancel_work_sync
	ldr	w0, [x20, #32]
	bl	_module_put
	ldr	w8, [x20, #8]
	sub	w8, w8, #1
	str	w8, [x20, #8]
	ldr	x0, [x20, #16]
	cmp	x0, x19
	b.eq	LBB0_13
; %bb.9:
	ldr	w9, [x0]
Lloh11:
	adrp	x10, _IFF_UP@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IFF_UP@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.10:
	ldr	x9, [x20, #24]
	cbz	x9, LBB0_13
; %bb.11:
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.12:
	bl	_dev_close
LBB0_13:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldr	x8, [x20, #56]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_16
; %bb.15:
	mov	x0, x20
	blr	x8
	cbz	x0, LBB0_4
LBB0_16:
	ldr	x8, [x20, #72]
	cbz	x8, LBB0_4
; %bb.17:
	ldr	x1, [x20, #64]
	cbz	x1, LBB0_4
; %bb.18:
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _IW_MODE_MASTER@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IW_MODE_MASTER@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.19:
	mov	x0, x19
	mov	w2, #1
	bl	_hostap_deauth_all_stas
	b	LBB0_4
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_FLOW,4,2                 ; @DEBUG_FLOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: prism2_close\n"

	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ; @WLAN_REASON_DEAUTH_LEAVING
	.comm	_IW_MODE_MASTER,8,3             ; @IW_MODE_MASTER
	.comm	_HOSTAP_HW_ENABLE_CMDCOMPL,4,2  ; @HOSTAP_HW_ENABLE_CMDCOMPL
	.comm	_IFF_UP,4,2                     ; @IFF_UP
	.no_dead_strip	_prism2_close
.subsections_via_symbols
