	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function Reached_Train
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x447a0000                      ## float 1000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Reached_Train
	.p2align	4, 0x90
_Reached_Train:                         ## @Reached_Train
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	56(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_8
## %bb.1:
	cmpq	$0, 56(%r14)
	je	LBB0_8
## %bb.2:
	movq	%rdi, %rbx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_G_UseTargets
	movq	56(%r14), %rax
	movq	%rax, 56(%rbx)
	movl	20(%r14), %edi
	movl	48(%rbx), %esi
	callq	_VectorCopy
	movq	56(%r14), %rax
	movl	20(%rax), %edi
	movl	52(%rbx), %esi
	callq	_VectorCopy
	movss	(%r14), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jne	LBB0_4
	jp	LBB0_4
## %bb.3:
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
LBB0_4:
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	maxss	%xmm0, %xmm1
	movss	%xmm1, -28(%rbp)                ## 4-byte Spill
	movl	48(%rbx), %esi
	movl	52(%rbx), %edi
	callq	_VectorSubtract
	callq	_VectorLength
	mulss	LCPI0_1(%rip), %xmm0
	divss	-28(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, 8(%rbx)
	movq	_SVF_NOCLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	notl	%edx
	movl	44(%rbx), %ecx
	andl	%ecx, %edx
	movl	%edx, 44(%rbx)
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_6
## %bb.5:
	movl	$1065353216, 8(%rbx)            ## imm = 0x3F800000
	orl	%eax, %ecx
	movl	%ecx, 44(%rbx)
LBB0_6:
	movl	40(%r14), %eax
	movl	%eax, 16(%rbx)
	movq	_MOVER_1TO2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_level@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	%rbx, %rdi
	callq	_SetMoverState
	movslq	4(%r14), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	imulq	$1000, %rax, %rax               ## imm = 0x3E8
	addq	(%r15), %rax
	movq	%rax, 32(%rbx)
	movq	_Think_BeginMoving@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_TR_STATIONARY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVF_NOCLIENT,4,2               ## @SVF_NOCLIENT
	.comm	_MOVER_1TO2,4,2                 ## @MOVER_1TO2
	.comm	_level,8,3                      ## @level
	.comm	_Think_BeginMoving,4,2          ## @Think_BeginMoving
	.comm	_TR_STATIONARY,4,2              ## @TR_STATIONARY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Reached_Train                  ; -- Begin function Reached_Train
	.p2align	2
_Reached_Train:                         ; @Reached_Train
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 b8, -56
	.cfi_offset b9, -64
	ldr	x20, [x0, #56]
	cbz	x20, LBB0_8
; %bb.1:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_8
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	mov	x1, #0
	bl	_G_UseTargets
	ldr	x8, [x20, #56]
	str	x8, [x19, #56]
	ldr	w0, [x20, #20]
	ldr	w1, [x19, #48]
	bl	_VectorCopy
	ldr	x8, [x20, #56]
	ldr	w0, [x8, #20]
	ldr	w1, [x19, #52]
	bl	_VectorCopy
	ldr	s0, [x20]
	fcmp	s0, #0.0
	b.ne	LBB0_4
; %bb.3:
	ldr	s0, [x19]
LBB0_4:
	fmov	s8, #1.00000000
	fmax	s9, s0, s8
	ldp	w1, w0, [x19, #48]
	bl	_VectorSubtract
	bl	_VectorLength
	mov	w8, #1148846080
	fmov	s1, w8
	fmul	s0, s0, s1
	fdiv	s0, s0, s9
Lloh0:
	adrp	x8, _SVF_NOCLIENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SVF_NOCLIENT@GOTPAGEOFF]
	str	s0, [x19, #8]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #44]
	bic	w10, w9, w8
	str	w10, [x19, #44]
	fcmp	s0, s8
	b.pl	LBB0_6
; %bb.5:
	mov	w10, #1065353216
	str	w10, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #44]
LBB0_6:
	ldr	w8, [x20, #40]
	str	w8, [x19, #16]
Lloh3:
	adrp	x8, _MOVER_1TO2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MOVER_1TO2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x21, _level@GOTPAGE
Lloh7:
	ldr	x21, [x21, _level@GOTPAGEOFF]
	ldr	x2, [x21]
	mov	x0, x19
	bl	_SetMoverState
	ldrsw	x8, [x20, #4]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	x9, [x21]
	mov	w10, #1000
	madd	x8, x8, x10, x9
	str	x8, [x19, #32]
Lloh8:
	adrp	x8, _Think_BeginMoving@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Think_BeginMoving@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh11:
	adrp	x8, _TR_STATIONARY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TR_STATIONARY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #12]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SVF_NOCLIENT,4,2               ; @SVF_NOCLIENT
	.comm	_MOVER_1TO2,4,2                 ; @MOVER_1TO2
	.comm	_level,8,3                      ; @level
	.comm	_Think_BeginMoving,4,2          ; @Think_BeginMoving
	.comm	_TR_STATIONARY,4,2              ; @TR_STATIONARY
.subsections_via_symbols
