	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_parse_and_register
_wacom_parse_and_register:              ## @wacom_parse_and_register
	.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
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	32(%rdi), %r14
	movq	_HID_CONNECT_HIDRAW@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_wacom_compute_pktlen
	movq	%rax, 8(%r13)
	movq	_WACOM_PKGLEN_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_devres_open_group
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	$1, (%r13)
	movq	%r13, %rdi
	callq	_wacom_allocate_inputs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_31
## %bb.6:
	leaq	8(%r13), %rbx
	movq	16(%r13), %rax
	movq	_BAMBOO_PAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movq	(%rbx), %rax
	movq	_WACOM_PKGLEN_PENABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_28
## %bb.8:
	movq	_HID_GENERIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r13)
	jmp	LBB0_9
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_40
LBB0_28:
	movq	_WACOM_PKGLEN_BPAD_TOUCH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.29:
	movq	_WACOM_PKGLEN_BPAD_TOUCH_USB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_30
LBB0_9:
	movq	%rbx, %rdi
	callq	_wacom_set_default_phy
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wacom_retrieve_hid_descriptor
	movq	%r13, %rdi
	callq	_wacom_setup_device_quirks
	movl	24(%r13), %eax
	movq	_WACOM_DEVICETYPE_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.10:
	movq	16(%r13), %rax
	movq	_WIRELESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.11:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_HID_GENERIC@GOTPCREL(%rip), %rcx
	movq	_ENODEV@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	subl	(%rdx), %ebx
	cmpq	(%rcx), %rax
	cmovnel	%esi, %ebx
	movl	4(%r14), %edx
	testl	%ebx, %ebx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	testl	%ebx, %ebx
	jne	LBB0_31
## %bb.12:
	movq	_WACOM_DEVICETYPE_PEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r13)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_13:
	movq	%rbx, %rdi
	callq	_wacom_calculate_res
	testl	%r15d, %r15d
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%r13, %rdi
	callq	_wacom_update_name
	movq	16(%r13), %rax
	movq	_BAMBOO_PEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.14:
	movl	24(%r13), %eax
	movq	_WACOM_DEVICETYPE_TOUCH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_30
## %bb.15:
	movq	_WACOM_DEVICETYPE_PAD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
LBB0_30:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_31
LBB0_16:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_wacom_add_shared_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_31
## %bb.17:
	movq	_WACOM_DEVICETYPE_WL_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%r13)
	je	LBB0_18
LBB0_20:
	movq	%r13, %rdi
	callq	_wacom_register_inputs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_31
## %bb.21:
	movq	_WACOM_DEVICETYPE_PAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%r13)
	je	LBB0_24
## %bb.22:
	movq	%r13, %rdi
	callq	_wacom_initialize_leds
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_31
## %bb.23:
	movq	%r13, %rdi
	callq	_wacom_initialize_remotes
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_31
LBB0_24:
	movq	16(%r13), %rax
	movq	_HID_GENERIC@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	jne	LBB0_26
## %bb.25:
	movq	_HID_CONNECT_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_26:
	orl	%r12d, %esi
	movq	%r14, %rdi
	callq	_hid_hw_start
	testl	%eax, %eax
	je	LBB0_32
## %bb.27:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_hid_err
	jmp	LBB0_31
LBB0_18:
	movq	_WACOM_QUIRK_BATTERY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 28(%r13)
	je	LBB0_20
## %bb.19:
	movq	%r13, %rdi
	callq	_wacom_initialize_battery
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_20
LBB0_31:
	movq	%r13, %rdi
	callq	_wacom_release_resources
LBB0_40:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	testl	%r15d, %r15d
	jne	LBB0_34
## %bb.33:
	movq	%r13, %rdi
	callq	_wacom_query_tablet_data
LBB0_34:
	movq	16(%r13), %rcx
	movq	_BAMBOO_TOUCH@GOTPCREL(%rip), %rdx
	movl	24(%r13), %eax
	cmpq	(%rdx), %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_37
## %bb.35:
	movq	_WACOM_DEVICETYPE_PEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_37
## %bb.36:
	leaq	4(%r13), %rdi
	callq	_cancel_delayed_work_sync
	movq	%r13, %rdi
	callq	__wacom_query_tablet_data
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_hid_hw_stop
	jmp	LBB0_31
LBB0_37:
	movq	_WACOM_DEVICETYPE_WL_MONITOR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_39
## %bb.38:
	movq	%r14, %rdi
	callq	_hid_hw_open
LBB0_39:
	movq	%rbx, %rdi
	callq	_wacom_set_shared_values
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_devres_close_group
	xorl	%ebx, %ebx
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_CONNECT_HIDRAW,4,2         ## @HID_CONNECT_HIDRAW
	.comm	_WACOM_PKGLEN_MAX,8,3           ## @WACOM_PKGLEN_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BAMBOO_PAD,8,3                 ## @BAMBOO_PAD
	.comm	_WACOM_PKGLEN_PENABLED,8,3      ## @WACOM_PKGLEN_PENABLED
	.comm	_HID_GENERIC,8,3                ## @HID_GENERIC
	.comm	_WACOM_PKGLEN_BPAD_TOUCH,8,3    ## @WACOM_PKGLEN_BPAD_TOUCH
	.comm	_WACOM_PKGLEN_BPAD_TOUCH_USB,8,3 ## @WACOM_PKGLEN_BPAD_TOUCH_USB
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_WACOM_DEVICETYPE_NONE,4,2      ## @WACOM_DEVICETYPE_NONE
	.comm	_WIRELESS,8,3                   ## @WIRELESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown device_type for '%s'. %s."

L_.str.1:                               ## @.str.1
	.asciz	"Ignoring"

L_.str.2:                               ## @.str.2
	.asciz	"Assuming pen"

	.comm	_WACOM_DEVICETYPE_PEN,4,2       ## @WACOM_DEVICETYPE_PEN
L_.str.3:                               ## @.str.3
	.asciz	" (WL)"

L_.str.4:                               ## @.str.4
	.space	1

	.comm	_BAMBOO_PEN,8,3                 ## @BAMBOO_PEN
	.comm	_WACOM_DEVICETYPE_TOUCH,4,2     ## @WACOM_DEVICETYPE_TOUCH
	.comm	_WACOM_DEVICETYPE_PAD,4,2       ## @WACOM_DEVICETYPE_PAD
	.comm	_WACOM_DEVICETYPE_WL_MONITOR,4,2 ## @WACOM_DEVICETYPE_WL_MONITOR
	.comm	_WACOM_QUIRK_BATTERY,4,2        ## @WACOM_QUIRK_BATTERY
	.comm	_HID_CONNECT_DRIVER,4,2         ## @HID_CONNECT_DRIVER
L_.str.5:                               ## @.str.5
	.asciz	"hw start failed\n"

	.comm	_BAMBOO_TOUCH,8,3               ## @BAMBOO_TOUCH
	.no_dead_strip	_wacom_parse_and_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_parse_and_register
_wacom_parse_and_register:              ; @wacom_parse_and_register
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #32]
Lloh0:
	adrp	x8, _HID_CONNECT_HIDRAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HID_CONNECT_HIDRAW@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x20
	bl	_wacom_compute_pktlen
	mov	x21, x19
	str	x0, [x21, #8]!
Lloh3:
	adrp	x8, _WACOM_PKGLEN_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WACOM_PKGLEN_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_devres_open_group
	cbz	w0, LBB0_7
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_wacom_allocate_inputs
	mov	x23, x0
	cbnz	w0, LBB0_28
; %bb.4:
	ldr	x8, [x19, #16]
Lloh11:
	adrp	x9, _BAMBOO_PAD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BAMBOO_PAD@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.5:
	ldr	x8, [x21]
Lloh14:
	adrp	x9, _WACOM_PKGLEN_PENABLED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WACOM_PKGLEN_PENABLED@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
Lloh17:
	adrp	x8, _HID_GENERIC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HID_GENERIC@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	b	LBB0_10
LBB0_7:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_29
LBB0_9:
Lloh22:
	adrp	x9, _WACOM_PKGLEN_BPAD_TOUCH@GOTPAGE
Lloh23:
	ldr	x9, [x9, _WACOM_PKGLEN_BPAD_TOUCH@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
Lloh25:
	adrp	x10, _WACOM_PKGLEN_BPAD_TOUCH_USB@GOTPAGE
Lloh26:
	ldr	x10, [x10, _WACOM_PKGLEN_BPAD_TOUCH_USB@GOTPAGEOFF]
Lloh27:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_17
LBB0_10:
	mov	x0, x21
	bl	_wacom_set_default_phy
	mov	x0, x20
	mov	x1, x21
	bl	_wacom_retrieve_hid_descriptor
	mov	x0, x19
	bl	_wacom_setup_device_quirks
	ldr	w8, [x19, #24]
Lloh28:
	adrp	x9, _WACOM_DEVICETYPE_NONE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _WACOM_DEVICETYPE_NONE@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.11:
	ldr	x8, [x19, #16]
Lloh31:
	adrp	x9, _WIRELESS@GOTPAGE
Lloh32:
	ldr	x9, [x9, _WIRELESS@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.12:
Lloh34:
	adrp	x9, _HID_GENERIC@GOTPAGE
Lloh35:
	ldr	x9, [x9, _HID_GENERIC@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
Lloh37:
	adrp	x10, _ENODEV@GOTPAGE
Lloh38:
	ldr	x10, [x10, _ENODEV@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	cmp	x8, x9
	csneg	w23, wzr, w10, ne
	ldr	w2, [x20, #4]
Lloh40:
	adrp	x8, l_.str.1@PAGE
Lloh41:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh42:
	adrp	x9, l_.str.2@PAGE
Lloh43:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w23, #0
	csel	x3, x9, x8, eq
Lloh44:
	adrp	x1, l_.str@PAGE
Lloh45:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	cbnz	w23, LBB0_28
; %bb.13:
Lloh46:
	adrp	x8, _WACOM_DEVICETYPE_PEN@GOTPAGE
Lloh47:
	ldr	x8, [x8, _WACOM_DEVICETYPE_PEN@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
LBB0_14:
	mov	x0, x21
	bl	_wacom_calculate_res
Lloh49:
	adrp	x8, l_.str.3@PAGE
Lloh50:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh51:
	adrp	x9, l_.str.4@PAGE
Lloh52:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	w22, #0
	csel	x1, x9, x8, eq
	mov	x0, x19
	bl	_wacom_update_name
	ldr	x8, [x19, #16]
Lloh53:
	adrp	x9, _BAMBOO_PEN@GOTPAGE
Lloh54:
	ldr	x9, [x9, _BAMBOO_PEN@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.15:
	ldr	w8, [x19, #24]
Lloh56:
	adrp	x9, _WACOM_DEVICETYPE_TOUCH@GOTPAGE
Lloh57:
	ldr	x9, [x9, _WACOM_DEVICETYPE_TOUCH@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.16:
Lloh59:
	adrp	x9, _WACOM_DEVICETYPE_PAD@GOTPAGE
Lloh60:
	ldr	x9, [x9, _WACOM_DEVICETYPE_PAD@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
LBB0_17:
Lloh62:
	adrp	x8, _ENODEV@GOTPAGE
Lloh63:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh64:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_28
LBB0_18:
	mov	x0, x20
	bl	_wacom_add_shared_data
	mov	x23, x0
	cbnz	w0, LBB0_28
; %bb.19:
	ldr	w8, [x19, #24]
Lloh65:
	adrp	x25, _WACOM_DEVICETYPE_WL_MONITOR@GOTPAGE
Lloh66:
	ldr	x25, [x25, _WACOM_DEVICETYPE_WL_MONITOR@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_26
LBB0_20:
	mov	x0, x19
	bl	_wacom_register_inputs
	mov	x23, x0
	cbnz	w0, LBB0_28
; %bb.21:
	ldr	w8, [x19, #24]
Lloh67:
	adrp	x9, _WACOM_DEVICETYPE_PAD@GOTPAGE
Lloh68:
	ldr	x9, [x9, _WACOM_DEVICETYPE_PAD@GOTPAGEOFF]
Lloh69:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.22:
	mov	x0, x19
	bl	_wacom_initialize_leds
	mov	x23, x0
	cbnz	w0, LBB0_28
; %bb.23:
	mov	x0, x19
	bl	_wacom_initialize_remotes
	mov	x23, x0
	cbnz	w0, LBB0_28
LBB0_24:
	ldr	x8, [x19, #16]
Lloh70:
	adrp	x9, _HID_GENERIC@GOTPAGE
Lloh71:
	ldr	x9, [x9, _HID_GENERIC@GOTPAGEOFF]
Lloh72:
	ldr	x9, [x9]
Lloh73:
	adrp	x10, _HID_CONNECT_DRIVER@GOTPAGE
Lloh74:
	ldr	x10, [x10, _HID_CONNECT_DRIVER@GOTPAGEOFF]
Lloh75:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w8, w10, wzr, eq
	orr	w1, w8, w24
	mov	x0, x20
	bl	_hid_hw_start
	cbz	w0, LBB0_30
; %bb.25:
	mov	x23, x0
Lloh76:
	adrp	x1, l_.str.5@PAGE
Lloh77:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_hid_err
	b	LBB0_28
LBB0_26:
	ldr	w8, [x19, #28]
Lloh78:
	adrp	x9, _WACOM_QUIRK_BATTERY@GOTPAGE
Lloh79:
	ldr	x9, [x9, _WACOM_QUIRK_BATTERY@GOTPAGEOFF]
Lloh80:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.27:
	mov	x0, x19
	bl	_wacom_initialize_battery
	mov	x23, x0
	cbz	w0, LBB0_20
LBB0_28:
	mov	x0, x19
	bl	_wacom_release_resources
LBB0_29:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_30:
	cbnz	w22, LBB0_32
; %bb.31:
	mov	x0, x19
	bl	_wacom_query_tablet_data
LBB0_32:
	ldr	x9, [x19, #16]
Lloh81:
	adrp	x8, _BAMBOO_TOUCH@GOTPAGE
Lloh82:
	ldr	x8, [x8, _BAMBOO_TOUCH@GOTPAGEOFF]
Lloh83:
	ldr	x10, [x8]
	ldr	w8, [x19, #24]
	cmp	x9, x10
	b.ne	LBB0_35
; %bb.33:
Lloh84:
	adrp	x9, _WACOM_DEVICETYPE_PEN@GOTPAGE
Lloh85:
	ldr	x9, [x9, _WACOM_DEVICETYPE_PEN@GOTPAGEOFF]
Lloh86:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_35
; %bb.34:
	add	x0, x19, #4
	bl	_cancel_delayed_work_sync
	mov	x0, x19
	bl	__wacom_query_tablet_data
Lloh87:
	adrp	x8, _ENODEV@GOTPAGE
Lloh88:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh89:
	ldr	w8, [x8]
	neg	w23, w8
	mov	x0, x20
	bl	_hid_hw_stop
	b	LBB0_28
LBB0_35:
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_37
; %bb.36:
	mov	x0, x20
	bl	_hid_hw_open
LBB0_37:
	mov	x0, x21
	bl	_wacom_set_shared_values
	mov	x0, x20
	mov	x1, x19
	bl	_devres_close_group
	mov	w23, #0
	b	LBB0_29
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_CONNECT_HIDRAW,4,2         ; @HID_CONNECT_HIDRAW
	.comm	_WACOM_PKGLEN_MAX,8,3           ; @WACOM_PKGLEN_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BAMBOO_PAD,8,3                 ; @BAMBOO_PAD
	.comm	_WACOM_PKGLEN_PENABLED,8,3      ; @WACOM_PKGLEN_PENABLED
	.comm	_HID_GENERIC,8,3                ; @HID_GENERIC
	.comm	_WACOM_PKGLEN_BPAD_TOUCH,8,3    ; @WACOM_PKGLEN_BPAD_TOUCH
	.comm	_WACOM_PKGLEN_BPAD_TOUCH_USB,8,3 ; @WACOM_PKGLEN_BPAD_TOUCH_USB
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_WACOM_DEVICETYPE_NONE,4,2      ; @WACOM_DEVICETYPE_NONE
	.comm	_WIRELESS,8,3                   ; @WIRELESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown device_type for '%s'. %s."

l_.str.1:                               ; @.str.1
	.asciz	"Ignoring"

l_.str.2:                               ; @.str.2
	.asciz	"Assuming pen"

	.comm	_WACOM_DEVICETYPE_PEN,4,2       ; @WACOM_DEVICETYPE_PEN
l_.str.3:                               ; @.str.3
	.asciz	" (WL)"

l_.str.4:                               ; @.str.4
	.space	1

	.comm	_BAMBOO_PEN,8,3                 ; @BAMBOO_PEN
	.comm	_WACOM_DEVICETYPE_TOUCH,4,2     ; @WACOM_DEVICETYPE_TOUCH
	.comm	_WACOM_DEVICETYPE_PAD,4,2       ; @WACOM_DEVICETYPE_PAD
	.comm	_WACOM_DEVICETYPE_WL_MONITOR,4,2 ; @WACOM_DEVICETYPE_WL_MONITOR
	.comm	_WACOM_QUIRK_BATTERY,4,2        ; @WACOM_QUIRK_BATTERY
	.comm	_HID_CONNECT_DRIVER,4,2         ; @HID_CONNECT_DRIVER
l_.str.5:                               ; @.str.5
	.asciz	"hw start failed\n"

	.comm	_BAMBOO_TOUCH,8,3               ; @BAMBOO_TOUCH
	.no_dead_strip	_wacom_parse_and_register
.subsections_via_symbols
