	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_bamboo_pad_touch_event
_wacom_bamboo_pad_touch_event:          ## @wacom_bamboo_pad_touch_event
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movb	(%rsi), %al
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	cmpl	$0, 8(%rdi)
	je	LBB0_7
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_input_mt_slot
	movq	_MT_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_input_mt_report_slot_state
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movl	8(%r13), %eax
	addq	$3, %r14
	cmpq	%rax, %rbx
	jae	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BIT
	testb	%al, -41(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_report_touch_events
	movq	%rax, %r13
	xorl	%r15d, %r15d
	testq	%rax, %rax
	setne	%r15b
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_input_mt_slot
	movq	_MT_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_input_mt_report_slot_state
	testq	%r13, %r13
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movzbl	1(%rsi,%rax), %ecx
	movzbl	2(%rsi,%rax), %r15d
	movl	%r15d, %edx
	andl	$15, %edx
	shll	$8, %edx
	orl	%ecx, %edx
	movzbl	3(%rsi,%rax), %eax
	shll	$4, %eax
	shrl	$4, %r15d
	orl	%eax, %r15d
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_input_report_abs
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_input_report_abs
	jmp	LBB0_6
LBB0_7:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_input_mt_sync_frame
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	-41(%rbp), %bl                  ## 1-byte Reload
	movl	%ebx, %eax
	andb	$64, %al
	movzbl	%al, %edx
	movq	%r14, %rdi
	callq	_input_report_key
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %eax
	andb	$-128, %al
	movzbl	%al, %edx
	movq	%r14, %rdi
	callq	_input_report_key
	testb	%bl, %bl
	je	LBB0_8
## %bb.9:
	movq	%r13, %rdi
	callq	_report_touch_events
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	jmp	LBB0_10
LBB0_8:
	xorl	%ecx, %ecx
LBB0_10:
	movq	(%r13), %rax
	movl	%ecx, (%rax)
	movl	$1, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_TOOL_FINGER,4,2             ## @MT_TOOL_FINGER
	.comm	_ABS_MT_POSITION_X,4,2          ## @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ## @ABS_MT_POSITION_Y
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.no_dead_strip	_wacom_bamboo_pad_touch_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_bamboo_pad_touch_event
_wacom_bamboo_pad_touch_event:          ; @wacom_bamboo_pad_touch_event
	.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	x19, x0
	ldr	x20, [x0, #16]
	ldrb	w24, [x1]
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x25, #0
	mov	x21, #0
	add	x26, x1, #1
Lloh0:
	adrp	x27, _MT_TOOL_FINGER@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MT_TOOL_FINGER@GOTPAGEOFF]
Lloh2:
	adrp	x28, _ABS_MT_POSITION_Y@GOTPAGE
Lloh3:
	ldr	x28, [x28, _ABS_MT_POSITION_Y@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_input_mt_slot
	ldr	w1, [x27]
	mov	x0, x20
	mov	w2, #0
	bl	_input_mt_report_slot_state
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldr	w8, [x19, #8]
	add	x25, x25, #3
	cmp	x21, x8
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_BIT
	tst	w0, w24
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_report_touch_events
	mov	x22, x0
	cmp	x0, #0
	cset	w23, ne
	mov	x0, x20
	mov	x1, x21
	bl	_input_mt_slot
	ldr	w1, [x27]
	mov	x0, x20
	mov	x2, x23
	bl	_input_mt_report_slot_state
	cbz	x22, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x26, w25, uxtw
	ldrb	w2, [x8]
	ldrb	w9, [x8, #1]
	bfi	w2, w9, #8, #4
	ldrb	w8, [x8, #2]
	lsr	w22, w9, #4
	bfi	w22, w8, #4, #8
Lloh4:
	adrp	x8, _ABS_MT_POSITION_X@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ABS_MT_POSITION_X@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_input_report_abs
	ldr	w1, [x28]
	mov	x0, x20
	mov	x2, x22
	bl	_input_report_abs
	b	LBB0_3
LBB0_7:
	mov	x0, x20
	bl	_input_mt_sync_frame
Lloh7:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	and	w2, w24, #0x40
	mov	x0, x20
	bl	_input_report_key
Lloh10:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	and	w2, w24, #0x80
	mov	x0, x20
	bl	_input_report_key
	cbz	w24, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_report_touch_events
	cmp	x0, #0
	cset	w8, ne
	b	LBB0_10
LBB0_9:
	mov	w8, #0
LBB0_10:
	ldr	x9, [x19]
	str	w8, [x9]
	mov	w0, #1
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_TOOL_FINGER,4,2             ; @MT_TOOL_FINGER
	.comm	_ABS_MT_POSITION_X,4,2          ; @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ; @ABS_MT_POSITION_Y
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.no_dead_strip	_wacom_bamboo_pad_touch_event
.subsections_via_symbols
