#include <perms.h>

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

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

  //     2  %const %string (1) snl = "

  const _imp_string1 SNL = _imp_str_init("\n");

  //     3+ "
  //     4
  //     5  %routine tobern2(%long %real a0, %long %real a1, %long %real a2, %long %real %name b0, %long %real %name b1, %long %real %name b2)

  void TOBERN2(double A0, double A1, double A2, double *B0, double *B1, double *B2) {
    //     6       b0 = a0

    *B0 = A0;

    //     7       b1 = a0 + a1 / 2

    *B1 = A0 + (double)(A1 / 2);

    //     8       b2 = a0 + a1 + a2

    *B2 = A0 + A1 + A2;

    //     9  %end

    return;
  } /* end of TOBERN2 */

  //    10
  //    11  { uses de Casteljau’s algorithm }
  //    12  %long %real %fn evalbern2(%long %real b0, %long %real b1, %long %real b2, %long %real t)

  double EVALBERN2(double B0, double B1, double B2, double T) {
    //    13      %long %real s = 1.0 - t

    double S;
    S = 1.0 - T;

    //    14      %long %real b01 = s * b0 + t * b1

    double B01;
    B01 = S * B0 + T * B1;

    //    15      %long %real b12 = s * b1 + t * b2

    double B12;
    B12 = S * B1 + T * B2;

    //    16      %result = s * b01 + t * b12

    return S * B01 + T * B12;

    //    17  %end

  } /* end of EVALBERN2 */

  //    18
  //    19  %routine tobern3(%long %real a0, %long %real a1, %long %real a2, %long %real a3, %long %real %name b0, %long %real %name b1, %long %real %name b2, %long %real %name b3)

  void TOBERN3(double A0, double A1, double A2, double A3, double *B0, double *B1, double *B2, double *B3) {
    //    20      b0 = a0

    *B0 = A0;

    //    21      b1 = a0 + a1 / 3

    *B1 = A0 + (double)(A1 / 3);

    //    22      b2 = a0 + a1 * 2/3 + a2 / 3

    *B2 = A0 + (double)((A1 * 2) / 3) + (double)(A2 / 3);

    //    23      b3 = a0 + a1 + a2 + a3

    *B3 = A0 + A1 + A2 + A3;

    //    24  %end

    return;
  } /* end of TOBERN3 */

  //    25
  //    26  { uses de Casteljau’s algorithm }
  //    27  %long %real %fn evalbern3(%long %real b0, %long %real b1, %long %real b2, %long %real b3, %long %real t)

  double EVALBERN3(double B0, double B1, double B2, double B3, double T) {
    //    28      %long %real s = 1 - t

    double S;
    S = 1 - T;

    //    29      %long %real b01  = s * b0  + t * b1

    double B01;
    B01 = S * B0 + T * B1;

    //    30      %long %real b12  = s * b1  + t * b2

    double B12;
    B12 = S * B1 + T * B2;

    //    31      %long %real b23  = s * b2  + t * b3

    double B23;
    B23 = S * B2 + T * B3;

    //    32      %long %real b012 = s * b01 + t * b12

    double B012;
    B012 = S * B01 + T * B12;

    //    33      %long %real b123 = s * b12 + t * b23

    double B123;
    B123 = S * B12 + T * B23;

    //    34      %result = s * b012 + t * b123

    return S * B012 + T * B123;

    //    35  %end

  } /* end of EVALBERN3 */

  //    36
  //    37  %routine bern2to3(%long %real q0, %long %real q1, %long %real q2, %long %real %name c0, %long %real %name c1, %long %real %name c2, %long %real %name c3)

  void BERN2TO3(double Q0, double Q1, double Q2, double *C0, double *C1, double *C2, double *C3) {
    //    38      c0 = q0

    *C0 = Q0;

    //    39      c1 = q0 / 3   + q1 * 2/3

    *C1 = (double)(Q0 / 3) + (double)((Q1 * 2) / 3);

    //    40      c2 = q1 * 2/3 + q2 / 3

    *C2 = (double)((Q1 * 2) / 3) + (double)(Q2 / 3);

    //    41      c3 = q2

    *C3 = Q2;

    //    42  %end

    return;
  } /* end of BERN2TO3 */

  //    43
  //    44  { uses Horner's rule }
  //    45  %long %real %fn evalmono2(%long %real a0, %long %real a1, %long %real a2, %long %real t)

  double EVALMONO2(double A0, double A1, double A2, double T) {
    //    46      %result = a0 + (t * (a1 + (t * a2)))

    return A0 + T * (A1 + T * A2);

    //    47  %end

  } /* end of EVALMONO2 */

  //    48
  //    49  { uses Horner's rule }
  //    50  %long %real %fn evalmono3(%long %real a0, %long %real a1, %long %real a2, %long %real a3, %long %real t)

  double EVALMONO3(double A0, double A1, double A2, double A3, double T) {
    //    51      %result = a0 + (t * (a1 + (t * (a2 + (t * a3)))))

    return A0 + T * (A1 + T * (A2 + T * A3));

    //    52  %end

  } /* end of EVALMONO3 */

  //    53
  //    54      %long %real p0m, p1m, p2m, q0m, q1m, q2m, r0m, r1m, r2m, r3m

  double P0M;
  double P1M;
  double P2M;
  double Q0M;
  double Q1M;
  double Q2M;
  double R0M;
  double R1M;
  double R2M;
  double R3M;

  //    55      %long %real p0b2, p1b2, p2b2, q0b2, q1b2, q2b2

  double P0B2;
  double P1B2;
  double P2B2;
  double Q0B2;
  double Q1B2;
  double Q2B2;

  //    56      %long %real p0b3, p1b3, p2b3, p3b3, q0b3, q1b3, q2b3, q3b3, r0b3, r1b3, r2b3, r3b3

  double P0B3;
  double P1B3;
  double P2B3;
  double P3B3;
  double Q0B3;
  double Q1B3;
  double Q2B3;
  double Q3B3;
  double R0B3;
  double R1B3;
  double R2B3;
  double R3B3;

  //    57      %long %real pc0, pc1, pc2, pc3, qc0, qc1, qc2, qc3

  double PC0;
  double PC1;
  double PC2;
  double PC3;
  double QC0;
  double QC1;
  double QC2;
  double QC3;

  //    58
  //    59      %long %real x, y, m

  double X;
  double Y;
  double M;

  //    60
  //    61      p0m = 1; p1m = 0; p2m = 0

  P0M = 1;
  P1M = 0;
  P2M = 0;

  //    62      q0m = 1; q1m = 2; q2m = 3

  Q0M = 1;
  Q1M = 2;
  Q2M = 3;

  //    63      r0m = 1; r1m = 2; r2m = 3; r3m = 4

  R0M = 1;
  R1M = 2;
  R2M = 3;
  R3M = 4;

  //    64
  //    65      tobern2 (p0m, p1m, p2m, p0b2, p1b2, p2b2)

  TOBERN2(P0M, P1M, P2M, /*?*/ &P0B2, /*?*/ &P1B2, /*?*/ &P2B2);

  //    66      tobern2 (q0m, q1m, q2m, q0b2, q1b2, q2b2)

  TOBERN2(Q0M, Q1M, Q2M, /*?*/ &Q0B2, /*?*/ &Q1B2, /*?*/ &Q2B2);

  //    67      print string ("Subprogram (1) examples:".snl)

  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr("Subprogram (1) examples:"),
                                         (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //    68      print string ("  mono ( ")

  _imp_PRINTSTRING(_imp_str_literal("  mono ( "));

  //    69      print fl (p0m, 4); print string (", ")

  _imp_PRINTFL(P0M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    70      print fl (p1m, 4); print string (", ")

  _imp_PRINTFL(P1M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    71      print fl (p2m, 4); print string (") --> bern ( ")

  _imp_PRINTFL(P2M, 4);
  _imp_PRINTSTRING(_imp_str_literal(") --> bern ( "));

  //    72      print fl (p0b2, 4); print string (", ")

  _imp_PRINTFL(P0B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    73      print fl (p1b2, 4); print string (", ")

  _imp_PRINTFL(P1B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    74      print fl (p2b2, 4); print string (")".snl)

  _imp_PRINTFL(P2B2, 4);
  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr(")"), (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //    75      print string ("  mono ( ")

  _imp_PRINTSTRING(_imp_str_literal("  mono ( "));

  //    76      print fl (q0m, 4); print string (", ")

  _imp_PRINTFL(Q0M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    77      print fl (q1m, 4); print string (", ")

  _imp_PRINTFL(Q1M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    78      print fl (q2m, 4); print string (") --> bern ( ")

  _imp_PRINTFL(Q2M, 4);
  _imp_PRINTSTRING(_imp_str_literal(") --> bern ( "));

  //    79      print fl (q0b2, 4); print string (", ")

  _imp_PRINTFL(Q0B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    80      print fl (q1b2, 4); print string (", ")

  _imp_PRINTFL(Q1B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //    81      print fl (q2b2, 4); print string (")".snl)

  _imp_PRINTFL(Q2B2, 4);
  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr(")"), (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //    82
  //    83      print string ("Subprogram (2) examples:".snl)

  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr("Subprogram (2) examples:"),
                                         (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //    84      x = 0.25

  X = 0.25;

  //    85      y = evalbern2 (p0b2, p1b2, p2b2, x)

  Y = EVALBERN2(P0B2, P1B2, P2B2, X);

  //    86      print string ("  p ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  p ( "));
  _imp_PRINTFL(X, 4);

  //    87      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //    88      newline

  _imp_NEWLINE();

  //    89      x = 7.50

  X = 7.50;

  //    90      y = evalbern2 (p0b2, p1b2, p2b2, x)

  Y = EVALBERN2(P0B2, P1B2, P2B2, X);

  //    91      print string ("  p ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  p ( "));
  _imp_PRINTFL(X, 4);

  //    92      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //    93      newline

  _imp_NEWLINE();

  //    94      x = 0.25

  X = 0.25;

  //    95      y = evalbern2 (q0b2, q1b2, q2b2, x)

  Y = EVALBERN2(Q0B2, Q1B2, Q2B2, X);

  //    96      print string ("  q ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  q ( "));
  _imp_PRINTFL(X, 4);

  //    97      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //    98      newline

  _imp_NEWLINE();

  //    99      x = 7.50

  X = 7.50;

  //   100      y = evalbern2 (q0b2, q1b2, q2b2, x)

  Y = EVALBERN2(Q0B2, Q1B2, Q2B2, X);

  //   101      print string ("  q ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  q ( "));
  _imp_PRINTFL(X, 4);

  //   102      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //   103      newline

  _imp_NEWLINE();

  //   104
  //   105      tobern3 (p0m, p1m, p2m, 0, p0b3, p1b3, p2b3, p3b3)

  TOBERN3(P0M, P1M, P2M, 0, /*?*/ &P0B3, /*?*/ &P1B3, /*?*/ &P2B3, /*?*/ &P3B3);

  //   106      tobern3 (q0m, q1m, q2m, 0, q0b3, q1b3, q2b3, q3b3)

  TOBERN3(Q0M, Q1M, Q2M, 0, /*?*/ &Q0B3, /*?*/ &Q1B3, /*?*/ &Q2B3, /*?*/ &Q3B3);

  //   107      tobern3 (r0m, r1m, r2m, r3m, r0b3, r1b3, r2b3, r3b3)

  TOBERN3(R0M, R1M, R2M, R3M, /*?*/ &R0B3, /*?*/ &R1B3, /*?*/ &R2B3, /*?*/ &R3B3);

  //   108      print string ("Subprogram (3) examples:".snl)

  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr("Subprogram (3) examples:"),
                                         (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   109      print string ("  mono ( ")

  _imp_PRINTSTRING(_imp_str_literal("  mono ( "));

  //   110      print fl (p0m, 4); print string (", ")

  _imp_PRINTFL(P0M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   111      print fl (p1m, 4); print string (", ")

  _imp_PRINTFL(P1M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   112      print fl (p2m, 4); print string (", ")

  _imp_PRINTFL(P2M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   113      print fl (0, 4); print string (") --> bern ( ")

  _imp_PRINTFL(0, 4);
  _imp_PRINTSTRING(_imp_str_literal(") --> bern ( "));

  //   114      print fl (p0b3, 4); print string (", ")

  _imp_PRINTFL(P0B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   115      print fl (p1b3, 4); print string (", ")

  _imp_PRINTFL(P1B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   116      print fl (p2b3, 4); print string (", ")

  _imp_PRINTFL(P2B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   117      print fl (p3b3, 4); print string (")".snl)

  _imp_PRINTFL(P3B3, 4);
  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr(")"), (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   118      print string ("  mono ( ")

  _imp_PRINTSTRING(_imp_str_literal("  mono ( "));

  //   119      print fl (q0m, 4); print string (", ")

  _imp_PRINTFL(Q0M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   120      print fl (q1m, 4); print string (", ")

  _imp_PRINTFL(Q1M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   121      print fl (q2m, 4); print string (", ")

  _imp_PRINTFL(Q2M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   122      print fl (0, 4); print string (") --> bern ( ")

  _imp_PRINTFL(0, 4);
  _imp_PRINTSTRING(_imp_str_literal(") --> bern ( "));

  //   123      print fl (q0b3, 4); print string (", ")

  _imp_PRINTFL(Q0B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   124      print fl (q1b3, 4); print string (", ")

  _imp_PRINTFL(Q1B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   125      print fl (q2b3, 4); print string (", ")

  _imp_PRINTFL(Q2B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   126      print fl (q3b3, 4); print string (")".snl)

  _imp_PRINTFL(Q3B3, 4);
  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr(")"), (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   127      print string ("  mono ( ")

  _imp_PRINTSTRING(_imp_str_literal("  mono ( "));

  //   128      print fl (r0m, 4); print string (", ")

  _imp_PRINTFL(R0M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   129      print fl (r1m, 4); print string (", ")

  _imp_PRINTFL(R1M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   130      print fl (r2m, 4); print string (", ")

  _imp_PRINTFL(R2M, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   131      print fl (r3m, 4); print string (") --> bern ( ")

  _imp_PRINTFL(R3M, 4);
  _imp_PRINTSTRING(_imp_str_literal(") --> bern ( "));

  //   132      print fl (r0b3, 4); print string (", ")

  _imp_PRINTFL(R0B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   133      print fl (r1b3, 4); print string (", ")

  _imp_PRINTFL(R1B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   134      print fl (r2b3, 4); print string (", ")

  _imp_PRINTFL(R2B3, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   135      print fl (r3b3, 4); print string (")".snl)

  _imp_PRINTFL(R3B3, 4);
  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr(")"), (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   136
  //   137      print string ("Subprogram (4) examples:".snl)

  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr("Subprogram (4) examples:"),
                                         (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   138      x = 0.25

  X = 0.25;

  //   139      y = evalbern3 (p0b3, p1b3, p2b3, p3b3, x)

  Y = EVALBERN3(P0B3, P1B3, P2B3, P3B3, X);

  //   140      print string ("  p ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  p ( "));
  _imp_PRINTFL(X, 4);

  //   141      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //   142      newline

  _imp_NEWLINE();

  //   143      x = 7.50

  X = 7.50;

  //   144      y = evalbern3 (p0b3, p1b3, p2b3, p3b3, x)

  Y = EVALBERN3(P0B3, P1B3, P2B3, P3B3, X);

  //   145      print string ("  p ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  p ( "));
  _imp_PRINTFL(X, 4);

  //   146      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //   147      newline

  _imp_NEWLINE();

  //   148      x = 0.25

  X = 0.25;

  //   149      y = evalbern3 (q0b3, q1b3, q2b3, q3b3, x)

  Y = EVALBERN3(Q0B3, Q1B3, Q2B3, Q3B3, X);

  //   150      print string ("  q ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  q ( "));
  _imp_PRINTFL(X, 4);

  //   151      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //   152      newline

  _imp_NEWLINE();

  //   153      x = 7.50

  X = 7.50;

  //   154      y = evalbern3 (q0b3, q1b3, q2b3, q3b3, x)

  Y = EVALBERN3(Q0B3, Q1B3, Q2B3, Q3B3, X);

  //   155      print string ("  q ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  q ( "));
  _imp_PRINTFL(X, 4);

  //   156      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //   157      newline

  _imp_NEWLINE();

  //   158      x = 0.25

  X = 0.25;

  //   159      y = evalbern3 (r0b3, r1b3, r2b3, r3b3, x)

  Y = EVALBERN3(R0B3, R1B3, R2B3, R3B3, X);

  //   160      print string ("  r ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  r ( "));
  _imp_PRINTFL(X, 4);

  //   161      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //   162      newline

  _imp_NEWLINE();

  //   163      x = 7.50

  X = 7.50;

  //   164      y = evalbern3 (r0b3, r1b3, r2b3, r3b3, x)

  Y = EVALBERN3(R0B3, R1B3, R2B3, R3B3, X);

  //   165      print string ("  r ( "); print fl (x, 4)

  _imp_PRINTSTRING(_imp_str_literal("  r ( "));
  _imp_PRINTFL(X, 4);

  //   166      print string (") = "); print fl (y, 4)

  _imp_PRINTSTRING(_imp_str_literal(") = "));
  _imp_PRINTFL(Y, 4);

  //   167      newline

  _imp_NEWLINE();

  //   168
  //   169      bern2to3 (p0b2, p1b2, p2b2, pc0, pc1, pc2, pc3)

  BERN2TO3(P0B2, P1B2, P2B2, /*?*/ &PC0, /*?*/ &PC1, /*?*/ &PC2, /*?*/ &PC3);

  //   170      bern2to3 (q0b2, q1b2, q2b2, qc0, qc1, qc2, qc3)

  BERN2TO3(Q0B2, Q1B2, Q2B2, /*?*/ &QC0, /*?*/ &QC1, /*?*/ &QC2, /*?*/ &QC3);

  //   171      print string ("Subprogram (5) examples:".snl)

  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr("Subprogram (5) examples:"),
                                         (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   172      print string ("  bern ( ")

  _imp_PRINTSTRING(_imp_str_literal("  bern ( "));

  //   173      print fl (p0b2, 4); print string (", ")

  _imp_PRINTFL(P0B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   174      print fl (p1b2, 4); print string (", ")

  _imp_PRINTFL(P1B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   175      print fl (p2b2, 4); print string (") --> bern ( ")

  _imp_PRINTFL(P2B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(") --> bern ( "));

  //   176      print fl (pc0, 4); print string (", ")

  _imp_PRINTFL(PC0, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   177      print fl (pc1, 4); print string (", ")

  _imp_PRINTFL(PC1, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   178      print fl (pc2, 4); print string (", ")

  _imp_PRINTFL(PC2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   179      print fl (pc3, 4); print string (")".snl)

  _imp_PRINTFL(PC3, 4);
  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr(")"), (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   180      print string ("  bern ( ")

  _imp_PRINTSTRING(_imp_str_literal("  bern ( "));

  //   181      print fl (q0b2, 4); print string (", ")

  _imp_PRINTFL(Q0B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   182      print fl (q1b2, 4); print string (", ")

  _imp_PRINTFL(Q1B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   183      print fl (q2b2, 4); print string (") --> bern ( ")

  _imp_PRINTFL(Q2B2, 4);
  _imp_PRINTSTRING(_imp_str_literal(") --> bern ( "));

  //   184      print fl (qc0, 4); print string (", ")

  _imp_PRINTFL(QC0, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   185      print fl (qc1, 4); print string (", ")

  _imp_PRINTFL(QC1, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   186      print fl (qc2, 4); print string (", ")

  _imp_PRINTFL(QC2, 4);
  _imp_PRINTSTRING(_imp_str_literal(", "));

  //   187      print fl (qc3, 4); print string (")".snl)

  _imp_PRINTFL(QC3, 4);
  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = *({
          _imp_string255 tmp = _imp_join((_imp_string *)/*?*/ _imp_str_literal_ptr(")"), (_imp_string *)/*?*/ &SNL);
          (_imp_string255 *)&tmp;
        }) /*q*/;
        (_imp_string255 *)&tmp;
      })
  );

  //   188  %endofprogram

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