	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_intuos_pro2_bt_touch
_wacom_intuos_pro2_bt_touch:            ## @wacom_intuos_pro2_bt_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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movq	24(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	117(%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	112(%r14), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	114(%r14), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %r12
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_mt_sync_frame
	movq	-112(%rbp), %r15                ## 8-byte Reload
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	subl	%eax, 8(%r15)
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	jle	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	addq	$43, -72(%rbp)                  ## 8-byte Folded Spill
	addq	$43, -104(%rbp)                 ## 8-byte Folded Spill
	addq	$43, -96(%rbp)                  ## 8-byte Folded Spill
	cmpq	$4, %rbx
	je	LBB0_13
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	imulq	$43, %rbx, %rax
	movzbl	109(%rax,%r14), %esi
	testb	$-128, %sil
	je	LBB0_12
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	andl	$127, %esi
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%esi, 8(%r15)
	jmp	LBB0_5
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, 8(%r15)
	movq	%r15, %rdi
	callq	_wacom_wac_finger_count_touches
	movq	16(%r15), %rcx
	movl	%eax, (%rcx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_sync
	jmp	LBB0_12
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%r15), %esi
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$5, %edi
	callq	_min
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	shlq	$3, %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	addq	$8, %r15
	cmpq	%r15, -136(%rbp)                ## 8-byte Folded Reload
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %r12
	je	LBB0_10
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movzbl	-7(%rbx,%r15), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_input_mt_get_slot_by_key
	movl	%eax, %r13d
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r15), %rdi
	callq	_get_unaligned_le16
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15), %rdi
	callq	_get_unaligned_le16
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movzbl	-1(%rbx,%r15), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_input_abs_get_res
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movzbl	(%rbx,%r15), %r12d
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_input_abs_get_res
	testl	%r13d, %r13d
	js	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	%r13d, %esi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movzbl	%al, %r14d
	imull	%r12d, %r14d
	movq	%rbx, %r12
	movzbl	-41(%rbp), %ebx                 ## 1-byte Folded Reload
	imull	-76(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r13, %rdi
	callq	_input_mt_slot
	movq	_MT_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movzbl	-6(%rax,%r15), %edx
	andl	$1, %edx
	movq	%r13, %rdi
	callq	_input_mt_report_slot_state
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movq	_ABS_MT_TOUCH_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_max
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	movq	_ABS_MT_TOUCH_MINOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_min
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	movq	_ABS_MT_ORIENTATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	%r14d, %ebx
	seta	%dl
	movq	%r13, %rdi
	callq	_input_report_abs
	jmp	LBB0_9
LBB0_13:
	cmpl	$0, 8(%r15)
	je	LBB0_15
## %bb.14:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_SW_MUTE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	281(%r14), %al
	notb	%al
	shrb	$7, %al
	movzbl	%al, %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_input_report_switch
	movq	%rbx, %rdi
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ABS_MT_POSITION_X,4,2          ## @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ## @ABS_MT_POSITION_Y
	.comm	_MT_TOOL_FINGER,4,2             ## @MT_TOOL_FINGER
	.comm	_ABS_MT_TOUCH_MAJOR,4,2         ## @ABS_MT_TOUCH_MAJOR
	.comm	_ABS_MT_TOUCH_MINOR,4,2         ## @ABS_MT_TOUCH_MINOR
	.comm	_ABS_MT_ORIENTATION,4,2         ## @ABS_MT_ORIENTATION
	.comm	_SW_MUTE_DEVICE,4,2             ## @SW_MUTE_DEVICE
	.no_dead_strip	_wacom_intuos_pro2_bt_touch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_intuos_pro2_bt_touch
_wacom_intuos_pro2_bt_touch:            ; @wacom_intuos_pro2_bt_touch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x0
	mov	x23, #0
	ldr	x19, [x0, #24]
	ldr	x20, [x0]
	add	x24, x20, #117
	mov	w25, #43
Lloh0:
	adrp	x21, _ABS_MT_POSITION_X@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ABS_MT_POSITION_X@GOTPAGEOFF]
	stp	x0, x20, [sp, #8]               ; 16-byte Folded Spill
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_input_mt_sync_frame
	ldp	x22, x20, [sp, #8]              ; 16-byte Folded Reload
	ldr	w8, [x22, #8]
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	sub	w8, w8, w9
	str	w8, [x22, #8]
	cmp	w8, #0
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
	ldr	x24, [sp, #40]                  ; 8-byte Folded Reload
	mov	w25, #43
	b.le	LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	add	x24, x24, #43
	cmp	x23, #4
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	madd	x8, x23, x25, x20
	ldrb	w8, [x8, #109]
	tbz	w8, #7, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w1, w8, #0x7f
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
	str	x24, [sp, #40]                  ; 8-byte Folded Spill
	cbz	w1, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w1, [x22, #8]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x22, #8]
	mov	x0, x22
	bl	_wacom_wac_finger_count_touches
	ldr	x8, [x22, #16]
	str	w0, [x8]
	mov	x0, x19
	bl	_input_sync
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #5
	bl	_min
	str	w0, [sp, #36]                   ; 4-byte Folded Spill
	cmp	w0, #1
	b.lt	LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	mov	w27, w8
	ldr	x28, [sp, #40]                  ; 8-byte Folded Reload
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x28, x28, #8
	subs	x27, x27, #1
	b.eq	LBB0_1
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldurb	w1, [x28, #-7]
	mov	x0, x19
	bl	_input_mt_get_slot_by_key
	mov	x24, x0
	sub	x0, x28, #5
	bl	_get_unaligned_le16
	mov	x23, x0
	sub	x0, x28, #3
	bl	_get_unaligned_le16
	mov	x22, x0
	ldurb	w20, [x28, #-1]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_input_abs_get_res
	mov	x25, x0
	ldrb	w26, [x28]
Lloh2:
	adrp	x8, _ABS_MT_POSITION_Y@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_input_abs_get_res
	tbnz	w24, #31, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mul	w26, w0, w26
	mul	w25, w25, w20
	mov	x0, x19
	mov	x1, x24
	bl	_input_mt_slot
Lloh5:
	adrp	x8, _MT_TOOL_FINGER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT_TOOL_FINGER@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldurb	w8, [x28, #-6]
	and	w2, w8, #0x1
	mov	x0, x19
	bl	_input_mt_report_slot_state
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_abs
Lloh8:
	adrp	x8, _ABS_MT_POSITION_Y@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_input_report_abs
Lloh11:
	adrp	x8, _ABS_MT_TOUCH_MAJOR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ABS_MT_TOUCH_MAJOR@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	mov	x0, x25
	mov	x1, x26
	bl	_max
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_input_report_abs
Lloh14:
	adrp	x8, _ABS_MT_TOUCH_MINOR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ABS_MT_TOUCH_MINOR@GOTPAGEOFF]
Lloh16:
	ldr	w22, [x8]
	mov	x0, x25
	mov	x1, x26
	bl	_min
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_input_report_abs
Lloh17:
	adrp	x8, _ABS_MT_ORIENTATION@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ABS_MT_ORIENTATION@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	cmp	w25, w26
	cset	w2, hi
	mov	x0, x19
	bl	_input_report_abs
	b	LBB0_10
LBB0_13:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_15
; %bb.14:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_15:
Lloh20:
	adrp	x8, _SW_MUTE_DEVICE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SW_MUTE_DEVICE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldrb	w8, [x20, #281]
	mvn	w8, w8
	ubfx	w2, w8, #7, #1
	mov	x0, x19
	bl	_input_report_switch
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_input_sync
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ABS_MT_POSITION_X,4,2          ; @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ; @ABS_MT_POSITION_Y
	.comm	_MT_TOOL_FINGER,4,2             ; @MT_TOOL_FINGER
	.comm	_ABS_MT_TOUCH_MAJOR,4,2         ; @ABS_MT_TOUCH_MAJOR
	.comm	_ABS_MT_TOUCH_MINOR,4,2         ; @ABS_MT_TOUCH_MINOR
	.comm	_ABS_MT_ORIENTATION,4,2         ; @ABS_MT_ORIENTATION
	.comm	_SW_MUTE_DEVICE,4,2             ; @SW_MUTE_DEVICE
	.no_dead_strip	_wacom_intuos_pro2_bt_touch
.subsections_via_symbols
