	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CG_RunLerpFrame
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_RunLerpFrame:                       ## @CG_RunLerpFrame
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	_cg_animSpeed@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	cmpl	%edx, 24(%rbx)
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 56(%rbx)
	jne	LBB0_5
LBB0_4:
	movq	%rbx, %rsi
	movss	%xmm0, -20(%rbp)                ## 4-byte Spill
	callq	_CG_SetLerpFrameAnimation
	movss	-20(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
LBB0_5:
	movq	_cg@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	32(%rbx), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_23
## %bb.6:
	movsd	8(%rbx), %xmm1                  ## xmm1 = mem[0],zero
	movsd	%xmm1, (%rbx)
	movq	%rdi, 40(%rbx)
	movq	56(%rbx), %r8
	movslq	(%r8), %rcx
	testq	%rcx, %rcx
	je	LBB0_30
## %bb.7:
	movq	48(%rbx), %rdx
	addq	%rcx, %rdi
	cmpq	%rdx, %rsi
	cmovlq	%rdx, %rdi
	movq	%rdi, 32(%rbx)
	movq	%rdi, %rax
	subq	%rdx, %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_8
## %bb.9:
	cqto
	idivq	%rcx
	jmp	LBB0_10
LBB0_1:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	jmp	LBB0_30
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_10:
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %eax
	movl	4(%r8), %r9d
	movq	16(%r8), %r10
	testq	%r10, %r10
	setne	%cl
	movl	%r9d, %edx
	shll	%cl, %edx
	cmpl	%eax, %edx
	jg	LBB0_14
## %bb.11:
	movl	8(%r8), %ecx
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.12:
	subl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%r9d, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
LBB0_14:
	cmpq	$0, 24(%r8)
	je	LBB0_16
LBB0_15:
	notl	%eax
	addl	%eax, %r9d
	addl	12(%r8), %r9d
	movl	%r9d, %ecx
	jmp	LBB0_20
LBB0_13:
	decl	%edx
	movq	%rsi, 32(%rbx)
	movq	%rsi, %rdi
	movl	%edx, %eax
	cmpq	$0, 24(%r8)
	jne	LBB0_15
LBB0_16:
	movl	12(%r8), %ecx
	testq	%r10, %r10
	je	LBB0_19
## %bb.17:
	cmpl	%r9d, %eax
	jl	LBB0_19
## %bb.18:
	addl	%r9d, %ecx
	cltd
	idivl	%r9d
	notl	%edx
	addl	%edx, %ecx
	jmp	LBB0_20
LBB0_19:
	addl	%eax, %ecx
LBB0_20:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	movsd	%xmm0, 8(%rbx)
	cmpq	%rdi, %rsi
	jle	LBB0_23
## %bb.21:
	movq	%rsi, 32(%rbx)
	movq	_cg_debugAnim@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	%rsi, %rdi
	je	LBB0_23
## %bb.22:
	leaq	L_.str(%rip), %rdi
	callq	_CG_Printf
	movq	32(%rbx), %rdi
	movq	(%r14), %rsi
LBB0_23:
	leaq	200(%rsi), %rax
	cmpq	%rax, %rdi
	jle	LBB0_25
## %bb.24:
	movq	%rsi, 32(%rbx)
	movq	%rsi, %rdi
LBB0_25:
	movq	40(%rbx), %rax
	cmpq	%rsi, %rax
	jle	LBB0_27
## %bb.26:
	movq	%rsi, 40(%rbx)
	movq	%rsi, %rax
LBB0_27:
	subq	%rax, %rdi
	jne	LBB0_29
## %bb.28:
	movq	$0, 16(%rbx)
	jmp	LBB0_30
LBB0_29:
	subq	%rax, %rsi
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rsi, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2ss	%rdi, %xmm1
	divss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rbx)
LBB0_30:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg_animSpeed,8,3               ## @cg_animSpeed
	.comm	_cg,8,3                         ## @cg
	.comm	_cg_debugAnim,8,3               ## @cg_debugAnim
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Clamp lf->frameTime\n"

	.no_dead_strip	_CG_RunLerpFrame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_RunLerpFrame
_CG_RunLerpFrame:                       ; @CG_RunLerpFrame
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-48]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	mov	x19, x1
Lloh0:
	adrp	x8, _cg_animSpeed@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg_animSpeed@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.1:
	fmov	s8, s0
	ldr	w8, [x19, #24]
	cmp	w8, w2
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_4
LBB0_3:
	mov	x1, x19
	bl	_CG_SetLerpFrameAnimation
LBB0_4:
Lloh3:
	adrp	x20, _cg@GOTPAGE
Lloh4:
	ldr	x20, [x20, _cg@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19, #32]
	cmp	x8, x9
	b.lt	LBB0_20
; %bb.5:
	ldr	d0, [x19, #8]
	str	d0, [x19]
	str	x9, [x19, #40]
	ldr	x10, [x19, #56]
	ldrsw	x11, [x10]
	cbz	w11, LBB0_27
; %bb.6:
	ldr	x12, [x19, #48]
	add	x9, x9, x11
	cmp	x8, x12
	csel	x9, x12, x9, lt
	str	x9, [x19, #32]
	sub	x12, x9, x12
	sdiv	x11, x12, x11
	scvtf	s0, w11
	fmul	s0, s0, s8
	fcvtzs	w12, s0
	ldr	w11, [x10, #4]
	ldr	x13, [x10, #16]
	cmp	x13, #0
	cset	w14, ne
	lsl	w14, w11, w14
	cmp	w14, w12
	b.gt	LBB0_9
; %bb.7:
	ldr	w15, [x10, #8]
	cbz	w15, LBB0_12
; %bb.8:
	sub	w12, w12, w14
	sdiv	w14, w12, w15
	msub	w12, w14, w15, w12
	sub	w14, w11, w15
	add	w12, w14, w12
LBB0_9:
	ldr	x14, [x10, #24]
	cbz	x14, LBB0_13
LBB0_10:
	ldr	w10, [x10, #12]
	mvn	w12, w12
	add	w11, w11, w12
	add	w10, w11, w10
	b	LBB0_17
LBB0_11:
	stp	xzr, xzr, [x19]
	str	xzr, [x19, #16]
	b	LBB0_27
LBB0_12:
	sub	w12, w14, #1
	str	x8, [x19, #32]
	mov	x9, x8
	ldr	x14, [x10, #24]
	cbnz	x14, LBB0_10
LBB0_13:
	ldr	w10, [x10, #12]
	cbz	x13, LBB0_16
; %bb.14:
	cmp	w12, w11
	b.lt	LBB0_16
; %bb.15:
	sdiv	w13, w12, w11
	msub	w12, w13, w11, w12
	mvn	w12, w12
	add	w10, w10, w11
LBB0_16:
	add	w10, w10, w12
LBB0_17:
	scvtf	d0, w10
	str	d0, [x19, #8]
	cmp	x8, x9
	b.le	LBB0_20
; %bb.18:
	str	x8, [x19, #32]
Lloh5:
	adrp	x9, _cg_debugAnim@GOTPAGE
Lloh6:
	ldr	x9, [x9, _cg_debugAnim@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x9]
	mov	x9, x8
	cbz	x10, LBB0_20
; %bb.19:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CG_Printf
	ldr	x9, [x19, #32]
	ldr	x8, [x20]
LBB0_20:
	add	x10, x8, #200
	cmp	x9, x10
	b.le	LBB0_22
; %bb.21:
	str	x8, [x19, #32]
	mov	x9, x8
LBB0_22:
	ldr	x10, [x19, #40]
	cmp	x10, x8
	b.le	LBB0_24
; %bb.23:
	str	x8, [x19, #40]
	mov	x10, x8
LBB0_24:
	subs	x9, x9, x10
	b.ne	LBB0_26
; %bb.25:
	str	xzr, [x19, #16]
	b	LBB0_27
LBB0_26:
	sub	x8, x8, x10
	scvtf	s0, x8
	scvtf	s1, x9
	fdiv	s0, s0, s1
	fcvt	d0, s0
	fmov	d1, #1.00000000
	fsub	d0, d1, d0
	str	d0, [x19, #16]
LBB0_27:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_cg_animSpeed,8,3               ; @cg_animSpeed
	.comm	_cg,8,3                         ; @cg
	.comm	_cg_debugAnim,8,3               ; @cg_debugAnim
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Clamp lf->frameTime\n"

	.no_dead_strip	_CG_RunLerpFrame
.subsections_via_symbols
