	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_wac_pen_report
_wacom_wac_pen_report:                  ## @wacom_wac_pen_report
	.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
	callq	_hid_get_drvdata
	cmpq	$0, 64(%rax)
	jne	LBB0_16
## %bb.1:
	movq	%rax, %rbx
	movq	72(%rax), %r15
	movl	28(%rax), %r14d
	movq	16(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_9
## %bb.2:
	cmpl	$0, 24(%rbx)
	je	LBB0_9
## %bb.3:
	cmpq	$0, 48(%rbx)
	je	LBB0_5
## %bb.4:
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rcx
LBB0_8:
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	jmp	LBB0_9
LBB0_5:
	movq	(%rbx), %rcx
	movl	(%rcx), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.6:
	callq	_wacom_intuos_get_tool_type
	movq	16(%rbx), %rcx
	movq	%rax, (%rcx)
LBB0_9:
	movq	56(%rbx), %rax
	movl	%r14d, (%rax)
	movq	%rbx, %rdi
	callq	_delay_pen_events
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	16(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.11:
	movq	(%rbx), %rax
	movl	(%rax), %r12d
	movl	36(%rbx), %r13d
	addl	%r13d, %r13d
	orl	32(%rbx), %r13d
	movq	_BTN_STYLUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%edx, %edx
	cmpl	$1, %r13d
	sete	%dl
	movq	%r15, %rdi
	callq	_input_report_key
	movq	_BTN_STYLUS2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%edx, %edx
	cmpl	$2, %r13d
	sete	%dl
	movq	%r15, %rdi
	callq	_input_report_key
	movq	_BTN_STYLUS3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%edx, %edx
	cmpl	$3, %r13d
	sete	%dl
	movq	%r15, %rdi
	callq	_input_report_key
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	40(%rbx), %edx
	movq	%r15, %rdi
	callq	_input_report_key
	movq	16(%rbx), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_input_report_key
	movq	8(%rbx), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.12:
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SERIAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_input_event
	movq	_ABS_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r14d, %r14d
	cmovel	%r14d, %r12d
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_input_report_abs
LBB0_13:
	movl	$0, 40(%rbx)
	movq	%r15, %rdi
	callq	_input_sync
LBB0_14:
	testl	%r14d, %r14d
	jne	LBB0_16
## %bb.15:
	movq	16(%rbx), %rax
	movq	$0, (%rax)
	movq	(%rbx), %rax
	movl	$0, (%rax)
	movq	8(%rbx), %rax
	movl	$0, (%rax)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_BTN_TOOL_RUBBER,8,3            ## @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,8,3               ## @BTN_TOOL_PEN
	.comm	_BTN_STYLUS,8,3                 ## @BTN_STYLUS
	.comm	_BTN_STYLUS2,8,3                ## @BTN_STYLUS2
	.comm	_BTN_STYLUS3,8,3                ## @BTN_STYLUS3
	.comm	_BTN_TOUCH,8,3                  ## @BTN_TOUCH
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SERIAL,4,2                 ## @MSC_SERIAL
	.comm	_ABS_MISC,4,2                   ## @ABS_MISC
	.no_dead_strip	_wacom_wac_pen_report
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_wac_pen_report
_wacom_wac_pen_report:                  ; @wacom_wac_pen_report
	.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
	bl	_hid_get_drvdata
	ldr	x8, [x0, #64]
	cbnz	x8, LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	x21, [x0, #72]
	ldp	w9, w20, [x0, #24]
	ldr	x8, [x0, #16]
	ldr	x10, [x8]
	cmp	x10, #0
	ccmp	w9, #0, #4, eq
	b.eq	LBB0_7
; %bb.2:
	ldr	x9, [x19, #48]
	cbz	x9, LBB0_5
; %bb.3:
Lloh0:
	adrp	x9, _BTN_TOOL_RUBBER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BTN_TOOL_RUBBER@GOTPAGEOFF]
LBB0_4:
	ldr	x9, [x9]
	str	x9, [x8]
	b	LBB0_7
LBB0_5:
	ldr	x9, [x19]
	ldr	w0, [x9]
	cbz	w0, LBB0_15
; %bb.6:
	bl	_wacom_intuos_get_tool_type
	ldr	x8, [x19, #16]
	str	x0, [x8]
LBB0_7:
	ldr	x8, [x19, #56]
	str	w20, [x8]
	mov	x0, x19
	bl	_delay_pen_events
	cbnz	w0, LBB0_12
; %bb.8:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.9:
	ldr	x8, [x19]
	ldr	w22, [x8]
	ldp	w8, w9, [x19, #32]
	orr	w23, w8, w9, lsl #1
Lloh2:
	adrp	x8, _BTN_STYLUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BTN_STYLUS@GOTPAGEOFF]
Lloh4:
	ldr	x1, [x8]
	cmp	w23, #1
	cset	w2, eq
	mov	x0, x21
	bl	_input_report_key
Lloh5:
	adrp	x8, _BTN_STYLUS2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BTN_STYLUS2@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
	cmp	w23, #2
	cset	w2, eq
	mov	x0, x21
	bl	_input_report_key
Lloh8:
	adrp	x8, _BTN_STYLUS3@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BTN_STYLUS3@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	cmp	w23, #3
	cset	w2, eq
	mov	x0, x21
	bl	_input_report_key
Lloh11:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	ldr	w2, [x19, #40]
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	mov	x0, x21
	mov	x2, x20
	bl	_input_report_key
	ldr	x8, [x19, #8]
	ldr	w3, [x8]
	cbz	w3, LBB0_11
; %bb.10:
Lloh14:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _MSC_SERIAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSC_SERIAL@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_input_event
Lloh20:
	adrp	x8, _ABS_MISC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ABS_MISC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	cmp	w20, #0
	csel	w2, wzr, w22, eq
	mov	x0, x21
	bl	_input_report_abs
LBB0_11:
	str	wzr, [x19, #40]
	mov	x0, x21
	bl	_input_sync
LBB0_12:
	cbnz	w20, LBB0_14
; %bb.13:
	ldr	x8, [x19, #16]
	str	xzr, [x8]
	ldp	x8, x9, [x19]
	str	wzr, [x8]
	str	wzr, [x9]
LBB0_14:
	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_15:
Lloh23:
	adrp	x9, _BTN_TOOL_PEN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _BTN_TOOL_PEN@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BTN_TOOL_RUBBER,8,3            ; @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,8,3               ; @BTN_TOOL_PEN
	.comm	_BTN_STYLUS,8,3                 ; @BTN_STYLUS
	.comm	_BTN_STYLUS2,8,3                ; @BTN_STYLUS2
	.comm	_BTN_STYLUS3,8,3                ; @BTN_STYLUS3
	.comm	_BTN_TOUCH,8,3                  ; @BTN_TOUCH
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SERIAL,4,2                 ; @MSC_SERIAL
	.comm	_ABS_MISC,4,2                   ; @ABS_MISC
	.no_dead_strip	_wacom_wac_pen_report
.subsections_via_symbols
