#include <perms.h>
static void LOCAL(int I);

//          Edinburgh IMP77 Compiler - Version 8.4
//
//     1  ! In the C translation, local should be 'static' not external or auto...
//     2  %routinespec local(%integer i)
//     3
//     4  %externalroutine fred

void FRED(void) {
  //     5    local(2)

  LOCAL(2);

  //     6  %end

  return;
} /* end of FRED */

//     7
//     8  %routine local(%integer i)

static void LOCAL(int I) {
  //     9    write(i,0); newline

  _imp_WRITE(I, 0);
  _imp_NEWLINE();

  //    10  %end

  return;
} /* end of LOCAL */

//    11
//    12  %begin

int main(int argc, char **argv) { /*%begin*/
  _imp_initialise(argc, argv);
  auto void JIM(int I);

  //    13    %routinespec jim(%integer i)
  //    14    jim(22)

  JIM(22);

  //    15    %routine jim(%integer i)

  void JIM(int I) {
    //    16      fred

    FRED();

    //    17    %end

    return;
  } /* end of JIM */

  // ?I unused
  //    18  %end

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

//    19
//    20  %endoffile