	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_wac_finger_slot
_wacom_wac_finger_slot:                 ## @wacom_wac_finger_slot
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	64(%rdi), %r12d
	cmpq	$0, 48(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_report_touch_events
	xorl	%r15d, %r15d
	testq	%rax, %rax
	setne	%r15b
	jmp	LBB0_3
LBB0_1:
	xorl	%r15d, %r15d
LBB0_3:
	movq	56(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.4:
	cmpl	$0, 4(%rax)
	jne	LBB0_6
## %bb.5:
	xorl	%r15d, %r15d
	cmpl	$0, (%rax)
	je	LBB0_13
LBB0_6:
	movq	(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%rbx)
	cmpq	8(%rbx), %rax
	jge	LBB0_13
## %bb.7:
	cmpl	$2, %r12d
	jl	LBB0_9
## %bb.8:
	movl	40(%rbx), %esi
	movq	%r14, %rdi
	callq	_input_mt_get_slot_by_key
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_input_mt_slot
	movq	_MT_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_input_mt_report_slot_state
	testl	%r15d, %r15d
	jne	LBB0_11
	jmp	LBB0_13
LBB0_9:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_input_report_key
	testl	%r15d, %r15d
	je	LBB0_13
LBB0_11:
	cmpl	$2, %r12d
	movq	_ABS_X@GOTPCREL(%rip), %rax
	cmovgeq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %edx
	movq	_ABS_Y@GOTPCREL(%rip), %r15
	cmovgeq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %r15
	movq	%r14, %rdi
	callq	_input_report_abs
	movl	(%r15), %esi
	movl	20(%rbx), %edx
	movq	%r14, %rdi
	callq	_input_report_abs
	movq	_ABS_MT_TOUCH_MAJOR@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%r14), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	(%r15), %r15d
	movq	24(%rbx), %rdi
	movq	32(%rbx), %rsi
	callq	_max
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	movq	_ABS_MT_TOUCH_MINOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	24(%rbx), %rdi
	movq	32(%rbx), %rsi
	callq	_min
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	movq	32(%rbx), %rax
	cmpq	%rax, 24(%rbx)
	jne	LBB0_14
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ABS_MT_ORIENTATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	setg	%al
	movzbl	%al, %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_report_abs               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_TOOL_FINGER,4,2             ## @MT_TOOL_FINGER
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_MT_POSITION_X,4,2          ## @ABS_MT_POSITION_X
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_MT_POSITION_Y,4,2          ## @ABS_MT_POSITION_Y
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.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
	.no_dead_strip	_wacom_wac_finger_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_wac_finger_slot
_wacom_wac_finger_slot:                 ; @wacom_wac_finger_slot
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w22, [x0, #64]
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_report_touch_events
	cmp	x0, #0
	cset	w21, ne
	b	LBB0_3
LBB0_2:
	mov	w21, #0
LBB0_3:
	ldr	x8, [x20, #56]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_7
; %bb.4:
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_7
; %bb.5:
	ldr	w8, [x8]
	cbz	w8, LBB0_13
; %bb.6:
	mov	w21, #0
LBB0_7:
	ldp	x8, x9, [x20]
	add	x10, x8, #1
	str	x10, [x20]
	cmp	x8, x9
	b.ge	LBB0_13
; %bb.8:
	cmp	w22, #2
	b.lt	LBB0_10
; %bb.9:
	ldr	w1, [x20, #40]
	mov	x0, x19
	bl	_input_mt_get_slot_by_key
	mov	x1, x0
	mov	x0, x19
	bl	_input_mt_slot
Lloh0:
	adrp	x8, _MT_TOOL_FINGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_TOOL_FINGER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_mt_report_slot_state
	cbnz	w21, LBB0_11
	b	LBB0_13
LBB0_10:
Lloh3:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_key
	cbz	w21, LBB0_13
LBB0_11:
Lloh6:
	adrp	x8, _ABS_MT_POSITION_X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_MT_POSITION_X@GOTPAGEOFF]
Lloh8:
	adrp	x9, _ABS_X@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ABS_X@GOTPAGEOFF]
	cmp	w22, #1
	csel	x8, x8, x9, gt
	ldr	w1, [x8]
	ldr	w2, [x20, #16]
Lloh10:
	adrp	x8, _ABS_MT_POSITION_Y@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh12:
	adrp	x9, _ABS_Y@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ABS_Y@GOTPAGEOFF]
	csel	x21, x8, x9, gt
	mov	x0, x19
	bl	_input_report_abs
	ldr	w1, [x21]
	ldr	w2, [x20, #20]
	mov	x0, x19
	bl	_input_report_abs
Lloh14:
	adrp	x21, _ABS_MT_TOUCH_MAJOR@GOTPAGE
Lloh15:
	ldr	x21, [x21, _ABS_MT_TOUCH_MAJOR@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w1, [x19]
	bl	_test_bit
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w21, [x21]
	ldp	x0, x1, [x20, #24]
	bl	_max
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_abs
Lloh16:
	adrp	x8, _ABS_MT_TOUCH_MINOR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ABS_MT_TOUCH_MINOR@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	ldp	x0, x1, [x20, #24]
	bl	_min
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_abs
	ldp	x8, x9, [x20, #24]
	cmp	x8, x9
	b.ne	LBB0_14
LBB0_13:
	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
LBB0_14:
Lloh19:
	adrp	x8, _ABS_MT_ORIENTATION@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ABS_MT_ORIENTATION@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	cset	w2, gt
	mov	x0, x19
	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
	b	_input_report_abs
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_TOOL_FINGER,4,2             ; @MT_TOOL_FINGER
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_MT_POSITION_X,4,2          ; @ABS_MT_POSITION_X
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_MT_POSITION_Y,4,2          ; @ABS_MT_POSITION_Y
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.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
	.no_dead_strip	_wacom_wac_finger_slot
.subsections_via_symbols
