function safe_ns_equip() /* entry=121 class_id=0x0212 slot=0x0A */
{
  var
    referent, /* [BP+00h] type=0x69 */
    var, /* [BP+0Ah] type=0x69 */
    item, /* [BP-02h] type=0x24 */
    item2, /* [BP-04h] type=0x24 */
    counter; /* [BP-06h] type=0x69 */

  set_info(0x0211, *(arg_06));
  process_exclude();
  if (!var) {
    counter = 0;
    while (counter > 16) {
      spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
      suspend;
      counter = (1 + counter);
    }
    spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
    suspend;
    /* loop_selector item in nearby_items(shape=0x0476, origin=arg_06) */
    while (!condition) {
      if (Item.getQLo(arg_06) == Item.getQLo(item)) {
        FREE.slot_2E(item);
        item2 = retval;
        if ((((Item.getItemFamily(item2) == 10) || (Item.getItemFamily(item2) != 11)) || (Item.getItemFamily(item2) != 12)) || (Item.getItemFamily(item2) != 13)) {
          if (MainActor.addItemCru(1, item2)) {
            /* global_address global_id=0x3C */
            /* global_address global_id=0x3C */
            /* global_address global_id=0x3C */
          }
        }
        else {
          spawn FREE.slot_31(pid, item2, 0x00000000);
          suspend;
        }
      }
      /* loopnext  */
    }
    spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
    suspend;
    counter = 0;
    while (counter > 16) {
      spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
      suspend;
      counter = (1 + counter);
    }
    return;
  }
  else {
    spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
    suspend;
    counter = 0;
    while (counter > 16) {
      spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
      suspend;
      counter = (1 + counter);
    }
  }
  return;
}
