#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*/ boy_do_i_lack_imagination();
int /*<<< orphan*/ handle_another_value();
int /*<<< orphan*/ handle_fifty();
int /*<<< orphan*/ handle_zero();
int /*<<< orphan*/ one_last_func_call();
int some_int_value();
void long_function(void) {
  switch (some_int_value()) {
  case 0:
    handle_zero();
    break;
  case 50:
    handle_fifty();
    break;
  case 127:
    handle_another_value();
    break;
  default:
    boy_do_i_lack_imagination();
    break;
  }
  one_last_func_call();
}


x86 assembly (clang, -O0):
<long_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <some_int_value@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
test   %eax,%eax
je     11a3 <long_function+0x43>
jmp    1181 <long_function+0x21>
mov    -0x4(%rbp),%eax
sub    $0x32,%eax
je     11af <long_function+0x4f>
jmp    1192 <long_function+0x32>
mov    -0x4(%rbp),%eax
sub    $0x7f,%eax
je     11bb <long_function+0x5b>
jmp    11c7 <long_function+0x67>
mov    $0x0,%al
call   1060 <handle_zero@plt>
jmp    11ce <long_function+0x6e>
mov    $0x0,%al
call   1080 <handle_fifty@plt>
jmp    11ce <long_function+0x6e>
mov    $0x0,%al
call   1050 <handle_another_value@plt>
jmp    11ce <long_function+0x6e>
mov    $0x0,%al
call   1040 <boy_do_i_lack_imagination@plt>
mov    $0x0,%al
call   1070 <one_last_func_call@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_function>:
push   %rax
xor    %eax,%eax
call   1030 <some_int_value@plt>
cmp    $0x7f,%eax
je     117f <long_function+0x1f>
cmp    $0x32,%eax
je     1188 <long_function+0x28>
test   %eax,%eax
jne    1191 <long_function+0x31>
xor    %eax,%eax
call   1060 <handle_zero@plt>
jmp    1198 <long_function+0x38>
xor    %eax,%eax
call   1050 <handle_another_value@plt>
jmp    1198 <long_function+0x38>
xor    %eax,%eax
call   1080 <handle_fifty@plt>
jmp    1198 <long_function+0x38>
xor    %eax,%eax
call   1040 <boy_do_i_lack_imagination@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <one_last_func_call@plt>

LLVM IR (-O0):
define void @long_function() {
%1 = call i32 (...) @some_int_value()
switch i32 %1, label %8 [
i32 0, label %2
i32 50, label %4
i32 127, label %6
]
2: ; preds = %0
%3 = call i32 (...) @handle_zero()
br label %10
4: ; preds = %0
%5 = call i32 (...) @handle_fifty()
br label %10
6: ; preds = %0
%7 = call i32 (...) @handle_another_value()
br label %10
8: ; preds = %0
%9 = call i32 (...) @boy_do_i_lack_imagination()
br label %10
10: ; preds = %8, %6, %4, %2
%11 = call i32 (...) @one_last_func_call()
ret void
}

LLVM IR (-O2):
define void @long_function() {
%1 = tail call i32 (...) @some_int_value()
switch i32 %1, label %8 [
i32 0, label %2
i32 50, label %4
i32 127, label %6
]
2: ; preds = %0
%3 = tail call i32 (...) @handle_zero()
br label %10
4: ; preds = %0
%5 = tail call i32 (...) @handle_fifty()
br label %10
6: ; preds = %0
%7 = tail call i32 (...) @handle_another_value()
br label %10
8: ; preds = %0
%9 = tail call i32 (...) @boy_do_i_lack_imagination()
br label %10
10: ; preds = %8, %6, %4, %2
%11 = tail call i32 (...) @one_last_func_call()
ret void
}