#include <perms.h>

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

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

  //     2    %label fred

  // __label__ /* block-scoped label (GCC) */ FRED;

  //     3    %begin

  { /*%begin*/

    //     4      %name jim  ;! here as a comparison of what is being output by the translator

    _imp_name *JIM;

    //     5      %switch bert(0:1)

    int BERT_index;
    int BERT_line;
    char *BERT_file;
    static const void *BERT[2] = {&&case_BERT_0, &&case_BERT_1};

    //     6      -> fred

    goto U_1001;

    //     7      bert(0):

  case_BERT_0:;

  //     8      %stop

    _imp_stop(0);

    //     9      fred:

  U_1001:;

  //    10      ->bert(0)

    BERT_line = __LINE__;
    BERT_file = __FILE__;
    BERT_index = 0;
    goto case_BERT_dispatch;

    //    11      bert(1):

  case_BERT_1:;

  //    12    %end

    goto end_1000;

  case_BERT_dispatch:
    if (BERT_index < 0 || BERT_index > 1)
      _imp_signalf(6, 3, BERT_index, "->BERT(%d) out of bounds at %s line %d", BERT_index, BERT_file, BERT_line);
    goto *BERT[BERT_index - 0];
  end_1000:;
  }

  // ?JIM unused
  //    13    ->fred

  goto U_1000;

  //    14    fred:

U_1000:;

//    15  %endofprogram

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