	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_interrupt
_wacom_interrupt:                       ## @wacom_interrupt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	callq	_serio_get_drvdata
	movq	%rax, %rbx
	testb	$-128, %r14b
	jne	LBB0_1
## %bb.2:
	cmpb	$13, %r14b
	je	LBB0_3
	jmp	LBB0_5
LBB0_1:
	movl	$0, (%rbx)
	cmpb	$13, %r14b
	jne	LBB0_5
LBB0_3:
	movq	8(%rbx), %rax
	testb	$-128, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_wacom_handle_response
	jmp	LBB0_10
LBB0_5:
	movl	(%rbx), %edx
	movq	_DATA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-2, %eax
	cmpl	%eax, %edx
	jle	LBB0_7
## %bb.6:
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_wacom_clear_data_buf
	movl	(%rbx), %edx
LBB0_7:
	movq	8(%rbx), %rax
	leal	1(%rdx), %ecx
	movl	%ecx, (%rbx)
	movslq	%edx, %rcx
	movl	%r14d, (%rax,%rcx,4)
	movslq	(%rbx), %rcx
	movq	_PACKET_LENGTH@GOTPCREL(%rip), %rdx
	cmpq	%rcx, (%rdx)
	jne	LBB0_11
## %bb.8:
	testb	$-128, (%rax)
	je	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	callq	_wacom_handle_packet
LBB0_10:
	movq	%rbx, %rdi
	callq	_wacom_clear_data_buf
LBB0_11:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_DATA_SIZE,4,2                  ## @DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"throwing away %d bytes of garbage\n"

	.comm	_PACKET_LENGTH,8,3              ## @PACKET_LENGTH
	.no_dead_strip	_wacom_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_interrupt
_wacom_interrupt:                       ; @wacom_interrupt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_serio_get_drvdata
	mov	x19, x0
	tbnz	w20, #7, LBB0_2
; %bb.1:
	cmp	w20, #13
	b.eq	LBB0_3
	b	LBB0_5
LBB0_2:
	str	wzr, [x19]
	cmp	w20, #13
	b.ne	LBB0_5
LBB0_3:
	ldr	x8, [x19, #8]
	ldrb	w8, [x8]
	tbnz	w8, #7, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_wacom_handle_response
	b	LBB0_10
LBB0_5:
	ldr	w2, [x19]
Lloh0:
	adrp	x8, _DATA_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATA_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w8, #2
	cmp	w2, w8
	b.le	LBB0_7
; %bb.6:
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_wacom_clear_data_buf
	ldr	w2, [x19]
LBB0_7:
	ldr	x8, [x19, #8]
	add	w9, w2, #1
	str	w9, [x19]
	str	w20, [x8, w2, sxtw #2]
	ldrsw	x9, [x19]
Lloh5:
	adrp	x10, _PACKET_LENGTH@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PACKET_LENGTH@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x10, x9
	b.ne	LBB0_11
; %bb.8:
	ldrb	w8, [x8]
	tbz	w8, #7, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_wacom_handle_packet
LBB0_10:
	mov	x0, x19
	bl	_wacom_clear_data_buf
LBB0_11:
Lloh8:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_DATA_SIZE,4,2                  ; @DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"throwing away %d bytes of garbage\n"

	.comm	_PACKET_LENGTH,8,3              ; @PACKET_LENGTH
	.no_dead_strip	_wacom_interrupt
.subsections_via_symbols
