#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int getinput();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int line1, line2, line3, line4, line5, line6, line7, line8, deadline11,
      deadline12, line10, dependant, single, b, c, d, e, f, g, eic,
      spousedependant;
  printf("Welcome to the United States 1040 federal income tax program.\n");
  printf("(Note: this isn't the real 1040 form. If you try to submit your\n");
  printf("taxes this way, you'll get what you deserve!\n\n");
  printf("Answer the following questions to determine what you owe.\n\n");
  printf("Total wages, salary, and tips? ");
  line1 = getinput();
  printf("Taxable interest (such as from bank accounts)? ");
  line2 = getinput();
  printf("Unemployment compensation, qualified state tuition, and Alaska\n");
  printf("Permanent Fund dividends? ");
  line3 = getinput();
  line4 = line1 + line2 + line3;
  printf("Your adjusted gross income is: ");
  printf("%d\n", line4);
  printf("Enter <1> if your parents or someone else can claim you on their");
  printf(" return. \nEnter <0> otherwise: ");
  dependant = getinput();
  if (0 != dependant) {
    b = 700;
    c = b;
    if (c < (line1 + 250)) {
      c = (line1 + 250);
    }
    printf("Enter <1> if you are single, <0> if you are married: ");
    single = getinput();
    if (0 != single) {
      d = 7350;
    } else {
      d = 7350;
    }
    e = c;
    if (e > d) {
      e = d;
    }
    f = 0;
    if (single == 0) {
      printf("Enter <1> if your spouse can be claimed as a dependant, ");
      printf("enter <0> if not: ");
      spousedependant = getinput();
      if (0 == spousedependant) {
        f = 2800;
      }
    }
    g = e + f;
    line5 = g;
  }
  if (0 == dependant) {
    printf("Enter <1> if you are single, <0> if you are married: ");
    single = getinput();
    if (0 != single) {
      line5 = 12950;
    }
    if (0 == single) {
      line5 = 7200;
    }
  }
  line6 = line4 - line5;
  if (line6 < 0) {
    line6 = 0;
  }
  printf("Your taxable income is: ");
  printf("%d\n", line6);
  printf("Enter the amount of Federal income tax withheld: ");
  line7 = getinput();
  printf("Enter <1> if you get an earned income credit (EIC); ");
  printf("enter 0 otherwise: ");
  eic = getinput();
  line8 = 0;
  if (0 != eic) {
    printf("OK, I'll give you a thousand dollars for your credit.\n");
    line8 = 1000;
  }
  printf("Your total tax payments amount to: ");
  printf("%d\n", (line8 + line7));
  line10 = (line6 * 28 + 50) / 100;
  printf("Your total tax liability is: ");
  printf("%d\n", line10);
  if (((line8 + line7) - line10) < 0) {
    deadline11 = 0;
  } else
    deadline11 = 0;
  if (((line8 + line7) - line10) > 0) {
    printf("Congratulations, you get a tax refund of $");
    printf("%d\n", ((line8 + line7) - line10));
  }
  if ((line10 - (line8 + line7)) >= 0) {
    printf("Bummer. You owe the IRS a check for $");
    printf("%d\n", (line10 - (line8 + line7)));
  }
  if ((line10 - (line8 + line7)) < 0) {
    deadline12 = 0;
  } else
    deadline12 = 0;
  printf("%d\n", line6);
  printf("%d\n", (line8 + line7));
  printf("%d\n", line10);
  printf("%d\n", b);
  printf("%d\n", e);
  printf("%d\n", d);
  printf("%d\n", deadline11);
  printf("%d\n", deadline12);
  line6 = line10;
  line8 = 0;
  line10 = 0;
  deadline11 = b + deadline12;
  deadline12 = e + d;
  printf("Thank you for using ez-tax.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x8(%rbp)
lea    0xf85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0xc(%rbp)
lea    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xfc6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xfd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xffe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x34(%rbp)
xor    %eax,%eax
cmp    -0x34(%rbp),%eax
je     12f0 <main+0x1d0>
movl   $0x2bc,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0xfa,%ecx
cmp    %ecx,%eax
jge    1245 <main+0x125>
mov    -0x8(%rbp),%eax
add    $0xfa,%eax
mov    %eax,-0x40(%rbp)
lea    0xfcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x38(%rbp)
xor    %eax,%eax
cmp    -0x38(%rbp),%eax
je     1274 <main+0x154>
movl   $0x1cb6,-0x44(%rbp)
jmp    127b <main+0x15b>
movl   $0x1cb6,-0x44(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jle    1293 <main+0x173>
mov    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0x0,-0x38(%rbp)
jne    12e1 <main+0x1c1>
lea    0xfa6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x58(%rbp)
xor    %eax,%eax
cmp    -0x58(%rbp),%eax
jne    12dc <main+0x1bc>
movl   $0xaf0,-0x4c(%rbp)
jmp    12e1 <main+0x1c1>
mov    -0x48(%rbp),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x34(%rbp),%eax
jne    133c <main+0x21c>
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x38(%rbp)
xor    %eax,%eax
cmp    -0x38(%rbp),%eax
je     1325 <main+0x205>
movl   $0x3296,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x38(%rbp),%eax
jne    1337 <main+0x217>
movl   $0x1c20,-0x18(%rbp)
jmp    133c <main+0x21c>
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1356 <main+0x236>
movl   $0x0,-0x1c(%rbp)
lea    0xf40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x20(%rbp)
lea    0xf54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getinput@plt>
mov    %eax,-0x54(%rbp)
movl   $0x0,-0x24(%rbp)
xor    %eax,%eax
cmp    -0x54(%rbp),%eax
je     13da <main+0x2ba>
lea    0xf65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x3e8,-0x24(%rbp)
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
add    -0x20(%rbp),%esi
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x1c,-0x1c(%rbp),%eax
add    $0x32,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x30(%rbp)
lea    0xf77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
sub    -0x30(%rbp),%eax
cmp    $0x0,%eax
jge    144b <main+0x32b>
movl   $0x0,-0x28(%rbp)
jmp    1452 <main+0x332>
movl   $0x0,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
sub    -0x30(%rbp),%eax
cmp    $0x0,%eax
jle    1489 <main+0x369>
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
add    -0x20(%rbp),%esi
sub    -0x30(%rbp),%esi
lea    0xd34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0x20(%rbp),%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
jl     14c4 <main+0x3a4>
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
mov    -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
sub    %eax,%esi
lea    0xcf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0x20(%rbp),%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
jge    14e4 <main+0x3c4>
movl   $0x0,-0x2c(%rbp)
jmp    14eb <main+0x3cb>
movl   $0x0,-0x2c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xcc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
add    -0x20(%rbp),%esi
lea    0xcad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
lea    0xc8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%esi
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%esi
lea    0xc69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xc58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xc47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x48(%rbp),%eax
add    -0x44(%rbp),%eax
mov    %eax,-0x2c(%rbp)
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    0x115a(%rip),%rdi
call   1030 <puts@plt>
lea    0x118c(%rip),%rdi
call   1030 <puts@plt>
lea    0x11c0(%rip),%rdi
call   1030 <puts@plt>
lea    0x11e2(%rip),%rdi
call   1030 <puts@plt>
lea    0xe91(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
mov    %eax,%ebx
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
mov    %eax,%r15d
lea    0x11e0(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
add    %ebx,%r15d
add    %eax,%r15d
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
test   %eax,%eax
je     1277 <main+0x147>
lea    0xfa(%rbx),%eax
cmp    $0x1c3,%ebx
mov    $0x2bc,%ebx
cmovge %eax,%ebx
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
cmp    $0x1cb6,%ebx
mov    $0x1cb6,%r14d
cmovb  %ebx,%r14d
test   %eax,%eax
jne    1272 <main+0x142>
lea    0xedc(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf05(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
test   %eax,%eax
mov    $0xaf0,%ebp
cmovne %ebx,%ebp
add    %r14d,%ebp
jmp    129b <main+0x16b>
lea    0xe72(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
test   %eax,%eax
mov    $0x1c20,%eax
mov    $0x3296,%ebp
cmove  %eax,%ebp
xor    %r12d,%r12d
sub    %ebp,%r15d
cmovs  %r12d,%r15d
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdd1(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
mov    %eax,%ebx
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getinput@plt>
test   %eax,%eax
je     1314 <main+0x1e4>
lea    0x10d2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3e8,%r12d
lea    0xeeb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    %ebx,%r12d
lea    0xd5f(%rip),%rbp
mov    %rbp,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%r15,%r15,8),%eax
lea    (%rax,%rax,2),%eax
add    %r15d,%eax
add    $0x32,%eax
imul   $0x51eb851f,%rax,%rbx
shr    $0x25,%rbx
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12d,%ebp
sub    %ebx,%ebp
jle    1390 <main+0x260>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd04(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%ebp
sub    %r12d,%ebp
js     13b5 <main+0x285>
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xcdf(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xccf(%rip),%rbp
mov    %rbp,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x2bc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x1cb6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf93(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [63 x i8] c"Welcome to the United States 1040 federal income tax program.\0A\00"
@.str.1 = [65 x i8] c"(Note: this isn't the real 1040 form. If you try to submit your\0A\00"
@.str.2 = [47 x i8] c"taxes this way, you'll get what you deserve!\0A\0A\00"
@.str.3 = [60 x i8] c"Answer the following questions to determine what you owe.\0A\0A\00"
@.str.4 = [32 x i8] c"Total wages, salary, and tips? \00"
@.str.5 = [48 x i8] c"Taxable interest (such as from bank accounts)? \00"
@.str.6 = [64 x i8] c"Unemployment compensation, qualified state tuition, and Alaska\0A\00"
@.str.7 = [27 x i8] c"Permanent Fund dividends? \00"
@.str.8 = [32 x i8] c"Your adjusted gross income is: \00"
@.str.9 = [4 x i8] c"%d\0A\00"
@.str.10 = [65 x i8] c"Enter <1> if your parents or someone else can claim you on their\00"
@.str.11 = [32 x i8] c" return. \0AEnter <0> otherwise: \00"
@.str.12 = [54 x i8] c"Enter <1> if you are single, <0> if you are married: \00"
@.str.13 = [57 x i8] c"Enter <1> if your spouse can be claimed as a dependant, \00"
@.str.14 = [19 x i8] c"enter <0> if not: \00"
@.str.15 = [25 x i8] c"Your taxable income is: \00"
@.str.16 = [50 x i8] c"Enter the amount of Federal income tax withheld: \00"
@.str.17 = [53 x i8] c"Enter <1> if you get an earned income credit (EIC); \00"
@.str.18 = [20 x i8] c"enter 0 otherwise: \00"
@.str.19 = [55 x i8] c"OK, I'll give you a thousand dollars for your credit.\0A\00"
@.str.20 = [36 x i8] c"Your total tax payments amount to: \00"
@.str.21 = [30 x i8] c"Your total tax liability is: \00"
@.str.22 = [43 x i8] c"Congratulations, you get a tax refund of $\00"
@.str.23 = [38 x i8] c"Bummer. You owe the IRS a check for $\00"
@.str.24 = [29 x i8] c"Thank you for using ez-tax.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i32 0, i32* %1
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%28 = call i32 (...) @getinput()
store i32 %28, i32* %2
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%30 = call i32 (...) @getinput()
store i32 %30, i32* %3
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.6, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%33 = call i32 (...) @getinput()
store i32 %33, i32* %4
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %4
%38 = add nsw i32 %36, %37
store i32 %38, i32* %5
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%40 = load i32, i32* %5
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %40)
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%44 = call i32 (...) @getinput()
store i32 %44, i32* %13
%45 = load i32, i32* %13
%46 = icmp ne i32 0, %45
br i1 %46, label %47, label %86
47: ; preds = %0
store i32 700, i32* %15
%48 = load i32, i32* %15
store i32 %48, i32* %16
%49 = load i32, i32* %16
%50 = load i32, i32* %2
%51 = add nsw i32 %50, 250
%52 = icmp slt i32 %49, %51
br i1 %52, label %53, label %56
53: ; preds = %47
%54 = load i32, i32* %2
%55 = add nsw i32 %54, 250
store i32 %55, i32* %16
br label %56
56: ; preds = %53, %47
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
%58 = call i32 (...) @getinput()
store i32 %58, i32* %14
%59 = load i32, i32* %14
%60 = icmp ne i32 0, %59
br i1 %60, label %61, label %62
61: ; preds = %56
store i32 7350, i32* %17
br label %63
62: ; preds = %56
store i32 7350, i32* %17
br label %63
63: ; preds = %62, %61
%64 = load i32, i32* %16
store i32 %64, i32* %18
%65 = load i32, i32* %18
%66 = load i32, i32* %17
%67 = icmp sgt i32 %65, %66
br i1 %67, label %68, label %70
68: ; preds = %63
%69 = load i32, i32* %17
store i32 %69, i32* %18
br label %70
70: ; preds = %68, %63
store i32 0, i32* %19
%71 = load i32, i32* %14
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %81
73: ; preds = %70
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.13, i64 0, i64 0))
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0))
%76 = call i32 (...) @getinput()
store i32 %76, i32* %22
%77 = load i32, i32* %22
%78 = icmp eq i32 0, %77
br i1 %78, label %79, label %80
79: ; preds = %73
store i32 2800, i32* %19
br label %80
80: ; preds = %79, %73
br label %81
81: ; preds = %80, %70
%82 = load i32, i32* %18
%83 = load i32, i32* %19
%84 = add nsw i32 %82, %83
store i32 %84, i32* %20
%85 = load i32, i32* %20
store i32 %85, i32* %6
br label %86
86: ; preds = %81, %0
%87 = load i32, i32* %13
%88 = icmp eq i32 0, %87
br i1 %88, label %89, label %100
89: ; preds = %86
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
%91 = call i32 (...) @getinput()
store i32 %91, i32* %14
%92 = load i32, i32* %14
%93 = icmp ne i32 0, %92
br i1 %93, label %94, label %95
94: ; preds = %89
store i32 12950, i32* %6
br label %95
95: ; preds = %94, %89
%96 = load i32, i32* %14
%97 = icmp eq i32 0, %96
br i1 %97, label %98, label %99
98: ; preds = %95
store i32 7200, i32* %6
br label %99
99: ; preds = %98, %95
br label %100
100: ; preds = %99, %86
%101 = load i32, i32* %5
%102 = load i32, i32* %6
%103 = sub nsw i32 %101, %102
store i32 %103, i32* %7
%104 = load i32, i32* %7
%105 = icmp slt i32 %104, 0
br i1 %105, label %106, label %107
106: ; preds = %100
store i32 0, i32* %7
br label %107
107: ; preds = %106, %100
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
%109 = load i32, i32* %7
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %109)
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0))
%112 = call i32 (...) @getinput()
store i32 %112, i32* %8
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.17, i64 0, i64 0))
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0))
%115 = call i32 (...) @getinput()
store i32 %115, i32* %21
store i32 0, i32* %9
%116 = load i32, i32* %21
%117 = icmp ne i32 0, %116
br i1 %117, label %118, label %120
118: ; preds = %107
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.19, i64 0, i64 0))
store i32 1000, i32* %9
br label %120
120: ; preds = %118, %107
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0))
%122 = load i32, i32* %9
%123 = load i32, i32* %8
%124 = add nsw i32 %122, %123
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %124)
%126 = load i32, i32* %7
%127 = mul nsw i32 %126, 28
%128 = add nsw i32 %127, 50
%129 = sdiv i32 %128, 100
store i32 %129, i32* %12
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0))
%131 = load i32, i32* %12
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %131)
%133 = load i32, i32* %9
%134 = load i32, i32* %8
%135 = add nsw i32 %133, %134
%136 = load i32, i32* %12
%137 = sub nsw i32 %135, %136
%138 = icmp slt i32 %137, 0
br i1 %138, label %139, label %140
139: ; preds = %120
store i32 0, i32* %10
br label %141
140: ; preds = %120
store i32 0, i32* %10
br label %141
141: ; preds = %140, %139
%142 = load i32, i32* %9
%143 = load i32, i32* %8
%144 = add nsw i32 %142, %143
%145 = load i32, i32* %12
%146 = sub nsw i32 %144, %145
%147 = icmp sgt i32 %146, 0
br i1 %147, label %148, label %156
148: ; preds = %141
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.22, i64 0, i64 0))
%150 = load i32, i32* %9
%151 = load i32, i32* %8
%152 = add nsw i32 %150, %151
%153 = load i32, i32* %12
%154 = sub nsw i32 %152, %153
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %154)
br label %156
156: ; preds = %148, %141
%157 = load i32, i32* %12
%158 = load i32, i32* %9
%159 = load i32, i32* %8
%160 = add nsw i32 %158, %159
%161 = sub nsw i32 %157, %160
%162 = icmp sge i32 %161, 0
br i1 %162, label %163, label %171
163: ; preds = %156
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.23, i64 0, i64 0))
%165 = load i32, i32* %12
%166 = load i32, i32* %9
%167 = load i32, i32* %8
%168 = add nsw i32 %166, %167
%169 = sub nsw i32 %165, %168
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %169)
br label %171
171: ; preds = %163, %156
%172 = load i32, i32* %12
%173 = load i32, i32* %9
%174 = load i32, i32* %8
%175 = add nsw i32 %173, %174
%176 = sub nsw i32 %172, %175
%177 = icmp slt i32 %176, 0
br i1 %177, label %178, label %179
178: ; preds = %171
store i32 0, i32* %11
br label %180
179: ; preds = %171
store i32 0, i32* %11
br label %180
180: ; preds = %179, %178
%181 = load i32, i32* %7
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %181)
%183 = load i32, i32* %9
%184 = load i32, i32* %8
%185 = add nsw i32 %183, %184
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %185)
%187 = load i32, i32* %12
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %187)
%189 = load i32, i32* %15
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %189)
%191 = load i32, i32* %18
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %191)
%193 = load i32, i32* %17
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %193)
%195 = load i32, i32* %10
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %195)
%197 = load i32, i32* %11
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %197)
%199 = load i32, i32* %12
store i32 %199, i32* %7
store i32 0, i32* %9
store i32 0, i32* %12
%200 = load i32, i32* %15
%201 = load i32, i32* %11
%202 = add nsw i32 %200, %201
store i32 %202, i32* %10
%203 = load i32, i32* %18
%204 = load i32, i32* %17
%205 = add nsw i32 %203, %204
store i32 %205, i32* %11
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.24, i64 0, i64 0))
%207 = load i32, i32* %1
ret i32 %207
}

LLVM IR (-O2):
@.str.4 = [32 x i8] c"Total wages, salary, and tips? \00"
@.str.5 = [48 x i8] c"Taxable interest (such as from bank accounts)? \00"
@.str.7 = [27 x i8] c"Permanent Fund dividends? \00"
@.str.8 = [32 x i8] c"Your adjusted gross income is: \00"
@.str.9 = [4 x i8] c"%d\0A\00"
@.str.10 = [65 x i8] c"Enter <1> if your parents or someone else can claim you on their\00"
@.str.11 = [32 x i8] c" return. \0AEnter <0> otherwise: \00"
@.str.12 = [54 x i8] c"Enter <1> if you are single, <0> if you are married: \00"
@.str.13 = [57 x i8] c"Enter <1> if your spouse can be claimed as a dependant, \00"
@.str.14 = [19 x i8] c"enter <0> if not: \00"
@.str.15 = [25 x i8] c"Your taxable income is: \00"
@.str.16 = [50 x i8] c"Enter the amount of Federal income tax withheld: \00"
@.str.17 = [53 x i8] c"Enter <1> if you get an earned income credit (EIC); \00"
@.str.18 = [20 x i8] c"enter 0 otherwise: \00"
@.str.20 = [36 x i8] c"Your total tax payments amount to: \00"
@.str.21 = [30 x i8] c"Your total tax liability is: \00"
@.str.22 = [43 x i8] c"Congratulations, you get a tax refund of $\00"
@.str.23 = [38 x i8] c"Bummer. You owe the IRS a check for $\00"
@str = [62 x i8] c"Welcome to the United States 1040 federal income tax program.\00"
@str.25 = [64 x i8] c"(Note: this isn't the real 1040 form. If you try to submit your\00"
@str.26 = [46 x i8] c"taxes this way, you'll get what you deserve!\0A\00"
@str.27 = [59 x i8] c"Answer the following questions to determine what you owe.\0A\00"
@str.28 = [63 x i8] c"Unemployment compensation, qualified state tuition, and Alaska\00"
@str.29 = [28 x i8] c"Thank you for using ez-tax.\00"
@str.30 = [54 x i8] c"OK, I'll give you a thousand dollars for your credit.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.25, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.26, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.27, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 (...) @getinput()
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 (...) @getinput()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.28, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 (...) @getinput()
%12 = add nsw i32 %8, %6
%13 = add nsw i32 %12, %11
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %13)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%18 = tail call i32 (...) @getinput()
%19 = icmp eq i32 %18, 0
br i1 %19, label %38, label %20
20: ; preds = %0
%21 = icmp sgt i32 %6, 450
%22 = add nsw i32 %6, 250
%23 = select i1 %21, i32 %22, i32 700
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
%25 = tail call i32 (...) @getinput()
%26 = icmp ult i32 %23, 7350
%27 = select i1 %26, i32 %23, i32 7350
%28 = icmp eq i32 %25, 0
br i1 %28, label %29, label %35
29: ; preds = %20
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.13, i64 0, i64 0))
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0))
%32 = tail call i32 (...) @getinput()
%33 = icmp eq i32 %32, 0
%34 = select i1 %33, i32 2800, i32 0
br label %35
35: ; preds = %20, %29
%36 = phi i32 [ 0, %20 ], [ %34, %29 ]
%37 = add nuw nsw i32 %36, %27
br label %43
38: ; preds = %0
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
%40 = tail call i32 (...) @getinput()
%41 = icmp eq i32 %40, 0
%42 = select i1 %41, i32 7200, i32 12950
br label %43
43: ; preds = %35, %38
%44 = phi i32 [ %27, %35 ], [ undef, %38 ]
%45 = phi i32 [ %37, %35 ], [ %42, %38 ]
%46 = sub nsw i32 %13, %45
%47 = icmp sgt i32 %46, 0
%48 = select i1 %47, i32 %46, i32 0
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %48)
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0))
%52 = tail call i32 (...) @getinput()
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.17, i64 0, i64 0))
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0))
%55 = tail call i32 (...) @getinput()
%56 = icmp eq i32 %55, 0
br i1 %56, label %59, label %57
57: ; preds = %43
%58 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.30, i64 0, i64 0))
br label %59
59: ; preds = %57, %43
%60 = phi i32 [ 1000, %57 ], [ 0, %43 ]
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0))
%62 = add nsw i32 %60, %52
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %62)
%64 = mul nsw i32 %48, 28
%65 = add nuw nsw i32 %64, 50
%66 = udiv i32 %65, 100
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0))
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %66)
%69 = sub nsw i32 %62, %66
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %59
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.22, i64 0, i64 0))
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %69)
br label %74
74: ; preds = %71, %59
%75 = sub nsw i32 %66, %62
%76 = icmp sgt i32 %75, -1
br i1 %76, label %77, label %80
77: ; preds = %74
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.23, i64 0, i64 0))
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %75)
br label %80
80: ; preds = %74, %77
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %48)
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %62)
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %66)
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 700)
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %44)
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 7350)
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 0)
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 0)
%89 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.29, i64 0, i64 0))
ret i32 0
}