// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Drop_Item
edict_t *Drop_Item (edict_t *ent, gitem_t *item)
{
	edict_t	*dropped;
	vec3_t	forward, right;
	vec3_t	offset;

	dropped = G_Spawn();

	dropped->classname = item->classname;
	dropped->item = item;
	dropped->spawnflags = DROPPED_ITEM;
	dropped->s.effects = item->world_model_flags;
	dropped->s.renderfx = RF_GLOW;
	VectorSet (dropped->mins, -15, -15, -15);
	VectorSet (dropped->maxs, 15, 15, 15);
	gi.setmodel (dropped, dropped->item->world_model);
	dropped->solid = SOLID_TRIGGER;
	dropped->movetype = MOVETYPE_TOSS;  
	dropped->touch = drop_temp_touch;
	dropped->owner = ent;

	if (ent->client)
	{
		trace_t	trace;

		AngleVectors (ent->client->v_angle, forward, right, NULL);
		VectorSet(offset, 24, 0, -16);
		G_ProjectSource (ent->s.origin, offset, forward, right, dropped->s.origin);
		trace = gi.trace (ent->s.origin, dropped->mins, dropped->maxs,
			dropped->s.origin, ent, CONTENTS_SOLID);
		VectorCopy (trace.endpos, dropped->s.origin);
	}
	else
	{
		AngleVectors (ent->s.angles, forward, right, NULL);
		VectorCopy (ent->s.origin, dropped->s.origin);
	}

	VectorScale (forward, 100, dropped->velocity);
	dropped->velocity[2] = 300;

	dropped->think = drop_make_touchable;
	dropped->nextthink = level.time + 1;

	gi.linkentity (dropped);

	return dropped;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x19950
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x138(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x330(%rax)
movq -0x18(%rbp), %rax
movl $0x10000, 0x140(%rax)   # imm = 0x10000
movq -0x10(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x200, 0x44(%rax)      # imm = 0x200
movq -0x18(%rbp), %rax
movss 0x3646c(%rip), %xmm0    # 0x7029c
movss %xmm0, 0xcc(%rax)
movq -0x18(%rbp), %rax
movss 0x36458(%rip), %xmm0    # 0x7029c
movss %xmm0, 0xd0(%rax)
movq -0x18(%rbp), %rax
movss 0x36444(%rip), %xmm0    # 0x7029c
movss %xmm0, 0xd4(%rax)
movq -0x18(%rbp), %rax
movss 0x3642c(%rip), %xmm0    # 0x70298
movss %xmm0, 0xd8(%rax)
movq -0x18(%rbp), %rax
movss 0x36418(%rip), %xmm0    # 0x70298
movss %xmm0, 0xdc(%rax)
movq -0x18(%rbp), %rax
movss 0x36404(%rip), %xmm0    # 0x70298
movss %xmm0, 0xe0(%rax)
movq 0x4875d(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x330(%rcx), %rcx
movq 0x30(%rcx), %rsi
callq *%rax
movq -0x18(%rbp), %rax
movl $0x1, 0x108(%rax)
movq -0x18(%rbp), %rax
movl $0x7, 0x118(%rax)
movq -0x18(%rbp), %rax
movq 0x486a5(%rip), %rcx     # 0x82588
movq %rcx, 0x220(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x39ff4
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xebc, %rdi            # imm = 0xEBC
leaq -0x24(%rbp), %rsi
leaq -0x30(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x183e0
movss 0x3655c(%rip), %xmm0    # 0x7048c
movss %xmm0, -0x3c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movss 0x36543(%rip), %xmm0    # 0x70488
movss %xmm0, -0x34(%rbp)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x24(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movq -0x18(%rbp), %r8
addq $0x4, %r8
callq 0x19140
movq 0x4868e(%rip), %rax     # 0x82600
movq 0x60(%rax), %rax
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %rdx
addq $0xcc, %rdx
movq -0x18(%rbp), %rcx
addq $0xd8, %rcx
movq -0x18(%rbp), %r8
addq $0x4, %r8
movq -0x8(%rbp), %r9
leaq -0xd0(%rbp), %rdi
movl $0x1, (%rsp)
callq *%rax
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movl $0x48, %edx
callq 0x18dc0
movss -0x7c(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
movss -0x74(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xc(%rax)
jmp 0x3a043
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
leaq -0x24(%rbp), %rsi
leaq -0x30(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x183e0
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xc(%rax)
leaq -0x24(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1c0, %rsi            # imm = 0x1C0
movss 0x38b26(%rip), %xmm0    # 0x72b80
callq 0x18a80
movq -0x18(%rbp), %rax
movss 0x36419(%rip), %xmm0    # 0x70484
movss %xmm0, 0x1c8(%rax)
movq -0x18(%rbp), %rax
leaq 0x2c42(%rip), %rcx      # 0x3ccc0
movq %rcx, 0x210(%rax)
movss 0x35e5f(%rip), %xmm0    # 0x6feec
movq 0x48d0c(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq 0x48554(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movq -0x18(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)