#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 i = 4, j = 2, k = 0;
  char c1 = 'a', c2 = 'b';
  if (k == 0)
    printf("k is zero\n");
  else if (j == 2)
    printf("j is 2\n");
  else if (i == 4)
    printf("i is 4\n");
  if (c1 != 'a')
    printf("c1 is not a\n");
  else if (c2 == 'a')
    printf("c2 is b");
  else
    printf("Hello\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movb   $0x61,-0x11(%rbp)
movb   $0x62,-0x12(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1157 <main+0x47>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1192 <main+0x82>
cmpl   $0x2,-0xc(%rbp)
jne    1172 <main+0x62>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    118d <main+0x7d>
cmpl   $0x4,-0x8(%rbp)
jne    1188 <main+0x78>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    118d <main+0x7d>
jmp    1192 <main+0x82>
movsbl -0x11(%rbp),%eax
cmp    $0x61,%eax
je     11b0 <main+0xa0>
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
jmp    11df <main+0xcf>
movsbl -0x12(%rbp),%eax
cmp    $0x61,%eax
jne    11ce <main+0xbe>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0xca>
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
jmp    11df <main+0xcf>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"k is zero\0A\00"
@.str.1 = [8 x i8] c"j is 2\0A\00"
@.str.2 = [8 x i8] c"i is 4\0A\00"
@.str.3 = [13 x i8] c"c1 is not a\0A\00"
@.str.4 = [8 x i8] c"c2 is b\00"
@.str.5 = [7 x i8] c"Hello\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
store i32 0, i32* %1
store i32 4, i32* %2
store i32 2, i32* %3
store i32 0, i32* %4
store i8 97, i8* %5
store i8 98, i8* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %23
11: ; preds = %0
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %22
16: ; preds = %11
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 4
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
br label %22
22: ; preds = %21, %14
br label %23
23: ; preds = %22, %9
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 97
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %38
29: ; preds = %23
%30 = load i8, i8* %6
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 97
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %37
35: ; preds = %29
%36 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
br label %38
38: ; preds = %37, %27
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@str = [10 x i8] c"k is zero\00"
@str.6 = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}