LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: use_target_blaster
void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
{
	int effect;

	if (self->spawnflags & 2)
		effect = 0;
	else if (self->spawnflags & 1)
		effect = EF_HYPERBLASTER;
	else
		effect = EF_BLASTER;

	fire_blaster (self, self->s.origin, self->movedir, self->dmg, self->speed, effect, MOD_TARGET_BLASTER);
	gi.sound (self, CHAN_VOICE, self->noise_index, 1, ATTN_NORM, 0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x140(%rdi), %eax
movl 0x280(%rdi), %ecx
testb $0x1, %al
movl $0x8, %edx
movl $0x40, %esi
cmovel %edx, %esi
xorl %r9d, %r9d
testb $0x2, %al
cmovel %esi, %r9d
leaq 0x4(%rdi), %rsi
leaq 0x19c(%rdi), %rdx
cvttss2si 0x190(%rdi), %r8d
movl $0x21, (%rsp)
callq 0x189b0
movq 0x2bebf(%rip), %rax     # 0x68600
movq 0x20(%rax), %rax
movl 0x2e8(%rbx), %edx
movss 0x167d5(%rip), %xmm0    # 0x52f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x2, %esi
movaps %xmm0, %xmm1
addq $0x10, %rsp
popq %rbx
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: SP_target_blaster
void SP_target_blaster (edict_t *self)
{
	self->use = use_target_blaster;
	G_SetMovedir (self->s.angles, self->movedir);
	self->noise_index = gi.soundindex ("weapons/laser2.wav");

	if (!self->dmg)
		self->dmg = 15;
	if (!self->speed)
		self->speed = 1000;

	self->svflags = SVF_NOCLIENT;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x2c1ad(%rip), %rax     # 0x68920
movq %rax, 0x228(%rdi)
addq $0x10, %rdi
leaq 0x19c(%rbx), %rsi
callq 0x19630
movq 0x2be6f(%rip), %rax     # 0x68600
leaq 0x1ca6c(%rip), %rdi     # 0x59204
callq *0x48(%rax)
movl %eax, 0x2e8(%rbx)
cmpl $0x0, 0x280(%rbx)
jne 0x3c7b4
movl $0xf, 0x280(%rbx)
movss 0x190(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3c7d0
jp 0x3c7d0
movl $0x447a0000, 0x190(%rbx) # imm = 0x447A0000
movl $0x1, 0xc8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: SP_target_crosslevel_target
void SP_target_crosslevel_target (edict_t *self)
{
	if (! self->delay)
		self->delay = 1;
	self->svflags = SVF_NOCLIENT;

	self->think = target_crosslevel_target_think;
	self->nextthink = level.time + self->delay;
}

// Assembly:
movss 0x2fc(%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3c863
jp 0x3c863
movl $0x3f800000, 0x2fc(%rdi) # imm = 0x3F800000
movss 0x166c5(%rip), %xmm0    # 0x52f28
movl $0x1, 0xc8(%rdi)
movq 0x2bfac(%rip), %rax     # 0x68820
movq %rax, 0x210(%rdi)
movq 0x2c51e(%rip), %rax     # 0x68da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: target_lightramp_think
void target_lightramp_think (edict_t *self)
{
	char	style[2];

	style[0] = 'a' + self->movedir[0] + (level.time - self->timestamp) / FRAMETIME * self->movedir[2];
	style[1] = 0;
	gi.configstring (CS_LIGHTS+self->enemy->style, style);

	if ((level.time - self->timestamp) < self->speed)
	{
		self->nextthink = level.time + FRAMETIME;
	}
	else if (self->spawnflags & 1)
	{
		char	temp;

		temp = self->movedir[0];
		self->movedir[0] = self->movedir[1];
		self->movedir[1] = temp;
		self->movedir[2] *= -1;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss 0x19c(%rdi), %xmm0
addss 0x1c3ab(%rip), %xmm0    # 0x5913c
movq 0x2c008(%rip), %r14     # 0x68da0
movss 0x4(%r14), %xmm1
subss 0x144(%rdi), %xmm1
divss 0x164e2(%rip), %xmm1    # 0x53290
mulss 0x1a4(%rdi), %xmm1
addss %xmm0, %xmm1
cvttss2si %xmm1, %eax
leaq 0x6(%rsp), %rsi
movb %al, (%rsi)
movb $0x0, 0x1(%rsi)
movq 0x2b830(%rip), %rax     # 0x68600
movq 0x2a0(%rdi), %rcx
movl $0x320, %edi            # imm = 0x320
addl 0x32c(%rcx), %edi
callq *0x30(%rax)
movss 0x4(%r14), %xmm0
movaps %xmm0, %xmm1
subss 0x144(%rbx), %xmm1
movss 0x190(%rbx), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x3ce15
addss 0x16485(%rip), %xmm0    # 0x53290
movss %xmm0, 0x200(%rbx)
jmp 0x3ce5f
testb $0x1, 0x140(%rbx)
je 0x3ce5f
cvttss2si 0x19c(%rbx), %eax
movss 0x1a0(%rbx), %xmm0
movss %xmm0, 0x19c(%rbx)
movsbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x1a0(%rbx)
movss 0x1a4(%rbx), %xmm0
xorps 0x18e79(%rip), %xmm0    # 0x55cd0
movss %xmm0, 0x1a4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: target_lightramp_use
void target_lightramp_use (edict_t *self, edict_t *other, edict_t *activator)
{
	if (!self->enemy)
	{
		edict_t		*e;

		// check all the targets
		e = NULL;
		while (1)
		{
			e = G_Find (e, FOFS(targetname), self->target);
			if (!e)
				break;
			if (strcmp(e->classname, "light") != 0)
			{
				gi.dprintf("%s at %s ", self->classname, vtos(self->s.origin));
				gi.dprintf("target %s (%s at %s) is not a light\n", self->target, e->classname, vtos(e->s.origin));
			}
			else
			{
				self->enemy = e;
			}
		}

		if (!self->enemy)
		{
			gi.dprintf("%s target %s not found at %s\n", self->classname, self->target, vtos(self->s.origin));
			G_FreeEdict (self);
			return;
		}
	}

	self->timestamp = level.time;
	target_lightramp_think (self);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x2a0(%rdi)
jne 0x3cf4d
movq 0x150(%rbx), %rdx
xorl %edi, %edi
movl $0x158, %esi            # imm = 0x158
callq 0x19430
testq %rax, %rax
je 0x3cf43
movq %rax, %r14
leaq 0x4(%rbx), %r15
movq 0x138(%r14), %rdi
leaq 0x1d079(%rip), %rsi     # 0x59f2d
callq 0x18b20
testl %eax, %eax
je 0x3cf1c
movq 0x2b73c(%rip), %r12     # 0x68600
movq 0x8(%r12), %rbp
movq 0x138(%rbx), %r13
movq %r15, %rdi
callq 0x190a0
leaq 0x1c356(%rip), %rdi     # 0x59235
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%rbp
movq 0x8(%r12), %r12
movq 0x150(%rbx), %r13
movq 0x138(%r14), %rbp
leaq 0x4(%r14), %rdi
callq 0x190a0
leaq 0x1c333(%rip), %rdi     # 0x5923f
movq %r13, %rsi
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq *%r12
jmp 0x3cf23
movq %r14, 0x2a0(%rbx)
movq 0x150(%rbx), %rdx
movq %r14, %rdi
movl $0x158, %esi            # imm = 0x158
callq 0x19430
movq %rax, %r14
testq %rax, %rax
jne 0x3cea6
cmpq $0x0, 0x2a0(%rbx)
je 0x3cf77
movq 0x2be4c(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
movss %xmm0, 0x144(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19b50
movq 0x2b682(%rip), %rax     # 0x68600
movq 0x8(%rax), %r12
movq 0x138(%rbx), %r14
movq 0x150(%rbx), %r15
leaq 0x4(%rbx), %rdi
callq 0x190a0
leaq 0x1c2c4(%rip), %rdi     # 0x59264
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq *%r12
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: SP_target_lightramp
void SP_target_lightramp (edict_t *self)
{
	if (!self->message || strlen(self->message) != 2 || self->message[0] < 'a' || self->message[0] > 'z' || self->message[1] < 'a' || self->message[1] > 'z' || self->message[0] == self->message[1])
	{
		gi.dprintf("target_lightramp has bad ramp (%s) at %s\n", self->message, vtos(self->s.origin));
		G_FreeEdict (self);
		return;
	}

	if (deathmatch->value)
	{
		G_FreeEdict (self);
		return;
	}

	if (!self->target)
	{
		gi.dprintf("%s with no target at %s\n", self->classname, vtos(self->s.origin));
		G_FreeEdict (self);
		return;
	}

	self->svflags |= SVF_NOCLIENT;
	self->use = target_lightramp_use;
	self->think = target_lightramp_think;

	self->movedir[0] = self->message[0] - 'a';
	self->movedir[1] = self->message[1] - 'a';
	self->movedir[2] = (self->movedir[1] - self->movedir[0]) / (self->speed / FRAMETIME);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x130(%rdi), %r14
testq %r14, %r14
je 0x3d007
movq %r14, %rdi
callq 0x18680
cmpq $0x2, %rax
jne 0x3d007
movb (%r14), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1a, %cl
jb 0x3d007
movb 0x1(%r14), %cl
leal -0x7b(%rcx), %edx
cmpb $-0x1a, %dl
setae %dl
cmpb %cl, %al
setne %al
testb %dl, %al
jne 0x3d03a
movq 0x2b5f2(%rip), %rax     # 0x68600
movq 0x8(%rax), %r15
leaq 0x4(%rbx), %rdi
callq 0x190a0
leaq 0x1c260(%rip), %rdi     # 0x59282
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%r15
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19a50
movq 0x2be7f(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3d02d
jp 0x3d02d
cmpq $0x0, 0x150(%rbx)
je 0x3d0d8
orb $0x1, 0xc8(%rbx)
movq 0x2b7d5(%rip), %rax     # 0x68840
movq %rax, 0x228(%rbx)
movq 0x2bed7(%rip), %rax     # 0x68f50
movq %rax, 0x210(%rbx)
movsbl (%r14), %eax
leal -0x61(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0x19c(%rbx)
movsbl 0x1(%r14), %ecx
leal -0x61(%rcx), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movss %xmm0, 0x1a0(%rbx)
subl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss 0x190(%rbx), %xmm1
divss 0x161ca(%rip), %xmm1    # 0x53290
divss %xmm1, %xmm0
movss %xmm0, 0x1a4(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq 0x2b521(%rip), %rax     # 0x68600
movq 0x8(%rax), %r15
movq 0x138(%rbx), %r14
leaq 0x4(%rbx), %rdi
callq 0x190a0
leaq 0x1a854(%rip), %rdi     # 0x5794e
jmp 0x3d022
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: target_earthquake_think
void target_earthquake_think (edict_t *self)
{
	int		i;
	edict_t	*e;

	if (self->last_move_time < level.time)
	{
		gi.positioned_sound (self->s.origin, self, CHAN_AUTO, self->noise_index, 1.0, ATTN_NONE, 0);
		self->last_move_time = level.time + 0.5;
	}

	for (i=1, e=g_edicts+i; i < globals.num_edicts; i++,e++)
	{
		if (!e->inuse)
			continue;
		if (!e->client)
			continue;
		if (!e->groundentity)
			continue;

		e->groundentity = NULL;
		e->velocity[0] += crandom()* 150;
		e->velocity[1] += crandom()* 150;
		e->velocity[2] = self->speed * (100.0 / e->mass);
	}

	if (level.time < self->timestamp)
		self->nextthink = level.time + FRAMETIME;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2bc8c(%rip), %r14     # 0x68da0
movss 0x4(%r14), %xmm0
ucomiss 0x250(%rdi), %xmm0
jbe 0x3d164
movq 0x2b4d6(%rip), %rax     # 0x68600
leaq 0x4(%rbx), %rdi
movl 0x2e8(%rbx), %ecx
movss 0x15dec(%rip), %xmm0    # 0x52f28
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rsi
xorl %edx, %edx
callq *0x28(%rax)
movss 0x4(%r14), %xmm0
movss 0x172a8(%rip), %xmm1    # 0x54400
addss %xmm0, %xmm1
movss %xmm1, 0x250(%rbx)
movq 0x2b99d(%rip), %r15     # 0x68b08
movl 0x8c(%r15), %eax
cmpl $0x2, %eax
jl 0x3d2c6
movq 0x2b3d6(%rip), %rcx     # 0x68558
movl $0x760, %r12d           # imm = 0x760
addq (%rcx), %r12
movl $0x1, %ebp
movl $0x7fff, %r13d          # imm = 0x7FFF
cmpl $0x0, -0x258(%r12)
je 0x3d2af
cmpq $0x0, -0x260(%r12)
je 0x3d2af
cmpq $0x0, (%r12)
je 0x3d2af
movq $0x0, (%r12)
callq 0x19a10
andl %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0x160aa(%rip), %xmm1    # 0x53288
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x18a2a(%rip), %xmm1    # 0x55c18
addsd %xmm1, %xmm0
addsd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0xf8(%r12), %xmm1
movsd 0x1bf35(%rip), %xmm2    # 0x59140
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xf8(%r12)
callq 0x19a10
andl %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x16050(%rip), %xmm0    # 0x53288
cvtss2sd %xmm0, %xmm0
addsd 0x189d4(%rip), %xmm0    # 0x55c18
addsd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0xf4(%r12), %xmm1
mulsd 0x1bee3(%rip), %xmm0    # 0x59140
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xf4(%r12)
xorps %xmm0, %xmm0
cvtss2sd 0x190(%rbx), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl -0xe0(%r12), %xmm1
movsd 0x1a0b1(%rip), %xmm2    # 0x57340
divsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
movss %xmm0, -0xf0(%r12)
movl 0x8c(%r15), %eax
incl %ebp
addq $0x4a8, %r12            # imm = 0x4A8
cmpl %eax, %ebp
jl 0x3d196
movss 0x4(%r14), %xmm0
movss 0x144(%rbx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x3d2e3
addss 0x15fb5(%rip), %xmm0    # 0x53290
movss %xmm0, 0x200(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: target_earthquake_use
void target_earthquake_use (edict_t *self, edict_t *other, edict_t *activator)
{
	self->timestamp = level.time + self->count;
	self->nextthink = level.time + FRAMETIME;
	self->activator = activator;
	self->last_move_time = 0;
}

// Assembly:
movq 0x2baa7(%rip), %rax     # 0x68da0
cvtsi2ssl 0x290(%rdi), %xmm0
movss 0x4(%rax), %xmm1
addss %xmm1, %xmm0
addss 0x15f7e(%rip), %xmm1    # 0x53290
movss %xmm0, 0x144(%rdi)
movss %xmm1, 0x200(%rdi)
movq %rdx, 0x2b0(%rdi)
movl $0x0, 0x250(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: SP_target_earthquake
void SP_target_earthquake (edict_t *self)
{
	if (!self->targetname)
		gi.dprintf("untargeted %s at %s\n", self->classname, vtos(self->s.origin));

	if (!self->count)
		self->count = 5;

	if (!self->speed)
		self->speed = 200;

	self->svflags |= SVF_NOCLIENT;
	self->think = target_earthquake_think;
	self->use = target_earthquake_use;

	self->noise_index = gi.soundindex ("world/quake.wav");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x158(%rdi)
jne 0x3d373
movq 0x2b2b3(%rip), %rax     # 0x68600
movq 0x8(%rax), %r15
movq 0x138(%rbx), %r14
leaq 0x4(%rbx), %rdi
callq 0x190a0
leaq 0x1bf44(%rip), %rdi     # 0x592ac
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%r15
cmpl $0x0, 0x290(%rbx)
jne 0x3d386
movl $0x5, 0x290(%rbx)
movss 0x190(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3d3a2
jp 0x3d3a2
movl $0x43480000, 0x190(%rbx) # imm = 0x43480000
orb $0x1, 0xc8(%rbx)
movq 0x2b138(%rip), %rax     # 0x684e8
movq %rax, 0x210(%rbx)
movq 0x2b512(%rip), %rax     # 0x688d0
movq %rax, 0x228(%rbx)
movq 0x2b234(%rip), %rax     # 0x68600
leaq 0x1beee(%rip), %rdi     # 0x592c1
callq *0x48(%rax)
movl %eax, 0x2e8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: InitTrigger
void InitTrigger (edict_t *self)
{
	if (!VectorCompare (self->s.angles, vec3_origin))
		G_SetMovedir (self->s.angles, self->movedir);

	self->solid = SOLID_TRIGGER;
	self->movetype = MOVETYPE_NONE;
	gi.setmodel (self, self->model);
	self->svflags = SVF_NOCLIENT;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq 0x2b372(%rip), %rsi     # 0x68768
movq %r14, %rdi
callq 0x18b70
testl %eax, %eax
jne 0x3d411
leaq 0x19c(%rbx), %rsi
movq %r14, %rdi
callq 0x19630
movl $0x1, %ebp
movl %ebp, 0x108(%rbx)
movl $0x0, 0x118(%rbx)
movq 0x2b1d3(%rip), %rax     # 0x68600
movq 0x120(%rbx), %rsi
movq %rbx, %rdi
callq *0x58(%rax)
movl %ebp, 0xc8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: multi_trigger
void multi_trigger (edict_t *ent)
{
	if (ent->nextthink)
		return;		// already been triggered

	G_UseTargets (ent, ent->activator);

	if (ent->wait > 0)	
	{
		ent->think = multi_wait;
		ent->nextthink = level.time + ent->wait;
	}
	else
	{	// we can't just remove (self) here, because this is a touch function
		// called while looping through area links...
		ent->touch = NULL;
		ent->nextthink = level.time + FRAMETIME;
		ent->think = G_FreeEdict;
	}
}

// Assembly:
movss 0x200(%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3d462
jnp 0x3d463
retq
pushq %rbx
movq %rdi, %rbx
movq 0x2b0(%rdi), %rsi
callq 0x198e0
movss 0x2f8(%rbx), %xmm0
ucomiss 0x1650e(%rip), %xmm0    # 0x53990
jbe 0x3d4a8
movq 0x2b9cd(%rip), %rax     # 0x68e58
movq %rax, 0x210(%rbx)
movq 0x2b907(%rip), %rax     # 0x68da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
jmp 0x3d4dd
movq $0x0, 0x220(%rbx)
movq 0x2b8e6(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x15dc9(%rip), %xmm0    # 0x53290
movss %xmm0, 0x200(%rbx)
movq 0x2af5a(%rip), %rax     # 0x68430
movq %rax, 0x210(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: Touch_Multi
void Touch_Multi (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	if(other->client)
	{
		if (self->spawnflags & 2)
			return;
	}
	else if (other->svflags & SVF_MONSTER)
	{
		if (!(self->spawnflags & 1))
			return;
	}
	else
		return;

	if (!VectorCompare(self->movedir, vec3_origin))
	{
		vec3_t	forward;

		AngleVectors(other->s.angles, forward, NULL, NULL);
		if (_DotProduct(forward, self->movedir) < 0)
			return;
	}

	self->activator = other;
	multi_trigger (self);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x58(%rsi)
je 0x3d50e
testb $0x2, 0x140(%rbx)
je 0x3d521
jmp 0x3d572
testb $0x4, 0xc8(%r14)
je 0x3d572
testb $0x1, 0x140(%rbx)
je 0x3d572
leaq 0x19c(%rbx), %r15
movq 0x2b239(%rip), %rsi     # 0x68768
movq %r15, %rdi
callq 0x18b70
testl %eax, %eax
jne 0x3d563
leaq 0x10(%r14), %rdi
leaq 0xc(%rsp), %r12
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x18650
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x3d572
movq %r14, 0x2b0(%rbx)
movq %rbx, %rdi
callq 0x19390
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_multiple
void SP_trigger_multiple (edict_t *ent)
{
	if (ent->sounds == 1)
		ent->noise_index = gi.soundindex ("misc/secret.wav");
	else if (ent->sounds == 2)
		ent->noise_index = gi.soundindex ("misc/talk.wav");
	else if (ent->sounds == 3)
		ent->noise_index = gi.soundindex ("misc/trigger1.wav");
	
	if (!ent->wait)
		ent->wait = 0.2f;
	ent->touch = Touch_Multi;
	ent->movetype = MOVETYPE_NONE;
	ent->svflags |= SVF_NOCLIENT;


	if (ent->spawnflags & 4)
	{
		ent->solid = SOLID_NOT;
		ent->use = trigger_enable;
	}
	else
	{
		ent->solid = SOLID_TRIGGER;
		ent->use = Use_Multi;
	}

	if (!VectorCompare(ent->s.angles, vec3_origin))
		G_SetMovedir (ent->s.angles, ent->movedir);

	gi.setmodel (ent, ent->model);
	gi.linkentity (ent);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x28c(%rdi), %eax
decl %eax
cmpl $0x2, %eax
ja 0x3d5d7
movl %eax, %eax
leaq 0x1be58(%rip), %rcx     # 0x59418
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
movq 0x2b032(%rip), %rax     # 0x68600
callq *0x48(%rax)
movl %eax, 0x2e8(%rbx)
movss 0x2f8(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3d5f3
jp 0x3d5f3
movl $0x3e4ccccd, 0x2f8(%rbx) # imm = 0x3E4CCCCD
movq 0x2b886(%rip), %rax     # 0x68e80
movq %rax, 0x220(%rbx)
movl $0x0, 0x118(%rbx)
orb $0x1, 0xc8(%rbx)
movl 0x140(%rbx), %ecx
andl $0x4, %ecx
movl %ecx, %eax
shrl $0x2, %eax
xorl $0x1, %eax
testl %ecx, %ecx
jne 0x3d630
movq 0x2b6ba(%rip), %rcx     # 0x68ce8
jmp 0x3d637
movq 0x2b531(%rip), %rcx     # 0x68b68
movl %eax, 0x108(%rbx)
movq %rcx, 0x228(%rbx)
leaq 0x10(%rbx), %r14
movq 0x2b119(%rip), %rsi     # 0x68768
movq %r14, %rdi
callq 0x18b70
testl %eax, %eax
jne 0x3d66a
leaq 0x19c(%rbx), %rsi
movq %r14, %rdi
callq 0x19630
movq 0x2af8f(%rip), %r14     # 0x68600
movq 0x120(%rbx), %rsi
movq %rbx, %rdi
callq *0x58(%r14)
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_once
void SP_trigger_once(edict_t *ent)
{
	// make old maps work because I messed up on flag assignments here
	// triggered was on bit 1 when it should have been on bit 4
	if (ent->spawnflags & 1)
	{
		vec3_t	v;

		VectorMA (ent->mins, 0.5, ent->size, v);
		ent->spawnflags &= ~1;
		ent->spawnflags |= 4;
		gi.dprintf("fixed TRIGGERED flag on %s at %s\n", ent->classname, vtos(v));
	}

	ent->wait = -1;
	SP_trigger_multiple (ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testb $0x1, 0x140(%rdi)
je 0x3d70a
leaq 0xcc(%rbx), %rdi
leaq 0xfc(%rbx), %rsi
movss 0x16d41(%rip), %xmm0    # 0x54400
leaq 0xc(%rsp), %r14
movq %r14, %rdx
callq 0x19760
movl 0x140(%rbx), %eax
andl $-0x6, %eax
orl $0x4, %eax
movl %eax, 0x140(%rbx)
movq 0x2af1b(%rip), %rax     # 0x68600
movq 0x8(%rax), %r12
movq 0x138(%rbx), %r15
movq %r14, %rdi
callq 0x190a0
leaq 0x1bbef(%rip), %rdi     # 0x592ee
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%r12
movl $0xbf800000, 0x2f8(%rbx) # imm = 0xBF800000
movq %rbx, %rdi
callq 0x18f80
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_key
void SP_trigger_key (edict_t *self)
{
	if (!st.item)
	{
		gi.dprintf("no key item for trigger_key at %s\n", vtos(self->s.origin));
		return;
	}
	self->item = FindItemByClassname (st.item);

	if (!self->item)
	{
		gi.dprintf("item %s not found for trigger_key at %s\n", st.item, vtos(self->s.origin));
		return;
	}

	if (!self->target)
	{
		gi.dprintf("%s at %s has no target\n", self->classname, vtos(self->s.origin));
		return;
	}

	gi.soundindex ("misc/keytry.wav");
	gi.soundindex ("misc/keyuse.wav");

	self->use = trigger_key_use;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2acc6(%rip), %r14     # 0x68668
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x3d9fb
callq 0x18170
movq %rax, 0x330(%rbx)
testq %rax, %rax
je 0x3da28
cmpq $0x0, 0x150(%rbx)
je 0x3da4c
movq 0x2ac2f(%rip), %r14     # 0x68600
leaq 0x1b948(%rip), %rdi     # 0x59320
callq *0x48(%r14)
leaq 0x1b94d(%rip), %rdi     # 0x59330
callq *0x48(%r14)
movq 0x2b4ea(%rip), %rax     # 0x68ed8
movq %rax, 0x228(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq 0x2abfe(%rip), %rax     # 0x68600
movq 0x8(%rax), %r14
addq $0x4, %rbx
movq %rbx, %rdi
callq 0x190a0
leaq 0x1b927(%rip), %rdi     # 0x59340
movq %rax, %rsi
xorl %eax, %eax
movq %r14, %rcx
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
movq 0x2abd1(%rip), %rax     # 0x68600
movq 0x8(%rax), %r15
movq 0x40(%r14), %r14
addq $0x4, %rbx
movq %rbx, %rdi
callq 0x190a0
leaq 0x1b919(%rip), %rdi     # 0x59363
jmp 0x3da71
movq 0x2abad(%rip), %rax     # 0x68600
movq 0x8(%rax), %r15
movq 0x138(%rbx), %r14
addq $0x4, %rbx
movq %rbx, %rdi
callq 0x190a0
leaq 0x1b91b(%rip), %rdi     # 0x5938c
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
movq %r15, %rcx
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: trigger_counter_use
void trigger_counter_use(edict_t *self, edict_t *other, edict_t *activator)
{
	if (self->count == 0)
		return;
	
	self->count--;

	if (self->count)
	{
		if (! (self->spawnflags & 1))
		{
			gi.centerprintf(activator, "%i more to go...", self->count);
			gi.sound (activator, CHAN_AUTO, gi.soundindex ("misc/talk1.wav"), 1, ATTN_NORM, 0);
		}
		return;
	}
	
	if (! (self->spawnflags & 1))
	{
		gi.centerprintf(activator, "Sequence completed!");
		gi.sound (activator, CHAN_AUTO, gi.soundindex ("misc/talk1.wav"), 1, ATTN_NORM, 0);
	}
	self->activator = activator;
	multi_trigger (self);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x290(%rdi), %edx
testl %edx, %edx
je 0x3dafa
movq %rdi, %r14
decl %edx
movl %edx, 0x290(%rdi)
movl 0x140(%rdi), %eax
je 0x3db06
testb $0x1, %al
jne 0x3dafa
movq 0x2ab4a(%rip), %r14     # 0x68600
leaq 0x1b8e7(%rip), %rsi     # 0x593a4
movq %rbx, %rdi
xorl %eax, %eax
callq *0x18(%r14)
movq 0x20(%r14), %r15
leaq 0x182be(%rip), %rdi     # 0x55d8f
callq *0x48(%r14)
movss 0x1544b(%rip), %xmm0    # 0x52f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testb $0x1, %al
jne 0x3db48
movq 0x2aaef(%rip), %r15     # 0x68600
leaq 0x1b89d(%rip), %rsi     # 0x593b5
movq %rbx, %rdi
xorl %eax, %eax
callq *0x18(%r15)
movq 0x20(%r15), %r12
leaq 0x18263(%rip), %rdi     # 0x55d8f
callq *0x48(%r15)
movss 0x153f0(%rip), %xmm0    # 0x52f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r12
movq %rbx, 0x2b0(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x19390
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_counter
void SP_trigger_counter (edict_t *self)
{
	self->wait = -1;
	if (!self->count)
		self->count = 2;

	self->use = trigger_counter_use;
}

// Assembly:
movl $0xbf800000, 0x2f8(%rdi) # imm = 0xBF800000
cmpl $0x0, 0x290(%rdi)
jne 0x3db7f
movl $0x2, 0x290(%rdi)
movq 0x2ae0a(%rip), %rax     # 0x68990
movq %rax, 0x228(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: trigger_push_touch
void trigger_push_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	if (strcmp(other->classname, "grenade") == 0)
	{
		VectorScale (self->movedir, self->speed * 10, other->velocity);
	}
	else if (other->health > 0)
	{
		VectorScale (self->movedir, self->speed * 10, other->velocity);

		if (other->client)
		{
			// don't take falling damage immediately from this
			VectorCopy (other->velocity, other->client->oldvelocity);
			if (other->fly_sound_debounce_time < level.time)
			{
				other->fly_sound_debounce_time = level.time + 1.5;
				gi.sound (other, CHAN_AUTO, windsound, 1, ATTN_NORM, 0);
			}
		}
	}
	if (self->spawnflags & PUSH_ONCE)
		G_FreeEdict (self);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x138(%rsi), %rdi
leaq 0x1c3d8(%rip), %rsi     # 0x59fa1
callq 0x18b20
testl %eax, %eax
je 0x3dc93
cmpl $0x0, 0x254(%r14)
jle 0x3dcb9
leaq 0x19c(%rbx), %rdi
movss 0x190(%rbx), %xmm0
mulss 0x15319(%rip), %xmm0    # 0x52f14
leaq 0x1c0(%r14), %rsi
callq 0x189d0
movq 0x58(%r14), %rax
testq %rax, %rax
je 0x3dcb9
movss 0x1c0(%r14), %xmm0
movss %xmm0, 0xed8(%rax)
movss 0x1c4(%r14), %xmm0
movss %xmm0, 0xedc(%rax)
movss 0x1c8(%r14), %xmm0
movss %xmm0, 0xee0(%rax)
movq 0x2b152(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
ucomiss 0x24c(%r14), %xmm0
jbe 0x3dcb9
addss 0x15fd3(%rip), %xmm0    # 0x53c38
movss %xmm0, 0x24c(%r14)
movq 0x2a98b(%rip), %rax     # 0x68600
movl 0x53155(%rip), %edx     # 0x90dd0
movss 0x152a5(%rip), %xmm0    # 0x52f28
xorps %xmm2, %xmm2
movq %r14, %rdi
xorl %esi, %esi
movaps %xmm0, %xmm1
callq *0x20(%rax)
jmp 0x3dcb9
leaq 0x19c(%rbx), %rdi
movss 0x190(%rbx), %xmm0
mulss 0x1526a(%rip), %xmm0    # 0x52f14
addq $0x1c0, %r14            # imm = 0x1C0
movq %r14, %rsi
callq 0x189d0
testb $0x1, 0x140(%rbx)
jne 0x3dcca
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_push
void SP_trigger_push (edict_t *self)
{
	InitTrigger (self);
	windsound = gi.soundindex ("misc/windfly.wav");
	self->touch = trigger_push_touch;
	if (!self->speed)
		self->speed = 1000;
	gi.linkentity (self);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x184f0
movq 0x2a914(%rip), %rax     # 0x68600
leaq 0x1b6d6(%rip), %rdi     # 0x593c9
movq %rax, %r14
callq *0x48(%rax)
movl %eax, 0x530d1(%rip)     # 0x90dd0
movq 0x2b23a(%rip), %rax     # 0x68f40
movq %rax, 0x220(%rbx)
movss 0x190(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3dd29
jp 0x3dd29
movl $0x447a0000, 0x190(%rbx) # imm = 0x447A0000
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: hurt_use
void hurt_use (edict_t *self, edict_t *other, edict_t *activator)
{
	if (self->solid == SOLID_NOT)
		self->solid = SOLID_TRIGGER;
	else
		self->solid = SOLID_NOT;
	gi.linkentity (self);

	if (!(self->spawnflags & 2))
		self->use = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
cmpl $0x0, 0x108(%rdi)
sete %al
movl %eax, 0x108(%rdi)
movq 0x2a8a7(%rip), %rax     # 0x68600
callq *0x90(%rax)
testb $0x2, 0x140(%rbx)
jne 0x3dd73
movq $0x0, 0x228(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: hurt_touch
void hurt_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	int		dflags;

	if (!other->takedamage)
		return;

	if (self->timestamp > level.time)
		return;

	if (self->spawnflags & 16)
		self->timestamp = level.time + 1;
	else
		self->timestamp = level.time + FRAMETIME;

	if (!(self->spawnflags & 4))
	{
		if ((level.framenum % 10) == 0)
			gi.sound (other, CHAN_AUTO, self->noise_index, 1, ATTN_NORM, 0);
	}

	if (self->spawnflags & 8)
		dflags = DAMAGE_NO_PROTECTION;
	else
		dflags = 0;
	T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, self->dmg, self->dmg, dflags, MOD_TRIGGER_HURT);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x27c(%rsi)
je 0x3dd9e
movq %rdi, %rbx
movss 0x144(%rdi), %xmm1
movq 0x2b00c(%rip), %rcx     # 0x68da0
movss 0x4(%rcx), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x3dda7
addq $0x8, %rsp
jmp 0x3de3f
movq %rsi, %r14
movl 0x140(%rbx), %eax
xorl %edx, %edx
testb $0x10, %al
sete %dl
leaq 0x1b516(%rip), %rsi     # 0x592d4
addss (%rsi,%rdx,4), %xmm0
movss %xmm0, 0x144(%rbx)
testb $0x4, %al
jne 0x3de0b
imull $0xcccccccd, (%rcx), %ecx # imm = 0xCCCCCCCD
movl $0x19999998, %edx       # imm = 0x19999998
addl %edx, %ecx
rorl %ecx
cmpl %edx, %ecx
ja 0x3de0b
movq 0x2a817(%rip), %rax     # 0x68600
movl 0x2e8(%rbx), %edx
movss 0x15131(%rip), %xmm0    # 0x52f28
xorps %xmm2, %xmm2
movq %r14, %rdi
xorl %esi, %esi
movaps %xmm0, %xmm1
callq *0x20(%rax)
movl 0x140(%rbx), %eax
shll $0x2, %eax
andl $0x20, %eax
leaq 0x4(%r14), %r8
movl 0x280(%rbx), %r10d
movq 0x2a945(%rip), %rcx     # 0x68768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x1f
pushq %rax
pushq %r10
pushq %r10
callq 0x190f0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_hurt
void SP_trigger_hurt (edict_t *self)
{
	InitTrigger (self);

	self->noise_index = gi.soundindex ("world/electro.wav");
	self->touch = hurt_touch;

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

	if (self->spawnflags & 1)
		self->solid = SOLID_NOT;
	else
		self->solid = SOLID_TRIGGER;

	if (self->spawnflags & 2)
		self->use = hurt_use;

	gi.linkentity (self);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x184f0
movq 0x2a7aa(%rip), %rax     # 0x68600
leaq 0x1b57d(%rip), %rdi     # 0x593da
movq %rax, %r14
callq *0x48(%rax)
movl %eax, 0x2e8(%rbx)
movq 0x2a7d8(%rip), %rax     # 0x68648
movq %rax, 0x220(%rbx)
cmpl $0x0, 0x280(%rbx)
jne 0x3de8a
movl $0x5, 0x280(%rbx)
movl 0x140(%rbx), %eax
movl %eax, %ecx
notl %ecx
andl $0x1, %ecx
movl %ecx, 0x108(%rbx)
testb $0x2, %al
je 0x3deaf
movq 0x2af78(%rip), %rax     # 0x68e20
movq %rax, 0x228(%rbx)
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_gravity
void SP_trigger_gravity (edict_t *self)
{
	if (st.gravity == 0)
	{
		gi.dprintf("trigger_gravity without gravity set at %s\n", vtos(self->s.origin));
		G_FreeEdict  (self);
		return;
	}

	InitTrigger (self);
	self->gravity = atoi(st.gravity);
	self->touch = trigger_gravity_touch;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2a787(%rip), %r14     # 0x68668
cmpq $0x0, 0x48(%r14)
je 0x3df1b
movq %rbx, %rdi
callq 0x184f0
movq 0x48(%r14), %rdi
callq 0x195e0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x1e0(%rbx)
movq 0x2aca4(%rip), %rax     # 0x68bb0
movq %rax, 0x220(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x2a6de(%rip), %rax     # 0x68600
movq 0x8(%rax), %r14
leaq 0x4(%rbx), %rdi
callq 0x190a0
leaq 0x1b4b6(%rip), %rdi     # 0x593ec
movq %rax, %rsi
xorl %eax, %eax
callq *%r14
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: trigger_monsterjump_touch
void trigger_monsterjump_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	if (other->flags & (FL_FLY | FL_SWIM) )
		return;
	if (other->svflags & SVF_DEADMONSTER)
		return;
	if ( !(other->svflags & SVF_MONSTER))
		return;

// set XY even if not on ground, so the jump will clear lips
	other->velocity[0] = self->movedir[0] * self->speed;
	other->velocity[1] = self->movedir[1] * self->speed;
	
	if (!other->groundentity)
		return;
	
	other->groundentity = NULL;
	other->velocity[2] = self->movedir[2];
}

// Assembly:
testb $0x3, 0x11c(%rsi)
je 0x3df57
retq
movl 0xc8(%rsi), %eax
andl $0x6, %eax
cmpl $0x4, %eax
jne 0x3df56
movss 0x19c(%rdi), %xmm0
mulss 0x190(%rdi), %xmm0
movss %xmm0, 0x1c0(%rsi)
movss 0x1a0(%rdi), %xmm0
mulss 0x190(%rdi), %xmm0
movss %xmm0, 0x1c4(%rsi)
cmpq $0x0, 0x2b8(%rsi)
je 0x3df56
movq $0x0, 0x2b8(%rsi)
movss 0x1a4(%rdi), %xmm0
movss %xmm0, 0x1c8(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_trigger.c
// Function: SP_trigger_monsterjump
void SP_trigger_monsterjump (edict_t *self)
{
	if (!self->speed)
		self->speed = 200;
	if (!st.height)
		st.height = 200;
	if (self->s.angles[YAW] == 0)
		self->s.angles[YAW] = 360;
	InitTrigger (self);
	self->touch = trigger_monsterjump_touch;
	self->movedir[2] = st.height;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss 0x190(%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3dfde
jp 0x3dfde
movl $0x43480000, 0x190(%rbx) # imm = 0x43480000
movq 0x2a683(%rip), %r14     # 0x68668
cmpl $0x0, 0x28(%r14)
jne 0x3dff4
movl $0xc8, 0x28(%r14)
movss 0x14(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jne 0x3e007
jp 0x3e007
movl $0x43b40000, 0x14(%rbx) # imm = 0x43B40000
movq %rbx, %rdi
callq 0x184f0
movq 0x2a6ca(%rip), %rax     # 0x686e0
movq %rax, 0x220(%rbx)
xorps %xmm0, %xmm0
cvtsi2ssl 0x28(%r14), %xmm0
movss %xmm0, 0x1a4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_Find
edict_t *G_Find (edict_t *from, int fieldofs, char *match)
{
	char	*s;

	if (!from)
		from = g_edicts;
	else
		from++;

	for ( ; from < &g_edicts[globals.num_edicts] ; from++)
	{
		if (!from->inuse)
			continue;
		s = *(char **) ((byte *)from + fieldofs);
		if (!s)
			continue;
		if (!Q_stricmp (s, match))
			return from;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
leaq 0x4a8(%rdi), %rbx
testq %rdi, %rdi
movq 0x2a49b(%rip), %r15     # 0x68558
movq (%r15), %rax
cmoveq %rax, %rbx
movq 0x2aa3d(%rip), %r12     # 0x68b08
movslq 0x8c(%r12), %rcx
imulq $0x4a8, %rcx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jae 0x3e124
movslq %esi, %r13
cmpl $0x0, 0x60(%rbx)
je 0x3e10b
movq (%rbx,%r13), %rdi
testq %rdi, %rdi
je 0x3e10b
movq %r14, %rsi
callq 0x18690
testl %eax, %eax
je 0x3e126
movq (%r15), %rax
movl 0x8c(%r12), %ecx
addq $0x4a8, %rbx            # imm = 0x4A8
movslq %ecx, %rdx
imulq $0x4a8, %rdx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jb 0x3e0e5
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: findradius
edict_t *findradius (edict_t *from, vec3_t org, float rad)
{
	vec3_t	eorg;
	int		j;

	if (!from)
		from = g_edicts;
	else
		from++;
	for ( ; from < &g_edicts[globals.num_edicts]; from++)
	{
		if (!from->inuse)
			continue;
		if (from->solid == SOLID_NOT)
			continue;
		for (j=0 ; j<3 ; j++)
			eorg[j] = org[j] - (from->s.origin[j] + (from->mins[j] + from->maxs[j])*0.5f);
		if (VectorLength(eorg) > rad)
			continue;
		return from;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movss %xmm0, (%rsp)
leaq 0x4a8(%rdi), %rbx
testq %rdi, %rdi
movq 0x2a402(%rip), %r12     # 0x68558
movq (%r12), %rax
cmoveq %rax, %rbx
movq 0x2a9a3(%rip), %r13     # 0x68b08
movslq 0x8c(%r13), %rcx
imulq $0x4a8, %rcx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jae 0x3e20f
movq %rsi, %r14
movss 0x16276(%rip), %xmm2    # 0x54400
leaq 0x4(%rsp), %r15
cmpl $0x0, 0x60(%rbx)
je 0x3e1f6
cmpl $0x0, 0x108(%rbx)
je 0x3e1f6
xorl %eax, %eax
movss 0xcc(%rbx,%rax,4), %xmm0
addss 0xd8(%rbx,%rax,4), %xmm0
movss (%r14,%rax,4), %xmm1
mulss %xmm2, %xmm0
addss 0x4(%rbx,%rax,4), %xmm0
subss %xmm0, %xmm1
movss %xmm1, 0x4(%rsp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x3e1a0
movq %r15, %rdi
callq 0x192e0
ucomiss (%rsp), %xmm0
jbe 0x3e211
movq (%r12), %rax
movl 0x8c(%r13), %ecx
movss 0x1620a(%rip), %xmm2    # 0x54400
addq $0x4a8, %rbx            # imm = 0x4A8
movslq %ecx, %rdx
imulq $0x4a8, %rdx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jb 0x3e18f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: findallradius
edict_t *findallradius (edict_t *from, vec3_t org, float rad)
{
	vec3_t	eorg;
	int		j;

	if (!from)
		from = g_edicts;
	else
		from++;
	for ( ; from < &g_edicts[globals.num_edicts]; from++)
	{
		if (!from->inuse)
			continue;
		for (j=0 ; j<3 ; j++)
			eorg[j] = org[j] - (from->s.origin[j] + (from->mins[j] + from->maxs[j])*0.5f);
		if (VectorLength(eorg) > rad)
			continue;
		return from;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movss %xmm0, (%rsp)
leaq 0x4a8(%rdi), %rbx
testq %rdi, %rdi
movq 0x2a313(%rip), %r12     # 0x68558
movq (%r12), %rax
cmoveq %rax, %rbx
movq 0x2a8b4(%rip), %r13     # 0x68b08
movslq 0x8c(%r13), %rcx
imulq $0x4a8, %rcx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jae 0x3e2f5
movq %rsi, %r14
movss 0x16187(%rip), %xmm2    # 0x54400
leaq 0x4(%rsp), %r15
cmpl $0x0, 0x60(%rbx)
je 0x3e2dc
xorl %eax, %eax
movss 0xcc(%rbx,%rax,4), %xmm0
addss 0xd8(%rbx,%rax,4), %xmm0
movss (%r14,%rax,4), %xmm1
mulss %xmm2, %xmm0
addss 0x4(%rbx,%rax,4), %xmm0
subss %xmm0, %xmm1
movss %xmm1, 0x4(%rsp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x3e286
movq %r15, %rdi
callq 0x192e0
ucomiss (%rsp), %xmm0
jbe 0x3e2f7
movq (%r12), %rax
movl 0x8c(%r13), %ecx
movss 0x16124(%rip), %xmm2    # 0x54400
addq $0x4a8, %rbx            # imm = 0x4A8
movslq %ecx, %rdx
imulq $0x4a8, %rdx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jb 0x3e27e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_PickTarget
edict_t *G_PickTarget (char *targetname)
{
	edict_t	*ent = NULL;
	int		num_choices = 0;
	edict_t	*choice[MAXCHOICES];

	if (!targetname)
	{
		gi.dprintf("G_PickTarget called with NULL targetname\n");
		return NULL;
	}

	while(1)
	{
		ent = G_Find (ent, FOFS(targetname), targetname);
		if (!ent)
			break;
		choice[num_choices++] = ent;
		if (num_choices == MAXCHOICES)
			break;
	}

	if (!num_choices)
	{
		gi.dprintf("G_PickTarget: target %s not found\n", targetname);
		return NULL;
	}

	return choice[rand() % num_choices];
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
je 0x3e352
movq %rdi, %rbx
xorl %edi, %edi
movl $0x158, %esi            # imm = 0x158
movq %rbx, %rdx
callq 0x19430
testq %rax, %rax
je 0x3e36a
xorl %r14d, %r14d
movq %rax, (%rsp,%r14,8)
cmpq $0x7, %r14
je 0x3e385
movq %rax, %rdi
movl $0x158, %esi            # imm = 0x158
movq %rbx, %rdx
callq 0x19430
incq %r14
testq %rax, %rax
jne 0x3e32e
jmp 0x3e38b
movq 0x2a2a7(%rip), %rcx     # 0x68600
leaq 0x1b0f0(%rip), %rdi     # 0x59450
xorl %r14d, %r14d
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x3e39b
movq 0x2a28f(%rip), %rcx     # 0x68600
leaq 0x1b102(%rip), %rdi     # 0x5947a
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x3e39b
movl $0x8, %r14d
callq 0x19a10
cltd
idivl %r14d
movslq %edx, %rax
movq (%rsp,%rax,8), %r14
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_FreeEdict
void G_FreeEdict (edict_t *ed)
{
	gi.unlinkentity (ed);		// unlink from world

	// LM_JORM -- REMOVE later
/*	
	if (!strcmp(ed->classname, "flag") ||
		!strcmp(ed->classname, "damage_rune") ||
		!strcmp(ed->classname, "haste_rune") ||
		!strcmp(ed->classname, "resist_rune") ||
		!strcmp(ed->classname, "regen_rune"))
		assert(false);
*/
	// LM_JORM END
	if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE))
	{
//		gi.dprintf("tried to free special edict\n");
		return;
	}

	memset (ed, 0, sizeof(*ed));
	ed->classname = "freed";
	ed->freetime = level.time;
	ed->inuse = false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x29ed3(%rip), %rax     # 0x68600
callq *0x98(%rax)
movq 0x29e1e(%rip), %rax     # 0x68558
movq %rbx, %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
movabsq $-0x20a4f089731d3543, %rax # imm = 0xDF5B0F768CE2CABD
imulq %rcx, %rax
cvtsi2ss %rax, %xmm0
movq 0x29dd2(%rip), %rax     # 0x68530
movq (%rax), %rax
movss 0x20(%rax), %xmm1
addss 0x1478e(%rip), %xmm1    # 0x52efc
ucomiss %xmm0, %xmm1
jae 0x3e7a4
movl $0x4a8, %edx            # imm = 0x4A8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18880
leaq 0x1addc(%rip), %rax     # 0x59565
movq %rax, 0x138(%rbx)
movq 0x2a609(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
movss %xmm0, 0x128(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_Spawn
edict_t *G_Spawn (void)
{
	int			i;
	edict_t		*e;

	e = &g_edicts[(int)maxclients->value+1];
	for ( i=maxclients->value+1 ; i<globals.num_edicts ; i++, e++)
	{
		// the first couple seconds of server time can involve a lot of
		// freeing and allocating, so relax the replacement policy
		if (!e->inuse && ( e->freetime < 2 || level.time - e->freetime > 0.5f ) )
		{
			G_InitEdict (e);
			return e;
		}
	}
	
	if (i == game.maxentities)
		gi.error ("ED_Alloc: no free edicts");
		
	globals.num_edicts++;
	G_InitEdict (e);
	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x29da3(%rip), %r14     # 0x68558
movq 0x29d74(%rip), %rax     # 0x68530
movq (%rax), %rax
movss 0x20(%rax), %xmm0
cvttss2si %xmm0, %eax
cltq
imulq $0x4a8, %rax, %r12      # imm = 0x4A8
addq (%r14), %r12
addss 0x1474c(%rip), %xmm0    # 0x52f28
cvttss2si %xmm0, %edx
movq 0x2a321(%rip), %r15     # 0x68b08
movl 0x8c(%r15), %eax
leaq 0x4a8(%r12), %rbx
movl %eax, %ecx
subl %edx, %ecx
jle 0x3e853
movq 0x2a59d(%rip), %rdx     # 0x68da0
movss 0x4(%rdx), %xmm0
movss 0x14c5c(%rip), %xmm1    # 0x5346c
movss 0x15be8(%rip), %xmm2    # 0x54400
cmpl $0x0, 0x60(%rbx)
jne 0x3e83f
movss 0x128(%rbx), %xmm3
ucomiss %xmm3, %xmm1
ja 0x3e8cd
movaps %xmm0, %xmm4
subss %xmm3, %xmm4
ucomiss %xmm2, %xmm4
ja 0x3e8cd
addq $0x4a8, %rbx            # imm = 0x4A8
decl %ecx
jne 0x3e818
leaq -0x4a8(%rbx), %r12
movl %eax, %edx
movq 0x2a4e6(%rip), %rcx     # 0x68d40
cmpl 0x614(%rcx), %edx
jne 0x3e87c
movq 0x29d97(%rip), %rcx     # 0x68600
leaq 0x1acdc(%rip), %rdi     # 0x5954c
xorl %eax, %eax
callq *0x38(%rcx)
movl 0x8c(%r15), %eax
incl %eax
movl %eax, 0x8c(%r15)
movl $0x1, 0x508(%r12)
leaq 0x1acac(%rip), %rax     # 0x59544
movq %rax, 0x5e0(%r12)
movl $0x3f800000, 0x688(%r12) # imm = 0x3F800000
movq %rbx, %rax
subq (%r14), %rax
shrq $0x3, %rax
imull $0x8ce2cabd, %eax, %eax # imm = 0x8CE2CABD
movl %eax, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq -0x4a8(%rbx), %r12
jmp 0x3e885
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: vtos
char	*vtos (vec3_t v)
{
	static	int		index;
	static	char	str[8][32];
	char	*s;

	// use an array so that multiple vtos won't collide
	s = str[index];
	index = (index + 1)&7;

	Com_sprintf (s, 32, "(%i %i %i)", (int)v[0], (int)v[1], (int)v[2]);

	return s;
}

// Assembly:
pushq %rbx
movl 0x52534(%rip), %eax     # 0x90e40
leal 0x1(%rax), %ecx
shlq $0x5, %rax
andl $0x7, %ecx
movl %ecx, 0x52524(%rip)     # 0x90e40
cvttss2si (%rdi), %ecx
leaq 0x52529(%rip), %rbx     # 0x90e50
cvttss2si 0x4(%rdi), %r8d
addq %rax, %rbx
cvttss2si 0x8(%rdi), %r9d
leaq 0x1abfc(%rip), %rdx     # 0x59539
movq %rbx, %rdi
movl $0x20, %esi
xorl %eax, %eax
callq 0x18e10
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_SetMovedir
void G_SetMovedir (vec3_t angles, vec3_t movedir)
{
	if (VectorCompare (angles, VEC_UP))
	{
		VectorCopy (MOVEDIR_UP, movedir);
	}
	else if (VectorCompare (angles, VEC_DOWN))
	{
		VectorCopy (MOVEDIR_DOWN, movedir);
	}
	else
	{
		AngleVectors (angles, movedir, NULL, NULL);
	}

	VectorClear (angles);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2a26e(%rip), %rsi     # 0x68bd0
callq 0x18b70
testl %eax, %eax
je 0x3e974
movq 0x29bc6(%rip), %rax     # 0x68538
jmp 0x3e98e
movq 0x2a5f5(%rip), %rsi     # 0x68f70
movq %rbx, %rdi
callq 0x18b70
testl %eax, %eax
je 0x3e9c3
movq 0x29a52(%rip), %rax     # 0x683e0
movss (%rax), %xmm0
movss %xmm0, (%r14)
movss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%r14)
movss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%r14)
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183a0
jmp 0x3e9ad
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: vectoyaw
float vectoyaw (vec3_t vec)
{
	float	yaw;
	
	if (/*vec[YAW] == 0 &&*/ vec[PITCH] == 0) 
	{
		yaw = 0;
		if (vec[YAW] > 0)
			yaw = 90;
		else if (vec[YAW] < 0)
			yaw = -90;
	} 
	else
	{
		yaw = (int) (atan2(vec[YAW], vec[PITCH]) * 180 / M_PI);
		if (yaw < 0)
			yaw += 360;
	}

	return yaw;
}

// Assembly:
pushq %rax
movss (%rdi), %xmm2
movss 0x4(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm2
jne 0x3e9f7
jp 0x3e9f7
ucomiss %xmm0, %xmm1
jbe 0x3ea33
movss 0x1aa2f(%rip), %xmm0    # 0x59424
jmp 0x3ea40
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
callq 0x190b0
mulsd 0x1aa1e(%rip), %xmm0    # 0x59430
divsd 0x1aa1e(%rip), %xmm0    # 0x59438
cvttsd2si %xmm0, %eax
cvttpd2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
testl %eax, %eax
jns 0x3ea40
addss 0x15333(%rip), %xmm0    # 0x53d64
jmp 0x3ea40
ucomiss %xmm1, %xmm0
jbe 0x3ea40
movss 0x1a9e8(%rip), %xmm0    # 0x59428
popq %rax
retq