#include <perms.h>

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

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

  //     2    ! be sure not to just use 'INDEX' icode on stack to determine
  //     3    ! number of indices, because there may be other ones underneath
  //     4    ! that do not belong to the current access.
  //     5    ! Need to store the arity of the array in its delaration (def_tag)
  //     6    %integerarray  p,q,r,s(0:255, 0:255)

  int P[256][256];
  int Q[256];
  int R[256];
  int S[256];

  //     7    r(100, s(50, q(1,2))) = 42

  R[S[50][Q[2] /* no lb? #2 */]] = 42;

  //     8  %endofprogram

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