#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 /*<<< orphan*/ print_string(char *);
void main(void) {
  int x, y;
  x = 0;
  y = 1;
  print_string("Should print Foo\n");
  if (!(x == 1)) {
    print_string("Foo\n");
  }
  print_string("\n");
  print_string("Should print Bar\n");
  if (!(x == 0 && y == 10)) {
    print_string("Bar\n");
  }
  print_string("\nShould print Boo\n");
  if (x != 1) {
    if (!(x < 0) && y == 1) {
      print_string("Boo\n");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <print_string@plt>
cmpl   $0x1,-0x4(%rbp)
je     1148 <main+0x38>
lea    0xeca(%rip),%rdi
call   1030 <print_string@plt>
lea    0xee6(%rip),%rdi
call   1030 <print_string@plt>
lea    0xeb7(%rip),%rdi
call   1030 <print_string@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1174 <main+0x64>
cmpl   $0xa,-0x8(%rbp)
je     1180 <main+0x70>
lea    0xea4(%rip),%rdi
call   1030 <print_string@plt>
lea    0xe9d(%rip),%rdi
call   1030 <print_string@plt>
cmpl   $0x1,-0x4(%rbp)
je     11bb <main+0xab>
cmpl   $0x0,-0x4(%rbp)
jl     11b6 <main+0xa6>
cmpl   $0x1,-0x8(%rbp)
jne    11b6 <main+0xa6>
lea    0xe81(%rip),%rdi
call   1030 <print_string@plt>
jmp    11bb <main+0xab>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_string@plt>
lea    0xee9(%rip),%rdi
call   1030 <print_string@plt>
lea    0xf05(%rip),%rdi
call   1030 <print_string@plt>
lea    0xed6(%rip),%rdi
call   1030 <print_string@plt>
lea    0xed7(%rip),%rdi
call   1030 <print_string@plt>
lea    0xed0(%rip),%rdi
call   1030 <print_string@plt>
lea    0xed2(%rip),%rdi
pop    %rax
jmp    1030 <print_string@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Should print Foo\0A\00"
@.str.1 = [5 x i8] c"Foo\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [18 x i8] c"Should print Bar\0A\00"
@.str.4 = [5 x i8] c"Bar\0A\00"
@.str.5 = [19 x i8] c"\0AShould print Boo\0A\00"
@.str.6 = [5 x i8] c"Boo\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @print_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 10
br i1 %15, label %18, label %16
16: ; preds = %13, %8
%17 = call i32 @print_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
%19 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%20 = load i32, i32* %1
%21 = icmp ne i32 %20, 1
br i1 %21, label %22, label %31
22: ; preds = %18
%23 = load i32, i32* %1
%24 = icmp slt i32 %23, 0
br i1 %24, label %30, label %25
25: ; preds = %22
%26 = load i32, i32* %2
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @print_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %30
30: ; preds = %28, %25, %22
br label %31
31: ; preds = %30, %18
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Should print Foo\0A\00"
@.str.1 = [5 x i8] c"Foo\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [18 x i8] c"Should print Bar\0A\00"
@.str.4 = [5 x i8] c"Bar\0A\00"
@.str.5 = [19 x i8] c"\0AShould print Boo\0A\00"
@.str.6 = [5 x i8] c"Boo\0A\00"
define void @main() {
%1 = tail call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @print_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @print_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
ret void
}