	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00lib_remove_dev           ## -- Begin function rt2x00lib_remove_dev
	.p2align	4, 0x90
_rt2x00lib_remove_dev:                  ## @rt2x00lib_remove_dev
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_DEVICE_STATE_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	52(%rbx), %rsi
	callq	_clear_bit
	movq	_REQUIRE_DELAYED_RFKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_has_cap_flag
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_rt2x00rfkill_unregister
LBB0_2:
	movq	%rbx, %rdi
	callq	_rt2x00lib_disable_radio
	leaq	48(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	44(%rbx), %rdi
	callq	_cancel_delayed_work_sync
	leaq	40(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	36(%rbx), %rdi
	callq	_hrtimer_cancel
	leaq	32(%rbx), %rdi
	callq	_tasklet_kill
	leaq	28(%rbx), %rdi
	callq	_tasklet_kill
	leaq	24(%rbx), %rdi
	callq	_tasklet_kill
	leaq	20(%rbx), %rdi
	callq	_tasklet_kill
	leaq	16(%rbx), %rdi
	callq	_tasklet_kill
	movq	%rbx, %rdi
	callq	_rt2x00lib_uninitialize
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_destroy_workqueue
LBB0_4:
	leaq	4(%rbx), %rdi
	callq	_kfifo_free
	movq	%rbx, %rdi
	callq	_rt2x00debug_deregister
	movq	%rbx, %rdi
	callq	_rt2x00leds_unregister
	movq	%rbx, %rdi
	callq	_rt2x00lib_remove_hw
	movq	%rbx, %rdi
	callq	_rt2x00lib_free_firmware
	movq	%rbx, %rdi
	callq	_rt2x00queue_free
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DEVICE_STATE_PRESENT,4,2       ## @DEVICE_STATE_PRESENT
	.comm	_REQUIRE_DELAYED_RFKILL,4,2     ## @REQUIRE_DELAYED_RFKILL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00lib_remove_dev           ; -- Begin function rt2x00lib_remove_dev
	.p2align	2
_rt2x00lib_remove_dev:                  ; @rt2x00lib_remove_dev
	.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, _DEVICE_STATE_PRESENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEVICE_STATE_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #52
	bl	_clear_bit
Lloh3:
	adrp	x8, _REQUIRE_DELAYED_RFKILL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REQUIRE_DELAYED_RFKILL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_has_cap_flag
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_rt2x00rfkill_unregister
LBB0_2:
	mov	x0, x19
	bl	_rt2x00lib_disable_radio
	add	x0, x19, #48
	bl	_cancel_work_sync
	add	x0, x19, #44
	bl	_cancel_delayed_work_sync
	add	x0, x19, #40
	bl	_cancel_work_sync
	add	x0, x19, #36
	bl	_hrtimer_cancel
	add	x0, x19, #32
	bl	_tasklet_kill
	add	x0, x19, #28
	bl	_tasklet_kill
	add	x0, x19, #24
	bl	_tasklet_kill
	add	x0, x19, #20
	bl	_tasklet_kill
	add	x0, x19, #16
	bl	_tasklet_kill
	mov	x0, x19
	bl	_rt2x00lib_uninitialize
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_destroy_workqueue
LBB0_4:
	add	x0, x19, #4
	bl	_kfifo_free
	mov	x0, x19
	bl	_rt2x00debug_deregister
	mov	x0, x19
	bl	_rt2x00leds_unregister
	mov	x0, x19
	bl	_rt2x00lib_remove_hw
	mov	x0, x19
	bl	_rt2x00lib_free_firmware
	mov	x0, x19
	bl	_rt2x00queue_free
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DEVICE_STATE_PRESENT,4,2       ; @DEVICE_STATE_PRESENT
	.comm	_REQUIRE_DELAYED_RFKILL,4,2     ; @REQUIRE_DELAYED_RFKILL
.subsections_via_symbols
