// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, 0x118(%rdi)
andl $0x0, 0x108(%rdi)
orb $-0x60, 0x44(%rdi)
movl $0x1, 0x28(%rdi)
movl 0x140(%rdi), %eax
testb $0x40, %al
pushq $0x4
popq %rcx
pushq $0x10
popq %rdx
cmovel %ecx, %edx
movl %edx, 0x38(%rdi)
movl $0xf2f2f0f0, %ecx       # imm = 0xF2F2F0F0
testb $0x2, %al
jne 0x39928
movl $0xd0d1d2d3, %ecx       # imm = 0xD0D1D2D3
testb $0x4, %al
jne 0x39928
movl $0xf3f3f1f1, %ecx       # imm = 0xF3F3F1F1
testb $0x8, %al
jne 0x39928
movl $0xdcdddedf, %ecx       # imm = 0xDCDDDEDF
testb $0x10, %al
jne 0x39928
movl $0xe0e1e2e3, %ecx       # imm = 0xE0E1E2E3
testb $0x20, %al
je 0x3992b
movl %ecx, 0x3c(%rbx)
cmpq $0x0, 0x2a0(%rbx)
jne 0x399a2
movq 0x150(%rbx), %rdx
testq %rdx, %rdx
je 0x39992
xorl %edi, %edi
movl $0x158, %esi            # imm = 0x158
callq 0x195e0
movq %rax, %r14
testq %rax, %rax
jne 0x39989
movq 0x2cca4(%rip), %rax     # 0x66600
movq 0x8(%rax), %r12
movq 0x138(%rbx), %r15
leaq 0x4(%rbx), %rdi
callq 0x19200
movq 0x150(%rbx), %rcx
leaq 0x1b879(%rip), %rdi     # 0x551f7
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%r12
movq %r14, 0x2a0(%rbx)
jmp 0x399a2
leaq 0x10(%rbx), %rdi
leaq 0x19c(%rbx), %rsi
callq 0x197f0
movq 0x2d0cf(%rip), %rax     # 0x66a78
movq %rax, 0x228(%rbx)
movq 0x2d5f1(%rip), %rax     # 0x66fa8
movq %rax, 0x210(%rbx)
cmpl $0x0, 0x280(%rbx)
jne 0x399d1
movl $0x1, 0x280(%rbx)
movaps 0x199d8(%rip), %xmm0    # 0x533b0
movups %xmm0, 0xcc(%rbx)
movsd 0x199d9(%rip), %xmm0    # 0x533c0
movsd %xmm0, 0xdc(%rbx)
movq 0x2cc0a(%rip), %rax     # 0x66600
movq %rbx, %rdi
callq *0x90(%rax)
testb $0x1, 0x140(%rbx)
jne 0x39a22
orb $0x1, 0xc8(%rbx)
andl $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 0x18ca0