// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/plasma.c
// Function: fire_plasma_spread
void
fire_plasma_spread
(edict_t *goop_c, vec3_t start, vec3_t dir) {
	edict_t	*goop_l = Spawn_Goop(goop_c->owner, start);
	edict_t	*goop_r = Spawn_Goop(goop_c->owner, start);
	vec3_t	angles;
	
	goop_l->movetype = MOVETYPE_FLYMISSILE;
	goop_c->movetype = MOVETYPE_FLYMISSILE;
	goop_r->movetype = MOVETYPE_FLYMISSILE;

	VectorClear (goop_l->mins);
	VectorClear (goop_l->maxs);
	VectorClear (goop_c->mins);
	VectorClear (goop_c->maxs);
	VectorClear (goop_r->mins);
	VectorClear (goop_r->maxs);

	goop_l->dmg= 1;
	goop_c->dmg= 1;
	goop_r->dmg= 1;

	//bat  this really shouldn't even matter???
	//if(is_quad)
	//{
	//	goop_l->dmg=	7 + 9 * PLASMA_SPREAD_DAMAGE * 4;
	//	goop_c->dmg=	7 + 9 * PLASMA_SPREAD_DAMAGE * 4;
	//	goop_r->dmg=	7 + 9 * PLASMA_SPREAD_DAMAGE * 4;
	//}
	//else
	//{
	//	goop_l->dmg=	7 + 9 * PLASMA_SPREAD_DAMAGE;
	//	goop_c->dmg=	7 + 9 * PLASMA_SPREAD_DAMAGE;
	//	goop_r->dmg=	7 + 9 * PLASMA_SPREAD_DAMAGE;
	//}



	// center spread, line of sight
	VectorScale(dir, PLASMA_SPREAD_SPEED, goop_c->velocity);
	vectoangles(dir,angles);

	// right spread, has 10+ in yaw
	angles[YAW] -= 10;
	AngleVectors( angles, dir, NULL, NULL );
	VectorScale(dir, PLASMA_SPREAD_SPEED, goop_r->velocity);

	// left spread, has 10- in yaw
	angles[YAW] += 20;
	AngleVectors( angles, dir, NULL, NULL );
	VectorScale(dir, PLASMA_SPREAD_SPEED, goop_l->velocity);

	goop_l->touch = plasma_spread_touch;
	goop_c->touch = plasma_spread_touch;
	goop_r->touch = plasma_spread_touch;
	
	goop_l->think = G_FreeEdict;
	goop_c->think = G_FreeEdict;
	goop_r->think = G_FreeEdict;
	goop_l->nextthink = level.time + 3.0;
	goop_c->nextthink = level.time + 3.0;
	goop_r->nextthink = level.time + 3.0;

	gi.linkentity(goop_l);
	gi.linkentity(goop_c);
	gi.linkentity(goop_r);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq 0x110(%rdi), %rdi
callq 0x188d0
movq %rax, %r15
movq 0x110(%rbx), %rdi
movq %r14, %rsi
callq 0x188d0
movq %rax, %r14
pushq $0x8
popq %rax
movl %eax, 0x118(%r15)
movl %eax, 0x118(%rbx)
movl %eax, 0x118(%r14)
xorps %xmm0, %xmm0
andq $0x0, 0xdc(%r15)
movups %xmm0, 0xcc(%r15)
andq $0x0, 0xdc(%rbx)
movups %xmm0, 0xcc(%rbx)
andq $0x0, 0xdc(%r14)
movups %xmm0, 0xcc(%r14)
pushq $0x1
popq %rax
movl %eax, 0x280(%r15)
movl %eax, 0x280(%rbx)
movl %eax, 0x280(%r14)
movl $0x1c0, %r13d           # imm = 0x1C0
leaq (%rbx,%r13), %rsi
movss 0x2d597(%rip), %xmm0    # 0x4fc34
movq %r12, %rdi
callq 0x18a70
leaq 0xc(%rsp), %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x19240
movss 0x4(%rbp), %xmm0
addss 0x2d57a(%rip), %xmm0    # 0x4fc3c
movss %xmm0, 0x4(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183d0
leaq (%r14,%r13), %rsi
movq %r12, %rdi
movss 0x2d54f(%rip), %xmm0    # 0x4fc34
callq 0x18a70
movss 0x4(%rbp), %xmm0
addss 0x2d549(%rip), %xmm0    # 0x4fc40
movss %xmm0, 0x4(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183d0
addq %r15, %r13
movq %r12, %rdi
movss 0x2d51b(%rip), %xmm0    # 0x4fc34
movq %r13, %rsi
callq 0x18a70
movq 0x445a0(%rip), %rax     # 0x66cc8
movq %rax, 0x220(%r15)
movq %rax, 0x220(%rbx)
movq %rax, 0x220(%r14)
movq 0x43cec(%rip), %rax     # 0x66430
movq %rax, 0x210(%r15)
movq %rax, 0x210(%rbx)
movq %rax, 0x210(%r14)
movq 0x44640(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
addss 0x2c79f(%rip), %xmm0    # 0x4ef0c
movss %xmm0, 0x200(%r15)
movss %xmm0, 0x200(%rbx)
movss %xmm0, 0x200(%r14)
movq 0x43e72(%rip), %r12     # 0x66600
movq %r15, %rdi
callq *0x90(%r12)
movq %rbx, %rdi
callq *0x90(%r12)
movq %r14, %rdi
callq *0x90(%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq