// File: /workspace/github_c_makefile_star2_O1/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 0x38ae2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x3138b(%rip), %rax     # 0x69cd8
movq 0x30ef4(%rip), %r13     # 0x69848
movq %rax, (%r13)
testq %rdi, %rdi
sete %bpl
je 0x38a3e
leaq 0xc(%rsp), %r15
movq %rsp, %r12
movq %rbx, %r14
movss 0x1c0(%r14), %xmm0
ucomiss 0x1bfe0(%rip), %xmm0    # 0x54960
jne 0x389e8
jp 0x389e8
movss 0x1c4(%r14), %xmm0
ucomiss 0x1bfcc(%rip), %xmm0    # 0x54960
jne 0x389e8
jp 0x389e8
movss 0x1c8(%r14), %xmm0
ucomiss 0x1bfb8(%rip), %xmm0    # 0x54960
jne 0x389e8
jp 0x389e8
movss 0x1cc(%r14), %xmm0
ucomiss 0x1bfa4(%rip), %xmm0    # 0x54960
jne 0x389e8
jp 0x389e8
movss 0x1d0(%r14), %xmm0
ucomiss 0x1bf90(%rip), %xmm0    # 0x54960
jne 0x389e8
jp 0x389e8
movss 0x1d4(%r14), %xmm0
ucomiss 0x1bf7c(%rip), %xmm0    # 0x54960
jne 0x389e8
jnp 0x38a28
leaq 0x1c0(%r14), %rdi
movss 0x1b899(%rip), %xmm0    # 0x54290
movq %r15, %rsi
callq 0x189d0
leaq 0x1cc(%r14), %rdi
movss 0x1b882(%rip), %xmm0    # 0x54290
movq %r12, %rsi
callq 0x189d0
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x183e0
testl %eax, %eax
je 0x38a41
movq 0x2c8(%r14), %r14
testq %r14, %r14
sete %bpl
jne 0x38970
jmp 0x38a41
movq %rbx, %r14
movl $0xa000, %eax           # imm = 0xA000
addq 0x3128b(%rip), %rax     # 0x69cd8
cmpq %rax, (%r13)
jbe 0x38a68
movq 0x30ba6(%rip), %rcx     # 0x69600
leaq 0x1fe04(%rip), %rsi     # 0x58865
xorl %edi, %edi
xorl %eax, %eax
callq *0x38(%rcx)
testb $0x1, %bpl
je 0x38a84
testq %rbx, %rbx
je 0x38ad4
movq %rbx, %rdi
callq 0x18620
movq 0x2c8(%rbx), %rbx
jmp 0x38a6e
testq %rbx, %rbx
je 0x38ab9
xorps %xmm0, %xmm0
movss 0x1b7fc(%rip), %xmm1    # 0x54290
movss 0x200(%rbx), %xmm2
ucomiss %xmm0, %xmm2
jbe 0x38aad
addss %xmm1, %xmm2
movss %xmm2, 0x200(%rbx)
movq 0x2c8(%rbx), %rbx
testq %rbx, %rbx
jne 0x38a94
movq 0x218(%r14), %rax
testq %rax, %rax
je 0x38ad4
movq 0x30dac(%rip), %rcx     # 0x69878
movq (%rcx), %rsi
movq %r14, %rdi
callq *%rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq