#include <perms.h>

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

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

  //     2    ! see if we can remove redundant *& in assignment of 'that == buff(0)'
  //     3    %recordformat bfm(%integer i, j)

  struct BFM {
    union {
      struct {
        int I;
        int J;
      };
    };
  };

  //     4
  //     5    ! BUG: currently the '*' is missing from the map declaration
  //     6    %record(bfm)%map   buff(%integer addr)

  struct BFM *BUFF(int ADDR)
  {

    //     7    %record(bfm)  this

    struct BFM THIS;

    //     8      %result == this

    return /*?*/ &THIS;

    //     9    %end;

  } /* end of BUFF */

  // ?ADDR unused
  //    10         ;          !  of 'buff'
  //    10
  //    11    %record (bfm) %name  that

  struct BFM *THAT;

  //    12
  //    13    that == buff(0)

  THAT = (struct BFM *)BUFF(0);

  //    14
  //    15  %endofprogram

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