	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_usb_disconnect             ## -- Begin function rtl_usb_disconnect
	.p2align	4, 0x90
_rtl_usb_disconnect:                    ## @rtl_usb_disconnect
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_usb_get_intfdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rtl_priv
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_mac
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_rtl_usbpriv
	movl	%eax, %edi
	callq	_rtl_usbdev
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	28(%r15), %rdi
	callq	_wait_for_completion
	movq	_RTL_STATUS_INTERFACE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	addq	$24, %rsi
	callq	_clear_bit
	cmpl	$1, (%r13)
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_ieee80211_unregister_hw
	movl	$0, (%r13)
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rtl_deinit_deferred_work
	movq	16(%r15), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
LBB0_4:
	movq	%rbx, %rdi
	callq	_rtl_usb_deinit
	movq	%rbx, %rdi
	callq	_rtl_deinit_core
	movl	8(%r15), %edi
	callq	_kfree
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	%rbx, %rdi
	callq	__rtl_usb_io_handler_release
	movl	(%r12), %edi
	callq	_usb_put_dev
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ieee80211_free_hw              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL_STATUS_INTERFACE_START,4,2 ## @RTL_STATUS_INTERFACE_START
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_usb_disconnect             ; -- Begin function rtl_usb_disconnect
	.p2align	2
_rtl_usb_disconnect:                    ; @rtl_usb_disconnect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_usb_get_intfdata
	mov	x20, x0
	bl	_rtl_priv
	mov	x21, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_mac
	mov	x23, x0
	mov	x0, x20
	bl	_rtl_usbpriv
	bl	_rtl_usbdev
	mov	x22, x0
	cmp	x21, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x0, x21, #28
	bl	_wait_for_completion
Lloh0:
	adrp	x8, _RTL_STATUS_INTERFACE_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL_STATUS_INTERFACE_START@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x21, #24
	bl	_clear_bit
	ldr	w8, [x23]
	mov	x0, x20
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.3:
	bl	_ieee80211_unregister_hw
	str	wzr, [x23]
	b	LBB0_5
LBB0_4:
	mov	w1, #0
	bl	_rtl_deinit_deferred_work
	ldr	x8, [x21, #16]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
LBB0_5:
	mov	x0, x20
	bl	_rtl_usb_deinit
	mov	x0, x20
	bl	_rtl_deinit_core
	ldr	w0, [x21, #8]
	bl	_kfree
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	mov	x0, x20
	bl	__rtl_usb_io_handler_release
	ldr	w0, [x22]
	bl	_usb_put_dev
	mov	x0, x19
	mov	x1, #0
	bl	_usb_set_intfdata
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ieee80211_free_hw
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL_STATUS_INTERFACE_START,4,2 ; @RTL_STATUS_INTERFACE_START
.subsections_via_symbols
