// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_phys.c
// Function: SV_Physics_Pusher
void SV_Physics_Pusher (edict_t *ent)
{
	vec3_t		move, amove;
	edict_t		*part, *mv;

	// if not a team captain, so movement will be handled elsewhere
	if ( ent->flags & FL_TEAMSLAVE)
		return;

	// make sure all team slaves can move before commiting
	// any moves or calling any think functions
	// if the move is blocked, all moved objects will be backed out
//retry:
	pushed_p = pushed;
	for (part = ent ; part ; part=part->teamchain)
	{
		if (part->velocity[0] || part->velocity[1] || part->velocity[2] ||
			part->avelocity[0] || part->avelocity[1] || part->avelocity[2]
			)
		{	// object is moving
			VectorScale (part->velocity, FRAMETIME, move);
			VectorScale (part->avelocity, FRAMETIME, amove);

			if (!SV_Push (part, move, amove))
				break;	// move was blocked
		}
	}
	if (pushed_p > &pushed[MAX_EDICTS])
		gi.error (ERR_FATAL, "pushed_p > &pushed[MAX_EDICTS], memory corrupted");

	if (part)
	{
		// the move failed, bump all nextthink times and back out moves
		for (mv = ent ; mv ; mv=mv->teamchain)
		{
			if (mv->nextthink > 0)
				mv->nextthink += FRAMETIME;
		}

		// if the pusher has a "blocked" function, call it
		// otherwise, just stay in place until the obstacle is gone
		if (part->blocked)
			part->blocked (part, obstacle);
#if 0
		// if the pushed entity went away and the pusher is still there
		if (!obstacle->inuse && part->inuse)
			goto retry;
#endif
	}
	else
	{
		// the move succeeded, so call all think functions
		for (part = ent ; part ; part=part->teamchain)
		{
			SV_RunThink (part);
		}
	}
}

// Assembly:
testb $0x4, 0x11d(%rdi)
jne 0x3824c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x30c0b(%rip), %rax     # 0x68cd8
movq 0x30774(%rip), %r13     # 0x68848
movq %rax, (%r13)
leaq 0xc(%rsp), %r15
movq %rsp, %r12
movq %rdi, %r14
movss 0x1c0(%r14), %xmm0
ucomiss 0x1b89d(%rip), %xmm0    # 0x53990
jne 0x3815b
jp 0x3815b
movss 0x1c4(%r14), %xmm0
ucomiss 0x1b889(%rip), %xmm0    # 0x53990
jne 0x3815b
jp 0x3815b
movss 0x1c8(%r14), %xmm0
ucomiss 0x1b875(%rip), %xmm0    # 0x53990
jne 0x3815b
jp 0x3815b
movss 0x1cc(%r14), %xmm0
ucomiss 0x1b861(%rip), %xmm0    # 0x53990
jne 0x3815b
jp 0x3815b
movss 0x1d0(%r14), %xmm0
ucomiss 0x1b84d(%rip), %xmm0    # 0x53990
jne 0x3815b
jp 0x3815b
movss 0x1d4(%r14), %xmm0
ucomiss 0x1b839(%rip), %xmm0    # 0x53990
jne 0x3815b
jnp 0x3819b
leaq 0x1c0(%r14), %rdi
movss 0x1b126(%rip), %xmm0    # 0x53290
movq %r15, %rsi
callq 0x189d0
leaq 0x1cc(%r14), %rdi
movss 0x1b10f(%rip), %xmm0    # 0x53290
movq %r12, %rsi
callq 0x189d0
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x183e0
testl %eax, %eax
je 0x381b3
movq 0x2c8(%r14), %r14
testq %r14, %r14
jne 0x380e3
movb $0x1, %bpl
xorl %r14d, %r14d
jmp 0x381b5
xorl %ebp, %ebp
movl $0xa000, %eax           # imm = 0xA000
addq 0x30b17(%rip), %rax     # 0x68cd8
cmpq %rax, (%r13)
jbe 0x381dc
movq 0x30432(%rip), %rcx     # 0x68600
leaq 0x1f8a4(%rip), %rsi     # 0x57a79
xorl %edi, %edi
xorl %eax, %eax
callq *0x38(%rcx)
testb %bpl, %bpl
je 0x381f7
movq %rbx, %rdi
callq 0x18620
movq 0x2c8(%rbx), %rbx
testq %rbx, %rbx
jne 0x381e1
jmp 0x3823e
xorps %xmm0, %xmm0
movss 0x200(%rbx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x38217
addss 0x1b081(%rip), %xmm1    # 0x53290
movss %xmm1, 0x200(%rbx)
movq 0x2c8(%rbx), %rbx
testq %rbx, %rbx
jne 0x381fa
movq 0x218(%r14), %rax
testq %rax, %rax
je 0x3823e
movq 0x30642(%rip), %rcx     # 0x68878
movq (%rcx), %rsi
movq %r14, %rdi
callq *%rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq