	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_velocikey_decelerate           ## -- Begin function velocikey_decelerate
	.p2align	4, 0x90
_velocikey_decelerate:                  ## @velocikey_decelerate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_velocikey_decelerate.decay_timer(%rip), %rdi
	callq	_timer_elapsed
	cmpl	$500, %eax                      ## imm = 0x1F4
	jg	LBB0_2
## %bb.1:
	cmpq	$0, _velocikey_decelerate.decay_timer(%rip)
	je	LBB0_2
## %bb.8:
	popq	%rbp
	retq
LBB0_2:
	movq	_typing_speed@GOTPCREL(%rip), %r8
	movl	(%r8), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.3:
	decl	%ecx
	movl	%ecx, (%r8)
LBB0_4:
	movq	_TYPING_SPEED_MAX_VALUE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	xorl	%eax, %eax
	cmpl	%edi, %ecx
	setg	%al
	movl	%ecx, %edx
	subl	%eax, %edx
	leal	3(%rsi), %eax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	sarl	$2, %eax
	leal	(%rax,%rax,2), %esi
	cmpl	%edi, %ecx
	jg	LBB0_6
## %bb.5:
	cmpl	%esi, %edx
	jle	LBB0_7
LBB0_6:
	leal	-3(%rdx), %eax
	cmpl	%esi, %edx
	cmovlel	%edx, %eax
	movl	%eax, (%r8)
LBB0_7:
	xorl	%eax, %eax
	callq	_timer_read
	movq	%rax, _velocikey_decelerate.decay_timer(%rip)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_velocikey_decelerate.decay_timer,8,3 ## @velocikey_decelerate.decay_timer
	.comm	_typing_speed,4,2               ## @typing_speed
	.comm	_TYPING_SPEED_MAX_VALUE,4,2     ## @TYPING_SPEED_MAX_VALUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_velocikey_decelerate           ; -- Begin function velocikey_decelerate
	.p2align	2
_velocikey_decelerate:                  ; @velocikey_decelerate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	adrp	x19, _velocikey_decelerate.decay_timer@PAGE
	ldr	x0, [x19, _velocikey_decelerate.decay_timer@PAGEOFF]
	bl	_timer_elapsed
	ldr	x8, [x19, _velocikey_decelerate.decay_timer@PAGEOFF]
	cmp	w0, #500
	ccmp	x8, #0, #4, le
	b.ne	LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _typing_speed@GOTPAGE
Lloh1:
	ldr	x8, [x8, _typing_speed@GOTPAGEOFF]
	ldr	w9, [x8]
	subs	w10, w9, #1
	b.lt	LBB0_3
; %bb.2:
	str	w10, [x8]
	mov	x9, x10
LBB0_3:
Lloh2:
	adrp	x10, _TYPING_SPEED_MAX_VALUE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _TYPING_SPEED_MAX_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	add	w11, w10, #3
	cmp	w10, #0
	csel	w11, w11, w10, lt
	cinc	w12, w10, lt
	cmp	w9, w12, asr #1
	cset	w10, gt
	sub	w10, w9, w10
	cmp	w9, w12, asr #1
	asr	w9, w11, #2
	add	w9, w9, w9, lsl #1
	ccmp	w10, w9, #0, le
	b.le	LBB0_5
; %bb.4:
	sub	w11, w10, #3
	cmp	w10, w9
	csel	w9, w11, w10, gt
	str	w9, [x8]
LBB0_5:
	bl	_timer_read
	str	x0, [x19, _velocikey_decelerate.decay_timer@PAGEOFF]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_velocikey_decelerate.decay_timer,8,3 ; @velocikey_decelerate.decay_timer
	.comm	_typing_speed,4,2               ; @typing_speed
	.comm	_TYPING_SPEED_MAX_VALUE,4,2     ; @TYPING_SPEED_MAX_VALUE
.subsections_via_symbols
