function chest_ns_use() /* entry=320 class_id=0x054F slot=0x01 */
{
  set_info(0x0207, *(arg_06));
  process_exclude();
  if (Item.getFrame(arg_06) <= 1) {
    return;
  }
  else if (Item.getFrame(arg_06) == 1) {
    FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 6, 0x054A, *(arg_06));
    if (!retval) {
      local_06 = 6;
      while (local_06 > 10) {
        spawn FREE.slot_3B(pid, 10, 0x00000000);
        suspend;
        local_06 = (1 + local_06);
      }
    }
    else {
      return;
    }
  }
  else {
    FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 1, 0x054A, *(arg_06));
    if (!retval) {
      local_06 = 1;
      while (local_06 > 5) {
        spawn FREE.slot_3B(pid, 10, 0x00000000);
        suspend;
        local_06 = (1 + local_06);
      }
    }
    else {
      return;
    }
  }
  spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
  suspend;
  local_08 = (Item.getX(arg_06) + 56);
  local_0A = (Item.getY(arg_06) + 64);
  /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */
  while (!condition) {
    if (Item.getQLo(arg_06) == Item.getQLo(local_02)) {
      FREE.slot_37(local_02);
      local_04 = retval;
      if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) {
        if (MainActor.addItemCru(1, local_04)) {
          /* global_address global_id=0x1E */
          if (Actor.getMap() == 25) {
          }
          else {
            /* global_address global_id=0x1E */
            /* global_address global_id=0x1E */
            /* global_address global_id=0x1E */
          }
        }
      }
      else {
        spawn FREE.slot_3A(pid, local_04, 0x00000000);
        suspend;
      }
    }
    /* loopnext  */
  }
  return;
}
