	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cw1200_do_unjoin
_cw1200_do_unjoin:                      ## @cw1200_do_unjoin
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	$1, -24(%rbp)
	addq	$92, %rdi
	callq	_cancel_delayed_work_sync
	leaq	36(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	$0, (%rbx)
	leaq	88(%rbx), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpl	$0, 4(%rbx)
	je	LBB0_3
## %bb.2:
	movq	80(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wiphy_dbg
	jmp	LBB0_7
LBB0_4:
	movl	$0, 8(%rbx)
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_CW1200_JOIN_STATUS_AP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	leaq	76(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	72(%rbx), %rdi
	callq	_cancel_work_sync
	movq	_CW1200_JOIN_STATUS_PASSIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_wsm_flush_tx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wsm_keep_alive_period
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wsm_reset
	movl	24(%rbx), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %esi
	movq	%rbx, %rdi
	callq	_wsm_set_output_power
	movq	$0, 64(%rbx)
	movq	%rbx, %rdi
	callq	_cw1200_setup_mac
	movq	%rbx, %rdi
	callq	_cw1200_free_event_queue
	leaq	56(%rbx), %rdi
	callq	_cancel_work_sync
	movl	52(%rbx), %esi
	movq	%rbx, %rdi
	callq	_cw1200_update_listening
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_cw1200_cqm_bssloss_sm
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_wsm_set_block_ack_policy
	movl	$0, 28(%rbx)
	movq	%rbx, %rdi
	callq	_cw1200_update_filtering
	leaq	48(%rbx), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	44(%rbx), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	$0, 32(%rbx)
	addq	$40, %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_7
LBB0_3:
	movl	$1, 4(%rbx)
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Delayed unjoin is already scheduled.\n"

	.comm	_CW1200_JOIN_STATUS_AP,8,3      ## @CW1200_JOIN_STATUS_AP
	.comm	_CW1200_JOIN_STATUS_PASSIVE,8,3 ## @CW1200_JOIN_STATUS_PASSIVE
L_.str.1:                               ## @.str.1
	.asciz	"[STA] Unjoin completed.\n"

	.no_dead_strip	_cw1200_do_unjoin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cw1200_do_unjoin
_cw1200_do_unjoin:                      ; @cw1200_do_unjoin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	mov	w8, #1
	str	w8, [sp, #8]
	add	x0, x0, #92
	bl	_cancel_delayed_work_sync
	add	x19, x20, #36
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	str	wzr, [x0], #88
	bl	_atomic_read
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x8, [x20, #80]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wiphy_dbg
	b	LBB0_7
LBB0_3:
	str	wzr, [x20, #8]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.4:
Lloh2:
	adrp	x9, _CW1200_JOIN_STATUS_AP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CW1200_JOIN_STATUS_AP@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.5:
	add	x0, x20, #76
	bl	_cancel_work_sync
	add	x0, x20, #72
	bl	_cancel_work_sync
Lloh5:
	adrp	x8, _CW1200_JOIN_STATUS_PASSIVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CW1200_JOIN_STATUS_PASSIVE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x20, #16]
	mov	x0, x20
	bl	_wsm_flush_tx
	mov	x0, x20
	mov	w1, #0
	bl	_wsm_keep_alive_period
	add	x1, sp, #8
	mov	x0, x20
	bl	_wsm_reset
	ldr	w8, [x20, #24]
	add	w8, w8, w8, lsl #2
	lsl	w1, w8, #1
	mov	x0, x20
	bl	_wsm_set_output_power
	str	xzr, [x20, #64]
	mov	x0, x20
	bl	_cw1200_setup_mac
	mov	x0, x20
	bl	_cw1200_free_event_queue
	add	x0, x20, #56
	bl	_cancel_work_sync
	ldr	w1, [x20, #52]
	mov	x0, x20
	bl	_cw1200_update_listening
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_cw1200_cqm_bssloss_sm
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_wsm_set_block_ack_policy
	str	wzr, [x20, #28]
	mov	x0, x20
	bl	_cw1200_update_filtering
	add	x0, x20, #48
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x0, x20, #44
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	wzr, [x20, #32]
	add	x0, x20, #40
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	b	LBB0_7
LBB0_6:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Delayed unjoin is already scheduled.\n"

	.comm	_CW1200_JOIN_STATUS_AP,8,3      ; @CW1200_JOIN_STATUS_AP
	.comm	_CW1200_JOIN_STATUS_PASSIVE,8,3 ; @CW1200_JOIN_STATUS_PASSIVE
l_.str.1:                               ; @.str.1
	.asciz	"[STA] Unjoin completed.\n"

	.no_dead_strip	_cw1200_do_unjoin
.subsections_via_symbols
