#include <perms.h>
static const int Bytesize = 1;
static const int Wordsize = 4;
int Getarguments(void);
int Getargcount(void) {
  int *Arr;
  int Count;
  Arr = &Getarguments();
  Count = 0;
  while (*Integer(Addr(*Arr) + Wordsize * Count)) Count++;
  return (Count);
}
_imp_string Getarg(int Index) {
  int I;
  int Len;
  unsigned char *B;
  unsigned char *Src;
  _imp_string S;
  *Length(S) = 0;
  if (0 <= Index && Index < Getargcount()) {
    B = Byteinteger(*Integer(Addr(Getarguments()) + Wordsize * Index));
    Len = 0;
    while (*Byteinteger(Addr(*B) + Len)) {
      Len++;
      if (Len == -1) {
        Len = 0;
        break;
      }
    }
    for (I = 1; I <= Len; I++) {
      Src = Byteinteger(Addr(*B) + Bytesize * (I - 1));
      *Length(S) = *Length(S) + 1;
      *Charno(S, *Length(S)) = *Src;
    }
  }
  return (S);
}
