#include <perms.h>
int _imp_mainep(int _imp_argc, char **_imp_argv) {
  int J;
  int K;
  static const unsigned char Cb1 = 255;
  static const unsigned char Cb2 = 0;
  static const int Cint3 = 10;
  static const int Cint4 = 3;
  static int Failures = 0;
  void Pass(void) { Printstring(_imp_str_literal("Pass: ")); }
  void Fail(void) {
    Printstring(_imp_str_literal("FAIL: "));
    Failures++;
  }
  int F(void) { return (3); }
  Openoutput(2, _imp_str_literal("Journal"));
  Selectoutput(2);
  Newlines(2);
  Printstring(_imp_str_literal("INTEGER Arithmetic Validation"));
  Newline();
  Printstring(_imp_str_literal("============================="));
  Newlines(2);
  Printstring(_imp_str_literal("Entities:"));
  Newline();
  Printstring(_imp_str_literal("-------- "));
  Newlines(2);
  Printstring(_imp_str_literal("Constants:                      "));
  Newline();
  Printstring(_imp_str_literal("---------                       "));
  Newline();
  Printstring(_imp_str_literal("%Integer  CInt3 = 10               "));
  Newline();
  Printstring(_imp_str_literal("%Integer  CInt4 = 3                "));
  Newlines(2);
  Newlines(3);
  Printstring(_imp_str_literal("Variables: "));
  Newline();
  Printstring(_imp_str_literal("---------  "));
  Newline();
  Printstring(_imp_str_literal("%Integer J "));
  Newline();
  Printstring(_imp_str_literal("%Integer K "));
  Newlines(2);
  Newlines(4);
  Printstring(_imp_str_literal("Test the Six Simple Relational Comparators"));
  Newline();
  Printstring(_imp_str_literal("------------------------------------------"));
  Newlines(2);
#if 1 /* 3==3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 = 3"));
  Newline();
#if 1 /* Cint4==3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 = 3"));
  Newline();
#if 1 /* 3==Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 = CInt4"));
  Newline();
#if 1 /* Cint4==Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 = CInt4"));
  Newlines(3);
  Printstring(_imp_str_literal("Let:    J = K = CInt4"));
  Newline();
  Printstring(_imp_str_literal("---"));
  Newlines(2);
  J = Cint4;
  K = Cint4;
  if (J == Cint4)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J = CInt4"));
  Newline();
  if (Cint4 == J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("CInt4 = J"));
  Newline();
  if (J == K)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J = K"));
  Newline();
  if (J == J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J = J"));
  Newline();
  if (J == 3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J = 3"));
  Newline();
  if (3 == J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("3 = J"));
  Newline();
  if (3 == F())
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("3 = F"));
  Newline();
  if (F() == 3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("F = 3"));
  Newline();
  if (F() * 3 + 10 == F() * F() + 5 * 2)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("F * 3 + 10 = F * F + 5 * 2"));
  Newlines(2);
#if 0 /* 3!=3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 # 3"));
  Newline();
#if 0 /* Cint4!=3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 # 3"));
  Newline();
#if 0 /* 3!=Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 # CInt4"));
  Newline();
#if 0 /* Cint4!=Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 # CInt4"));
  Newline();
  if (J != Cint4)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J # CInt4"));
  Newline();
  if (Cint4 != J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("CInt4 # J"));
  Newline();
  if (J != K)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J # K"));
  Newline();
  if (J != J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J # J"));
  Newline();
  if (J != 3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J # 3"));
  Newline();
  if (3 != J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("3 # J"));
  Newline();
  if (3 != F())
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("3 # F"));
  Newline();
  if (F() != 3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("F # 3"));
  Newlines(2);
  J = Cint4;
#if 0 /* 3 < 3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 < 3"));
  Newline();
  if (3 < J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("3 < J"));
  Newline();
  if (J < 3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J < 3"));
  Newline();
#if 0 /* 3 < Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 < CInt4"));
  Newline();
#if 0 /* Cint4 < 3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 < 3"));
  Newline();
  if (J < Cint4)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J < CInt4"));
  Newline();
  if (Cint4 < J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("CInt4 < J"));
  Newline();
#if 0 /* Cint4 < Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 < CInt4"));
  Newline();
  if (J < J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J < J"));
  Newline();
  if (F() < 3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("F < 3"));
  Newlines(2);
  J = Cint4;
#if 1 /* 3<=3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 <= 3"));
  Newline();
  if (3 <= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("3 <= J"));
  Newline();
  if (J <= 3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J <= 3"));
  Newline();
#if 1 /* 3<=Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 <= CInt4"));
  Newline();
#if 1 /* Cint4<=3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 <= 3"));
  Newline();
  if (J <= Cint4)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J <= CInt4"));
  Newline();
  if (Cint4 <= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("CInt4 <= J"));
  Newline();
#if 1 /* Cint4<=Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 <= CInt4"));
  Newline();
  if (J <= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J <= J"));
  Newline();
  if (F() <= 3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("F <= 3"));
  Newlines(2);
  J = Cint4;
#if 0 /* 3 > 3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 > 3"));
  Newline();
  if (3 > J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("3 > J"));
  Newline();
  if (J > 3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J > 3"));
  Newline();
#if 0 /* 3 > Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 > CInt4"));
  Newline();
#if 0 /* Cint4 > 3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 > 3"));
  Newline();
  if (J > Cint4)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J > CInt4"));
  Newline();
  if (Cint4 > J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("CInt4 > J"));
  Newline();
#if 0 /* Cint4 > Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 > CInt4"));
  Newline();
  if (J > J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J > J"));
  Newline();
  if (F() > 3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("F > 3"));
  Newlines(2);
  J = Cint4;
#if 1 /* 3>=3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 >= 3"));
  Newline();
  if (3 >= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("3 >= J"));
  Newline();
  if (J >= 3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J >= 3"));
  Newline();
#if 1 /* 3>=Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 >= CInt4"));
  Newline();
#if 1 /* Cint4>=3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 >= 3"));
  Newline();
  if (J >= Cint4)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J >= CInt4"));
  Newline();
  if (Cint4 >= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("CInt4 >= J"));
  Newline();
#if 1 /* Cint4>=Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 >= CInt4"));
  Newline();
  if (J >= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J >= J"));
  Newline();
  if (F() >= 3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("F >= 3"));
  Newlines(4);
#if 0 /* 3==10 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 = 10"));
  Newline();
#if 0 /* Cint4==10 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 = 10"));
  Newline();
#if 0 /* 10==Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("10 = CInt4"));
  Newline();
#if 0 /* Cint4==Cint3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 = CInt3"));
  Newlines(2);
  Printstring(_imp_str_literal("Let:   J = CInt4"));
  Newline();
  Printstring(_imp_str_literal("---    K  = CInt3"));
  Newlines(2);
  J = Cint4;
  K = Cint3;
  if (J == Cint3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J = CInt3"));
  Newline();
  if (Cint3 == J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("CInt3 = J"));
  Newline();
  if (J == K)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J = K"));
  Newline();
  if (J == 10)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J = 10"));
  Newline();
  if (10 == J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("10 = J"));
  Newlines(2);
#if 1 /* 3!=10 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 # 10"));
  Newline();
#if 1 /* Cint4!=10 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 # 10"));
  Newline();
#if 1 /* 10!=Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("10 # CInt4"));
  Newline();
#if 1 /* Cint4!=Cint3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 # CInt3"));
  Newline();
  if (J != Cint3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J # CInt3"));
  Newline();
  if (Cint3 != J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("CInt3 # J"));
  Newline();
  if (J != K)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J # K"));
  Newline();
  if (J != 10)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J # 10"));
  Newline();
  if (10 != J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("10 # J"));
  Newlines(2);
#if 1 /* 3 < 10 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 < 10"));
  Newline();
  if (10 < J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("10 < J"));
  Newline();
  if (J < 10)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J < 10"));
  Newline();
#if 0 /* 10 < Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("10 < CInt4"));
  Newline();
#if 1 /* Cint4 < 10 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 < 10"));
  Newline();
  if (J < Cint3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J < CInt3"));
  Newline();
  if (Cint3 < J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("CInt3 < J"));
  Newline();
#if 1 /* Cint4 < Cint3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 < CInt3"));
  Newlines(2);
#if 1 /* 3<=10 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("3 <= 10"));
  Newline();
  if (10 <= J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("10 <= J"));
  Newline();
  if (J <= 10)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J <= 10"));
  Newline();
#if 0 /* 10<=Cint4 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("10 <= CInt4"));
  Newline();
#if 1 /* Cint4<=10 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 <= 10"));
  Newline();
  if (J <= Cint3)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J <= CInt3"));
  Newline();
  if (Cint3 <= J)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("CInt3 <= J"));
  Newline();
#if 1 /* Cint4<=Cint3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt4 <= CInt3"));
  Newline();
  if (J <= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("J <= J"));
  Newlines(2);
#if 0 /* 3 > 10 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 > 10"));
  Newline();
  if (10 > J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("10 > J"));
  Newline();
  if (J > 10)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J > 10"));
  Newline();
#if 0 /* 3 > Cint3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("3 > CInt3"));
  Newline();
#if 0 /* Cint4 > 10 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 > 10"));
  Newline();
  if (J > Cint3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J > CInt3"));
  Newline();
  if (Cint3 > J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("CInt3 > J"));
  Newline();
#if 0 /* Cint4 > Cint3 */
Fail();
#else
  Pass();
#endif
  Printstring(_imp_str_literal("CInt4 > CInt3"));
  Newlines(2);
#if 1 /* 10>=3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("10 >= 3"));
  Newline();
  if (10 >= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("10 >= J"));
  Newline();
  if (J >= 10)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J >= 10"));
  Newline();
#if 1 /* 10>=Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("10 >= CInt4"));
  Newline();
#if 1 /* Cint3>=3 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt3 >= 3"));
  Newline();
  if (J >= Cint3)
    Fail();
  else
    Pass();
  Printstring(_imp_str_literal("J >= CInt3"));
  Newline();
  if (Cint3 >= J)
    Pass();
  else
    Fail();
  Printstring(_imp_str_literal("CInt3 >= J"));
  Newline();
#if 1 /* Cint3>=Cint4 */
  Pass();
#else
  Fail();
#endif
  Printstring(_imp_str_literal("CInt3 >= CInt4"));
  Newlines(3);
  Selectoutput(0);
  Write(Failures, 1);
  Printstring(_imp_str_literal(" failure(s)"));
  Newline();
  exit(0);
  return (1);
}
