extern int Physics_CalcElasticity(int, int, int);
extern void Physics_GetGravityDir(void);
int Object_FindByType(int x)
{
  int *slot = (int *)0x02001508;
  int r5;
  register unsigned int spv __asm__("r13");
  if (*slot == 0) {
    *slot = 0x02002F70;
  }
  r5 = *slot;
  {
    unsigned int top = (unsigned int)(r5 + x);
    if (top > spv) {
      Physics_CalcElasticity(1, 0x08CA03A4, 32);
      Physics_GetGravityDir();
    }
  }
  *slot = *slot + x;
  return r5;
}
