#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*/ bar();
int toto() {
  int i, j, b;
  int a[100];
  if (i == 20) {
    for (j = 0; j <= 20; j++)
      a[j] = b + i;
    b = 3;
    bar();
  } else {
    if (i == 30) {
      for (j = 0; j <= 20; j++)
        a[j] = b + i;
      b = 5;
    } else {
      for (j = 0; j <= 20; j++)
        a[j] = b + i;
      b = 8;
    }
  }
  return a[b];
}


x86 assembly (clang, -O0):
<toto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
cmpl   $0x14,-0x4(%rbp)
jne    1168 <toto+0x58>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     1155 <toto+0x45>
mov    -0xc(%rbp),%ecx
add    -0x4(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <toto+0x1c>
movl   $0x3,-0xc(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
jmp    11ea <toto+0xda>
cmpl   $0x1e,-0x4(%rbp)
jne    11ae <toto+0x9e>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     11a2 <toto+0x92>
mov    -0xc(%rbp),%ecx
add    -0x4(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1179 <toto+0x69>
movl   $0x5,-0xc(%rbp)
jmp    11e5 <toto+0xd5>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     11de <toto+0xce>
mov    -0xc(%rbp),%ecx
add    -0x4(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11b5 <toto+0xa5>
movl   $0x8,-0xc(%rbp)
jmp    11ea <toto+0xda>
movslq -0xc(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toto>:
ret

LLVM IR (-O0):
define i32 @toto() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [100 x i32]
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 20
br i1 %6, label %7, label %23
7: ; preds = %0
store i32 0, i32* %2
br label %8
8: ; preds = %18, %7
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 20
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %1
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %16
store i32 %14, i32* %17
br label %18
18: ; preds = %11
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %8
21: ; preds = %8
store i32 3, i32* %3
%22 = call i32 (...) @bar()
br label %57
23: ; preds = %0
%24 = load i32, i32* %1
%25 = icmp eq i32 %24, 30
br i1 %25, label %26, label %41
26: ; preds = %23
store i32 0, i32* %2
br label %27
27: ; preds = %37, %26
%28 = load i32, i32* %2
%29 = icmp sle i32 %28, 20
br i1 %29, label %30, label %40
30: ; preds = %27
%31 = load i32, i32* %3
%32 = load i32, i32* %1
%33 = add nsw i32 %31, %32
%34 = load i32, i32* %2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %35
store i32 %33, i32* %36
br label %37
37: ; preds = %30
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
store i32 %39, i32* %2
br label %27
40: ; preds = %27
store i32 5, i32* %3
br label %56
41: ; preds = %23
store i32 0, i32* %2
br label %42
42: ; preds = %52, %41
%43 = load i32, i32* %2
%44 = icmp sle i32 %43, 20
br i1 %44, label %45, label %55
45: ; preds = %42
%46 = load i32, i32* %3
%47 = load i32, i32* %1
%48 = add nsw i32 %46, %47
%49 = load i32, i32* %2
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %50
store i32 %48, i32* %51
br label %52
52: ; preds = %45
%53 = load i32, i32* %2
%54 = add nsw i32 %53, 1
store i32 %54, i32* %2
br label %42
55: ; preds = %42
store i32 8, i32* %3
br label %56
56: ; preds = %55, %40
br label %57
57: ; preds = %56, %21
%58 = load i32, i32* %3
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %59
%61 = load i32, i32* %60
ret i32 %61
}

LLVM IR (-O2):
define i32 @toto() {
ret i32 undef
}