// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Bandolier
qboolean Pickup_Bandolier (edict_t *ent, edict_t *other)
{
	gitem_t	*item;
	int		index;

	if (other->client->pers.max_bullets < 250)
		other->client->pers.max_bullets = 250;
	if (other->client->pers.max_shells < 150)
		other->client->pers.max_shells = 150;
	if (other->client->pers.max_cells < 250)
		other->client->pers.max_cells = 250;
	if (other->client->pers.max_slugs < 75)
		other->client->pers.max_slugs = 75;

	item = FindItem("Bullets");
	if (item)
	{
		index = ITEM_INDEX(item);
		other->client->pers.inventory[index] += item->quantity;
		if (other->client->pers.inventory[index] > other->client->pers.max_bullets)
			other->client->pers.inventory[index] = other->client->pers.max_bullets;
	}

	item = FindItem("Shells");
	if (item)
	{
		index = ITEM_INDEX(item);
		other->client->pers.inventory[index] += item->quantity;
		if (other->client->pers.inventory[index] > other->client->pers.max_shells)
			other->client->pers.inventory[index] = other->client->pers.max_shells;
	}

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

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0xfa, 0x718(%rax)
jge 0x3a246
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl $0xfa, 0x718(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x96, 0x71c(%rax)
jge 0x3a26c
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x96, 0x71c(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0xfa, 0x728(%rax)
jge 0x3a292
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl $0xfa, 0x728(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x4b, 0x72c(%rax)
jge 0x3a2b5
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x4b, 0x72c(%rax)
leaq 0x38ba8(%rip), %rdi     # 0x72e64
callq 0x18a90
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3a352
movq -0x18(%rbp), %rax
movq 0x48b65(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x5c(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
addl 0x318(%rax,%rcx,4), %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
cmpl 0x718(%rcx), %eax
jle 0x3a350
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x718(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, 0x318(%rax,%rcx,4)
jmp 0x3a352
leaq 0x38b13(%rip), %rdi     # 0x72e6c
callq 0x18a90
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3a3ef
movq -0x18(%rbp), %rax
movq 0x48ac8(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x5c(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
addl 0x318(%rax,%rcx,4), %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
cmpl 0x71c(%rcx), %eax
jle 0x3a3ed
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x71c(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, 0x318(%rax,%rcx,4)
jmp 0x3a3ef
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x3a437
movq 0x48ab6(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3a41e
jp 0x3a41e
jmp 0x3a437
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
cvtsi2ssl 0x5c(%rax), %xmm0
callq 0x19750
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)