#include <stdio.h>
int Counter;
RecordInst(){Counter++;}
Init(){Counter = 0;}
Report(){printf("No. of instructions are %d\n", Counter);}
/* FileAst "tax.adap" Begin */
int getinput() ;

int getinput() {
      int inp;
      RecordInst();
      inp = - 1;
      RecordInst();
      goto L3;
   L2:;
      RecordInst();
      scanf("%d", (&inp));
      RecordInst();
      if ((0 <= inp)) goto L6;
      RecordInst();
      printf("I need a non-negative number: ");
   L6:;
   L3:;
      RecordInst();
      if ((0 > inp)) goto L2;
      return inp;
   L1:;
}
int main() ;

int main() {
      int redat6;
      int redat7;
      int redat5;
      int temp_17;
      int temp_15;
      int temp_16;
      int temp_13;
      int temp_14;
      int temp_11;
      int temp_12;
      int temp_9;
      int temp_10;
      int temp_7;
      int temp_8;
      int temp_5;
      int temp_6;
      int temp_3;
      int temp_4;
      int temp_2;
      int temp_1;
      int temp_0;
      int redat9;
      int redat8;
      int redat4;
      int redat3;
      int redat2;
      int redat1;
      int spousedependant;
      int g;
      int f;
      int c;
      int eic;
      int line5;
      int line3;
      int line2;
      int line1;
      int b;
      int single;
      int dependant;
      int deadline11;
      int line4;
      int d;
      int e;
      int deadline12;
      int line6;
      int line7;
      int line8;
      int line10;
      Init();
      RecordInst();
      printf("Welcome to the United States 1040 federal income tax program.\n");
      RecordInst();
      printf("(Note: this isn't the real 1040 form. If you try to submit your\n");
      RecordInst();
      printf("taxes this way, you'll get what you deserve!\n\n");
      RecordInst();
      printf("Answer the following questions to determine what you owe.\n\n");
      RecordInst();
      printf("Total wages, salary, and tips? ");
      RecordInst();
      redat1 = getinput();
      RecordInst();
      line1 = redat1;
      RecordInst();
      printf("Taxable interest (such as from bank accounts)? ");
      RecordInst();
      redat2 = getinput();
      RecordInst();
      line2 = redat2;
      RecordInst();
      printf("Unemployment compensation, qualified state tuition, and Alaska\n");
      RecordInst();
      printf("Permanent Fund dividends? ");
      RecordInst();
      redat3 = getinput();
      RecordInst();
      line3 = redat3;
      RecordInst();
      temp_0 = (line1 + line2);
      RecordInst();
      line4 = (temp_0 + line3);
      RecordInst();
      printf("Your adjusted gross income is: ");
      RecordInst();
      printf("%d\n", line4);
      RecordInst();
      printf("Enter <1> if your parents or someone else can claim you on their");
      RecordInst();
      printf(" return. \nEnter <0> otherwise: ");
      RecordInst();
      redat4 = getinput();
      RecordInst();
      dependant = redat4;
      RecordInst();
      if ((dependant == 0)) goto L22;
      RecordInst();
      b = 700;
      RecordInst();
      c = b;
      RecordInst();
      temp_1 = (line1 + 250);
      RecordInst();
      if ((c >= temp_1)) goto L24;
      RecordInst();
      c = (line1 + 250);
   L24:;
      RecordInst();
      printf("Enter <1> if you are single, <0> if you are married: ");
      RecordInst();
      redat5 = getinput();
      RecordInst();
      single = redat5;
      RecordInst();
      if ((single == 0)) goto L27;
      RecordInst();
      d = 7350;
      RecordInst();
      goto L28;
   L27:;
      RecordInst();
      d = 7350;
   L28:;
      RecordInst();
      e = c;
      RecordInst();
      if ((e <= d)) goto L29;
      RecordInst();
      e = d;
   L29:;
      RecordInst();
      f = 0;
      RecordInst();
      if ((single != 0)) goto L31;
      RecordInst();
      printf("Enter <1> if your spouse can be claimed as a dependant, ");
      RecordInst();
      printf("enter <0> if not: ");
      RecordInst();
      redat6 = getinput();
      RecordInst();
      spousedependant = redat6;
      RecordInst();
      if ((spousedependant != 0)) goto L35;
      RecordInst();
      f = 2800;
   L35:;
   L31:;
      RecordInst();
      g = (e + f);
      RecordInst();
      line5 = g;
   L22:;
      RecordInst();
      if ((dependant != 0)) goto L37;
      RecordInst();
      printf("Enter <1> if you are single, <0> if you are married: ");
      RecordInst();
      redat7 = getinput();
      RecordInst();
      single = redat7;
      RecordInst();
      if ((single == 0)) goto L39;
      RecordInst();
      line5 = 12950;
   L39:;
      RecordInst();
      if ((single != 0)) goto L41;
      RecordInst();
      line5 = 7200;
   L41:;
   L37:;
      RecordInst();
      line6 = (line4 - line5);
      RecordInst();
      if ((line6 >= 0)) goto L43;
      RecordInst();
      line6 = 0;
   L43:;
      RecordInst();
      printf("Your taxable income is: ");
      RecordInst();
      printf("%d\n", line6);
      RecordInst();
      printf("Enter the amount of Federal income tax withheld: ");
      RecordInst();
      redat8 = getinput();
      RecordInst();
      line7 = redat8;
      RecordInst();
      printf("Enter <1> if you get an earned income credit (EIC); ");
      RecordInst();
      printf("enter 0 otherwise: ");
      RecordInst();
      redat9 = getinput();
      RecordInst();
      eic = redat9;
      RecordInst();
      line8 = 0;
      RecordInst();
      if ((eic == 0)) goto L49;
      RecordInst();
      printf("OK, I'll give you a thousand dollars for your credit.\n");
      RecordInst();
      line8 = 1000;
   L49:;
      RecordInst();
      printf("Your total tax payments amount to: ");
      RecordInst();
      temp_2 = (line8 + line7);
      RecordInst();
      printf("%d\n", temp_2);
      RecordInst();
      temp_4 = (line6 * 28);
      RecordInst();
      temp_3 = (temp_4 + 50);
      RecordInst();
      line10 = (temp_3 / 100);
      RecordInst();
      printf("Your total tax liability is: ");
      RecordInst();
      printf("%d\n", line10);
      RecordInst();
      temp_6 = (line8 + line7);
      RecordInst();
      temp_5 = (temp_6 - line10);
      RecordInst();
      if ((temp_5 >= 0)) goto L54;
      RecordInst();
      deadline11 = 0;
      RecordInst();
      goto L55;
   L54:;
      RecordInst();
      deadline11 = 0;
   L55:;
      RecordInst();
      temp_8 = (line8 + line7);
      RecordInst();
      temp_7 = (temp_8 - line10);
      RecordInst();
      if ((temp_7 <= 0)) goto L56;
      RecordInst();
      printf("Congratulations, you get a tax refund of $");
      RecordInst();
      temp_10 = (line8 + line7);
      RecordInst();
      temp_9 = (temp_10 - line10);
      RecordInst();
      printf("%d\n", temp_9);
   L56:;
      RecordInst();
      temp_12 = (line8 + line7);
      RecordInst();
      temp_11 = (line10 - temp_12);
      RecordInst();
      if ((temp_11 < 0)) goto L59;
      RecordInst();
      printf("Bummer. You owe the IRS a check for $");
      RecordInst();
      temp_14 = (line8 + line7);
      RecordInst();
      temp_13 = (line10 - temp_14);
      RecordInst();
      printf("%d\n", temp_13);
   L59:;
      RecordInst();
      temp_16 = (line8 + line7);
      RecordInst();
      temp_15 = (line10 - temp_16);
      RecordInst();
      if ((temp_15 >= 0)) goto L62;
      RecordInst();
      deadline12 = 0;
      RecordInst();
      goto L63;
   L62:;
      RecordInst();
      deadline12 = 0;
   L63:;
      RecordInst();
      printf("%d\n", line6);
      RecordInst();
      temp_17 = (line8 + line7);
      RecordInst();
      printf("%d\n", temp_17);
      RecordInst();
      printf("%d\n", line10);
      RecordInst();
      printf("%d\n", b);
      RecordInst();
      printf("%d\n", e);
      RecordInst();
      printf("%d\n", d);
      RecordInst();
      printf("%d\n", deadline11);
      RecordInst();
      printf("%d\n", deadline12);
      RecordInst();
      line6 = line10;
      RecordInst();
      line8 = 0;
      RecordInst();
      line10 = 0;
      RecordInst();
      deadline11 = (b + deadline12);
      RecordInst();
      deadline12 = (e + d);
      RecordInst();
      printf("Thank you for using ez-tax.\n");
      Report();
      return 0;
   L9:;
      Report();
}
/* FileAst "tax.adap" End */
