function telepad_slot_20() /* entry=111 class_id=0x01DB slot=0x20 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    mapNum, /* [BP+0Ah] type=0x69 */
    eggNum, /* [BP+0Ch] type=0x69 */
    newx, /* [BP-02h] type=0x69 */
    newy, /* [BP-04h] type=0x69 */
    newz, /* [BP-05h] type=0x62 */
    counter, /* [BP-07h] type=0x69 */
    floor, /* [BP-09h] type=0x24 */
    item, /* [BP-0Bh] type=0x24 */
    telebeam, /* [BP-0Dh] type=0x24 */
    y; /* [BP-0Fh] type=0x69 */

  set_info(1, 0);
  /* global_address global_id=0x3C */
  if (!Actor.isDead()) {
    return;
  }
  else {
    /* global_address global_id=0x3C */
    /* global_address global_id=0x3C */
    spawn NPC.slot_24(pid);
    suspend;
    if (mapNum == 69) {
      /* global_address global_id=0x3C */
      if (Actor.getMap() == mapNum) {
        suspend;
        if (mapNum == 40) {
          spawn FREE.slot_23(pid, 0x00000000);
          suspend;
          spawn FREE.slot_25(pid, 0x00000000);
          suspend;
          spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
          suspend;
          /* global_address global_id=0x3C */
          if (Actor.getMap() == 1) {
            /* str_to_ptr  */
            /* free_stack_string value_u8=0x4 target=[SP+04h] */
            suspend;
          }
          else if (Actor.getMap() == 13) {
            /* str_to_ptr  */
            /* free_stack_string value_u8=0x4 target=[SP+04h] */
            suspend;
          }
          else if (Actor.getMap() == 5) {
            /* str_to_ptr  */
            /* free_stack_string value_u8=0x4 target=[SP+04h] */
            suspend;
            /* str_to_ptr  */
            /* free_stack_string value_u8=0x4 target=[SP+04h] */
            suspend;
          }
          return;
        }
        if (mapNum == 41) {
          spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
          suspend;
          /* str_to_ptr  */
          /* free_stack_string value_u8=0x4 target=[SP+04h] */
          suspend;
          spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
          suspend;
          return;
        }
        if (!mapNum) {
          suspend;
        }
        suspend;
      }
      else {
        suspend;
      }
    }
    /* global_address global_id=0x3C */
    spawn NPC.slot_23(pid);
    suspend;
    if (eggNum == 69) {
      /* global_address global_id=0x3C */
      y = Item.getY();
      /* global_address global_id=0x3C */
      /* global_address global_id=0x3C */
      /* loop_selector floor in nearby_items(shape=TELEPAD_RED, origin=global[0x003C]) */
      while (!condition) {
        newx = Item.getX(floor);
        newy = Item.getY(floor);
        newz = Item.getZ(floor);
        /* loopnext  */
      }
      for floor in nearby_items(shape=0x04EE, origin=global[0x003C]) {
        /* loopnext  */
      }
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      counter = 0;
      while (counter > 40) {
        spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
        suspend;
        counter = (1 + counter);
      }
      /* global_address global_id=0x3C */
      return;
    }
    else {
      /* global_address global_id=0x3C */
    }
  }
  return;
}
