	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgpk_discard_decay_hack
_hgpk_discard_decay_hack:               ## @hgpk_discard_decay_hack
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movl	%esi, %r15d
	negl	%r15d
	cmovsl	%esi, %r15d
	movl	%edx, %r12d
	movl	%edx, %ebx
	negl	%ebx
	cmovsl	%edx, %ebx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r14
	movq	_recalib_delta@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	jle	LBB0_1
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_psmouse_warn
	movq	_recalib_delta@GOTPCREL(%rip), %rax
	movl	%r15d, 4(%r14)
	jmp	LBB0_10
LBB0_1:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r15d
	jle	LBB0_4
## %bb.2:
	movl	%r15d, %eax
	shrl	$2, %eax
	cmpl	(%r14), %eax
	jg	LBB0_3
LBB0_4:
	movl	4(%r14), %esi
	movl	%r15d, %edi
	callq	_approx_half
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_psmouse_warn
	movl	%r15d, 4(%r14)
	incl	8(%r14)
	movq	_recalib_delta@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	cmpl	$0, 4(%r14)
	je	LBB0_7
## %bb.8:
	xorl	%r13d, %r13d
	cmpl	$2, 8(%r14)
	setge	%r13b
	jmp	LBB0_9
LBB0_7:
	xorl	%r13d, %r13d
LBB0_9:
	movq	_recalib_delta@GOTPCREL(%rip), %rax
	movq	$0, 4(%r14)
LBB0_10:
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jle	LBB0_11
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_psmouse_warn
	movl	%ebx, 16(%r14)
	jmp	LBB0_19
LBB0_11:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %ebx
	jle	LBB0_14
## %bb.12:
	movl	%ebx, %eax
	shrl	$2, %eax
	cmpl	12(%r14), %eax
	jg	LBB0_13
LBB0_14:
	movl	16(%r14), %esi
	movl	%ebx, %edi
	callq	_approx_half
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_psmouse_warn
	movl	%ebx, 16(%r14)
	incl	20(%r14)
	jmp	LBB0_19
LBB0_16:
	cmpl	$0, 16(%r14)
	je	LBB0_18
## %bb.17:
	cmpl	$2, 20(%r14)
	movl	$1, %eax
	cmovgel	%eax, %r13d
LBB0_18:
	movq	$0, 16(%r14)
LBB0_19:
	movl	%r15d, (%r14)
	movl	%ebx, 12(%r14)
	testl	%r13d, %r13d
	je	LBB0_22
## %bb.20:
	movq	_jumpy_delay@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_22
## %bb.21:
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_psmouse_warn
	leaq	24(%r14), %r12
	movq	(%r15), %rdi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_psmouse_queue_work
LBB0_22:
	movl	$1, %eax
	cmpl	$0, 4(%r14)
	jne	LBB0_24
## %bb.23:
	xorl	%eax, %eax
	cmpl	$0, 16(%r14)
	setne	%al
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_recalib_delta,4,2              ## @recalib_delta
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detected %dpx jump in x\n"

L_.str.1:                               ## @.str.1
	.asciz	"detected secondary %dpx jump in x\n"

L_.str.2:                               ## @.str.2
	.asciz	"detected %dpx jump in y\n"

L_.str.3:                               ## @.str.3
	.asciz	"detected secondary %dpx jump in y\n"

	.comm	_jumpy_delay,8,3                ## @jumpy_delay
L_.str.4:                               ## @.str.4
	.asciz	"scheduling recalibration\n"

	.no_dead_strip	_hgpk_discard_decay_hack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hgpk_discard_decay_hack
_hgpk_discard_decay_hack:               ; @hgpk_discard_decay_hack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x24, [x0]
	cmp	w1, #0
	cneg	w20, w1, mi
	cmp	w2, #0
	cneg	w21, w2, mi
Lloh0:
	adrp	x25, _recalib_delta@GOTPAGE
Lloh1:
	ldr	x25, [x25, _recalib_delta@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w20, w8
	b.le	LBB0_2
LBB0_1:
	str	x23, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_warn
	mov	w23, #0
	str	w20, [x24, #4]
	b	LBB0_10
LBB0_2:
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w20, w8, asr #1
	b.le	LBB0_4
; %bb.3:
	ldr	w8, [x24]
	cmp	w8, w20, lsr #2
	b.lt	LBB0_1
LBB0_4:
	ldr	w1, [x24, #4]
	mov	x0, x20
	bl	_approx_half
	cbz	x0, LBB0_6
; %bb.5:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	str	x23, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_psmouse_warn
	mov	w23, #0
	ldr	w8, [x24, #8]
	add	w8, w8, #1
	stp	w20, w8, [x24, #4]
	b	LBB0_10
LBB0_6:
	ldr	w8, [x24, #4]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w8, [x24, #8]
	cmp	w8, #1
	cset	w23, gt
	b	LBB0_9
LBB0_8:
	mov	w23, #0
LBB0_9:
	stp	wzr, wzr, [x24, #4]
LBB0_10:
	ldr	w8, [x25]
	cmp	w21, w8
	b.le	LBB0_12
LBB0_11:
	str	x22, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_psmouse_warn
	str	w21, [x24, #16]
	b	LBB0_19
LBB0_12:
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w21, w8, asr #1
	b.le	LBB0_14
; %bb.13:
	ldr	w8, [x24, #12]
	cmp	w8, w21, lsr #2
	b.lt	LBB0_11
LBB0_14:
	ldr	w1, [x24, #16]
	mov	x0, x21
	bl	_approx_half
	cbz	x0, LBB0_16
; %bb.15:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_psmouse_warn
	ldr	w8, [x24, #20]
	add	w8, w8, #1
	stp	w21, w8, [x24, #16]
	b	LBB0_19
LBB0_16:
	ldr	w8, [x24, #16]
	cbz	w8, LBB0_18
; %bb.17:
	ldr	w8, [x24, #20]
	cmp	w8, #1
	csinc	w23, w23, wzr, le
LBB0_18:
	str	xzr, [x24, #16]
LBB0_19:
	str	w20, [x24]
	str	w21, [x24, #12]
	cbz	w23, LBB0_22
; %bb.20:
Lloh10:
	adrp	x21, _jumpy_delay@GOTPAGE
Lloh11:
	ldr	x21, [x21, _jumpy_delay@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_22
; %bb.21:
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_psmouse_warn
	add	x20, x24, #24
	ldr	x0, [x21]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_psmouse_queue_work
LBB0_22:
	ldr	w8, [x24, #4]
	cbz	w8, LBB0_24
; %bb.23:
	mov	w0, #1
	b	LBB0_25
LBB0_24:
	ldr	w8, [x24, #16]
	cmp	w8, #0
	cset	w0, ne
LBB0_25:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_recalib_delta,4,2              ; @recalib_delta
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detected %dpx jump in x\n"

l_.str.1:                               ; @.str.1
	.asciz	"detected secondary %dpx jump in x\n"

l_.str.2:                               ; @.str.2
	.asciz	"detected %dpx jump in y\n"

l_.str.3:                               ; @.str.3
	.asciz	"detected secondary %dpx jump in y\n"

	.comm	_jumpy_delay,8,3                ; @jumpy_delay
l_.str.4:                               ; @.str.4
	.asciz	"scheduling recalibration\n"

	.no_dead_strip	_hgpk_discard_decay_hack
.subsections_via_symbols
