#include <perms.h>

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

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

  //     2    %integer a, b, c

  int A;
  int B;
  int C;

  //     3    %longreal q, r

  double Q;
  double R;

  //     4    %string(255) option1, option2, s

  _imp_string255 OPTION1;
  _imp_string255 OPTION2;
  _imp_string255 S;

  //     5
  //     6    %if a <= b < c %start

  {
    // Double-sided test on B (Part I)
    int tmp;
    if (A > (tmp = B)) goto L_0001;
    // Double-sided test on B (Part II)
    if (tmp >= C) goto L_0001;
  }

  //     7    %finish

L_0001:;

//     8
//     9    %if q-0.1 <= r < q+0.1 %start

  {
    // Double-sided test on R (Part I)
    double tmp;
    if (Q - 0.1 > (tmp = R)) goto L_0002;
    // Double-sided test on R (Part II)
    if (tmp >= Q + 0.1) goto L_0002;
  }

  //    10    %finish

L_0002:;

//    11
//    12    %if option1 # s # option2 %start

  {
    // Double-sided test on S (Part I)
    _imp_string255 *tmp;

    /* clang-format off */
if (_imp_strcmp((_imp_string *)/*?*/&OPTION1, (_imp_string *)(tmp=/*?*/&S)) == 0) goto L_0003;

    /* clang-format on */

    /* clang-format off */
// Double-sided test on S (Part II)
if (_imp_strcmp((_imp_string *)tmp, (_imp_string *)/*?*/&OPTION2) == 0) goto L_0003;
}

  /* clang-format on */

  //    13    %finish

L_0003:;

//    14
//    15  %endofprogram

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