	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stabilize
_stabilize:                             ## @stabilize
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movl	%edi, %r14d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %r15d
	movl	_stabilize.prev_time(%rip), %esi
	movl	%eax, %edi
	callq	_ktime_ms_delta
	movq	%rax, %r12
	movl	_stabilize.hit_time(%rip), %esi
	movl	%r15d, %edi
	callq	_ktime_ms_delta
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	$100, %r12
	jle	LBB0_1
## %bb.2:
	movl	$0, _stabilize.hits(%rip)
	xorl	%edi, %edi
	jmp	LBB0_3
LBB0_1:
	movl	_stabilize.x(%rip), %edi
	movl	_stabilize.y(%rip), %ebx
LBB0_3:
	addl	%r14d, %edi
	movl	%edi, _stabilize.x(%rip)
	addl	%r13d, %ebx
	movl	%ebx, _stabilize.y(%rip)
	movl	%r15d, _stabilize.prev_time(%rip)
	callq	_abs
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, %rax
	jg	LBB0_5
## %bb.4:
	movl	_stabilize.y(%rip), %edi
	callq	_abs
	xorl	%ecx, %ecx
	cmpq	%r14, %rax
	jle	LBB0_24
LBB0_5:
	movl	_stabilize.y(%rip), %edi
	callq	_abs
	movq	%rax, %rbx
	movl	_stabilize.x(%rip), %edi
	callq	_abs
	cmpq	%rax, %rbx
	jle	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	cmpl	$0, _stabilize.y(%rip)
	setg	%al
	movl	$128, %ecx
	subl	%eax, %ecx
	jmp	LBB0_8
LBB0_7:
	xorl	%ecx, %ecx
	cmpl	$0, _stabilize.x(%rip)
	setle	%cl
	shll	$8, %ecx
	addl	$32512, %ecx                    ## imm = 0x7F00
LBB0_8:
	movl	$0, _stabilize.x(%rip)
	movl	$0, _stabilize.y(%rip)
	cmpl	_stabilize.prev_result(%rip), %ecx
	jne	LBB0_23
## %bb.9:
	movl	_stabilize.hits(%rip), %edx
	leal	1(%rdx), %eax
	movl	%eax, _stabilize.hits(%rip)
	cmpl	$3, %edx
	jl	LBB0_20
## %bb.10:
	movzwl	%cx, %eax
	cmpw	$127, %cx
	jg	LBB0_15
## %bb.11:
	cmpl	$32768, %eax                    ## imm = 0x8000
	je	LBB0_19
## %bb.12:
	cmpw	$127, %cx
	jne	LBB0_24
## %bb.13:
	movq	%r14, %rsi
	shlq	$4, %rsi
	addq	%r14, %rsi
	movabsq	$-8608480567731124087, %rdx     ## imm = 0x8888888888888889
	movq	%rsi, %rax
	imulq	%rdx
	addq	%rsi, %rdx
	jmp	LBB0_14
LBB0_23:
	movl	%ecx, _stabilize.prev_result(%rip)
	movl	$1, _stabilize.hits(%rip)
	movl	%r15d, _stabilize.hit_time(%rip)
LBB0_24:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	cmpl	$2, %eax
	jne	LBB0_24
## %bb.21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	jge	LBB0_24
## %bb.22:
	movl	$1, _stabilize.hits(%rip)
	xorl	%ecx, %ecx
	jmp	LBB0_24
LBB0_15:
	cmpl	$128, %eax
	je	LBB0_25
## %bb.16:
	cmpl	$32512, %eax                    ## imm = 0x7F00
	jne	LBB0_24
## %bb.17:
	movq	%r14, %rsi
	shlq	$4, %rsi
	addq	%r14, %rsi
	movabsq	$-8608480567731124087, %rdx     ## imm = 0x8888888888888889
	movq	%rsi, %rax
	imulq	%rdx
	addq	%rsi, %rdx
	jmp	LBB0_18
LBB0_19:
	movq	%r14, %rsi
	shlq	$4, %rsi
	addq	%r14, %rsi
	movabsq	$8608480567731124087, %rdx      ## imm = 0x7777777777777777
	movq	%rsi, %rax
	imulq	%rdx
	subq	%rsi, %rdx
LBB0_18:
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$4, %rdx
	addl	%eax, %edx
	movl	%edx, _stabilize.x(%rip)
	jmp	LBB0_24
LBB0_25:
	movq	%r14, %rsi
	shlq	$4, %rsi
	addq	%r14, %rsi
	movabsq	$8608480567731124087, %rdx      ## imm = 0x7777777777777777
	movq	%rsi, %rax
	imulq	%rdx
	subq	%rsi, %rdx
LBB0_14:
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$4, %rdx
	addl	%eax, %edx
	movl	%edx, _stabilize.y(%rip)
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_stabilize.prev_time,4,2 ## @stabilize.prev_time
.zerofill __DATA,__bss,_stabilize.hit_time,4,2 ## @stabilize.hit_time
.zerofill __DATA,__bss,_stabilize.x,4,2 ## @stabilize.x
.zerofill __DATA,__bss,_stabilize.y,4,2 ## @stabilize.y
.zerofill __DATA,__bss,_stabilize.prev_result,4,2 ## @stabilize.prev_result
.zerofill __DATA,__bss,_stabilize.hits,4,2 ## @stabilize.hits
	.no_dead_strip	_stabilize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stabilize
_stabilize:                             ; @stabilize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x3
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x23, x1
	mov	x24, x0
	bl	_ktime_get
	mov	x21, x0
	adrp	x20, _stabilize.prev_time@PAGE
	ldr	w1, [x20, _stabilize.prev_time@PAGEOFF]
	bl	_ktime_ms_delta
	mov	x25, x0
	adrp	x28, _stabilize.hit_time@PAGE
	ldr	w1, [x28, _stabilize.hit_time@PAGEOFF]
	mov	x0, x21
	bl	_ktime_ms_delta
	mov	x22, x0
	adrp	x26, _stabilize.x@PAGE
	adrp	x27, _stabilize.y@PAGE
	cmp	x25, #100
	b.le	LBB0_2
; %bb.1:
	mov	w8, #0
	mov	w9, #0
	adrp	x10, _stabilize.hits@PAGE
	str	wzr, [x10, _stabilize.hits@PAGEOFF]
	b	LBB0_3
LBB0_2:
	ldr	w9, [x26, _stabilize.x@PAGEOFF]
	ldr	w8, [x27, _stabilize.y@PAGEOFF]
LBB0_3:
	add	w0, w9, w24
	str	w0, [x26, _stabilize.x@PAGEOFF]
	add	w8, w8, w23
	str	w8, [x27, _stabilize.y@PAGEOFF]
	str	w21, [x20, _stabilize.prev_time@PAGEOFF]
	bl	_abs
	cmp	x0, x19
	b.gt	LBB0_5
; %bb.4:
	ldr	w0, [x27, _stabilize.y@PAGEOFF]
	bl	_abs
	cmp	x0, x19
	b.le	LBB0_15
LBB0_5:
	ldr	w0, [x27, _stabilize.y@PAGEOFF]
	bl	_abs
	mov	x23, x0
	ldr	w0, [x26, _stabilize.x@PAGEOFF]
	bl	_abs
	cmp	x23, x0
	b.le	LBB0_7
; %bb.6:
	ldr	w8, [x27, _stabilize.y@PAGEOFF]
	cmp	w8, #0
	mov	w8, #127
	cinc	w0, w8, le
	b	LBB0_8
LBB0_7:
	ldr	w8, [x26, _stabilize.x@PAGEOFF]
	mov	w9, #32768
	mov	w10, #32512
	cmp	w8, #0
	csel	w0, w10, w9, gt
LBB0_8:
	str	wzr, [x26, _stabilize.x@PAGEOFF]
	str	wzr, [x27, _stabilize.y@PAGEOFF]
	adrp	x8, _stabilize.prev_result@PAGE
	ldr	w9, [x8, _stabilize.prev_result@PAGEOFF]
	cmp	w0, w9
	b.ne	LBB0_14
; %bb.9:
	adrp	x8, _stabilize.hits@PAGE
	ldr	w10, [x8, _stabilize.hits@PAGEOFF]
	add	w9, w10, #1
	str	w9, [x8, _stabilize.hits@PAGEOFF]
	cmp	w10, #3
	b.lt	LBB0_16
; %bb.10:
	and	w8, w0, #0xffff
	mov	w9, #32511
	cmp	w8, w9
	b.gt	LBB0_19
; %bb.11:
	cmp	w8, #127
	b.eq	LBB0_22
; %bb.12:
	cmp	w8, #128
	b.ne	LBB0_26
; %bb.13:
	add	x8, x19, x19, lsl #4
	mov	x9, #8608480567731124087
	smulh	x9, x8, x9
	sub	x8, x9, x8
	b	LBB0_23
LBB0_14:
	str	w0, [x8, _stabilize.prev_result@PAGEOFF]
	mov	w8, #1
	adrp	x9, _stabilize.hits@PAGE
	str	w8, [x9, _stabilize.hits@PAGEOFF]
	str	w21, [x28, _stabilize.hit_time@PAGEOFF]
	b	LBB0_26
LBB0_15:
	mov	w0, #0
	b	LBB0_26
LBB0_16:
	cmp	w9, #2
	b.ne	LBB0_26
; %bb.17:
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x22, x9
	b.ge	LBB0_26
; %bb.18:
	mov	w0, #0
	mov	w9, #1
	str	w9, [x8, _stabilize.hits@PAGEOFF]
	b	LBB0_26
LBB0_19:
	mov	w9, #32512
	cmp	w8, w9
	b.eq	LBB0_24
; %bb.20:
	cmp	w8, #8, lsl #12                 ; =32768
	b.ne	LBB0_26
; %bb.21:
	add	x8, x19, x19, lsl #4
	mov	x9, #8608480567731124087
	smulh	x9, x8, x9
	sub	x8, x9, x8
	b	LBB0_25
LBB0_22:
	add	x8, x19, x19, lsl #4
	mov	x9, #-8608480567731124088
	movk	x9, #34953
	smulh	x9, x8, x9
	add	x8, x9, x8
LBB0_23:
	lsr	x9, x8, #63
	lsr	x8, x8, #4
	add	w8, w8, w9
	str	w8, [x27, _stabilize.y@PAGEOFF]
	b	LBB0_26
LBB0_24:
	add	x8, x19, x19, lsl #4
	mov	x9, #-8608480567731124088
	movk	x9, #34953
	smulh	x9, x8, x9
	add	x8, x9, x8
LBB0_25:
	lsr	x9, x8, #63
	lsr	x8, x8, #4
	add	w8, w8, w9
	str	w8, [x26, _stabilize.x@PAGEOFF]
LBB0_26:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_stabilize.prev_time,4,2 ; @stabilize.prev_time
.zerofill __DATA,__bss,_stabilize.hit_time,4,2 ; @stabilize.hit_time
.zerofill __DATA,__bss,_stabilize.x,4,2 ; @stabilize.x
.zerofill __DATA,__bss,_stabilize.y,4,2 ; @stabilize.y
.zerofill __DATA,__bss,_stabilize.prev_result,4,2 ; @stabilize.prev_result
.zerofill __DATA,__bss,_stabilize.hits,4,2 ; @stabilize.hits
	.no_dead_strip	_stabilize
.subsections_via_symbols
