// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: droptofloor
void droptofloor (edict_t *ent)
{
	trace_t		tr;
	vec3_t		dest;
	float		*v;

	v = tv(-15,-15,-15);
	VectorCopy (v, ent->mins);
	v = tv(15,15,15);
	VectorCopy (v, ent->maxs);

	if (ent->model)
		gi.setmodel (ent, ent->model);
	else
		gi.setmodel (ent, ent->item->world_model);
	ent->solid = SOLID_TRIGGER;
	
	ent->movetype = MOVETYPE_TOSS;  

	ent->touch = Touch_Item;

	v = tv(0,0,-128);
	VectorAdd (ent->s.origin, v, dest);

	tr = gi.trace (ent->s.origin, ent->mins, ent->maxs, dest, ent, MASK_SOLID);
	if (tr.startsolid)
	{
		gi.dprintf ("droptofloor: %s startsolid at %s\n", ent->classname, vtos(ent->s.origin));
		G_FreeEdict (ent);
		return;
	}

	VectorCopy (tr.endpos, ent->s.origin);

	if (ent->team)
	{
		ent->flags &= ~FL_TEAMSLAVE;
		ent->chain = ent->teamchain;
		ent->teamchain = NULL;

		ent->svflags |= SVF_NOCLIENT;
		ent->solid = SOLID_NOT;
		if (ent == ent->teammaster)
		{
			ent->nextthink = level.time + FRAMETIME;
			ent->think = DoRespawn;
		}
	}

	if (ent->spawnflags & ITEM_NO_TOUCH)
	{
		ent->solid = SOLID_BBOX;
		ent->touch = NULL;
		ent->s.effects &= ~EF_ROTATE;
		ent->s.renderfx &= ~RF_GLOW;
	}

	if (ent->spawnflags & ITEM_TRIGGER_SPAWN)
	{
		ent->svflags |= SVF_NOCLIENT;
		ent->solid = SOLID_NOT;
		ent->use = Use_Item;
	}

	gi.linkentity (ent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movss 0x22615(%rip), %xmm0    # 0x54440
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x19510
movss (%rax), %xmm0
leaq 0xcc(%rbx), %r14
movss %xmm0, 0xcc(%rbx)
movss 0x4(%rax), %xmm0
movss %xmm0, 0xd0(%rbx)
movss 0x8(%rax), %xmm0
movss %xmm0, 0xd4(%rbx)
movss 0x225d9(%rip), %xmm0    # 0x54444
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x19510
movss (%rax), %xmm0
leaq 0xd8(%rbx), %r15
movss %xmm0, 0xd8(%rbx)
movss 0x4(%rax), %xmm0
movss %xmm0, 0xdc(%rbx)
movss 0x8(%rax), %xmm0
movss %xmm0, 0xe0(%rbx)
movq 0x120(%rbx), %rsi
movq 0x3774f(%rip), %rbp     # 0x69600
movq 0x58(%rbp), %rax
testq %rsi, %rsi
jne 0x31ec5
movq 0x330(%rbx), %rcx
movq 0x30(%rcx), %rsi
movq %rbx, %rdi
callq *%rax
movl $0x1, 0x108(%rbx)
movl $0x7, 0x118(%rbx)
movq 0x3799b(%rip), %rax     # 0x69880
movq %rax, 0x220(%rbx)
movss 0x22558(%rip), %xmm2    # 0x5444c
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x19510
leaq 0x4(%rbx), %r12
movss 0x4(%rbx), %xmm0
addss (%rax), %xmm0
leaq 0x14(%rsp), %r8
movss %xmm0, (%r8)
movss 0x8(%rbx), %xmm0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%r8)
movss 0xc(%rbx), %xmm0
addss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%r8)
movl $0x3, (%rsp)
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r9
callq *0x60(%rbp)
cmpl $0x0, 0x4(%r13)
je 0x31f8d
movq 0x8(%rbp), %r15
movq 0x138(%rbx), %r14
movq %r12, %rdi
callq 0x190a0
leaq 0x2502e(%rip), %rdi     # 0x56fa3
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq *%r15
movq %rbx, %rdi
callq 0x19a60
jmp 0x32072
movss 0x2c(%rsp), %xmm0
movss 0x30(%rsp), %xmm1
movss 0x34(%rsp), %xmm2
movss %xmm0, 0x4(%rbx)
movss %xmm1, 0x8(%rbx)
movss %xmm2, 0xc(%rbx)
cmpq $0x0, 0x168(%rbx)
je 0x3201f
andb $-0x5, 0x11d(%rbx)
movq 0x2c8(%rbx), %rax
movq 0x2d0(%rbx), %rcx
movq %rax, 0x298(%rbx)
movq $0x0, 0x2c8(%rbx)
orb $0x1, 0xc8(%rbx)
movl $0x0, 0x108(%rbx)
cmpq %rbx, %rcx
jne 0x3201f
movq 0x37da4(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x22287(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
movq 0x37d38(%rip), %rax     # 0x69d50
movq %rax, 0x210(%rbx)
movl 0x140(%rbx), %eax
testb $0x2, %al
je 0x32046
movl $0x2, 0x108(%rbx)
movq $0x0, 0x220(%rbx)
andb $-0x2, 0x40(%rbx)
andb $-0x3, 0x45(%rbx)
testb $0x1, %al
je 0x32069
orb $0x1, 0xc8(%rbx)
movl $0x0, 0x108(%rbx)
movq 0x37966(%rip), %rax     # 0x699c8
movq %rax, 0x228(%rbx)
movq %rbx, %rdi
callq *0x90(%rbp)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq