#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*/ printf(char *, ...);
main() {
  int a = 1, b = 2, c = 3, res;
  if (a == 1)
    printf("Value of variable a is %d \n", a);
  if (b == 2 || c == 4)
    printf("Either value of variable b is %d or variable c has value %d \n", b,
           c);
  if (a == 1 && c == 3)
    printf("Value of variable a is %d and value of variable c is %d \n", a, c);
  if (a == 1 && b == c || c == 3) {
    printf("Either value of variable a is %d \n", a);
    printf("or \n");
    printf("Variable b is %d and variable c is %d \n", b, c);
  }
  if (a == 2)
    printf("Value of a is 2 \n");
  else
    printf("Value of a is not 2 \n");
  if (a != 2)
    printf("Value of a is not 2 it is %d \n", a);
  else if (a == 1)
    printf("Value of a is 1 \n");
  else
    printf("Value of a is neither 1 nor 2 \n");
  if (a == 1)
    if (b == 2)
      if (c == 3)
        printf("Value of a is 1, Value of b is 2 and Value of c is 3 \n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    114f <main+0x3f>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0xc(%rbp)
je     1163 <main+0x53>
cmpl   $0x4,-0x10(%rbp)
jne    1177 <main+0x67>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    119f <main+0x8f>
cmpl   $0x3,-0x10(%rbp)
jne    119f <main+0x8f>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11b5 <main+0xa5>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11bf <main+0xaf>
cmpl   $0x3,-0x10(%rbp)
jne    11f2 <main+0xe2>
mov    -0x8(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    120f <main+0xff>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <main+0x10d>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
je     123d <main+0x12d>
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <main+0x15d>
cmpl   $0x1,-0x8(%rbp)
jne    125a <main+0x14a>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1268 <main+0x158>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <main+0x15d>
cmpl   $0x1,-0x8(%rbp)
jne    12a3 <main+0x193>
cmpl   $0x2,-0xc(%rbp)
jne    129e <main+0x18e>
cmpl   $0x3,-0x10(%rbp)
jne    1299 <main+0x189>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129e <main+0x18e>
jmp    12a3 <main+0x193>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf07(%rip),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf29(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf80(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2d(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf60(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf56(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Value of variable a is %d \0A\00"
@.str.1 = [62 x i8] c"Either value of variable b is %d or variable c has value %d \0A\00"
@.str.2 = [58 x i8] c"Value of variable a is %d and value of variable c is %d \0A\00"
@.str.3 = [35 x i8] c"Either value of variable a is %d \0A\00"
@.str.4 = [5 x i8] c"or \0A\00"
@.str.5 = [40 x i8] c"Variable b is %d and variable c is %d \0A\00"
@.str.6 = [18 x i8] c"Value of a is 2 \0A\00"
@.str.7 = [22 x i8] c"Value of a is not 2 \0A\00"
@.str.8 = [31 x i8] c"Value of a is not 2 it is %d \0A\00"
@.str.9 = [18 x i8] c"Value of a is 1 \0A\00"
@.str.10 = [32 x i8] c"Value of a is neither 1 nor 2 \0A\00"
@.str.11 = [55 x i8] c"Value of a is 1, Value of b is 2 and Value of c is 3 \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i32 3, i32* %4
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %0
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 2
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 4
br i1 %16, label %17, label %21
17: ; preds = %14, %11
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %19)
br label %21
21: ; preds = %17, %14
%22 = load i32, i32* %2
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %31
24: ; preds = %21
%25 = load i32, i32* %4
%26 = icmp eq i32 %25, 3
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = load i32, i32* %2
%29 = load i32, i32* %4
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0), i32 %28, i32 %29)
br label %31
31: ; preds = %27, %24, %21
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 1
br i1 %33, label %34, label %38
34: ; preds = %31
%35 = load i32, i32* %3
%36 = load i32, i32* %4
%37 = icmp eq i32 %35, %36
br i1 %37, label %41, label %38
38: ; preds = %34, %31
%39 = load i32, i32* %4
%40 = icmp eq i32 %39, 3
br i1 %40, label %41, label %48
41: ; preds = %38, %34
%42 = load i32, i32* %2
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%45 = load i32, i32* %3
%46 = load i32, i32* %4
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i32 %45, i32 %46)
br label %48
48: ; preds = %41, %38
%49 = load i32, i32* %2
%50 = icmp eq i32 %49, 2
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
br label %55
53: ; preds = %48
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
br label %55
55: ; preds = %53, %51
%56 = load i32, i32* %2
%57 = icmp ne i32 %56, 2
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = load i32, i32* %2
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %59)
br label %69
61: ; preds = %55
%62 = load i32, i32* %2
%63 = icmp eq i32 %62, 1
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %68
66: ; preds = %61
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
br label %68
68: ; preds = %66, %64
br label %69
69: ; preds = %68, %58
%70 = load i32, i32* %2
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %82
72: ; preds = %69
%73 = load i32, i32* %3
%74 = icmp eq i32 %73, 2
br i1 %74, label %75, label %81
75: ; preds = %72
%76 = load i32, i32* %4
%77 = icmp eq i32 %76, 3
br i1 %77, label %78, label %80
78: ; preds = %75
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.11, i64 0, i64 0))
br label %80
80: ; preds = %78, %75
br label %81
81: ; preds = %80, %72
br label %82
82: ; preds = %81, %69
%83 = load i32, i32* %1
ret i32 %83
}

LLVM IR (-O2):
@.str = [28 x i8] c"Value of variable a is %d \0A\00"
@.str.1 = [62 x i8] c"Either value of variable b is %d or variable c has value %d \0A\00"
@.str.2 = [58 x i8] c"Value of variable a is %d and value of variable c is %d \0A\00"
@.str.3 = [35 x i8] c"Either value of variable a is %d \0A\00"
@.str.5 = [40 x i8] c"Variable b is %d and variable c is %d \0A\00"
@.str.8 = [31 x i8] c"Value of a is not 2 it is %d \0A\00"
@str = [4 x i8] c"or \00"
@str.12 = [21 x i8] c"Value of a is not 2 \00"
@str.13 = [54 x i8] c"Value of a is 1, Value of b is 2 and Value of c is 3 \00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 3)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 3)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i32 2, i32 3)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.12, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 1)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.13, i64 0, i64 0))
ret i32 0
}