// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_train
void SP_func_train (edict_t *self)
{
	self->movetype = MOVETYPE_PUSH;

	VectorClear (self->s.angles);
	self->blocked = train_blocked;
	if (self->spawnflags & TRAIN_BLOCK_STOPS)
		self->dmg = 0;
	else
	{
		if (!self->dmg)
			self->dmg = 100;
	}
	self->solid = SOLID_BSP;
	gi.setmodel (self, self->model);

	if (st.noise)
		self->moveinfo.sound_middle = gi.soundindex  (st.noise);

	if (!self->speed)
		self->speed = 100;

	self->moveinfo.speed = self->speed;
	self->moveinfo.accel = self->moveinfo.decel = self->moveinfo.speed;

	self->use = train_use;

	gi.linkentity (self);

	if (self->target)
	{
		// start trains on the second frame, to make sure their targets have had
		// a chance to spawn
		self->nextthink = level.time + FRAMETIME;
		self->think = func_train_find;
	}
	else
	{
		gi.dprintf ("func_train without a target at %s\n", vtos(self->absmin));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x2, 0x118(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x14(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x4a61f(%rip), %rcx     # 0x82bc8
movq %rcx, 0x218(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x385d2
movq -0x8(%rbp), %rax
movl $0x0, 0x280(%rax)
jmp 0x385ef
movq -0x8(%rbp), %rax
cmpl $0x0, 0x280(%rax)
jne 0x385ed
movq -0x8(%rbp), %rax
movl $0x64, 0x280(%rax)
jmp 0x385ef
movq -0x8(%rbp), %rax
movl $0x3, 0x108(%rax)
movq 0x49ffc(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x120(%rcx), %rsi
callq *%rax
movq 0x4a048(%rip), %rax     # 0x82668
cmpq $0x0, 0x30(%rax)
je 0x3864b
movq 0x49fd2(%rip), %rax     # 0x82600
movq 0x48(%rax), %rax
movq 0x4a02f(%rip), %rcx     # 0x82668
movq 0x30(%rcx), %rdi
callq *%rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x36c(%rax)
movq -0x8(%rbp), %rax
movss 0x190(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x38675
jp 0x38675
movq -0x8(%rbp), %rax
movss 0x3a513(%rip), %xmm0    # 0x72b80
movss %xmm0, 0x190(%rax)
movq -0x8(%rbp), %rax
movss 0x190(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x378(%rax)
movq -0x8(%rbp), %rax
movss 0x378(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x37c(%rax)
movq -0x8(%rbp), %rax
movss %xmm0, 0x374(%rax)
movq -0x8(%rbp), %rax
movq 0x49d7c(%rip), %rcx     # 0x82438
movq %rcx, 0x228(%rax)
movq 0x49f36(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x150(%rax)
je 0x38719
movss 0x37ba7(%rip), %xmm0    # 0x70294
movq 0x4a6ac(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x4a430(%rip), %rcx     # 0x82b40
movq %rcx, 0x210(%rax)
jmp 0x3874a
movq 0x49ee0(%rip), %rax     # 0x82600
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0xe4, %rdi
callq 0x19260
movq -0x10(%rbp), %rcx
movq %rax, %rsi
leaq 0x3a5fc(%rip), %rdi     # 0x72d42
movb $0x0, %al
callq *%rcx
addq $0x10, %rsp
popq %rbp
retq