	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_remove
_wacom_remove:                          ## @wacom_remove
	.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
	callq	_hid_get_drvdata
	movq	%rax, %rbx
	movq	_WACOM_DEVICETYPE_WL_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_hid_hw_close
LBB0_2:
	movq	%r14, %rdi
	callq	_hid_hw_stop
	leaq	40(%rbx), %rdi
	callq	_cancel_delayed_work_sync
	leaq	36(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	32(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	28(%rbx), %rdi
	callq	_cancel_work_sync
	movq	%rbx, %rdi
	addq	$24, %rdi
	callq	_cancel_work_sync
	movq	(%r14), %rax
	movq	_BUS_BLUETOOTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	addq	$8, %r14
	movq	_dev_attr_speed@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_remove_file
LBB0_4:
	movq	%rbx, %rdi
	callq	_wacom_led_groups_release
	movq	16(%rbx), %rax
	movq	_REMOTE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_wacom_release_resources
LBB0_6:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_kfifo_free                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WACOM_DEVICETYPE_WL_MONITOR,4,2 ## @WACOM_DEVICETYPE_WL_MONITOR
	.comm	_BUS_BLUETOOTH,8,3              ## @BUS_BLUETOOTH
	.comm	_dev_attr_speed,4,2             ## @dev_attr_speed
	.comm	_REMOTE,8,3                     ## @REMOTE
	.no_dead_strip	_wacom_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_remove
_wacom_remove:                          ; @wacom_remove
	.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
	bl	_hid_get_drvdata
	mov	x19, x0
	ldr	w8, [x0, #8]
Lloh0:
	adrp	x9, _WACOM_DEVICETYPE_WL_MONITOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WACOM_DEVICETYPE_WL_MONITOR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_hid_hw_close
LBB0_2:
	mov	x0, x20
	bl	_hid_hw_stop
	add	x0, x19, #40
	bl	_cancel_delayed_work_sync
	add	x0, x19, #36
	bl	_cancel_work_sync
	add	x0, x19, #32
	bl	_cancel_work_sync
	add	x0, x19, #28
	bl	_cancel_work_sync
	add	x0, x19, #24
	bl	_cancel_work_sync
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _BUS_BLUETOOTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BUS_BLUETOOTH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	add	x0, x20, #8
Lloh6:
	adrp	x1, _dev_attr_speed@GOTPAGE
Lloh7:
	ldr	x1, [x1, _dev_attr_speed@GOTPAGEOFF]
	bl	_device_remove_file
LBB0_4:
	mov	x0, x19
	bl	_wacom_led_groups_release
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x9, _REMOTE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _REMOTE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_wacom_release_resources
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfifo_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_WACOM_DEVICETYPE_WL_MONITOR,4,2 ; @WACOM_DEVICETYPE_WL_MONITOR
	.comm	_BUS_BLUETOOTH,8,3              ; @BUS_BLUETOOTH
	.comm	_dev_attr_speed,4,2             ; @dev_attr_speed
	.comm	_REMOTE,8,3                     ; @REMOTE
	.no_dead_strip	_wacom_remove
.subsections_via_symbols
