	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_pl_irq
_wacom_pl_irq:                          ## @wacom_pl_irq
	.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), %rbx
	movb	(%rbx), %al
	cmpb	$2, %al
	jne	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %r13
	movzbl	1(%rbx), %r15d
	andl	$64, %r15d
	testq	%r15, %r15
	je	LBB0_19
## %bb.3:
	movq	_ERASER_DEVICE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movb	7(%rbx), %al
	addb	%al, %al
	movzbl	4(%rbx), %edx
	movl	%edx, %ecx
	shrb	$2, %cl
	andb	$1, %cl
	orb	%al, %cl
	movsbl	%cl, %r12d
	movq	24(%r13), %rax
	movl	(%rax), %ecx
	cmpl	$256, %ecx                      ## imm = 0x100
	jl	LBB0_5
## %bb.4:
	movl	%edx, %eax
	shrl	$6, %eax
	andl	$1, %eax
	leal	(%rax,%r12,2), %r12d
LBB0_5:
	movq	16(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.16:
	movq	8(%rax), %rax
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	%rsi, %rax
	jne	LBB0_9
## %bb.17:
	andb	$32, %dl
	jne	LBB0_9
## %bb.18:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_wacom_report_key
	movq	%r14, %rdi
	callq	_wacom_input_sync
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r13), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_23
LBB0_1:
	movzbl	%al, %esi
	leaq	L_.str(%rip), %rdi
	callq	_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_19:
	movq	16(%r13), %rax
	movq	8(%rax), %rsi
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	je	LBB0_21
## %bb.20:
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rax)
	movq	16(%r13), %rax
	movq	8(%rax), %rsi
LBB0_21:
	movq	%r14, %rdi
	xorl	%edx, %edx
	jmp	LBB0_22
LBB0_6:
	testb	$16, 1(%rbx)
	jne	LBB0_7
## %bb.14:
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, %rdi
	testb	$32, %dl
	jne	LBB0_8
## %bb.15:
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	jmp	LBB0_8
LBB0_7:
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movq	%rdi, %rsi
LBB0_8:
	movq	%rdi, 8(%rax)
LBB0_9:
	movl	%ecx, %eax
	incl	%eax
	shrl	$31, %eax
	addl	%ecx, %eax
	incl	%eax
	sarl	%eax
	addl	%eax, %r12d
	movq	16(%r13), %rax
	cmpq	%rsi, 8(%rax)
	je	LBB0_11
## %bb.10:
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rax)
	movq	_STYLUS_DEVICE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movq	16(%r13), %rax
	movq	8(%rax), %rsi
LBB0_11:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_wacom_report_key
	movq	_ABS_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r13), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_wacom_report_abs
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	3(%rbx), %eax
	movzbl	2(%rbx), %ecx
	shll	$7, %ecx
	orl	%eax, %ecx
	movzbl	1(%rbx), %edx
	andl	$3, %edx
	shll	$14, %edx
	orl	%ecx, %edx
	movq	%r14, %rdi
	callq	_wacom_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	6(%rbx), %eax
	movzbl	5(%rbx), %ecx
	shll	$7, %ecx
	orl	%eax, %ecx
	movzbl	4(%rbx), %edx
	andl	$3, %edx
	shll	$14, %edx
	orl	%ecx, %edx
	movq	%r14, %rdi
	callq	_wacom_report_abs
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_wacom_report_abs
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movzbl	4(%rbx), %edx
	andl	$8, %edx
	movq	%r14, %rdi
	callq	_wacom_report_key
	movq	_BTN_STYLUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movzbl	4(%rbx), %edx
	andl	$16, %edx
	movq	%r14, %rdi
	callq	_wacom_report_key
	movq	_BTN_STYLUS2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	16(%r13), %rax
	movq	8(%rax), %rax
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movzbl	4(%rbx), %edx
	shrl	$5, %edx
	andl	$1, %edx
LBB0_13:
	movq	%r14, %rdi
LBB0_22:
	callq	_wacom_report_key
	movq	16(%r13), %rax
	movq	%r15, (%rax)
	movl	$1, %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wacom_pl_irq: received unknown report #%d"

	.comm	_ERASER_DEVICE_ID,4,2           ## @ERASER_DEVICE_ID
	.comm	_BTN_TOOL_RUBBER,8,3            ## @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,8,3               ## @BTN_TOOL_PEN
	.comm	_STYLUS_DEVICE_ID,4,2           ## @STYLUS_DEVICE_ID
	.comm	_ABS_MISC,4,2                   ## @ABS_MISC
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.comm	_BTN_TOUCH,8,3                  ## @BTN_TOUCH
	.comm	_BTN_STYLUS,8,3                 ## @BTN_STYLUS
	.comm	_BTN_STYLUS2,8,3                ## @BTN_STYLUS2
	.no_dead_strip	_wacom_pl_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_pl_irq
_wacom_pl_irq:                          ; @wacom_pl_irq
	.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	x20, x1
	ldr	x23, [x0]
	ldrb	w1, [x23]
	cmp	w1, #2
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x0
	ldrb	w8, [x23, #1]
	and	w21, w8, #0x40
	tbnz	w8, #6, LBB0_6
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	x1, [x8, #8]
Lloh0:
	adrp	x9, _BTN_TOOL_RUBBER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BTN_TOOL_RUBBER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x1, x9
	b.eq	LBB0_4
; %bb.3:
Lloh3:
	adrp	x9, _BTN_TOOL_PEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BTN_TOOL_PEN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	x9, [x8, #8]
	ldr	x8, [x19, #16]
	ldr	x1, [x8, #8]
LBB0_4:
	mov	x0, x20
	mov	w2, #0
	b	LBB0_19
LBB0_5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	mov	w0, #0
	b	LBB0_20
LBB0_6:
Lloh8:
	adrp	x8, _ERASER_DEVICE_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERASER_DEVICE_ID@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	ldp	x10, x8, [x19, #8]
	str	w9, [x10]
	ldrb	w9, [x23, #7]
	lsl	w9, w9, #1
	ldrb	w11, [x23, #4]
	bfxil	w9, w11, #2, #1
	sxtb	w9, w9
	ldr	x10, [x19, #24]
	ldr	w10, [x10]
	lsr	w12, w11, #6
	bfi	w12, w9, #1, #31
	cmp	w10, #256
	csel	w9, w9, w12, lt
	add	w12, w10, #1
	cmp	w12, #0
	add	w12, w10, #2
	csinc	w10, w12, w10, lt
	ldr	x12, [x8]
	cbz	x12, LBB0_9
; %bb.7:
	ldr	x8, [x8, #8]
Lloh11:
	adrp	x12, _BTN_TOOL_RUBBER@GOTPAGE
Lloh12:
	ldr	x12, [x12, _BTN_TOOL_RUBBER@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x12]
	and	w11, w11, #0x20
	cmp	x8, x1
	ccmp	w11, #0, #0, eq
	b.ne	LBB0_13
; %bb.8:
	mov	x0, x20
	mov	x1, x8
	mov	w2, #0
	bl	_wacom_report_key
	mov	x0, x20
	bl	_wacom_input_sync
	mov	w0, #0
Lloh14:
	adrp	x8, _BTN_TOOL_PEN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTN_TOOL_PEN@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	str	x8, [x9, #8]
	b	LBB0_20
LBB0_9:
	ldrb	w12, [x23, #1]
	tbnz	w12, #4, LBB0_11
; %bb.10:
Lloh17:
	adrp	x12, _BTN_TOOL_RUBBER@GOTPAGE
Lloh18:
	ldr	x12, [x12, _BTN_TOOL_RUBBER@GOTPAGEOFF]
Lloh19:
	ldr	x1, [x12]
Lloh20:
	adrp	x12, _BTN_TOOL_PEN@GOTPAGE
Lloh21:
	ldr	x12, [x12, _BTN_TOOL_PEN@GOTPAGEOFF]
Lloh22:
	ldr	x12, [x12]
	tst	w11, #0x20
	csel	x11, x12, x1, eq
	b	LBB0_12
LBB0_11:
Lloh23:
	adrp	x11, _BTN_TOOL_RUBBER@GOTPAGE
Lloh24:
	ldr	x11, [x11, _BTN_TOOL_RUBBER@GOTPAGEOFF]
Lloh25:
	ldr	x11, [x11]
	mov	x1, x11
LBB0_12:
	str	x11, [x8, #8]
LBB0_13:
	add	w22, w9, w10, asr #1
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	cmp	x9, x1
	b.eq	LBB0_15
; %bb.14:
Lloh26:
	adrp	x9, _BTN_TOOL_PEN@GOTPAGE
Lloh27:
	ldr	x9, [x9, _BTN_TOOL_PEN@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
Lloh29:
	adrp	x10, _STYLUS_DEVICE_ID@GOTPAGE
Lloh30:
	ldr	x10, [x10, _STYLUS_DEVICE_ID@GOTPAGEOFF]
	str	x9, [x8, #8]
Lloh31:
	ldr	w8, [x10]
	ldp	x9, x10, [x19, #8]
	str	w8, [x9]
	ldr	x1, [x10, #8]
LBB0_15:
	mov	x0, x20
	mov	x2, x21
	bl	_wacom_report_key
Lloh32:
	adrp	x8, _ABS_MISC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ABS_MISC@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_wacom_report_abs
Lloh35:
	adrp	x8, _ABS_X@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldrb	w8, [x23, #3]
	ldrb	w9, [x23, #2]
	orr	w8, w8, w9, lsl #7
	ldrb	w9, [x23, #1]
	and	w9, w9, #0x3
	orr	w2, w8, w9, lsl #14
	mov	x0, x20
	bl	_wacom_report_abs
Lloh38:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldrb	w8, [x23, #6]
	ldrb	w9, [x23, #5]
	orr	w8, w8, w9, lsl #7
	ldrb	w9, [x23, #4]
	and	w9, w9, #0x3
	orr	w2, w8, w9, lsl #14
	mov	x0, x20
	bl	_wacom_report_abs
Lloh41:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_wacom_report_abs
Lloh44:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh45:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh46:
	ldr	x1, [x8]
	ldrb	w8, [x23, #4]
	and	w2, w8, #0x8
	mov	x0, x20
	bl	_wacom_report_key
Lloh47:
	adrp	x8, _BTN_STYLUS@GOTPAGE
Lloh48:
	ldr	x8, [x8, _BTN_STYLUS@GOTPAGEOFF]
Lloh49:
	ldr	x1, [x8]
	ldrb	w8, [x23, #4]
	and	w2, w8, #0x10
	mov	x0, x20
	bl	_wacom_report_key
Lloh50:
	adrp	x8, _BTN_STYLUS2@GOTPAGE
Lloh51:
	ldr	x8, [x8, _BTN_STYLUS2@GOTPAGEOFF]
Lloh52:
	ldr	x1, [x8]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
Lloh53:
	adrp	x9, _BTN_TOOL_PEN@GOTPAGE
Lloh54:
	ldr	x9, [x9, _BTN_TOOL_PEN@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.16:
	mov	w2, #0
	b	LBB0_18
LBB0_17:
	ldrb	w8, [x23, #4]
	ubfx	w2, w8, #5, #1
LBB0_18:
	mov	x0, x20
LBB0_19:
	bl	_wacom_report_key
	ldr	x8, [x19, #16]
	str	x21, [x8]
	mov	w0, #1
LBB0_20:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wacom_pl_irq: received unknown report #%d"

	.comm	_ERASER_DEVICE_ID,4,2           ; @ERASER_DEVICE_ID
	.comm	_BTN_TOOL_RUBBER,8,3            ; @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,8,3               ; @BTN_TOOL_PEN
	.comm	_STYLUS_DEVICE_ID,4,2           ; @STYLUS_DEVICE_ID
	.comm	_ABS_MISC,4,2                   ; @ABS_MISC
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.comm	_BTN_TOUCH,8,3                  ; @BTN_TOUCH
	.comm	_BTN_STYLUS,8,3                 ; @BTN_STYLUS
	.comm	_BTN_STYLUS2,8,3                ; @BTN_STYLUS2
	.no_dead_strip	_wacom_pl_irq
.subsections_via_symbols
