	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_bpt3_touch
_wacom_bpt3_touch:                      ## @wacom_bpt3_touch
	.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	(%rdi), %rbx
	xorl	%r14d, %r14d
	cmpb	$2, (%rbx)
	jne	LBB0_11
## %bb.1:
	movzbl	1(%rbx), %r12d
	andl	$7, %r12d
	movl	$1, %r14d
	testb	%r12b, %r12b
	je	LBB0_11
## %bb.2:
	movq	%rdi, %r15
	addq	$2, %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_wacom_bpt3_touch_msg
	incl	%r13d
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$8, %rbx
	decq	%r12
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	leal	-2(%rax), %ecx
	cmpb	$15, %cl
	jbe	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$-128, %al
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_wacom_bpt3_button_msg
	jmp	LBB0_7
LBB0_8:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.9:
	testl	%r13d, %r13d
	je	LBB0_11
## %bb.10:
	callq	_input_mt_sync_frame
	movq	%r15, %rdi
	callq	_wacom_wac_finger_count_touches
	movq	8(%r15), %rcx
	movl	%eax, (%rcx)
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_wacom_bpt3_touch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_bpt3_touch
_wacom_bpt3_touch:                      ; @wacom_bpt3_touch
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0]
	ldrb	w8, [x20]
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.1:
	ldrb	w8, [x20, #1]
	and	w22, w8, #0x7
	cbz	w22, LBB0_40
; %bb.2:
	mov	x19, x0
	mov	x1, x20
	ldrb	w8, [x1, #2]!
	sub	w9, w8, #2
	cmp	w9, #15
	b.hi	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_wacom_bpt3_touch_msg
	mov	w21, #1
	cmp	w22, #1
	b.ne	LBB0_8
	b	LBB0_37
LBB0_4:
	mov	w0, #0
	b	LBB0_41
LBB0_5:
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_wacom_bpt3_button_msg
LBB0_7:
	mov	w21, #0
	cmp	w22, #1
	b.eq	LBB0_37
LBB0_8:
	mov	x1, x20
	ldrb	w8, [x1, #10]!
	sub	w9, w8, #2
	cmp	w9, #16
	b.hs	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_wacom_bpt3_touch_msg
	add	w21, w21, #1
	b	LBB0_12
LBB0_10:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_wacom_bpt3_button_msg
LBB0_12:
	cmp	w22, #2
	b.eq	LBB0_37
; %bb.13:
	mov	x1, x20
	ldrb	w8, [x1, #18]!
	sub	w9, w8, #2
	cmp	w9, #16
	b.hs	LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_wacom_bpt3_touch_msg
	add	w21, w21, #1
	b	LBB0_17
LBB0_15:
	cmp	w8, #128
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_wacom_bpt3_button_msg
LBB0_17:
	cmp	w22, #3
	b.eq	LBB0_37
; %bb.18:
	mov	x1, x20
	ldrb	w8, [x1, #26]!
	sub	w9, w8, #2
	cmp	w9, #16
	b.hs	LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_wacom_bpt3_touch_msg
	add	w21, w21, #1
	b	LBB0_22
LBB0_20:
	cmp	w8, #128
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x19
	bl	_wacom_bpt3_button_msg
LBB0_22:
	cmp	w22, #4
	b.eq	LBB0_37
; %bb.23:
	mov	x1, x20
	ldrb	w8, [x1, #34]!
	sub	w9, w8, #2
	cmp	w9, #16
	b.hs	LBB0_25
; %bb.24:
	mov	x0, x19
	bl	_wacom_bpt3_touch_msg
	add	w21, w21, #1
	b	LBB0_27
LBB0_25:
	cmp	w8, #128
	b.ne	LBB0_27
; %bb.26:
	mov	x0, x19
	bl	_wacom_bpt3_button_msg
LBB0_27:
	cmp	w22, #5
	b.eq	LBB0_37
; %bb.28:
	mov	x1, x20
	ldrb	w8, [x1, #42]!
	sub	w9, w8, #2
	cmp	w9, #16
	b.hs	LBB0_30
; %bb.29:
	mov	x0, x19
	bl	_wacom_bpt3_touch_msg
	add	w21, w21, #1
	b	LBB0_32
LBB0_30:
	cmp	w8, #128
	b.ne	LBB0_32
; %bb.31:
	mov	x0, x19
	bl	_wacom_bpt3_button_msg
LBB0_32:
	cmp	w22, #6
	b.eq	LBB0_37
; %bb.33:
	ldrb	w8, [x20, #50]!
	sub	w9, w8, #2
	cmp	w9, #16
	b.hs	LBB0_35
; %bb.34:
	mov	x0, x19
	mov	x1, x20
	bl	_wacom_bpt3_touch_msg
	add	w21, w21, #1
	b	LBB0_37
LBB0_35:
	cmp	w8, #128
	b.ne	LBB0_37
; %bb.36:
	mov	x0, x19
	mov	x1, x20
	bl	_wacom_bpt3_button_msg
LBB0_37:
	ldr	x8, [x19, #16]
	mov	w0, #1
	cbz	x8, LBB0_41
; %bb.38:
	cbz	w21, LBB0_41
; %bb.39:
	mov	x0, x8
	bl	_input_mt_sync_frame
	mov	x0, x19
	bl	_wacom_wac_finger_count_touches
	ldr	x8, [x19, #8]
	str	w0, [x8]
LBB0_40:
	mov	w0, #1
LBB0_41:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_wacom_bpt3_touch
.subsections_via_symbols
