// File: /workspace/github_c_makefile_star2_O3/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 0x1ff72
movq %rdi, %rbx
movq 0x58(%rdi), %rax
subq 0x490b9(%rip), %rsi     # 0x68e40
sarq $0x3, %rsi
movabsq $-0x3c3c3c3c3c3c3c3c, %rcx # imm = 0xC3C3C3C3C3C3C3C4
imulq %rsi, %rcx
decl 0x318(%rax,%rcx)
movq 0xf68(%rax), %r14
testq %r14, %r14
je 0x1ff72
movq $0x0, 0xf68(%rax)
movq %r14, %rdi
callq 0x1ff7d
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 0x1ff7d
movq 0x48795(%rip), %rax     # 0x68588
movq %rax, 0x220(%r14)
movq %rbx, 0x110(%r14)
movss 0x3348f(%rip), %xmm2    # 0x53298
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x19510
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 0x19a10
movl $0x7fff, %ebp           # imm = 0x7FFF
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x33427(%rip), %xmm0    # 0x53288
mulss 0x33433(%rip), %xmm0    # 0x5329c
addss 0x3342f(%rip), %xmm0    # 0x532a0
movss %xmm0, 0x1c0(%r14)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x333f8(%rip), %xmm0    # 0x53288
mulss 0x33404(%rip), %xmm0    # 0x5329c
addss 0x33400(%rip), %xmm0    # 0x532a0
movss %xmm0, 0x1c4(%r14)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x333c9(%rip), %xmm0    # 0x53288
mulss 0x333dd(%rip), %xmm0    # 0x532a4
addss 0x333d9(%rip), %xmm0    # 0x532a8
movss %xmm0, 0x1c8(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x188a0
movq 0x48606(%rip), %rax     # 0x684f0
movq %rax, 0x210(%r14)
movq 0x48ea8(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
movaps %xmm0, %xmm1
addss 0x33020(%rip), %xmm1    # 0x52f28
movss %xmm1, 0x200(%r14)
movss %xmm0, 0x250(%r14)
movl $0x1, 0x108(%r14)
movq 0x486d4(%rip), %r15     # 0x68600
movq %r14, %rdi
callq *0x90(%r15)
movq 0x20(%r15), %r14
leaq 0x334ad(%rip), %rdi     # 0x533ee
callq *0x48(%r15)
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x3, %esi
movl %eax, %edx
movss 0x32fce(%rip), %xmm0    # 0x52f28
movaps %xmm0, %xmm1
callq *%r14
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x18280
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq