	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_i2c_irq
_wacom_i2c_irq:                         ## @wacom_i2c_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	24(%rsi), %r12
	movq	(%rsi), %r14
	movl	16(%rsi), %edi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movl	12(%r14), %r13d
	movl	%r13d, %r15d
	andb	$2, %r15b
	movl	%r13d, %eax
	andb	$16, %al
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	leaq	16(%r14), %rdi
	callq	_le16_to_cpup
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leaq	24(%r14), %rdi
	callq	_le16_to_cpup
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	leaq	32(%r14), %rdi
	callq	_le16_to_cpup
	cmpl	$0, 8(%rbx)
	jne	LBB0_6
## %bb.2:
	movl	%eax, %ecx
	testb	$12, 12(%r14)
	jne	LBB0_3
## %bb.4:
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	%ecx, %eax
LBB0_6:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	12(%r14), %eax
	andl	$32, %eax
	movl	%eax, 8(%rbx)
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	testb	$5, %r13b
	setne	%dl
	movq	%r12, %rdi
	callq	_input_report_key
	movl	12(%rbx), %esi
	movzbl	8(%rbx), %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_BTN_STYLUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r15b, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_BTN_STYLUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	-41(%rbp), %edx                 ## 1-byte Folded Reload
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movq	%r12, %rdi
	callq	_input_sync
LBB0_7:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTN_TOOL_RUBBER,4,2            ## @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,4,2               ## @BTN_TOOL_PEN
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.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	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_wacom_i2c_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_i2c_irq
_wacom_i2c_irq:                         ; @wacom_i2c_irq
	.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	x24, x1
	ldr	x19, [x1, #24]
	ldr	x26, [x1]
	ldr	w0, [x1, #16]
	mov	x1, x26
	mov	w2, #8
	bl	_i2c_master_recv
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w27, [x26, #12]
	and	w25, w27, #0x2
	and	w23, w27, #0x10
	add	x0, x26, #16
	bl	_le16_to_cpup
	mov	x22, x0
	add	x0, x26, #24
	bl	_le16_to_cpup
	mov	x21, x0
	add	x0, x26, #32
	bl	_le16_to_cpup
	mov	x20, x0
	ldr	w8, [x24, #8]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x26, #12]
Lloh0:
	adrp	x9, _BTN_TOOL_RUBBER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BTN_TOOL_RUBBER@GOTPAGEOFF]
Lloh2:
	adrp	x10, _BTN_TOOL_PEN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _BTN_TOOL_PEN@GOTPAGEOFF]
	tst	w8, #0xc
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x24, #12]
LBB0_3:
	ldr	w8, [x26, #12]
	and	w8, w8, #0x20
	str	w8, [x24, #8]
Lloh4:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w8, #5
	tst	w27, w8
	cset	w2, ne
	mov	x0, x19
	bl	_input_report_key
	ldr	w1, [x24, #12]
	ldrb	w2, [x24, #8]
	mov	x0, x19
	bl	_input_report_key
Lloh7:
	adrp	x8, _BTN_STYLUS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BTN_STYLUS@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x25
	bl	_input_report_key
Lloh10:
	adrp	x8, _BTN_STYLUS2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BTN_STYLUS2@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_key
Lloh13:
	adrp	x8, _ABS_X@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_input_report_abs
Lloh16:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_abs
Lloh19:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_input_report_abs
	mov	x0, x19
	bl	_input_sync
LBB0_4:
Lloh22:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	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
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BTN_TOOL_RUBBER,4,2            ; @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,4,2               ; @BTN_TOOL_PEN
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.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	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_wacom_i2c_irq
.subsections_via_symbols
