// File: /workspace/github_c_makefile_star2_O3/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 0x3cc3f
movl $0xd0d1d2d3, %ecx       # imm = 0xD0D1D2D3
testb $0x4, %al
jne 0x3cc3f
movl $0xf3f3f1f1, %ecx       # imm = 0xF3F3F1F1
testb $0x8, %al
jne 0x3cc3f
movl $0xdcdddedf, %ecx       # imm = 0xDCDDDEDF
testb $0x10, %al
jne 0x3cc3f
movl $0xe0e1e2e3, %ecx       # imm = 0xE0E1E2E3
testb $0x20, %al
je 0x3cc42
movl %ecx, 0x3c(%rbx)
cmpq $0x0, 0x2a0(%rbx)
jne 0x3ccb9
movq 0x150(%rbx), %rdx
testq %rdx, %rdx
je 0x3cca9
xorl %edi, %edi
movl $0x158, %esi            # imm = 0x158
callq 0x19430
movq %rax, %r14
testq %rax, %rax
jne 0x3cca0
movq 0x2b98d(%rip), %rax     # 0x68600
movq 0x8(%rax), %r12
movq 0x138(%rbx), %r15
leaq 0x4(%rbx), %rdi
callq 0x190a0
movq 0x150(%rbx), %rcx
leaq 0x1c582(%rip), %rdi     # 0x59217
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%r12
movq %r14, 0x2a0(%rbx)
jmp 0x3ccb9
leaq 0x10(%rbx), %rdi
leaq 0x19c(%rbx), %rsi
callq 0x19630
movq 0x2bdb8(%rip), %rax     # 0x68a78
movq %rax, 0x228(%rbx)
movq 0x2c2da(%rip), %rax     # 0x68fa8
movq %rax, 0x210(%rbx)
cmpl $0x0, 0x280(%rbx)
jne 0x3cce8
movl $0x1, 0x280(%rbx)
movaps 0x1a6e1(%rip), %xmm0    # 0x573d0
movups %xmm0, 0xcc(%rbx)
movsd 0x1a6e2(%rip), %xmm0    # 0x573e0
movsd %xmm0, 0xdc(%rbx)
movq 0x2b8f3(%rip), %rax     # 0x68600
movq %rbx, %rdi
callq *0x90(%rax)
testb $0x1, 0x140(%rbx)
jne 0x3cd3c
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