// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movss 0x334a5(%rip), %xmm2    # 0x7029c
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x19740
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movss (%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xcc(%rax)
movq -0x68(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xd0(%rax)
movq -0x68(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xd4(%rax)
movss 0x3344c(%rip), %xmm2    # 0x70298
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x19740
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movss (%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movq -0x68(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xdc(%rax)
movq -0x68(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xe0(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x120(%rax)
je 0x3cec5
movq 0x45752(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x120(%rcx), %rsi
callq *%rax
jmp 0x3cee5
movq 0x45734(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x330(%rcx), %rcx
movq 0x30(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x1, 0x108(%rax)
movq -0x8(%rbp), %rax
movl $0x7, 0x118(%rax)
movq -0x8(%rbp), %rax
movq 0x45974(%rip), %rcx     # 0x82880
movq %rcx, 0x220(%rax)
xorps %xmm1, %xmm1
movss 0x3355a(%rip), %xmm2    # 0x70478
movaps %xmm1, %xmm0
callq 0x19740
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x68(%rbp), %rax
addss (%rax), %xmm0
movss %xmm0, -0x5c(%rbp)
movq -0x8(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x68(%rbp), %rax
addss 0x4(%rax), %xmm0
movss %xmm0, -0x58(%rbp)
movq -0x8(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x68(%rbp), %rax
addss 0x8(%rax), %xmm0
movss %xmm0, -0x54(%rbp)
movq 0x4568b(%rip), %rax     # 0x82600
movq 0x60(%rax), %rax
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
movq -0x8(%rbp), %rdx
addq $0xcc, %rdx
movq -0x8(%rbp), %rcx
addq $0xd8, %rcx
leaq -0x5c(%rbp), %r8
movq -0x8(%rbp), %r9
leaq -0xb0(%rbp), %rdi
movl $0x3, (%rsp)
callq *%rax
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x48, %edx
callq 0x18dc0
cmpl $0x0, -0x4c(%rbp)
je 0x3d025
movq 0x4562f(%rip), %rax     # 0x82600
movq 0x8(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
callq 0x19260
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rcx
movq %rax, %rdx
leaq 0x35f18(%rip), %rdi     # 0x72f2b
movb $0x0, %al
callq *%rcx
movq -0x8(%rbp), %rdi
callq 0x19cd0
jmp 0x3d1a7
movss -0x44(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0x40(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x8(%rax)
movss -0x3c(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x168(%rax)
je 0x3d102
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
movl %ecx, 0x11c(%rax)
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x298(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2c8(%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 -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x2d0(%rcx), %rax
jne 0x3d100
movss 0x331be(%rip), %xmm0    # 0x70294
movq 0x45cc3(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x45c57(%rip), %rcx     # 0x82d50
movq %rcx, 0x210(%rax)
jmp 0x3d102
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3d14e
movq -0x8(%rbp), %rax
movl $0x2, 0x108(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x220(%rax)
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl 0x44(%rax), %ecx
andl $0xfffffdff, %ecx       # imm = 0xFFFFFDFF
movl %ecx, 0x44(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3d193
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0xc8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x108(%rax)
movq -0x8(%rbp), %rax
movq 0x4583c(%rip), %rcx     # 0x829c8
movq %rcx, 0x228(%rax)
movq 0x45466(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
addq $0xd0, %rsp
popq %rbp
retq