	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mc13783_ts_report_sample
_mc13783_ts_report_sample:              ## @mc13783_ts_report_sample
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rdi
	movl	(%rax), %r12d
	movl	4(%rax), %ebx
	movl	%r12d, %r14d
	andl	$4095, %r14d                    ## imm = 0xFFF
	movl	%ebx, %ecx
	andl	$4095, %ecx                     ## imm = 0xFFF
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	8(%rax), %r13d
	movl	%r13d, %edx
	andl	$4095, %edx                     ## imm = 0xFFF
	movl	%edx, %r8d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	12(%rax), %r15d
	movl	%r15d, %eax
	andl	$4095, %eax                     ## imm = 0xFFF
	movl	%eax, %r9d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	shrl	$12, %r12d
	andl	$4095, %r12d                    ## imm = 0xFFF
	shrl	$12, %ebx
	andl	$4095, %ebx                     ## imm = 0xFFF
	shrl	$12, %r13d
	andl	$4095, %r13d                    ## imm = 0xFFF
	shrl	$12, %r15d
	andl	$4095, %r15d                    ## imm = 0xFFF
	leaq	L_.str(%rip), %rsi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edx
	xorl	%eax, %eax
	pushq	%r15
	pushq	%r13
	pushq	%rbx
	pushq	%r12
	callq	_dev_dbg
	addq	$32, %rsp
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movl	%r14d, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_sort3
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_sort3
	addl	%r13d, %r15d
	cmpl	$2, %r15d
	jb	LBB0_4
## %bb.1:
	movq	_sample_tolerance@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	subl	-68(%rbp), %ecx                 ## 4-byte Folded Reload
	cmpl	%eax, %ecx
	jge	LBB0_8
## %bb.3:
	subl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	cmpl	%eax, %ebx
	jge	LBB0_8
LBB0_4:
	movl	%r15d, %r13d
	shrl	%r13d
	cmpl	$2, %r15d
	jb	LBB0_6
## %bb.5:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_input_report_abs
	movl	$4096, %r15d                    ## imm = 0x1000
	subl	%r13d, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$36, %rsi
	addl	%eax, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_schedule_delayed_work
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%r13d, %r15d
LBB0_7:
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_input_report_abs
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_input_report_key
	movq	%rbx, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"x: (% 4d,% 4d,% 4d) y: (% 4d, % 4d,% 4d) cr: (% 4d, % 4d)\n"

	.comm	_sample_tolerance,4,2           ## @sample_tolerance
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
L_.str.1:                               ## @.str.1
	.asciz	"report (%d, %d, %d)\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.2:                               ## @.str.2
	.asciz	"report release\n"

	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
L_.str.3:                               ## @.str.3
	.asciz	"discard event\n"

	.no_dead_strip	_mc13783_ts_report_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mc13783_ts_report_sample
_mc13783_ts_report_sample:              ; @mc13783_ts_report_sample
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x20, x0
	ldr	x19, [x0, #16]
	ldr	x8, [x0]
	ldp	w9, w10, [x8]
	and	w23, w9, #0xfff
	and	w21, w10, #0xfff
	ubfx	w22, w9, #12, #12
	ubfx	w24, w10, #12, #12
	ldp	w9, w8, [x8, #8]
	and	w25, w9, #0xfff
	and	w26, w8, #0xfff
	ubfx	w27, w9, #12, #12
	ubfx	w28, w8, #12, #12
	stp	x27, x28, [sp, #48]
	stp	x22, x24, [sp, #32]
	stp	x25, x26, [sp, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	stp	x23, x21, [sp]
	mov	x0, x19
	bl	_dev_dbg
	mov	x0, x23
	mov	x1, x21
	mov	x2, x25
	bl	_sort3
	mov	x0, x26
	mov	x1, x22
	mov	x2, x24
	bl	_sort3
	add	w8, w28, w27
Lloh2:
	adrp	x9, _sample_tolerance@GOTPAGE
Lloh3:
	ldr	x9, [x9, _sample_tolerance@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, #2
	ccmp	w9, #0, #4, hs
	b.eq	LBB0_3
; %bb.1:
	sub	w10, w24, w26
	sub	w11, w25, w23
	cmp	w11, w9
	ccmp	w10, w9, #0, lt
	b.lt	LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str.3@PAGE
Lloh6:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_dev_dbg
LBB0_3:
	lsr	w23, w8, #1
	cmp	w8, #2
	b.lo	LBB0_5
; %bb.4:
Lloh7:
	adrp	x8, _ABS_X@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_abs
Lloh10:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_input_report_abs
	mov	w8, #4096
	sub	w24, w8, w23
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	stp	x22, x24, [sp, #8]
	str	x21, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	add	x0, x20, #8
Lloh15:
	adrp	x8, _HZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh17:
	ldrsw	x8, [x8]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #36
	add	w1, w8, w9
	bl	_schedule_delayed_work
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x24, x23
LBB0_6:
Lloh20:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x24
	bl	_input_report_abs
Lloh23:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_key
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"x: (% 4d,% 4d,% 4d) y: (% 4d, % 4d,% 4d) cr: (% 4d, % 4d)\n"

	.comm	_sample_tolerance,4,2           ; @sample_tolerance
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
l_.str.1:                               ; @.str.1
	.asciz	"report (%d, %d, %d)\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.2:                               ; @.str.2
	.asciz	"report release\n"

	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
l_.str.3:                               ; @.str.3
	.asciz	"discard event\n"

	.no_dead_strip	_mc13783_ts_report_sample
.subsections_via_symbols
