function timer_slot_20() /* entry=271 class_id=0x04C9 slot=0x20 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    cmd, /* [BP-02h] type=0x69 */
    time, /* [BP-04h] type=0x69 */
    phase2, /* [BP-06h] type=0x69 */
    a, /* [BP-08h] type=0x69 */
    l1, /* [BP-0Ch] type=0x64 */
    l2, /* [BP-10h] type=0x64 */
    l3; /* [BP-14h] type=0x64 */

  set_info(1, 0);
  time = ((Item.getMapArray(arg_06) * 0x0100) + Item.getNPCNum(arg_06));
  if (time == 0) {
    return;
  }
  else {
    cmd = Item.getQHi(arg_06);
    a = (cmd / 32);
    if (a == 0) {
      phase2 = 0;
    }
    else if (a == 1) {
      phase2 = 10;
    }
    else if (a == 2) {
      phase2 = 25;
    }
    else if (a == 3) {
      phase2 = 40;
    }
    else if (a == 4) {
      phase2 = 50;
    }
    else if (a == 5) {
      phase2 = 60;
    }
    else if (a == 6) {
      phase2 = 75;
    }
    else if (a == 7) {
      phase2 = 90;
    }
    /* word_to_dword  */
    l1 = time;
    /* word_to_dword  */
    l2 = phase2;
    l1 = (l1 * l2);
    /* word_to_dword  */
    l3 = 100;
    l1 = (l1 / l3);
    /* dword_to_word  */
    phase2 = l1;
    time = (time - phase2);
    while (!(1)) {
      if (!phase2) {
        spawn class_0A0C_slot_32(pid, phase2, 0x00000000);
        suspend;
        if ((Item.getStatus(arg_06) & 0x1000) == 0) {
          return;
        }
        if ((Item.inFastArea(arg_06) == 1) || ((cmd & 8) != 0)) {
          spawn class_0A18_slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
          suspend;
        }
      }
      spawn class_0A0C_slot_32(pid, time, 0x00000000);
      suspend;
      if ((Item.getStatus(arg_06) & 0x1000) == 0) {
        if (!(cmd & 16)) {
          spawn class_0A18_slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
          suspend;
        }
        return;
      }
      if ((Item.inFastArea(arg_06) == 1) || ((cmd & 8) != 0)) {
        if (!phase2) {
          spawn class_0A18_slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
          suspend;
        }
        else {
          spawn class_0A18_slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
          suspend;
        }
      }
      if ((cmd & 1) == 0) {
        /* bit_not  */
        return;
      }
    }
  }
  return;
}
