// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: Drop_Rune
void Drop_Rune (edict_t *ent, gitem_t *item)
{
	edict_t	*dropped;
	float *v;
	
	if (!item)
		return;
	
	ent->client->pers.inventory[ITEM_INDEX(item)]--;

	dropped = ent->client->rune;
	if (!dropped)
		return;
	ent->client->rune = 0;
	
	tossruneset(dropped);

	VectorCopy(ent->s.origin, dropped->s.origin);
	tossruneset(dropped);
	dropped->touch = drop_temp_touch;
	dropped->owner = ent;

	v = tv(0, 0, 48);
	VectorAdd (dropped->s.origin, v, dropped->s.origin);
	dropped->velocity[0] = -2000 + (random() * 4000);
	dropped->velocity[1] = -2000 + (random() * 4000);
	dropped->velocity[2] = 800 + (random() * 200);

	ctf_TossEnt(ent, dropped);
	
	dropped->think = Drop_Rune_Think;
	dropped->nextthink = level.time + 1;

	// We just moved.  Remember this time
	dropped->last_move_time = level.time;

	//ent->solid = SOLID_BBOX;
	dropped->solid = SOLID_TRIGGER;
	gi.linkentity (dropped); //always pair with changes to solid

	gi.sound(ent, CHAN_ITEM, gi.soundindex("misc/power2.wav"), 1, ATTN_NORM, 0);
	ValidateSelectedItem (ent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1e754
movq %rdi, %rbx
movq 0x58(%rdi), %rcx
subq 0x488c4(%rip), %rsi     # 0x66e40
movl $0x88, %edi
movq %rsi, %rax
cqto
idivq %rdi
decl 0x318(%rcx,%rax,4)
movq 0xf68(%rcx), %r14
testq %r14, %r14
je 0x1e754
andq $0x0, 0xf68(%rcx)
movq %r14, %rdi
callq 0x1e75f
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x4(%r14)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x8(%r14)
movss 0xc(%rbx), %xmm0
movss %xmm0, 0xc(%r14)
movq %r14, %rdi
callq 0x1e75f
movq 0x47fa8(%rip), %rax     # 0x66588
movq %rax, 0x220(%r14)
movq %rbx, 0x110(%r14)
movss 0x30ca2(%rip), %xmm2    # 0x4f298
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x196c0
movss 0x4(%r14), %xmm0
movss 0x8(%r14), %xmm1
addss (%rax), %xmm0
movss %xmm0, 0x4(%r14)
addss 0x4(%rax), %xmm1
movss %xmm1, 0x8(%r14)
movss 0xc(%r14), %xmm0
addss 0x8(%rax), %xmm0
movss %xmm0, 0xc(%r14)
callq 0x19bf0
movl $0x7fff, %ebp           # imm = 0x7FFF
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x30c3d(%rip), %xmm0    # 0x4f288
mulss 0x30c49(%rip), %xmm0    # 0x4f29c
addss 0x30c45(%rip), %xmm0    # 0x4f2a0
movss %xmm0, 0x1c0(%r14)
callq 0x19bf0
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x30c11(%rip), %xmm0    # 0x4f288
mulss 0x30c1d(%rip), %xmm0    # 0x4f29c
addss 0x30c19(%rip), %xmm0    # 0x4f2a0
movss %xmm0, 0x1c4(%r14)
callq 0x19bf0
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x30be5(%rip), %xmm0    # 0x4f288
mulss 0x30bf9(%rip), %xmm0    # 0x4f2a4
addss 0x30bf5(%rip), %xmm0    # 0x4f2a8
movss %xmm0, 0x1c8(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18900
movq 0x47e22(%rip), %rax     # 0x664f0
movq %rax, 0x210(%r14)
movq 0x486c4(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
movaps %xmm0, %xmm1
addss 0x3083c(%rip), %xmm1    # 0x4ef28
movss %xmm1, 0x200(%r14)
movss %xmm0, 0x250(%r14)
movl $0x1, 0x108(%r14)
movq 0x47ef0(%rip), %r15     # 0x66600
movq %r14, %rdi
callq *0x90(%r15)
movq 0x20(%r15), %r14
leaq 0x30cc9(%rip), %rdi     # 0x4f3ee
callq *0x48(%r15)
pushq $0x3
popq %rsi
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl %eax, %edx
movss 0x307ec(%rip), %xmm0    # 0x4ef28
movaps %xmm0, %xmm1
callq *%r14
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x182a0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq