#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_int(int);
int main() {
  int i;
  i = 1;
  switch (i) {}
  switch (i) {
  case 1:
    __print_int(i);
  }
  switch (i) {
  case 1:
    __print_int(1);
    break;
  case 2:
    __print_int(2);
    break;
  default:
    __print_int(999);
  }
  i = 45;
  switch (i) {
  case 1:
    __print_int(i);
  }
  switch (i) {
  case 1:
    __print_int(1);
    break;
  case 2:
    __print_int(2);
    break;
  default:
    __print_int(999);
  }
  switch (i) {
  default:
    __print_int(999);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    113f <main+0x2f>
jmp    1137 <main+0x27>
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1164 <main+0x54>
jmp    1153 <main+0x43>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1173 <main+0x63>
jmp    1182 <main+0x72>
mov    $0x1,%edi
call   1030 <__print_int@plt>
jmp    118c <main+0x7c>
mov    $0x2,%edi
call   1030 <__print_int@plt>
jmp    118c <main+0x7c>
mov    $0x3e7,%edi
call   1030 <__print_int@plt>
movl   $0x2d,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    11ac <main+0x9c>
jmp    11a4 <main+0x94>
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     11d1 <main+0xc1>
jmp    11c0 <main+0xb0>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     11e0 <main+0xd0>
jmp    11ef <main+0xdf>
mov    $0x1,%edi
call   1030 <__print_int@plt>
jmp    11f9 <main+0xe9>
mov    $0x2,%edi
call   1030 <__print_int@plt>
jmp    11f9 <main+0xe9>
mov    $0x3e7,%edi
call   1030 <__print_int@plt>
mov    $0x3e7,%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__print_int@plt>
mov    $0x1,%edi
call   1030 <__print_int@plt>
mov    $0x3e7,%edi
call   1030 <__print_int@plt>
mov    $0x3e7,%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %0
%5 = load i32, i32* %2
switch i32 %5, label %9 [
i32 1, label %6
]
6: ; preds = %4
%7 = load i32, i32* %2
%8 = call i32 @__print_int(i32 %7)
br label %9
9: ; preds = %6, %4
%10 = load i32, i32* %2
switch i32 %10, label %15 [
i32 1, label %11
i32 2, label %13
]
11: ; preds = %9
%12 = call i32 @__print_int(i32 1)
br label %17
13: ; preds = %9
%14 = call i32 @__print_int(i32 2)
br label %17
15: ; preds = %9
%16 = call i32 @__print_int(i32 999)
br label %17
17: ; preds = %15, %13, %11
store i32 45, i32* %2
%18 = load i32, i32* %2
switch i32 %18, label %22 [
i32 1, label %19
]
19: ; preds = %17
%20 = load i32, i32* %2
%21 = call i32 @__print_int(i32 %20)
br label %22
22: ; preds = %19, %17
%23 = load i32, i32* %2
switch i32 %23, label %28 [
i32 1, label %24
i32 2, label %26
]
24: ; preds = %22
%25 = call i32 @__print_int(i32 1)
br label %30
26: ; preds = %22
%27 = call i32 @__print_int(i32 2)
br label %30
28: ; preds = %22
%29 = call i32 @__print_int(i32 999)
br label %30
30: ; preds = %28, %26, %24
%31 = load i32, i32* %2
switch i32 %31, label %32 [
]
32: ; preds = %30
%33 = call i32 @__print_int(i32 999)
br label %34
34: ; preds = %32
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 1)
%2 = tail call i32 @__print_int(i32 1)
%3 = tail call i32 @__print_int(i32 999)
%4 = tail call i32 @__print_int(i32 999)
ret i32 0
}