#include <perms.h>

//          Edinburgh IMP77 Compiler - Version 8.4
//
//     1  %begin

int main(int argc, char **argv) { /*%begin*/
  _imp_initialise(argc, argv);

  //     2    %routine fifteen(%string(15) s)

  void FIFTEEN(_imp_string15 S) {
    //     3      printstring(s)

    _imp_PRINTSTRING(
        /* clang-format off */
*({  __typeof__(_imp_string15) tmp = S/*q*/;  (_imp_string255 *)&tmp;  })
        /* clang-format on */
    );

    //     4      newline

    _imp_NEWLINE();

    //     5    %end

    return;
  } /* end of FIFTEEN */

  //     6
  //     7    %on %event 6 %start

  if (!_imp_on_event(6)) goto L_0001;

    //     8      print string("A string capacity exceeded fault was trapped."); new line

  _imp_PRINTSTRING(_imp_str_literal("A string capacity exceeded fault was trapped."));
  _imp_NEWLINE();

  //     9      %stop

  _imp_stop(0);

  //    10    %finish

L_0001:;

//    11
//    12    %string(7) seven = "abcdefg"

  _imp_string7 SEVEN;

  /* clang-format off */
_imp_strncpy(/*?*/&SEVEN, ({__typeof__(_imp_string255) tmp;/*B*/ tmp = _imp_str_literal("abcdefg"); (void *)&tmp;}), /*max:*/7);

  /* clang-format on */

  //    13    %string(31) thirty one = "0123456789012345678901234567890"

  _imp_string31 THIRTYONE;

  /* clang-format off */
_imp_strncpy(/*?*/&THIRTYONE, ({__typeof__(_imp_string255) tmp;/*B*/ tmp = _imp_str_literal("0123456789012345678901234567890"); (void *)&tmp;}), /*max:*/31);

  /* clang-format on */

  //    14
  //    15    fifteen(thirty one)

  FIFTEEN(
      /* clang-format off */
*({  __typeof__(_imp_string31) tmp = THIRTYONE/*q*/;  (_imp_string15 *)&tmp;  })
      /* clang-format on */
  );

  //    16    fifteen(seven)

  FIFTEEN(
      /* clang-format off */
*({  __typeof__(_imp_string7) tmp = SEVEN/*q*/;  (_imp_string15 *)&tmp;  })
      /* clang-format on */
  );

  //    17
  //    18  %endofprogram

  _imp_stop(0);
  return 0;
end_0:;
}