	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function touchpad_check_second_peak
_touchpad_check_second_peak:            ## @touchpad_check_second_peak
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	(%rcx), %r8
	movslq	%esi, %r10
	movq	(%rax), %r9
	movq	%r10, %r11
	shlq	$4, %r11
	movslq	(%r8,%r11), %rsi
	movslq	(%r9,%r10,8), %rax
	cmpl	%eax, %esi
	movl	%eax, %edx
	cmovgl	%esi, %edx
	movslq	%edx, %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, %r14
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rdi), %rcx
	movl	(%rcx,%rsi,4), %ebx
	movslq	4(%rcx,%rsi,4), %rcx
	incq	%rsi
	subl	%ecx, %ebx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	cmpl	%ecx, %ebx
	jle	LBB0_1
	jmp	LBB0_13
LBB0_2:
	movl	4(%r8,%r11), %edx
	cmpl	%edx, %eax
	cmovgl	%eax, %edx
	movslq	%edx, %rdx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, %rdx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rdi), %rcx
	movl	4(%rcx,%rax,4), %esi
	movslq	(%rcx,%rax,4), %rcx
	incq	%rax
	subl	%ecx, %esi
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rbx
	shrq	$63, %rbx
	sarq	$34, %rcx
	addl	%ebx, %ecx
	cmpl	%ecx, %esi
	jle	LBB0_3
	jmp	LBB0_13
LBB0_6:
	movslq	8(%r8,%r11), %rsi
	movslq	4(%r9,%r10,8), %rax
	cmpl	%eax, %esi
	movl	%eax, %ecx
	cmovgl	%esi, %ecx
	movslq	%ecx, %r9
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, %r9
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rdi), %rcx
	movl	(%rcx,%rsi,4), %ebx
	movslq	4(%rcx,%rsi,4), %rcx
	incq	%rsi
	subl	%ecx, %ebx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	cmpl	%ecx, %ebx
	jle	LBB0_7
	jmp	LBB0_13
LBB0_8:
	movl	12(%r8,%r11), %ecx
	cmpl	%ecx, %eax
	cmovgl	%eax, %ecx
	movslq	%ecx, %rcx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, %rcx
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%rdi), %rdx
	movl	4(%rdx,%rax,4), %esi
	movslq	(%rdx,%rax,4), %rdx
	incq	%rax
	subl	%edx, %esi
	imulq	$1717986919, %rdx, %rdx         ## imm = 0x66666667
	movq	%rdx, %rbx
	shrq	$63, %rbx
	sarq	$34, %rdx
	addl	%ebx, %edx
	cmpl	%edx, %esi
	jle	LBB0_9
LBB0_13:
	movl	$1, %eax
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_touchpad_check_second_peak
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function touchpad_check_second_peak
_touchpad_check_second_peak:            ; @touchpad_check_second_peak
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	ldp	x10, x8, [x0, #8]
	ldr	x8, [x8]
	sxtw	x9, w1
	ldr	x10, [x10]
	sbfiz	x11, x1, #4, #32
	ldrsw	x12, [x8, x11]
	sbfiz	x11, x1, #3, #32
	ldrsw	x11, [x10, x11]
	cmp	w12, w11
	csel	w13, w12, w11, gt
	sxtw	x13, w13
	mov	w14, #26215
	movk	w14, #26214, lsl #16
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x13, x12
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x15, [x0]
	add	x15, x15, x12, lsl #2
	add	x12, x12, #1
	ldp	w16, w15, [x15]
                                        ; kill: def $w15 killed $w15 def $x15
	sxtw	x15, w15
	sub	w16, w16, w15
	mul	x15, x15, x14
	lsr	x17, x15, #63
	asr	x15, x15, #34
	add	w15, w15, w17
	cmp	w16, w15
	b.le	LBB0_1
	b	LBB0_12
LBB0_3:
	add	x12, x8, x9, lsl #4
	ldr	w12, [x12, #4]
	cmp	w11, w12
	csel	w12, w11, w12, gt
	sxtw	x12, w12
	mov	w13, #26215
	movk	w13, #26214, lsl #16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x12, x11
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x14, [x0]
	add	x14, x14, x11, lsl #2
	add	x11, x11, #1
	ldp	w14, w15, [x14]
                                        ; kill: def $w14 killed $w14 def $x14
	sxtw	x14, w14
	sub	w15, w15, w14
	mul	x14, x14, x13
	lsr	x16, x14, #63
	asr	x14, x14, #34
	add	w14, w14, w16
	cmp	w15, w14
	b.le	LBB0_4
	b	LBB0_12
LBB0_6:
	add	x11, x8, x9, lsl #4
	ldrsw	x11, [x11, #8]
	add	x10, x10, x9, lsl #3
	ldrsw	x10, [x10, #4]
	cmp	w11, w10
	csel	w12, w11, w10, gt
	sxtw	x12, w12
	mov	w13, #26215
	movk	w13, #26214, lsl #16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x12, x11
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x14, [x0]
	add	x14, x14, x11, lsl #2
	add	x11, x11, #1
	ldp	w15, w14, [x14]
                                        ; kill: def $w14 killed $w14 def $x14
	sxtw	x14, w14
	sub	w15, w15, w14
	mul	x14, x14, x13
	lsr	x16, x14, #63
	asr	x14, x14, #34
	add	w14, w14, w16
	cmp	w15, w14
	b.le	LBB0_7
	b	LBB0_12
LBB0_9:
	add	x8, x8, x9, lsl #4
	ldr	w8, [x8, #12]
	cmp	w10, w8
	csel	w8, w10, w8, gt
	sxtw	x8, w8
	mov	w9, #26215
	movk	w9, #26214, lsl #16
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cmp	x8, x10
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x11, [x0]
	add	x11, x11, x10, lsl #2
	add	x10, x10, #1
	ldp	w11, w12, [x11]
                                        ; kill: def $w11 killed $w11 def $x11
	sxtw	x11, w11
	sub	w12, w12, w11
	mul	x11, x11, x9
	lsr	x13, x11, #63
	asr	x11, x11, #34
	add	w11, w11, w13
	cmp	w12, w11
	b.le	LBB0_10
LBB0_12:
	mov	w0, #1
	ret
LBB0_13:
	mov	w0, #0
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_touchpad_check_second_peak
.subsections_via_symbols
