#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 */
struct cinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
int /*<<< orphan*/ print_version_0(struct cinfo *, int);
int /*<<< orphan*/ print_version_2(struct cinfo *, int);
void print_phase_1_data(struct cinfo *cip, int version) {
  switch (version) {
  case 0:
    print_version_0(cip, version);
    break;
  case 2:
  case 3:
    print_version_2(cip, version);
    break;
  default:
    fatal("print_phase_1_data: Bug 1.");
  }
}


x86 assembly (clang, -O0):
<print_phase_1_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1166 <print_phase_1_data+0x36>
jmp    1152 <print_phase_1_data+0x22>
mov    -0x10(%rbp),%eax
add    $0xfffffffe,%eax
sub    $0x2,%eax
jb     1177 <print_phase_1_data+0x47>
jmp    1188 <print_phase_1_data+0x58>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <print_version_0@plt>
jmp    1194 <print_phase_1_data+0x64>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <print_version_2@plt>
jmp    1194 <print_phase_1_data+0x64>
lea    0xe71(%rip),%rdi
call   1050 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_phase_1_data>:
lea    -0x2(%rsi),%eax
cmp    $0x2,%eax
jae    113d <print_phase_1_data+0xd>
jmp    1040 <print_version_2@plt>
test   %esi,%esi
jne    1148 <print_phase_1_data+0x18>
xor    %esi,%esi
jmp    1030 <print_version_0@plt>
lea    0xeb1(%rip),%rdi
jmp    1050 <fatal@plt>

LLVM IR (-O0):
%struct.cinfo = type { i32 }
@.str = [27 x i8] c"print_phase_1_data: Bug 1.\00"
define void @print_phase_1_data(%struct.cinfo* %0, i32 %1) {
%3 = alloca %struct.cinfo*
%4 = alloca i32
store %struct.cinfo* %0, %struct.cinfo** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %14 [
i32 0, label %6
i32 2, label %10
i32 3, label %10
]
6: ; preds = %2
%7 = load %struct.cinfo*, %struct.cinfo** %3
%8 = load i32, i32* %4
%9 = call i32 @print_version_0(%struct.cinfo* %7, i32 %8)
br label %16
10: ; preds = %2, %2
%11 = load %struct.cinfo*, %struct.cinfo** %3
%12 = load i32, i32* %4
%13 = call i32 @print_version_2(%struct.cinfo* %11, i32 %12)
br label %16
14: ; preds = %2
%15 = call i32 @fatal(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %10, %6
ret void
}

LLVM IR (-O2):
%struct.cinfo = type { i32 }
@.str = [27 x i8] c"print_phase_1_data: Bug 1.\00"
define void @print_phase_1_data(%struct.cinfo* %0, i32 %1) {
switch i32 %1, label %7 [
i32 0, label %3
i32 2, label %5
i32 3, label %5
]
3: ; preds = %2
%4 = tail call i32 @print_version_0(%struct.cinfo* %0, i32 0)
br label %9
5: ; preds = %2, %2
%6 = tail call i32 @print_version_2(%struct.cinfo* %0, i32 %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @fatal(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5, %3
ret void
}