	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_remove_card                ## -- Begin function lbs_remove_card
	.p2align	4, 0x90
_lbs_remove_card:                       ## @lbs_remove_card
	.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, %rbx
	movq	80(%rdi), %r14
	callq	_lbs_remove_mesh
	cmpq	$0, 72(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_lbs_scan_deinit
LBB0_2:
	movq	%rbx, %rdi
	callq	_lbs_wait_for_firmware_load
	leaq	L_.str(%rip), %rdi
	callq	_lbs_deb_main
	movl	64(%rbx), %edi
	callq	_destroy_workqueue
	leaq	L_.str.1(%rip), %rdi
	callq	_lbs_deb_main
	movq	(%rbx), %rax
	movq	_LBS802_11POWERMODEMAX_PSP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	_LBS802_11POWERMODECAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	8(%rbx), %rax
	movq	_PS_STATE_FULL_POWER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_PS_MODE_ACTION_EXIT_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_lbs_set_ps_mode
LBB0_5:
	cmpq	$0, 56(%rbx)
	je	LBB0_7
## %bb.6:
	movq	$0, 56(%rbx)
	leaq	48(%rbx), %rdi
	callq	_wake_up_interruptible
LBB0_7:
	leaq	24(%rbx), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	callq	_wake_up_interruptible
	movl	$1, 16(%rbx)
	movl	20(%rbx), %edi
	callq	_kthread_stop
	movq	%rbx, %rdi
	callq	_lbs_free_adapter
	movq	%rbx, %rdi
	callq	_lbs_cfg_free
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free_netdev                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"destroying worker thread\n"

L_.str.1:                               ## @.str.1
	.asciz	"done destroying worker thread\n"

	.comm	_LBS802_11POWERMODEMAX_PSP,8,3  ## @LBS802_11POWERMODEMAX_PSP
	.comm	_LBS802_11POWERMODECAM,8,3      ## @LBS802_11POWERMODECAM
	.comm	_PS_STATE_FULL_POWER,8,3        ## @PS_STATE_FULL_POWER
	.comm	_PS_MODE_ACTION_EXIT_PS,4,2     ## @PS_MODE_ACTION_EXIT_PS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_remove_card                ; -- Begin function lbs_remove_card
	.p2align	2
_lbs_remove_card:                       ; @lbs_remove_card
	.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	x20, x0
	ldr	x19, [x0, #80]
	bl	_lbs_remove_mesh
	ldr	x8, [x20, #72]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_lbs_scan_deinit
LBB0_2:
	mov	x0, x20
	bl	_lbs_wait_for_firmware_load
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lbs_deb_main
	ldr	w0, [x20, #64]
	bl	_destroy_workqueue
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_lbs_deb_main
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _LBS802_11POWERMODEMAX_PSP@GOTPAGE
Lloh5:
	ldr	x9, [x9, _LBS802_11POWERMODEMAX_PSP@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh7:
	adrp	x8, _LBS802_11POWERMODECAM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LBS802_11POWERMODECAM@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x20]
	ldr	x8, [x20, #8]
Lloh10:
	adrp	x9, _PS_STATE_FULL_POWER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PS_STATE_FULL_POWER@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
Lloh13:
	adrp	x8, _PS_MODE_ACTION_EXIT_PS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PS_MODE_ACTION_EXIT_PS@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_lbs_set_ps_mode
LBB0_5:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_7
; %bb.6:
	str	xzr, [x20, #56]
	add	x0, x20, #48
	bl	_wake_up_interruptible
LBB0_7:
	add	x0, x20, #24
	stp	xzr, xzr, [x20, #32]
	bl	_wake_up_interruptible
	mov	w8, #1
	str	w8, [x20, #16]
	ldr	w0, [x20, #20]
	bl	_kthread_stop
	mov	x0, x20
	bl	_lbs_free_adapter
	mov	x0, x20
	bl	_lbs_cfg_free
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free_netdev
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"destroying worker thread\n"

l_.str.1:                               ; @.str.1
	.asciz	"done destroying worker thread\n"

	.comm	_LBS802_11POWERMODEMAX_PSP,8,3  ; @LBS802_11POWERMODEMAX_PSP
	.comm	_LBS802_11POWERMODECAM,8,3      ; @LBS802_11POWERMODECAM
	.comm	_PS_STATE_FULL_POWER,8,3        ; @PS_STATE_FULL_POWER
	.comm	_PS_MODE_ACTION_EXIT_PS,4,2     ; @PS_MODE_ACTION_EXIT_PS
.subsections_via_symbols
