LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: func_timer_use
void func_timer_use (edict_t *self, edict_t *other, edict_t *activator)
{
	self->activator = activator;

	// if on, turn it off
	if (self->nextthink)
	{
		self->nextthink = 0;
		return;
	}

	// turn it on
	if (self->delay)
		self->nextthink = level.time + self->delay;
	else
		func_timer_think (self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2b0(%rax)
movq -0x8(%rbp), %rax
movss 0x200(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x38a3b
jp 0x38a3b
jmp 0x38a4c
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x200(%rax)
jmp 0x38a93
movq -0x8(%rbp), %rax
movss 0x2fc(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x38a64
jp 0x38a64
jmp 0x38a8a
movq 0x4a335(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
addss 0x2fc(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
jmp 0x38a93
movq -0x8(%rbp), %rdi
callq 0x19d30
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_timer
void SP_func_timer (edict_t *self)
{
	if (!self->wait)
		self->wait = 1.0;

	self->use = func_timer_use;
	self->think = func_timer_think;

	if (self->random >= self->wait)
	{
		self->random = self->wait - FRAMETIME;
		gi.dprintf("func_timer at %s has random >= wait\n", vtos(self->s.origin));
	}

	if (self->spawnflags & 1)
	{
		self->nextthink = level.time + 1.0 + st.pausetime + self->delay + self->wait + crandom() * self->random;
		self->activator = self;
	}

	self->svflags = SVF_NOCLIENT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movss 0x2f8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x38ad6
jp 0x38ad6
movq -0x8(%rbp), %rax
movss 0x3741e(%rip), %xmm0    # 0x6feec
movss %xmm0, 0x2f8(%rax)
movq -0x8(%rbp), %rax
movq 0x49aff(%rip), %rcx     # 0x825e0
movq %rcx, 0x228(%rax)
movq -0x8(%rbp), %rax
movq 0x49d25(%rip), %rcx     # 0x82818
movq %rcx, 0x210(%rax)
movq -0x8(%rbp), %rax
movss 0x300(%rax), %xmm0
movq -0x8(%rbp), %rax
ucomiss 0x2f8(%rax), %xmm0
jb 0x38b65
movq -0x8(%rbp), %rax
movss 0x2f8(%rax), %xmm0
movss 0x3776d(%rip), %xmm1    # 0x70294
subss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x300(%rax)
movq 0x49ac2(%rip), %rax     # 0x82600
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
callq 0x19260
movq -0x10(%rbp), %rcx
movq %rax, %rsi
leaq 0x3a2ce(%rip), %rdi     # 0x72e2f
movb $0x0, %al
callq *%rcx
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x38c4a
movq 0x4a21e(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x373ad(%rip), %xmm1    # 0x6ff40
addsd %xmm1, %xmm0
movq 0x49aca(%rip), %rax     # 0x82668
movss 0x38(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss 0x2fc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss 0x2f8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x19c80
movsd -0x18(%rbp), %xmm1
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x37695(%rip), %xmm2    # 0x70288
divss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm2
movsd 0x38825(%rip), %xmm0    # 0x71428
subsd %xmm0, %xmm2
movsd 0x39f89(%rip), %xmm0    # 0x72b98
mulsd %xmm2, %xmm0
movq -0x8(%rbp), %rax
movss 0x300(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2b0(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0xc8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: func_conveyor_use
void func_conveyor_use (edict_t *self, edict_t *other, edict_t *activator)
{
	if (self->spawnflags & 1)
	{
		self->speed = 0;
		self->spawnflags &= ~1;
	}
	else
	{
		self->speed = self->count;
		self->spawnflags |= 1;
	}

	if (!(self->spawnflags & 2))
		self->count = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x38ca6
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x190(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x140(%rax)
jmp 0x38cd1
movq -0x8(%rbp), %rax
cvtsi2ssl 0x290(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x190(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x140(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x38cf1
movq -0x8(%rbp), %rax
movl $0x0, 0x290(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_conveyor
void SP_func_conveyor (edict_t *self)
{
	if (!self->speed)
		self->speed = 100;

	if (!(self->spawnflags & 1))
	{
		self->count = self->speed;
		self->speed = 0;
	}

	self->use = func_conveyor_use;

	gi.setmodel (self, self->model);
	self->solid = SOLID_BSP;
	gi.linkentity (self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movss 0x190(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x38d36
jp 0x38d36
movq -0x8(%rbp), %rax
movss 0x39e52(%rip), %xmm0    # 0x72b80
movss %xmm0, 0x190(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x38d6d
movq -0x8(%rbp), %rax
cvttss2si 0x190(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x290(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x190(%rax)
movq -0x8(%rbp), %rax
movq 0x49d70(%rip), %rcx     # 0x82ae8
movq %rcx, 0x228(%rax)
movq 0x4987a(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x120(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x3, 0x108(%rax)
movq 0x49850(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_secret_use
void door_secret_use (edict_t *self, edict_t *other, edict_t *activator)
{
	// make sure we're not already moving
	if (!VectorCompare(self->s.origin, vec3_origin))
		return;

	Move_Calc (self, self->pos1, door_secret_move1);
	door_use_areaportals (self, true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
movq 0x49975(%rip), %rsi     # 0x82768
callq 0x18c60
cmpl $0x0, %eax
jne 0x38dff
jmp 0x38e28
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1a8, %rsi            # imm = 0x1A8
movq 0x49d83(%rip), %rdx     # 0x82b98
callq 0x18ff0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x18250
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_secret_move3
void door_secret_move3 (edict_t *self)
{
	if (self->wait == -1)
		return;
	self->nextthink = level.time + self->wait;
	self->think = door_secret_move4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movss 0x2f8(%rax), %xmm0
movss 0x39cbc(%rip), %xmm1    # 0x72b88
ucomiss %xmm1, %xmm0
jne 0x38ed5
jp 0x38ed5
jmp 0x38f0b
movq 0x49ec4(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
addss 0x2f8(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x49f04(%rip), %rcx     # 0x82e08
movq %rcx, 0x210(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_secret_done
void door_secret_done (edict_t *self)
{
	if (!(self->targetname) || (self->spawnflags & SECRET_ALWAYS_SHOOT))
	{
		self->health = 0;
		self->takedamage = DAMAGE_YES;
	}
	door_use_areaportals (self, false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x38fec
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x39008
movq -0x8(%rbp), %rax
movl $0x0, 0x254(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x27c(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x18250
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: FindItemByClassname
gitem_t	*FindItemByClassname (char *classname)
{
	int		i;
	gitem_t	*it;

	it = itemlist;
	for (i=0 ; i<game.num_items ; i++, it++)
	{
		if (!it->classname)
			continue;
		if (!Q_stricmp(it->classname, classname))
			return it;
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x4973d(%rip), %rax     # 0x82e40
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x49628(%rip), %rcx     # 0x82d40
cmpl 0x61c(%rcx), %eax
jge 0x39766
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x3972c
jmp 0x3974d
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x186f0
cmpl $0x0, %eax
jne 0x3974b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3976e
jmp 0x3974d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x20(%rbp)
jmp 0x3970e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: FindItem
gitem_t	*FindItem (char *pickup_name)
{
	int		i;
	gitem_t	*it;

	it = itemlist;
	for (i=0 ; i<game.num_items ; i++, it++)
	{
		if (!it->pickup_name)
			continue;
		if (!Q_stricmp(it->pickup_name, pickup_name))
			return it;
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x496ad(%rip), %rax     # 0x82e40
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x49598(%rip), %rcx     # 0x82d40
cmpl 0x61c(%rcx), %eax
jge 0x397f8
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x397bd
jmp 0x397df
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x186f0
cmpl $0x0, %eax
jne 0x397dd
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x39800
jmp 0x397df
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x20(%rbp)
jmp 0x3979e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: DoRespawn
void DoRespawn(edict_t* ent)
{
	if (!ent)
		return;

	if (ent->team)
	{
		edict_t* master;
		unsigned count;
		unsigned choice;

		master = ent->teammaster;
		if (master == NULL)
			return;

		count = 0;
		for (ent = master; ent; ent = ent->chain)
			count++;

		choice = count ? (rand() % count) : 0;

		count = 0;
		for (ent = master; count < choice; ent = ent->chain)
			count++;
	}

	if (ent)
	{
		ent->svflags &= ~SVF_NOCLIENT;
		ent->solid = SOLID_TRIGGER;
		gi.linkentity(ent);

		// send an effect
		ent->s.event = EV_ITEM_RESPAWN;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x39828
jmp 0x39921
movq -0x8(%rbp), %rax
cmpq $0x0, 0x168(%rax)
je 0x398da
movq -0x8(%rbp), %rax
movq 0x2d0(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x39855
jmp 0x39921
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x39885
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x298(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x39864
cmpl $0x0, -0x14(%rbp)
je 0x3989a
callq 0x19c80
xorl %edx, %edx
divl -0x14(%rbp)
movl %edx, -0x1c(%rbp)
jmp 0x398a1
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x398a1
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x398d8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x298(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x398b6
jmp 0x398da
cmpq $0x0, -0x8(%rbp)
je 0x39921
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0xc8(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x108(%rax)
movq 0x48cf7(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x1, 0x50(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SetRespawn
void SetRespawn (edict_t *ent, float delay)
{
	ent->flags |= FL_RESPAWN;
	ent->svflags |= SVF_NOCLIENT;
	ent->solid = SOLID_NOT;
	ent->nextthink = level.time + delay;
	ent->think = DoRespawn;
	gi.linkentity (ent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x11c(%rax)
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0xc8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x108(%rax)
movq 0x49421(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
addss -0xc(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x493b0(%rip), %rcx     # 0x82d50
movq %rcx, 0x210(%rax)
movq 0x48c52(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Use_Quad
void Use_Quad (edict_t *ent, gitem_t *item)
{
	int		timeout;

	ent->client->pers.inventory[ITEM_INDEX(item)]--;
	ValidateSelectedItem (ent);

	if (quad_drop_timeout_hack)
	{
		timeout = quad_drop_timeout_hack;
		quad_drop_timeout_hack = 0;
	}
	else
	{
		timeout = 300;
	}

	if (ent->client->quad_framenum > level.framenum)
		ent->client->quad_framenum += timeout;
	else
		ent->client->quad_framenum = level.framenum + timeout;

	gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage.wav"), 1, ATTN_NORM, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x491f9(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
callq 0x182a0
cmpl $0x0, 0x53094(%rip)     # 0x8cd10
je 0x39c93
movl 0x5308c(%rip), %eax     # 0x8cd10
movl %eax, -0x14(%rbp)
movl $0x0, 0x5307f(%rip)     # 0x8cd10
jmp 0x39c9a
movl $0x12c, -0x14(%rbp)     # imm = 0x12C
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf04(%rax), %xmm0
movq 0x490ef(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x39cd9
cvtsi2ssl -0x14(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
addss 0xf04(%rax), %xmm0
movss %xmm0, 0xf04(%rax)
jmp 0x39cf9
movq 0x490c0(%rip), %rax     # 0x82da0
movl (%rax), %eax
addl -0x14(%rbp), %eax
cvtsi2ss %eax, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xf04(%rax)
movq 0x48900(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x39173(%rip), %rdi     # 0x72e8a
movq 0x488e2(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x30(%rbp), %rdi
movl %eax, %edx
movq -0x28(%rbp), %rax
movl $0x3, %esi
movss 0x361b4(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Adrenaline
qboolean Pickup_Adrenaline (edict_t *ent, edict_t *other)
{
	if (!deathmatch->value)
		other->max_health += 1;

	if (other->health < other->max_health)
		other->health = other->max_health;

	if (!(ent->spawnflags & DROPPED_ITEM) && (deathmatch->value))
		SetRespawn (ent, ent->item->quantity);

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x48dd9(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3a10c
jp 0x3a10c
movq -0x10(%rbp), %rax
movl 0x258(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x258(%rax)
movq -0x10(%rbp), %rax
movl 0x254(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x258(%rcx), %eax
jge 0x3a136
movq -0x10(%rbp), %rax
movl 0x258(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x254(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x3a17e
movq 0x48d6f(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3a165
jp 0x3a165
jmp 0x3a17e
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
cvtsi2ssl 0x5c(%rax), %xmm0
callq 0x19750
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_AncientHead
qboolean Pickup_AncientHead (edict_t *ent, edict_t *other)
{
	other->max_health += 2;

	if (!(ent->spawnflags & DROPPED_ITEM) && (deathmatch->value))
		SetRespawn (ent, ent->item->quantity);

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x258(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x258(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x3a1fb
movq 0x48cf2(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3a1e2
jp 0x3a1e2
jmp 0x3a1fb
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
cvtsi2ssl 0x5c(%rax), %xmm0
callq 0x19750
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Use_Breather
void Use_Breather (edict_t *ent, gitem_t *item)
{
	ent->client->pers.inventory[ITEM_INDEX(item)]--;
	ValidateSelectedItem (ent);

	if (ent->client->breather_framenum > level.framenum)
		ent->client->breather_framenum += 300;
	else
		ent->client->breather_framenum = level.framenum + 300;

//	gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage.wav"), 1, ATTN_NORM, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x484d9(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
callq 0x182a0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf0c(%rax), %xmm0
movq 0x483f4(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3a9d7
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x35abf(%rip), %xmm0    # 0x70484
addss 0xf0c(%rax), %xmm0
movss %xmm0, 0xf0c(%rax)
jmp 0x3a9f9
movq 0x483c2(%rip), %rax     # 0x82da0
movl (%rax), %eax
addl $0x12c, %eax            # imm = 0x12C
cvtsi2ss %eax, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xf0c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Use_Envirosuit
void Use_Envirosuit (edict_t *ent, gitem_t *item)
{
	ent->client->pers.inventory[ITEM_INDEX(item)]--;
	ValidateSelectedItem (ent);

	if (ent->client->enviro_framenum > level.framenum)
		ent->client->enviro_framenum += 300;
	else
		ent->client->enviro_framenum = level.framenum + 300;

//	gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage.wav"), 1, ATTN_NORM, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48419(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
callq 0x182a0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf10(%rax), %xmm0
movq 0x48334(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3aa97
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x359ff(%rip), %xmm0    # 0x70484
addss 0xf10(%rax), %xmm0
movss %xmm0, 0xf10(%rax)
jmp 0x3aab9
movq 0x48302(%rip), %rax     # 0x82da0
movl (%rax), %eax
addl $0x12c, %eax            # imm = 0x12C
cvtsi2ss %eax, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xf10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Use_Invulnerability
void	Use_Invulnerability (edict_t *ent, gitem_t *item)
{
	ent->client->pers.inventory[ITEM_INDEX(item)]--;
	ValidateSelectedItem (ent);

	if (ent->client->invincible_framenum > level.framenum)
		ent->client->invincible_framenum += 300;
	else
		ent->client->invincible_framenum = level.framenum + 300;

	gi.sound(ent, CHAN_ITEM, gi.soundindex("items/protect.wav"), 1, ATTN_NORM, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48359(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
callq 0x182a0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf08(%rax), %xmm0
movq 0x48274(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3ab57
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x3593f(%rip), %xmm0    # 0x70484
addss 0xf08(%rax), %xmm0
movss %xmm0, 0xf08(%rax)
jmp 0x3ab79
movq 0x48242(%rip), %rax     # 0x82da0
movl (%rax), %eax
addl $0x12c, %eax            # imm = 0x12C
cvtsi2ss %eax, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xf08(%rax)
movq 0x47a80(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x38304(%rip), %rdi     # 0x72e9b
movq 0x47a62(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x28(%rbp), %rdi
movl %eax, %edx
movq -0x20(%rbp), %rax
movl $0x3, %esi
movss 0x35334(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Key
qboolean Pickup_Key (edict_t *ent, edict_t *other)
{
	if (coop->value)
	{
		if (strcmp(ent->classname, "key_power_cube") == 0)
		{
			if (other->client->pers.power_cubes & ((ent->spawnflags & 0x0000ff00)>> 8))
				return false;
			other->client->pers.inventory[ITEM_INDEX(ent->item)]++;
			other->client->pers.power_cubes |= ((ent->spawnflags & 0x0000ff00) >> 8);
		}
		else
		{
			if (other->client->pers.inventory[ITEM_INDEX(ent->item)])
				return false;
			other->client->pers.inventory[ITEM_INDEX(ent->item)] = 1;
		}
		return true;
	}
	other->client->pers.inventory[ITEM_INDEX(ent->item)]++;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0x482f9(%rip), %rax     # 0x82f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3ac7e
jp 0x3ac7e
jmp 0x3adcf
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rdi
leaq 0x3821d(%rip), %rsi     # 0x72ead
callq 0x18bf0
cmpl $0x0, %eax
jne 0x3ad41
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x740(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x140(%rcx), %ecx
andl $0xff00, %ecx           # imm = 0xFF00
sarl $0x8, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x3acd2
movl $0x0, -0x4(%rbp)
jmp 0x3ae19
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x48150(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x140(%rax), %ecx
andl $0xff00, %ecx           # imm = 0xFF00
sarl $0x8, %ecx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
orl 0x740(%rax), %ecx
movl %ecx, 0x740(%rax)
jmp 0x3adc6
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x480e1(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpl $0x0, 0x318(%rax,%rcx,4)
je 0x3ad89
movl $0x0, -0x4(%rbp)
jmp 0x3ae19
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x48099(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl $0x1, 0x318(%rax,%rcx,4)
movl $0x1, -0x4(%rbp)
jmp 0x3ae19
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x48053(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Add_Ammo
qboolean Add_Ammo (edict_t *ent, gitem_t *item, int count)
{
	int			index;
	int			max;

	if (!ent->client)
		return false;

	if (item->tag == AMMO_BULLETS)
		max = ent->client->pers.max_bullets;
	else if (item->tag == AMMO_SHELLS)
		max = ent->client->pers.max_shells;
	else if (item->tag == AMMO_ROCKETS)
		max = ent->client->pers.max_rockets;
	else if (item->tag == AMMO_GRENADES)
		max = ent->client->pers.max_grenades;
	else if (item->tag == AMMO_CELLS)
		max = ent->client->pers.max_cells;
	else if (item->tag == AMMO_SLUGS)
		max = ent->client->pers.max_slugs;
	else
		return false;

	index = ITEM_INDEX(item);

	if (ent->client->pers.inventory[index] == max)
		return false;

	ent->client->pers.inventory[index] += count;

	if (ent->client->pers.inventory[index] > max)
		ent->client->pers.inventory[index] = max;

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x3ae56
movl $0x0, -0x4(%rbp)
jmp 0x3afae
movq -0x18(%rbp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x3ae76
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x718(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x3af20
movq -0x18(%rbp), %rax
cmpl $0x1, 0x78(%rax)
jne 0x3ae96
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x71c(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x3af1e
movq -0x18(%rbp), %rax
cmpl $0x2, 0x78(%rax)
jne 0x3aeb3
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x720(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x3af1c
movq -0x18(%rbp), %rax
cmpl $0x3, 0x78(%rax)
jne 0x3aed0
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x724(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x3af1a
movq -0x18(%rbp), %rax
cmpl $0x4, 0x78(%rax)
jne 0x3aeed
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x728(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x3af18
movq -0x18(%rbp), %rax
cmpl $0x5, 0x78(%rax)
jne 0x3af0a
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x72c(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x3af16
movl $0x0, -0x4(%rbp)
jmp 0x3afae
jmp 0x3af18
jmp 0x3af1a
jmp 0x3af1c
jmp 0x3af1e
jmp 0x3af20
movq -0x18(%rbp), %rax
movq 0x47f15(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x20(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
jne 0x3af5c
movl $0x0, -0x4(%rbp)
jmp 0x3afae
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x20(%rbp), %rcx
addl 0x318(%rax,%rcx,4), %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x20(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
jle 0x3afa7
movl -0x24(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x20(%rbp), %rcx
movl %edx, 0x318(%rax,%rcx,4)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Ammo
qboolean Pickup_Ammo (edict_t *ent, edict_t *other)
{
	int			oldcount;
	int			count;
	qboolean	weapon;

	weapon = (ent->item->flags & IT_WEAPON);
	if ( (weapon) && ( (int)dmflags->value & DF_INFINITE_AMMO ) )
		count = 1000;
	else if (ent->count)
		count = ent->count;
	else
		count = ent->item->quantity;

	oldcount = other->client->pers.inventory[ITEM_INDEX(ent->item)];

	if (!Add_Ammo (other, ent->item, count))
		return false;

	if (weapon && !oldcount)
	{
		if (other->client->pers.weapon != ent->item && ( !deathmatch->value || other->client->pers.weapon == FindItem("blaster") ) )
			other->client->newweapon = ent->item;
	}

	if (!(ent->spawnflags & (DROPPED_ITEM | DROPPED_PLAYER_ITEM)) && (deathmatch->value))
		SetRespawn (ent, 30);
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movl 0x68(%rax), %eax
andl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3b00c
movq 0x47627(%rip), %rax     # 0x82618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x3b00c
movl $0x3e8, -0x20(%rbp)     # imm = 0x3E8
jmp 0x3b03b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x290(%rax)
je 0x3b028
movq -0x10(%rbp), %rax
movl 0x290(%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0x3b039
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0x3b03b
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x47de7(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl 0x318(%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rsi
movl -0x20(%rbp), %edx
callq 0x19430
cmpl $0x0, %eax
jne 0x3b09f
movl $0x0, -0x4(%rbp)
jmp 0x3b174
cmpl $0x0, -0x24(%rbp)
je 0x3b12d
cmpl $0x0, -0x1c(%rbp)
jne 0x3b12d
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x730(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x330(%rcx), %rax
je 0x3b12b
movq 0x47dee(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3b0e6
jp 0x3b0e6
jmp 0x3b111
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x730(%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x3bc2e(%rip), %rdi     # 0x76d2e
callq 0x18a90
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jne 0x3b12b
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rcx, 0xe50(%rax)
jmp 0x3b12d
movq -0x10(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x30000, %eax          # imm = 0x30000
cmpl $0x0, %eax
jne 0x3b16d
movq 0x47d78(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3b15c
jp 0x3b15c
jmp 0x3b16d
movq -0x10(%rbp), %rdi
movss 0x35128(%rip), %xmm0    # 0x70290
callq 0x19750
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Drop_Ammo
void Drop_Ammo (edict_t *ent, gitem_t *item)
{
	edict_t	*dropped;
	int		index;

	index = ITEM_INDEX(item);
	dropped = Drop_Item (ent, item);
	if (ent->client->pers.inventory[index] >= item->quantity)
		dropped->count = item->quantity;
	else
		dropped->count = ent->client->pers.inventory[index];

	if (ent->client->pers.weapon && 
		ent->client->pers.weapon->tag == AMMO_GRENADES &&
		item->tag == AMMO_GRENADES &&
		ent->client->pers.inventory[index] - dropped->count <= 0) {
		gi.cprintf (ent, PRINT_HIGH, "Can't drop current weapon\n");
		G_FreeEdict(dropped);
		return;
	}

	ent->client->pers.inventory[index] -= dropped->count;
	ValidateSelectedItem (ent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x47ca5(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x184a0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jl 0x3b1eb
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x290(%rax)
jmp 0x3b208
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x290(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x730(%rax)
je 0x3b285
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x730(%rax), %rax
cmpl $0x3, 0x78(%rax)
jne 0x3b285
movq -0x10(%rbp), %rax
cmpl $0x3, 0x78(%rax)
jne 0x3b285
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %eax
movq -0x18(%rbp), %rcx
subl 0x290(%rcx), %eax
cmpl $0x0, %eax
jg 0x3b285
movq 0x4739e(%rip), %rax     # 0x82600
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x37c46(%rip), %rdx     # 0x72ebc
movb $0x0, %al
callq *%rcx
movq -0x18(%rbp), %rdi
callq 0x19cd0
jmp 0x3b2b4
movq -0x18(%rbp), %rax
movl 0x290(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %edx
subl %esi, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
callq 0x182a0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: MegaHealth_think
void MegaHealth_think (edict_t *self)
{
	//surt regen rune problem with this
	if (self->owner)
	{
		if (self->owner->client && self->owner->client->rune &&
			self->owner->client->rune->runetype == RUNE_REGEN)
		{
			if (self->owner->health > self->owner->max_health + 25)
			{
				self->nextthink = level.time + 2;
				self->owner->health -= 1;
				return;
			}
		}
			
		//this was the old standard case
		else if (self->owner->health > self->owner->max_health)
		{
			self->nextthink = level.time + 1;
			self->owner->health -= 1;
			return;
		}
	}

	if (!(self->spawnflags & DROPPED_ITEM) && (deathmatch->value))
		SetRespawn (self, 20);
	else
		G_FreeEdict (self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x110(%rax)
je 0x3b3fe
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
cmpq $0x0, 0x58(%rax)
je 0x3b39a
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf68(%rax)
je 0x3b39a
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x8, 0x478(%rax)
jne 0x3b39a
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movl 0x254(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x110(%rcx), %rcx
movl 0x258(%rcx), %ecx
addl $0x19, %ecx
cmpl %ecx, %eax
jle 0x3b398
movss 0x34b87(%rip), %xmm0    # 0x6fee8
movq 0x47a38(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movl 0x254(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x254(%rax)
jmp 0x3b449
jmp 0x3b3fc
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movl 0x254(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x110(%rcx), %rcx
cmpl 0x258(%rcx), %eax
jle 0x3b3fa
movss 0x34b26(%rip), %xmm0    # 0x6feec
movq 0x479d3(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movl 0x254(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x254(%rax)
jmp 0x3b449
jmp 0x3b3fc
jmp 0x3b3fe
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x3b440
movq 0x47aa7(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3b42d
jp 0x3b42d
jmp 0x3b440
movq -0x8(%rbp), %rdi
movss 0x357d7(%rip), %xmm0    # 0x70c10
callq 0x19750
jmp 0x3b449
movq -0x8(%rbp), %rdi
callq 0x19cd0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Health
qboolean Pickup_Health (edict_t *ent, edict_t *other)
{
	if (!(ent->style & HEALTH_IGNORE_MAX))
		if (other->health >= other->max_health)
			return false;

	other->health += ent->count;

	if (!(ent->style & HEALTH_IGNORE_MAX))
	{
		if (other->health > other->max_health)
			other->health = other->max_health;
	}



#ifdef WEAP_BALANCE_OK	
	//surt take care of overboard health
	if ((int)ctfflags->value & CTF_WEAP_BALANCE)
	{
		if (other->health > (2 * other->max_health) )
			other->health = (2 * other->max_health);
	}
	//end surt code
#endif

	if (ent->style & HEALTH_TIMED)
	{
		ent->think = MegaHealth_think;
		ent->nextthink = level.time + 5;
		ent->owner = other;
		ent->flags |= FL_RESPAWN;
		ent->svflags |= SVF_NOCLIENT;
		ent->solid = SOLID_NOT;
	}
	else
	{
		if (!(ent->spawnflags & DROPPED_ITEM) && (deathmatch->value))
			SetRespawn (ent, 30);
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x32c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x3b496
movq -0x18(%rbp), %rax
movl 0x254(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x258(%rcx), %eax
jl 0x3b494
movl $0x0, -0x4(%rbp)
jmp 0x3b5c3
jmp 0x3b496
movq -0x10(%rbp), %rax
movl 0x290(%rax), %ecx
movq -0x18(%rbp), %rax
addl 0x254(%rax), %ecx
movl %ecx, 0x254(%rax)
movq -0x10(%rbp), %rax
movl 0x32c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x3b4ee
movq -0x18(%rbp), %rax
movl 0x254(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x258(%rcx), %eax
jle 0x3b4ec
movq -0x18(%rbp), %rax
movl 0x258(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x254(%rax)
jmp 0x3b4ee
movq -0x10(%rbp), %rax
movl 0x32c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3b57a
movq -0x10(%rbp), %rax
movq 0x473f5(%rip), %rcx     # 0x82900
movq %rcx, 0x210(%rax)
movss 0x349ee(%rip), %xmm0    # 0x6ff08
movq 0x4787f(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %ecx
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x11c(%rax)
movq -0x10(%rbp), %rax
movl 0xc8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x108(%rax)
jmp 0x3b5bc
movq -0x10(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x3b5ba
movq 0x4792b(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3b5a9
jp 0x3b5a9
jmp 0x3b5ba
movq -0x10(%rbp), %rdi
movss 0x34cdb(%rip), %xmm0    # 0x70290
callq 0x19750
jmp 0x3b5bc
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: ArmorIndex
int ArmorIndex (edict_t *ent)
{
	if (!ent->client)
		return 0;

	if (ent->client->pers.inventory[jacket_armor_index] > 0)
		return jacket_armor_index;

	if (ent->client->pers.inventory[combat_armor_index] > 0)
		return combat_armor_index;

	if (ent->client->pers.inventory[body_armor_index] > 0)
		return body_armor_index;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x3b5ec
movl $0x0, -0x4(%rbp)
jmp 0x3b65f
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq 0x51719(%rip), %rcx     # 0x8cd14
cmpl $0x0, 0x318(%rax,%rcx,4)
jle 0x3b610
movl 0x51709(%rip), %eax     # 0x8cd14
movl %eax, -0x4(%rbp)
jmp 0x3b65f
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq 0x516f9(%rip), %rcx     # 0x8cd18
cmpl $0x0, 0x318(%rax,%rcx,4)
jle 0x3b634
movl 0x516e9(%rip), %eax     # 0x8cd18
movl %eax, -0x4(%rbp)
jmp 0x3b65f
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq 0x516d9(%rip), %rcx     # 0x8cd1c
cmpl $0x0, 0x318(%rax,%rcx,4)
jle 0x3b658
movl 0x516c9(%rip), %eax     # 0x8cd1c
movl %eax, -0x4(%rbp)
jmp 0x3b65f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: PowerArmorType
int PowerArmorType (edict_t *ent)
{
	if (!ent->client)
		return POWER_ARMOR_NONE;

	if (!(ent->flags & FL_POWER_ARMOR))
		return POWER_ARMOR_NONE;

	if (ent->client->pers.inventory[power_shield_index] > 0)
		return POWER_ARMOR_SHIELD;

	if (ent->client->pers.inventory[power_screen_index] > 0)
		return POWER_ARMOR_SCREEN;

	return POWER_ARMOR_NONE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x3b95c
movl $0x0, -0x4(%rbp)
jmp 0x3b9c4
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x3b979
movl $0x0, -0x4(%rbp)
jmp 0x3b9c4
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq 0x51398(%rip), %rcx     # 0x8cd20
cmpl $0x0, 0x318(%rax,%rcx,4)
jle 0x3b99b
movl $0x2, -0x4(%rbp)
jmp 0x3b9c4
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq 0x5137a(%rip), %rcx     # 0x8cd24
cmpl $0x0, 0x318(%rax,%rcx,4)
jle 0x3b9bd
movl $0x1, -0x4(%rbp)
jmp 0x3b9c4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Use_PowerArmor
void Use_PowerArmor (edict_t *ent, gitem_t *item)
{
	int		index;

	if (ent->flags & FL_POWER_ARMOR)
	{
		ent->flags &= ~FL_POWER_ARMOR;
		gi.sound(ent, CHAN_AUTO, gi.soundindex("misc/power2.wav"), 1, ATTN_NORM, 0);
	}
	else
	{
		index = ITEM_INDEX(FindItem("cells"));
		if (!ent->client->pers.inventory[index])
		{
			ctf_SafePrint(ent, PRINT_HIGH, "No cells for power armor.\n");
			return;
		}
		ent->flags |= FL_POWER_ARMOR;
		gi.sound(ent, CHAN_AUTO, gi.soundindex("misc/power1.wav"), 1, ATTN_NORM, 0);	//FIXME powering up sound
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x3ba53
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
andl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
movl %ecx, 0x11c(%rax)
movq 0x46bef(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x349ee(%rip), %rdi     # 0x70416
movq 0x46bd1(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x28(%rbp), %rdi
movl %eax, %edx
movq -0x20(%rbp), %rax
xorl %esi, %esi
movss 0x344a6(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
jmp 0x3bafd
leaq 0x37f31(%rip), %rdi     # 0x7398b
callq 0x18a90
movq 0x473da(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpl $0x0, 0x318(%rax,%rcx,4)
jne 0x3baa3
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x3743b(%rip), %rdx     # 0x72ed7
callq 0x18f20
jmp 0x3bafd
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, 0x11c(%rax)
movq 0x46b40(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x37659(%rip), %rdi     # 0x73130
movq 0x46b22(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x38(%rbp), %rdi
movl %eax, %edx
movq -0x30(%rbp), %rax
xorl %esi, %esi
movss 0x343f7(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SP_flag
void SP_flag (edict_t *self)
{
	if ( !deathmatch->value )
	{
		G_FreeEdict (self);
		return;
	}

	//self->model = "models/items/mega_h/tris.md2";
	self->droptime = 0;
	self->entprops = 0;
	self->count = 0;
	self->flagteam = 0; // Not set yet
	SpawnItem (self, FindItemByClassname ("flag"));
	self->think = ctf_flagwave;
	self->nextthink = level.time + 1;
	gi.soundindex ("items/m_health.wav");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x46add(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3c403
jp 0x3c403
movq -0x8(%rbp), %rdi
callq 0x19cd0
jmp 0x3c49f
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4a0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4a4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x290(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x47c(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x3b6d0(%rip), %rdi     # 0x77b1b
callq 0x18180
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x19040
movq -0x8(%rbp), %rax
movq 0x46159(%rip), %rcx     # 0x825c0
movq %rcx, 0x210(%rax)
movss 0x33a76(%rip), %xmm0    # 0x6feec
movq 0x46923(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
leaq 0x37a7e(%rip), %rdi     # 0x73f13
movq 0x46164(%rip), %rax     # 0x82600
callq *0x48(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_PowerArmor
qboolean Pickup_PowerArmor (edict_t *ent, edict_t *other)
{
	int		quantity;

	quantity = other->client->pers.inventory[ITEM_INDEX(ent->item)];

	other->client->pers.inventory[ITEM_INDEX(ent->item)]++;

	if (deathmatch->value)
	{
		if (!(ent->spawnflags & DROPPED_ITEM) )
			SetRespawn (ent, ent->item->quantity);
		// auto-use for DM only if we didn't already have one
		if (!quantity)
			ent->item->use (other, ent->item);
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x46332(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl 0x318(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x462f6(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq 0x4634a(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3cb8a
jp 0x3cb8a
jmp 0x3cbdf
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x3cbb7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
cvtsi2ssl 0x5c(%rax), %xmm0
callq 0x19750
cmpl $0x0, -0x14(%rbp)
jne 0x3cbdd
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x330(%rcx), %rsi
callq *%rax
jmp 0x3cbdf
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)