/* Created by mplwrap version 93/04/01 on Thu Apr 1 21:14:05 PST 1993 */
/* Edited by erikb@ii.uib.no */

#include <mpl.h>
#include <stdio.h>
#include <stdlib.h>
#include "genutil.h"

typedef struct {
	int * addr;		/* base address of array */
	int   rank;		/* rank of array */
        int   onDPU;		/* if base address is FE or BE */
	int   extents[7];	/* extents of the array */
} DopeVector;

extern int blp_btprmNew( 
#ifdef __STDMPL__
int *, int
#endif
  );
BLP_BTPRMNEW ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int ret_val;
    int * var1;
    int * var2;
    int   dpuVar2;
    int   nbits;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) {
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
	   nbits = *var2;
        }
        else 
          {
            fprintf(stderr, "Error in BLP_BTPRMNEW.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int  * ptr;
        MALLOC(var1, nbits, int);
        copyIn( (char*)(fe+1+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), nbits*sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_BTPRMNEW.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    ret_val = blp_btprmNew( var1, *var2);
      
      { /* copy return-value back to FE as 1st parameter */
        int * ptr;
        copyIn((char*) (fe+1),(char*)(&ptr), sizeof(ptr));
        copyOut((char*)(&ret_val),(char*)(ptr), sizeof(ret_val));
      }
      
  }

extern void blp_copy( 
#ifdef __STDMPL__
int, int
#endif
  );
BLP_COPY ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int * var1;
    int   dpuVar1;
    int * var2;
    int   dpuVar2;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_COPY.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in BLP_COPY.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    blp_copy( *var1, *var2);
  }

extern int blp_copyNew( 
#ifdef __STDMPL__
int
#endif
  );
BLP_COPYNEW ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int ret_val;
    int * var1;
    int   dpuVar1;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_COPYNEW.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    ret_val = blp_copyNew( *var1);
      
      { /* copy return-value back to FE as 1st parameter */
        int * ptr;
        copyIn((char*) (fe+1),(char*)(&ptr), sizeof(ptr));
        copyOut((char*)(&ret_val),(char*)(ptr), sizeof(ret_val));
      }
  }

extern void blp_free( 
#ifdef __STDMPL__
int
#endif
  );
BLP_FREE ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int * var1;
    int   dpuVar1;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_FREE.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    blp_free( *var1);
  }

extern int blp_identNew( 
#ifdef __STDMPL__
int
#endif
  );
BLP_IDENTNEW ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int ret_val;
    int * var1;
    int   dpuVar1;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_IDENTNEW.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    ret_val = blp_identNew( *var1);
      
      { /* copy return-value back to FE as 1st parameter */
        int * ptr;
        copyIn((char*) (fe+1),(char*)(&ptr), sizeof(ptr));
        copyOut((char*)(&ret_val),(char*)(ptr), sizeof(ret_val));
      }
  }

extern int blp_iMatNew( 
#ifdef __STDMPL__
int *, int *, int
#endif
  );
BLP_IMATNEW ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int ret_val;
    int  * var1;
    int  * var2;
    int * var3;
    int   dpuVar3;
    int   nbits;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var3 = &dpuVar3;
        copyIn( (char*)(fe+3+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) {
           copyIn( (char*)(ptr),(char*)(var3), sizeof(*var3));
           nbits = *var3;
        }
        else 
          {
            fprintf(stderr, "Error in BLP_IMATNEW.m : No address to FE argument 3 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int  * ptr;
        MALLOC(var1, nbits*nbits, int);
        copyIn( (char*)(fe+1+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), nbits*nbits*sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_IMATNEW.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int  * ptr;
        MALLOC(var1, nbits, int);
        copyIn( (char*)(fe+2+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), nbits*sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in BLP_IMATNEW.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    ret_val = blp_iMatNew( var1, var2, *var3);
      
      { /* copy return-value back to FE as 1st parameter */
        int * ptr;
        copyIn((char*) (fe+1),(char*)(&ptr), sizeof(ptr));
        copyOut((char*)(&ret_val),(char*)(ptr), sizeof(ret_val));
      }
  }

extern void blp_inv( 
#ifdef __STDMPL__
int
#endif
  );
BLP_INV ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int * var1;
    int   dpuVar1;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_INV.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    blp_inv( *var1);
  }

extern void blp_lMult( 
#ifdef __STDMPL__
int, int
#endif
  );
BLP_LMULT ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int * var1;
    int   dpuVar1;
    int * var2;
    int   dpuVar2;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_LMULT.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in BLP_LMULT.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    blp_lMult( *var1, *var2);
  }

extern unsigned blp_pDestAd( 
#ifdef __STDMPL__
int, plural unsigned
#endif
  );
BLP_PDESTAD ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    plural unsigned ret_val;
    int * var1;
    int   dpuVar1;
    plural unsigned * var2;
    plural unsigned   dpuVar2;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+2), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_PDESTAD.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    if (be[3]->onDPU) 
      var2 = (plural unsigned *)be[3]->addr;
    else  /* Arrays must be on DPU */
      { 
         fprintf(stderr, "Error in BLP_PDESTAD.m : argument 2 must be on DPU\n");
         exit(1); 
      }
     
    /* call the MPL function */ 
    ret_val = blp_pDestAd( *var1, *var2);
      
    { /* pass back return-value */
    if (be[1]->onDPU) 
       {
          /* var2 is just used as temp. variable here */
          var2 = (plural unsigned *)be[1]->addr;
          *var2 = ret_val;
       }
    else  /* Arrays must be on DPU */
      { 
         fprintf(stderr, "Error in BLP_PDESTAD.m : argument 0 must be on DPU\n");
         exit(1); 
      }

    }
  }

extern void blp_print( 
#ifdef __STDMPL__
int
#endif
  );
BLP_PRINT ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int * var1;
    int   dpuVar1;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_PRINT.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    blp_print( *var1);
  }

extern void blp_rMult( 
#ifdef __STDMPL__
int, int
#endif
  );
BLP_RMULT ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int * var1;
    int   dpuVar1;
    int * var2;
    int   dpuVar2;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_RMULT.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in BLP_RMULT.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    blp_rMult( *var1, *var2);
  }

extern int blp_rout( 
#ifdef __STDMPL__
int
#endif
  );
BLP_ROUT ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int ret_val;
    int * var1;
    int   dpuVar1;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_ROUT.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    ret_val = blp_rout( *var1);
      
      { /* copy return-value back to FE as 1st parameter */
        int * ptr;
        copyIn((char*) (fe+1),(char*)(&ptr), sizeof(ptr));
        copyOut((char*)(&ret_val),(char*)(ptr), sizeof(ret_val));
      }
  }

extern int blp_sDestAd( 
#ifdef __STDMPL__
int, unsigned
#endif
  );
BLP_SDESTAD ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int ret_val;
    int * var1;
    int   dpuVar1;
    unsigned * var2;
    unsigned   dpuVar2;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in BLP_SDESTAD.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        unsigned * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in BLP_SDESTAD.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    ret_val = blp_sDestAd( *var1, *var2);
      
      { /* copy return-value back to FE as 1st parameter */
        int * ptr;
        copyIn((char*) (fe+1),(char*)(&ptr), sizeof(ptr));
        copyOut((char*)(&ret_val),(char*)(ptr), sizeof(ret_val));
      }
  }

extern void permut( 
#ifdef __STDMPL__
plural int *, int, int, int, int
#endif
  );
PERMUT ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    plural int  * var1;
    plural int    dpuVar1;
    int * var2;
    int   dpuVar2;
    int * var3;
    int   dpuVar3;
    int * var4;
    int   dpuVar4;
    int * var5;
    int   dpuVar5;
      
    if (be[1]->onDPU) 
      var1 = (plural int  *)be[1]->addr;
    else  /* Arrays must be on DPU */
      { 
         fprintf(stderr, "Error in PERMUT.m : argument 1 must be on DPU\n");
         exit(1); 
      }
     
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in PERMUT.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var3 = &dpuVar3;
        copyIn( (char*)(fe+3+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var3), sizeof(*var3));
        else 
          {
            fprintf(stderr, "Error in PERMUT.m : No address to FE argument 3 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var4 = &dpuVar4;
        copyIn( (char*)(fe+4+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var4), sizeof(*var4));
        else 
          {
            fprintf(stderr, "Error in PERMUT.m : No address to FE argument 4 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var5 = &dpuVar5;
        copyIn( (char*)(fe+5+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var5), sizeof(*var5));
        else 
          {
            fprintf(stderr, "Error in PERMUT.m : No address to FE argument 5 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    permut( var1, *var2, *var3, *var4, *var5);
  }

extern void permut32( 
#ifdef __STDMPL__
plural int *, int, int
#endif
  );
PERMUT32 ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    plural int  * var1;
    plural int    dpuVar1;
    int * var2;
    int   dpuVar2;
    int * var3;
    int   dpuVar3;
      
    if (be[1]->onDPU) 
      var1 = (plural int  *)be[1]->addr;
    else  /* Arrays must be on DPU */
      { 
         fprintf(stderr, "Error in PERMUT32.m : argument 1 must be on DPU\n");
         exit(1); 
      }
     
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in PERMUT32.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var3 = &dpuVar3;
        copyIn( (char*)(fe+3+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var3), sizeof(*var3));
        else 
          {
            fprintf(stderr, "Error in PERMUT32.m : No address to FE argument 3 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    permut32( var1, *var2, *var3);
  }

extern void permut64( 
#ifdef __STDMPL__
plural int *, int, int
#endif
  );
PERMUT64 ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    plural int  * var1;
    plural int    dpuVar1;
    int * var2;
    int   dpuVar2;
    int * var3;
    int   dpuVar3;
      
    if (be[1]->onDPU) 
      var1 = (plural int  *)be[1]->addr;
    else  /* Arrays must be on DPU */
      { 
         fprintf(stderr, "Error in PERMUT64.m : argument 1 must be on DPU\n");
         exit(1); 
      }
     
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in PERMUT64.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var3 = &dpuVar3;
        copyIn( (char*)(fe+3+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var3), sizeof(*var3));
        else 
          {
            fprintf(stderr, "Error in PERMUT64.m : No address to FE argument 3 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    permut64( var1, *var2, *var3);
  }

extern int pmr_blpCheck( 
#ifdef __STDMPL__
int, int
#endif
  );
PMR_BLPCHECK ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int ret_val;
    int * var1;
    int   dpuVar1;
    int * var2;
    int   dpuVar2;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in PMR_BLPCHECK.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var2 = &dpuVar2;
        copyIn( (char*)(fe+2+1), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var2), sizeof(*var2));
        else 
          {
            fprintf(stderr, "Error in PMR_BLPCHECK.m : No address to FE argument 2 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    ret_val = pmr_blpCheck( *var1, *var2);
      
      { /* copy return-value back to FE as 1st parameter */
        int * ptr;
        copyIn((char*) (fe+1),(char*)(&ptr), sizeof(ptr));
        copyOut((char*)(&ret_val),(char*)(ptr), sizeof(ret_val));
      }
  }

extern void pmr_free( 
#ifdef __STDMPL__
int
#endif
  );
PMR_FREE ( fe, be )
    int * fe[];        /*  FE(vax) address of FE(vax) arguments */
    DopeVector * be[]; /* a BE(acu) address of BE(acu) dopevectors */
  {
    int * var1;
    int   dpuVar1;
      
      /* copy in scalar argument from front-end */
      {
        int * ptr;
        var1 = &dpuVar1;
        copyIn( (char*)(fe+1+0), (char*)(&ptr), sizeof(ptr));
        if (ptr) 
           copyIn( (char*)(ptr),(char*)(var1), sizeof(*var1));
        else 
          {
            fprintf(stderr, "Error in PMR_FREE.m : No address to FE argument 1 \n");
            exit(1); 
          }
      }
      
    /* call the MPL function */ 
    pmr_free( *var1);
  }
