// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: target_laser_start
void target_laser_start (edict_t *self)
{
	edict_t *ent;

	self->movetype = MOVETYPE_NONE;
	self->solid = SOLID_NOT;
	self->s.renderfx |= RF_BEAM|RF_TRANSLUCENT;
	self->s.modelindex = 1;			// must be non-zero

	// set the beam diameter
	if (self->spawnflags & 64)
		self->s.frame = 16;
	else
		self->s.frame = 4;

	// set the color
	if (self->spawnflags & 2)
		self->s.skinnum = 0xf2f2f0f0;
	else if (self->spawnflags & 4)
		self->s.skinnum = 0xd0d1d2d3;
	else if (self->spawnflags & 8)
		self->s.skinnum = 0xf3f3f1f1;
	else if (self->spawnflags & 16)
		self->s.skinnum = 0xdcdddedf;
	else if (self->spawnflags & 32)
		self->s.skinnum = 0xe0e1e2e3;

	if (!self->enemy)
	{
		if (self->target)
		{
			ent = G_Find (NULL, FOFS(targetname), self->target);
			if (!ent)
				gi.dprintf ("%s at %s: %s is a bad target\n", self->classname, vtos(self->s.origin), self->target);
			self->enemy = ent;
		}
		else
		{
			G_SetMovedir (self->s.angles, self->movedir);
		}
	}
	self->use = target_laser_use;
	self->think = target_laser_think;

	if (!self->dmg)
		self->dmg = 1;

	VectorSet (self->mins, -8, -8, -8);
	VectorSet (self->maxs, 8, 8, 8);
	gi.linkentity (self);

	if (self->spawnflags & 1)
		target_laser_on (self);
	else
		target_laser_off (self);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, 0x118(%rdi)
movl %eax, 0x108(%rdi)
orb $-0x60, 0x44(%rdi)
movl $0x1, 0x28(%rdi)
movl 0x140(%rdi), %eax
testb $0x40, %al
movl $0x4, %ecx
movl $0x10, %edx
cmovel %ecx, %edx
movl %edx, 0x38(%rdi)
movl $0xf2f2f0f0, %ecx       # imm = 0xF2F2F0F0
testb $0x2, %al
jne 0x3d57d
movl $0xd0d1d2d3, %ecx       # imm = 0xD0D1D2D3
testb $0x4, %al
jne 0x3d57d
movl $0xf3f3f1f1, %ecx       # imm = 0xF3F3F1F1
testb $0x8, %al
jne 0x3d57d
movl $0xdcdddedf, %ecx       # imm = 0xDCDDDEDF
testb $0x10, %al
jne 0x3d57d
movl $0xe0e1e2e3, %ecx       # imm = 0xE0E1E2E3
testb $0x20, %al
je 0x3d580
movl %ecx, 0x3c(%rbx)
cmpq $0x0, 0x2a0(%rbx)
jne 0x3d5f7
movq 0x150(%rbx), %rdx
testq %rdx, %rdx
je 0x3d5e7
xorl %edi, %edi
movl $0x158, %esi            # imm = 0x158
callq 0x19430
movq %rax, %r14
testq %rax, %rax
jne 0x3d5de
movq 0x2c04f(%rip), %rax     # 0x69600
movq 0x8(%rax), %r12
movq 0x138(%rbx), %r15
leaq 0x4(%rbx), %rdi
callq 0x190a0
movq 0x150(%rbx), %rcx
leaq 0x1ca34(%rip), %rdi     # 0x5a007
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%r12
movq %r14, 0x2a0(%rbx)
jmp 0x3d5f7
leaq 0x10(%rbx), %rdi
leaq 0x19c(%rbx), %rsi
callq 0x19630
movq 0x2c47a(%rip), %rax     # 0x69a78
movq %rax, 0x228(%rbx)
movq 0x2c99c(%rip), %rax     # 0x69fa8
movq %rax, 0x210(%rbx)
cmpl $0x0, 0x280(%rbx)
jne 0x3d626
movl $0x1, 0x280(%rbx)
movaps 0x1ac63(%rip), %xmm0    # 0x58290
movups %xmm0, 0xcc(%rbx)
movabsq $0x4100000041000000, %rax # imm = 0x4100000041000000
movq %rax, 0xdc(%rbx)
movq 0x2bfb4(%rip), %rax     # 0x69600
movq %rbx, %rdi
callq *0x90(%rax)
movl 0x140(%rbx), %eax
testb $0x1, %al
jne 0x3d682
movl %eax, 0x140(%rbx)
orb $0x1, 0xc8(%rbx)
movl $0x0, 0x200(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18be0