function surcamns_slot_20() /* entry=269 class_id=0x04C6 slot=0x20 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    textFile, /* [BP-02h] type=0x73 */
    monit, /* [BP-04h] type=0x24 */
    valueBox, /* [BP-06h] type=0x24 */
    passcode, /* [BP-08h] type=0x69 */
    link, /* [BP-0Ah] type=0x69 */
    code; /* [BP-0Bh] type=0x62 */

  entry:
    set_info(0x021B, 0);
    link = Item.getQLo(arg_06);
    if (Item.getMapArray(arg_06) != 0) goto block_0356;

  block_024D:
    for monit in nearby_items(shape=0x037A, origin=arg_06) {
      if ((Item.getQLo(monit) == link) || (link != 0)) {
        if (!Item.getQHi(monit)) {
          TEXTFILE.slot_21(Item.getQHi(monit), Item.getQLo(monit), arg_06);
          /* free_local_string bp_offset=0xFE target=[BP-02h] */
          textFile = retval;
          spawn TEXTFILE.slot_20(pid, textFile, arg_06);
          /* free_stack_string value_u8=0x0 target=[SP+00h] */
          suspend;
        }
      }
      /* loopnext  */
    }

  block_02E4:
    spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
    suspend;
    spawn SURCAMNS.slot_21(pid, arg_06);
    suspend;
    spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
    suspend;
    goto block_045B;

  block_0356:
    code = 0;
    if Item.getQHi(arg_06) goto block_043C;

  block_036C:
    /* loop_selector valueBox in nearby_items(shape=PLACEHOLDER_KEY_CUBE, origin=arg_06) */

  block_038A:
    if condition goto block_03C2;

  block_038D:
    if (Item.getQLo(valueBox) != link) goto block_03BE;

  block_039F:
    VALBOX.slot_20(valueBox);
    passcode = retval;
    code = (1 + code);
    goto block_03C2;

  block_03BE:
    /* loopnext  */
    goto block_038A;

  block_03C2:
    if code goto block_03F4;

  block_03CC:
    TEXTFILE.slot_23(passcode, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06);
    /* free_local_string bp_offset=0xFE target=[BP-02h] */
    textFile = retval;
    goto block_0417;

  block_03F4:
    TEXTFILE.slot_21(Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06);
    /* free_local_string bp_offset=0xFE target=[BP-02h] */
    textFile = retval;

  block_0417:
    spawn TEXTFILE.slot_20(pid, textFile, arg_06);
    /* free_stack_string value_u8=0x0 target=[SP+00h] */
    suspend;

  block_043C:
    spawn SURCAMNS.slot_21(pid, arg_06);
    suspend;

  block_045B:
    /* bit_not  */
    /* free_local_string bp_offset=0xFE target=[BP-02h] */
    return;

}
