// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x118(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x108(%rax)
movq -0x8(%rbp), %rax
movl 0x44(%rax), %ecx
orl $0xa0, %ecx
movl %ecx, 0x44(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x4e112
movq -0x8(%rbp), %rax
movl $0x10, 0x38(%rax)
jmp 0x4e11d
movq -0x8(%rbp), %rax
movl $0x4, 0x38(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4e13f
movq -0x8(%rbp), %rax
movl $0xf2f2f0f0, 0x3c(%rax) # imm = 0xF2F2F0F0
jmp 0x4e1c1
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4e15e
movq -0x8(%rbp), %rax
movl $0xd0d1d2d3, 0x3c(%rax) # imm = 0xD0D1D2D3
jmp 0x4e1bf
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4e17d
movq -0x8(%rbp), %rax
movl $0xf3f3f1f1, 0x3c(%rax) # imm = 0xF3F3F1F1
jmp 0x4e1bd
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4e19c
movq -0x8(%rbp), %rax
movl $0xdcdddedf, 0x3c(%rax) # imm = 0xDCDDDEDF
jmp 0x4e1bb
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x4e1b9
movq -0x8(%rbp), %rax
movl $0xe0e1e2e3, 0x3c(%rax) # imm = 0xE0E1E2E3
jmp 0x4e1bb
jmp 0x4e1bd
jmp 0x4e1bf
jmp 0x4e1c1
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2a0(%rax)
jne 0x4e287
movq -0x8(%rbp), %rax
cmpq $0x0, 0x150(%rax)
je 0x4e26d
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rdx
xorl %eax, %eax
movl %eax, %edi
movq %rdi, %rax
addq $0x158, %rax            # imm = 0x158
movl %eax, %esi
callq 0x19660
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4e25c
movq 0x343ea(%rip), %rax     # 0x82600
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
callq 0x19260
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %r8
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rcx
leaq 0x27cc0(%rip), %rdi     # 0x75f17
movb $0x0, %al
callq *%r8
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2a0(%rax)
jmp 0x4e285
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rsi
addq $0x19c, %rsi            # imm = 0x19C
callq 0x19870
jmp 0x4e287
movq -0x8(%rbp), %rax
movq 0x347e6(%rip), %rcx     # 0x82a78
movq %rcx, 0x228(%rax)
movq -0x8(%rbp), %rax
movq 0x34d04(%rip), %rcx     # 0x82fa8
movq %rcx, 0x210(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x280(%rax)
jne 0x4e2c6
movq -0x8(%rbp), %rax
movl $0x1, 0x280(%rax)
movq -0x8(%rbp), %rax
movss 0x2313e(%rip), %xmm0    # 0x71410
movss %xmm0, 0xcc(%rax)
movq -0x8(%rbp), %rax
movss 0x2312a(%rip), %xmm0    # 0x71410
movss %xmm0, 0xd0(%rax)
movq -0x8(%rbp), %rax
movss 0x23116(%rip), %xmm0    # 0x71410
movss %xmm0, 0xd4(%rax)
movq -0x8(%rbp), %rax
movss 0x21bee(%rip), %xmm0    # 0x6fefc
movss %xmm0, 0xd8(%rax)
movq -0x8(%rbp), %rax
movss 0x21bda(%rip), %xmm0    # 0x6fefc
movss %xmm0, 0xdc(%rax)
movq -0x8(%rbp), %rax
movss 0x21bc6(%rip), %xmm0    # 0x6fefc
movss %xmm0, 0xe0(%rax)
movq 0x342bb(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4e36f
movq -0x8(%rbp), %rdi
callq 0x18ce0
jmp 0x4e378
movq -0x8(%rbp), %rdi
callq 0x18d60
addq $0x20, %rsp
popq %rbp
retq
nop