	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_dtu_irq
_wacom_dtu_irq:                         ## @wacom_dtu_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	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movzbl	1(%rbx), %r15d
	andl	$32, %r15d
	movsbl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_dbg
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.1:
	testb	$12, 1(%rbx)
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rax
	movq	%rax, %rcx
	je	LBB0_3
## %bb.2:
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movl	%ecx, (%rdx)
	cmpl	(%rax), %ecx
	jne	LBB0_4
## %bb.5:
	movq	_STYLUS_DEVICE_ID@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_ERASER_DEVICE_ID@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
LBB0_7:
	movq	_BTN_STYLUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	1(%rbx), %edx
	andl	$2, %edx
	movq	%r12, %rdi
	callq	_wacom_report_key
	movq	_BTN_STYLUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	1(%rbx), %edx
	andl	$16, %edx
	movq	%r12, %rdi
	callq	_wacom_report_key
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	2(%rbx), %rdi
	callq	_le16_to_cpup
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_wacom_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	4(%rbx), %rdi
	callq	_le16_to_cpup
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_wacom_report_abs
	movzbl	7(%rbx), %eax
	andl	$1, %eax
	shll	$8, %eax
	movsbl	6(%rbx), %edx
	orl	%eax, %edx
	jns	LBB0_9
## %bb.8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	addl	%eax, %edx
	incl	%edx
LBB0_9:
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_wacom_report_abs
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	1(%rbx), %edx
	andl	$5, %edx
	movq	%r12, %rdi
	callq	_wacom_report_key
	testb	%r15b, %r15b
	jne	LBB0_11
## %bb.10:
	movq	8(%r14), %rax
	movl	$0, (%rax)
LBB0_11:
	movq	16(%r14), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_wacom_report_key
	movq	_ABS_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_wacom_report_abs
	movq	%r12, %rdi
	callq	_wacom_input_sync
	movl	$1, %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_dtu_irq: received report #%d"

	.comm	_BTN_TOOL_RUBBER,4,2            ## @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,4,2               ## @BTN_TOOL_PEN
	.comm	_STYLUS_DEVICE_ID,4,2           ## @STYLUS_DEVICE_ID
	.comm	_ERASER_DEVICE_ID,4,2           ## @ERASER_DEVICE_ID
	.comm	_BTN_STYLUS,4,2                 ## @BTN_STYLUS
	.comm	_BTN_STYLUS2,4,2                ## @BTN_STYLUS2
	.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	_ABS_MISC,4,2                   ## @ABS_MISC
	.no_dead_strip	_wacom_dtu_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_dtu_irq
_wacom_dtu_irq:                         ; @wacom_dtu_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	x19, x1
	mov	x20, x0
	ldr	x24, [x0, #24]
	ldr	x23, [x0]
	ldrb	w22, [x23, #1]
	and	w21, w22, #0x20
	ldrsb	w1, [x23]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	tbz	w22, #5, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _BTN_TOOL_RUBBER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BTN_TOOL_RUBBER@GOTPAGEOFF]
	ldrb	w9, [x23, #1]
Lloh4:
	adrp	x10, _BTN_TOOL_PEN@GOTPAGE
Lloh5:
	ldr	x10, [x10, _BTN_TOOL_PEN@GOTPAGEOFF]
	tst	w9, #0xc
	csel	x8, x10, x8, eq
	ldr	w8, [x8]
	ldp	x11, x9, [x20, #8]
	str	w8, [x9]
	ldr	w9, [x10]
Lloh6:
	adrp	x10, _STYLUS_DEVICE_ID@GOTPAGE
Lloh7:
	ldr	x10, [x10, _STYLUS_DEVICE_ID@GOTPAGEOFF]
	cmp	w8, w9
Lloh8:
	adrp	x8, _ERASER_DEVICE_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERASER_DEVICE_ID@GOTPAGEOFF]
	csel	x8, x10, x8, eq
	ldr	w8, [x8]
	str	w8, [x11]
LBB0_2:
Lloh10:
	adrp	x8, _BTN_STYLUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BTN_STYLUS@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldrb	w8, [x23, #1]
	and	w2, w8, #0x2
	mov	x0, x19
	bl	_wacom_report_key
Lloh13:
	adrp	x8, _BTN_STYLUS2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BTN_STYLUS2@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldrb	w8, [x23, #1]
	and	w2, w8, #0x10
	mov	x0, x19
	bl	_wacom_report_key
Lloh16:
	adrp	x8, _ABS_X@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh18:
	ldr	w22, [x8]
	add	x0, x23, #2
	bl	_le16_to_cpup
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_wacom_report_abs
Lloh19:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh21:
	ldr	w22, [x8]
	add	x0, x23, #4
	bl	_le16_to_cpup
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_wacom_report_abs
	ldrb	w8, [x23, #7]
	and	w8, w8, #0x1
	ldrsb	w9, [x23, #6]
	orr	w2, w9, w8, lsl #8
	tbz	w2, #31, LBB0_4
; %bb.3:
	ldr	w8, [x24]
	add	w8, w2, w8
	add	w2, w8, #1
LBB0_4:
Lloh22:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wacom_report_abs
Lloh25:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldrb	w8, [x23, #1]
	mov	w9, #5
	and	w2, w8, w9
	mov	x0, x19
	bl	_wacom_report_key
	cbnz	w21, LBB0_6
; %bb.5:
	ldr	x8, [x20, #8]
	str	wzr, [x8]
LBB0_6:
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_wacom_report_key
Lloh28:
	adrp	x8, _ABS_MISC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ABS_MISC@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	x8, [x20, #8]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wacom_report_abs
	mov	x0, x19
	bl	_wacom_input_sync
	mov	w0, #1
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wacom_dtu_irq: received report #%d"

	.comm	_BTN_TOOL_RUBBER,4,2            ; @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,4,2               ; @BTN_TOOL_PEN
	.comm	_STYLUS_DEVICE_ID,4,2           ; @STYLUS_DEVICE_ID
	.comm	_ERASER_DEVICE_ID,4,2           ; @ERASER_DEVICE_ID
	.comm	_BTN_STYLUS,4,2                 ; @BTN_STYLUS
	.comm	_BTN_STYLUS2,4,2                ; @BTN_STYLUS2
	.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	_ABS_MISC,4,2                   ; @ABS_MISC
	.no_dead_strip	_wacom_dtu_irq
.subsections_via_symbols
