	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_handle_packet
_wacom_handle_packet:                   ## @wacom_handle_packet
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movl	(%rax), %r13d
	movl	4(%rax), %esi
	movl	12(%rax), %edx
	movl	%r13d, %ecx
	shll	$14, %ecx
	movzwl	%cx, %r8d
	shll	$7, %esi
	movl	%edx, %ecx
	shll	$14, %ecx
	movzwl	%cx, %r9d
	movl	16(%rax), %r12d
	shll	$7, %r12d
	movl	%r13d, %ecx
	notl	%ecx
	movl	$-1, %ebx
	testb	$96, %cl
	jne	LBB0_2
## %bb.1:
	movl	24(%rax), %edi
	andl	$127, %edi
	movl	8(%r15), %ecx
	movl	%edx, %ebx
	shrl	$2, %ebx
	andl	$1, %ebx
	testl	%ecx, %ecx
	leal	(%rbx,%rdi,2), %ebx
	cmovlel	%edi, %ebx
	movl	%r13d, %edi
	shrl	$2, %edi
	andl	$1, %edi
	cmpl	$2, %ecx
	leal	(%rdi,%rbx,2), %edi
	cmovll	%ebx, %edi
	movl	$64, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	xorl	%edi, %ebx
LBB0_2:
	shrl	$3, %edx
	orl	%r8d, %esi
	orl	%r9d, %r12d
	testb	$32, %r13b
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_3
## %bb.6:
	movq	_CURSOR@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_3:
	movl	%edx, %ecx
	andl	$15, %ecx
	testl	%ecx, 12(%r15)
	jne	LBB0_4
## %bb.5:
	movq	_STYLUS@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_4:
	movq	_ERASER@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %r14d
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	andl	$64, %r13d
	orl	8(%rax), %esi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	orl	20(%rax), %r12d
	movl	16(%r15), %eax
	cmpl	%eax, %r14d
	je	LBB0_10
## %bb.8:
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	20(%r15), %edi
	movq	_tools@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	4(%rcx,%rax,8), %esi
	xorl	%edx, %edx
	callq	_input_report_key
	movl	20(%r15), %edi
	callq	_input_sync
LBB0_10:
	movl	%r14d, 16(%r15)
	movl	20(%r15), %edi
	movq	_tools@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r14d, %ebx
	movl	4(%rax,%rbx,8), %esi
	movl	%r13d, %edx
	callq	_input_report_key
	xorl	%edx, %edx
	movl	20(%r15), %edi
	movq	_ABS_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.11:
	movq	_tools@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %edx
LBB0_12:
	callq	_input_report_abs
	movl	20(%r15), %edi
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movl	20(%r15), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	callq	_input_report_abs
	movl	20(%r15), %edi
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movl	20(%r15), %edi
	testb	$32, -52(%rbp)                  ## 1-byte Folded Reload
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_13
## %bb.14:
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	andl	$1, %edx
	callq	_input_report_key
	movl	20(%r15), %edi
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	andl	$2, %edx
	callq	_input_report_key
	movl	20(%r15), %edi
	movq	_BTN_MIDDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$4, %ebx
	movl	%ebx, %edx
	callq	_input_report_key
	movq	(%r15), %rax
	movl	24(%rax), %eax
	movl	%eax, %ecx
	shrl	$4, %ecx
	andl	$3, %ecx
	movl	%ecx, %edx
	negl	%edx
	testb	$64, %al
	cmovel	%ecx, %edx
	movl	20(%r15), %edi
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_input_report_rel
	jmp	LBB0_15
LBB0_13:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	andl	$1, %edx
	callq	_input_report_key
	movl	20(%r15), %edi
	movq	_BTN_STYLUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	andl	$2, %edx
	callq	_input_report_key
	movl	20(%r15), %edi
	movq	_BTN_STYLUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$4, %ebx
	movl	%ebx, %edx
	callq	_input_report_key
LBB0_15:
	movl	20(%r15), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ERASER,4,2                     ## @ERASER
	.comm	_STYLUS,4,2                     ## @STYLUS
	.comm	_CURSOR,4,2                     ## @CURSOR
	.comm	_tools,8,3                      ## @tools
	.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,4,2                  ## @BTN_TOUCH
	.comm	_BTN_STYLUS,4,2                 ## @BTN_STYLUS
	.comm	_BTN_STYLUS2,4,2                ## @BTN_STYLUS2
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_BTN_MIDDLE,4,2                 ## @BTN_MIDDLE
	.comm	_REL_WHEEL,4,2                  ## @REL_WHEEL
	.no_dead_strip	_wacom_handle_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_handle_packet
_wacom_handle_packet:                   ; @wacom_handle_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0]
	ldp	w25, w11, [x8]
	mvn	w13, w25
	ubfiz	w12, w25, #14, #2
	ldp	w24, w9, [x8, #12]
	ubfiz	w10, w24, #14, #2
	tst	w13, #0x60
	b.ne	LBB0_2
; %bb.1:
	ldr	w13, [x8, #24]
	and	w13, w13, #0x7f
	ldr	w14, [x19, #8]
	ubfx	w15, w24, #2, #1
	bfi	w15, w13, #1, #7
	cmp	w14, #0
	csel	w13, w15, w13, gt
	ubfx	w15, w25, #2, #1
	bfi	w15, w13, #1, #8
	cmp	w14, #1
	csel	w13, w15, w13, gt
	mov	w15, #64
	lsl	w14, w15, w14
	eor	w20, w13, w14
	b	LBB0_3
LBB0_2:
	mov	w20, #-1
LBB0_3:
	orr	w11, w12, w11, lsl #7
	ldr	w12, [x8, #8]
	ldr	w8, [x8, #20]
	and	w23, w25, #0x40
	orr	w9, w10, w9, lsl #7
	tbnz	w25, #5, LBB0_5
; %bb.4:
Lloh0:
	adrp	x10, _CURSOR@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CURSOR@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ubfx	w10, w24, #3, #4
Lloh2:
	adrp	x13, _ERASER@GOTPAGE
Lloh3:
	ldr	x13, [x13, _ERASER@GOTPAGEOFF]
	ldr	w14, [x19, #12]
Lloh4:
	adrp	x15, _STYLUS@GOTPAGE
Lloh5:
	ldr	x15, [x15, _STYLUS@GOTPAGEOFF]
	tst	w10, w14
	csel	x10, x15, x13, eq
LBB0_6:
	ldr	w26, [x10]
	orr	w22, w11, w12
	orr	w21, w9, w8
	ldr	w8, [x19, #16]
	cmp	w26, w8
	ccmp	w8, #0, #4, ne
Lloh6:
	adrp	x27, _tools@GOTPAGE
Lloh7:
	ldr	x27, [x27, _tools@GOTPAGEOFF]
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x19, #20]
	ldr	x9, [x27]
	add	x8, x9, x8, lsl #3
	ldr	w1, [x8, #4]
	mov	w2, #0
	bl	_input_report_key
	ldr	w0, [x19, #20]
	bl	_input_sync
LBB0_8:
	str	w26, [x19, #16]
	ldr	w0, [x19, #20]
	ldr	x8, [x27]
	add	x8, x8, w26, uxtw #3
	ldr	w1, [x8, #4]
	mov	x2, x23
	bl	_input_report_key
	ldr	w0, [x19, #20]
Lloh8:
	adrp	x8, _ABS_MISC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ABS_MISC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	cbnz	w23, LBB0_10
; %bb.9:
	mov	w2, #0
	b	LBB0_11
LBB0_10:
	mov	w8, w26
	ldr	x9, [x27]
	lsl	x8, x8, #3
	ldr	w2, [x9, x8]
LBB0_11:
	lsr	w23, w24, #3
	bl	_input_report_abs
	ldr	w0, [x19, #20]
Lloh11:
	adrp	x8, _ABS_X@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_input_report_abs
	ldr	w0, [x19, #20]
Lloh14:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_input_report_abs
	ldr	w0, [x19, #20]
Lloh17:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_input_report_abs
	ldr	w0, [x19, #20]
	tbnz	w25, #5, LBB0_13
; %bb.12:
Lloh20:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ubfx	w2, w24, #3, #1
	bl	_input_report_key
	ldr	w0, [x19, #20]
Lloh23:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	and	w2, w23, #0x2
	bl	_input_report_key
	ldr	w0, [x19, #20]
Lloh26:
	adrp	x8, _BTN_MIDDLE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BTN_MIDDLE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	and	w2, w23, #0x4
	bl	_input_report_key
	ldr	x8, [x19]
	ldr	w8, [x8, #24]
	ubfx	w9, w8, #4, #2
	tst	w8, #0x40
	cneg	w2, w9, ne
	ldr	w0, [x19, #20]
Lloh29:
	adrp	x8, _REL_WHEEL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _REL_WHEEL@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_input_report_rel
	b	LBB0_14
LBB0_13:
Lloh32:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ubfx	w2, w24, #3, #1
	bl	_input_report_key
	ldr	w0, [x19, #20]
Lloh35:
	adrp	x8, _BTN_STYLUS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _BTN_STYLUS@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	and	w2, w23, #0x2
	bl	_input_report_key
	ldr	w0, [x19, #20]
Lloh38:
	adrp	x8, _BTN_STYLUS2@GOTPAGE
Lloh39:
	ldr	x8, [x8, _BTN_STYLUS2@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	and	w2, w23, #0x4
	bl	_input_report_key
LBB0_14:
	ldr	w0, [x19, #20]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ERASER,4,2                     ; @ERASER
	.comm	_STYLUS,4,2                     ; @STYLUS
	.comm	_CURSOR,4,2                     ; @CURSOR
	.comm	_tools,8,3                      ; @tools
	.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,4,2                  ; @BTN_TOUCH
	.comm	_BTN_STYLUS,4,2                 ; @BTN_STYLUS
	.comm	_BTN_STYLUS2,4,2                ; @BTN_STYLUS2
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_BTN_MIDDLE,4,2                 ; @BTN_MIDDLE
	.comm	_REL_WHEEL,4,2                  ; @REL_WHEEL
	.no_dead_strip	_wacom_handle_packet
.subsections_via_symbols
