// File: /workspace/github_c_makefile_star2_O1/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 0x18870
movq %rax, %r15
movq 0x110(%rbx), %rdi
movq %r14, %rsi
callq 0x18870
movq %rax, %r14
movl $0x8, %eax
movl %eax, 0x118(%r15)
movl %eax, 0x118(%rbx)
movl %eax, 0x118(%r14)
xorl %eax, %eax
movq %rax, 0xdc(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0xcc(%r15)
movq %rax, 0xdc(%rbx)
movups %xmm0, 0xcc(%rbx)
movq %rax, 0xdc(%r14)
movups %xmm0, 0xcc(%r14)
movl $0x1, %eax
movl %eax, 0x280(%r15)
movl %eax, 0x280(%rbx)
movl %eax, 0x280(%r14)
movl $0x1c0, %r13d           # imm = 0x1C0
leaq (%rbx,%r13), %rsi
movss 0x3073c(%rip), %xmm0    # 0x54c04
movq %r12, %rdi
callq 0x189d0
leaq 0xc(%rsp), %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x190d0
movss 0x4(%rbp), %xmm0
addss 0x3071f(%rip), %xmm0    # 0x54c0c
movss %xmm0, 0x4(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183a0
leaq (%r14,%r13), %rsi
movq %r12, %rdi
movss 0x306f4(%rip), %xmm0    # 0x54c04
callq 0x189d0
movss 0x4(%rbp), %xmm0
addss 0x306ee(%rip), %xmm0    # 0x54c10
movss %xmm0, 0x4(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183a0
addq %r15, %r13
movq %r12, %rdi
movss 0x306c0(%rip), %xmm0    # 0x54c04
movq %r13, %rsi
callq 0x189d0
movq 0x45775(%rip), %rax     # 0x69cc8
movq %rax, 0x220(%r15)
movq %rax, 0x220(%rbx)
movq %rax, 0x220(%r14)
movq 0x44ec1(%rip), %rax     # 0x69430
movq %rax, 0x210(%r15)
movq %rax, 0x210(%rbx)
movq %rax, 0x210(%r14)
movq 0x45815(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x2f974(%rip), %xmm0    # 0x53f0c
movss %xmm0, 0x200(%r15)
movss %xmm0, 0x200(%rbx)
movss %xmm0, 0x200(%r14)
movq 0x45047(%rip), %r12     # 0x69600
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