function surcamew_slot_20() /* entry=284 class_id=0x04DE 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_03FC;

  block_02F3:
    for monit in nearby_items(shape=0x037D, 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_038A:
    spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
    suspend;
    spawn SURCAMEW.slot_21(pid, arg_06);
    suspend;
    spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
    suspend;
    goto block_0501;

  block_03FC:
    code = 0;
    if Item.getQHi(arg_06) goto block_04E2;

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

  block_0430:
    if condition goto block_0468;

  block_0433:
    if (Item.getQLo(valueBox) != link) goto block_0464;

  block_0445:
    VALBOX.slot_20(valueBox);
    passcode = retval;
    code = (1 + code);
    goto block_0468;

  block_0464:
    /* loopnext  */
    goto block_0430;

  block_0468:
    if code goto block_049A;

  block_0472:
    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_04BD;

  block_049A:
    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_04BD:
    spawn TEXTFILE.slot_20(pid, textFile, arg_06);
    /* free_stack_string value_u8=0x0 target=[SP+00h] */
    suspend;

  block_04E2:
    spawn SURCAMEW.slot_21(pid, arg_06);
    suspend;

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

}
