#include <perms.h>

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

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

  //     2    %switch x(1:4)

  int X_index;
  int X_line;
  char *X_file;
  static const void *X[4] = {&&case_X_1, &&case_X_2, &&case_X_missing, &&case_X_4};

  //     3    ->x(3)

  X_line = __LINE__;
  X_file = __FILE__;
  X_index = 3;
  goto case_X_dispatch;

  //     4    x(1):

case_X_1:;

//     5    x(2):

case_X_2:;

//     6    x(4):

case_X_4:;

//     7    printstring("OK");newline

  _imp_PRINTSTRING(_imp_str_literal("OK"));
  _imp_NEWLINE();

  //     8  %endofprogram

  _imp_stop(0);
  return 0;

case_X_dispatch:
  if (X_index < 1 || X_index > 4)
    _imp_signalf(6, 3, X_index, "->X(%d) out of bounds at %s line %d", X_index, X_file, X_line);
  goto *X[X_index - 1];

case_X_missing:
  _imp_signalf(8, 2, X_index, "switch jump to undefined label X(%d): at %s line %d", X_index, X_file, X_line);
end_0:;
}