xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ qd_div(double *, double const *, double *);
void qd_div_dd_qd(const double *a, const double *b, double *c) {
  double qd_a[4];
  qd_a[0] = a[0];
  qd_a[1] = a[1];
  qd_a[2] = 0.0;
  qd_a[3] = 0.0;
  qd_div(qd_a, b, c);
}


x86 assembly (clang, -O0):
<qd_div_dd_qd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <qd_div@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_div_dd_qd>:
sub    $0x28,%rsp
movups (%rdi),%xmm0
movaps %xmm0,(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <qd_div@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @qd_div_dd_qd(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [4 x double]
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
store double %10, double* %11
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 1
store double %14, double* %15
%16 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 2
store double 0.000000e+00, double* %16
%17 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 3
store double 0.000000e+00, double* %17
%18 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%19 = load double*, double** %5
%20 = load double*, double** %6
%21 = call i32 @qd_div(double* %18, double* %19, double* %20)
ret void
}

LLVM IR (-O2):
define void @qd_div_dd_qd(double* nocapture %0, double* %1, double* %2) {
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %4 to i8*
%6 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%7 = bitcast double* %0 to <2 x double>*
%8 = load <2 x double>, <2 x double>* %7
%9 = bitcast [4 x double]* %4 to <2 x double>*
store <2 x double> %8, <2 x double>* %9
%10 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 2
%11 = bitcast double* %10 to i8*
%12 = call i32 @qd_div(double* %6, double* %1, double* %2)
ret void
}
void f2(void) {}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f2() {
ret void
}

LLVM IR (-O2):
define void @f2() {
ret void
}
int fn5(int a, int b) {
  int tem1 = a ^ b;
  int tem2 = a & b;
  return tem1 ^ tem2;
}


x86 assembly (clang, -O0):
<fn5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn5>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn5(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = and i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = xor i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn5(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
void mset(char *dst, char c, size_t z) {
  while (z--)
    *dst++ = c;
}


x86 assembly (clang, -O0):
<mset>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1144 <mset+0x44>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1112 <mset+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mset>:
test   %rdx,%rdx
je     1123 <mset+0x13>
push   %rax
movzbl %sil,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @mset(i8* %0, i8 signext %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i64
store i8* %0, i8** %4
store i8 %1, i8* %5
store i64 %2, i64* %6
br label %7
7: ; preds = %11, %3
%8 = load i64, i64* %6
%9 = add i64 %8, -1
store i64 %9, i64* %6
%10 = icmp ne i64 %8, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %5
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
store i8 %12, i8* %13
br label %7
15: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @mset(i8* nocapture writeonly %0, i8 signext %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %6, label %5
5: ; preds = %3
br label %6
6: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
int32_t FixedMul(int32_t a, int32_t b) {
  int64_t scratch1 = (int64_t)a * (int64_t)b + (int64_t)0x8000;
  return (scratch1 >> 16) & 0xffffffff;
}


x86 assembly (clang, -O0):
<FixedMul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
add    $0x8000,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FixedMul>:
imul   %esi,%edi
lea    0x8000(%rdi),%eax
sar    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @FixedMul(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = add nsw i32 %8, 32768
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = ashr i32 %10, 16
%12 = and i32 %11, -1
ret i32 %12
}

LLVM IR (-O2):
define i32 @FixedMul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = add nsw i32 %3, 32768
%5 = ashr i32 %4, 16
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char *);
void wr_init(const char *fname) {
  fatal("Writing file of type %s is not supported\n", "PocketFMS FlightPlan");
}


x86 assembly (clang, -O0):
<wr_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xf00(%rip),%rsi
call   1030 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wr_init>:
lea    0xee9(%rip),%rdi
lea    0xf0c(%rip),%rsi
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Writing file of type %s is not supported\0A\00"
@.str.1 = [21 x i8] c"PocketFMS FlightPlan\00"
define void @wr_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @fatal(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Writing file of type %s is not supported\0A\00"
@.str.1 = [21 x i8] c"PocketFMS FlightPlan\00"
define void @wr_init(i8* nocapture readnone %0) {
%2 = tail call i32 @fatal(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test();
int main(void) {
  for (long long i = 0; i < 100000000; ++i) {
    test();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x5f5e100,-0x10(%rbp)
05
jge    114d <main+0x3d>
mov    $0x0,%al
call   1030 <test@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5f5e100,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <test@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %8, %0
%4 = load i64, i64* %2
%5 = icmp slt i64 %4, 100000000
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 (...) @test()
br label %8
8: ; preds = %6
%9 = load i64, i64* %2
%10 = add nsw i64 %9, 1
store i64 %10, i64* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (...) @test()
%5 = add nuw nsw i64 %3, 1
%6 = icmp eq i64 %5, 100000000
br i1 %6, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ get_localtime_str(char *, size_t, char *);
void get_localtime_filename(char *cur_time_str, size_t cur_time_str_len) {
  get_localtime_str(cur_time_str, cur_time_str_len, "%Y-%m-%d_%Hh%Mm%Ss");
}


x86 assembly (clang, -O0):
<get_localtime_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xed1(%rip),%rdx
call   1030 <get_localtime_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_localtime_filename>:
lea    0xee9(%rip),%rdx
jmp    1030 <get_localtime_str@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"%Y-%m-%d_%Hh%Mm%Ss\00"
define void @get_localtime_filename(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @get_localtime_str(i8* %5, i64 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%Y-%m-%d_%Hh%Mm%Ss\00"
define void @get_localtime_filename(i8* %0, i64 %1) {
%3 = tail call i32 @get_localtime_str(i8* %0, i64 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void silence() {
  for (int i = 0; i < 15000; i++) {
    putchar(0);
  }
}


x86 assembly (clang, -O0):
<silence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3a98,-0x4(%rbp)
jge    1141 <silence+0x31>
xor    %edi,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <silence+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<silence>:
push   %rbx
mov    $0x3a98,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <silence+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @silence() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 15000
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @putchar(i32 0)
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @silence() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @putchar(i32 0)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 15000
br i1 %6, label %1, label %2
}
/* Variables and functions */
scalar_t__ CLOCKS_PER_SEC;
scalar_t__ clock();
double uclock_sec(void) { return (double)clock() / (double)CLOCKS_PER_SEC; }


x86 assembly (clang, -O0):
<uclock_sec>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<uclock_sec>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i64 0
define double @uclock_sec() {
%1 = call i64 (...) @clock()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @CLOCKS_PER_SEC
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i64 0
define double @uclock_sec() {
%1 = tail call i64 (...) @clock()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @CLOCKS_PER_SEC
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}
int test_imm_3Cuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x3C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Cuint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x3c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Cuint64_lowword_reg>:
test   $0x3c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Cuint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 60
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_3Cuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 60
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void toi_cleanup_usm(void) {}


x86 assembly (clang, -O0):
<toi_cleanup_usm>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @toi_cleanup_usm() {
ret void
}

LLVM IR (-O2):
define void @toi_cleanup_usm() {
ret void
}
int test_imm_BDint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xBD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BDint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xbd,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BDint64_midword_mem>:
testb  $0xbd,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_BDint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 189
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_BDint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12386304
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int creat(char *, int);
int /*<<< orphan*/ exit(int);
int strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
void Panic(char *mesg) {
  int i;
  i = creat("/dev/console", 0666);
  write(i, "panic: ", 7);
  write(i, mesg, strlen(mesg));
  exit(1);
}


x86 assembly (clang, -O0):
<Panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
mov    $0x1b6,%esi
call   1050 <creat@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    0xea3(%rip),%rsi
mov    $0x7,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<Panic>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xeb3(%rip),%rdi
mov    $0x1b6,%esi
call   1050 <creat@plt>
mov    %eax,%ebp
lea    0xead(%rip),%rsi
mov    %eax,%edi
mov    $0x7,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/console\00"
@.str.1 = [8 x i8] c"panic: \00"
define void @Panic(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @creat(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 438)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @write(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%7 = load i32, i32* %3
%8 = load i8*, i8** %2
%9 = load i8*, i8** %2
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @write(i32 %7, i8* %8, i32 %10)
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/console\00"
@.str.1 = [8 x i8] c"panic: \00"
define void @Panic(i8* %0) {
%2 = tail call i32 @creat(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 438)
%3 = tail call i32 @write(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @write(i32 %2, i8* %0, i32 %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *__strtok_ts(char **, char *, char const *);
char *strtok(char *restrict s1, const char *restrict s2) {
  static char *__token = NULL;
  return __strtok_ts(&__token, s1, s2);
}


x86 assembly (clang, -O0):
<strtok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0x2f01(%rip),%rdi
call   1030 <__strtok_ts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtok>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0x2f13(%rip),%rdi
jmp    1030 <__strtok_ts@plt>

LLVM IR (-O0):
@strtok.__token = internal global i8* null
define i8* @strtok(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @__strtok_ts(i8** @strtok.__token, i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
@strtok.__token = internal global i8* null
define i8* @strtok(i8* noalias %0, i8* noalias %1) {
%3 = tail call i8* @__strtok_ts(i8** @strtok.__token, i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int i = 0;
  for (i = 0; i < argc; i++)
    printf("%s\n", argv[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1166 <main+0x56>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1145 <main+0x35>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %6
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
char *calloc(int, int);
int rand();
int /*<<< orphan*/ strcpy(char *, char *);
char *fn105() {
  char *result;
  result = calloc(5 + rand() % 5, 4);
  strcpy((char *)result, "fn105");
  return result;
}


x86 assembly (clang, -O0):
<fn105>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x5,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn105>:
push   %rbx
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x5,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
lea    0xe93(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"fn105\00"
define i8* @fn105() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 5
%4 = add nsw i32 5, %3
%5 = call i8* @calloc(i32 %4, i32 4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"fn105\00"
define i8* @fn105() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 5
%3 = add nsw i32 %2, 5
%4 = tail call i8* @calloc(i32 %3, i32 4)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}
float STSMinFloat(float a, float b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<STSMinFloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <STSMinFloat+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <STSMinFloat+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<STSMinFloat>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @STSMinFloat(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @STSMinFloat(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int dwarf_get_AT_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_AT_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_AT_name(val_in, &v);
  return ellipname(res, val_in, v, "AT", printonerr);
}


x86 assembly (clang, -O0):
<get_AT_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <dwarf_get_AT_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1040 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_AT_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <dwarf_get_AT_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1040 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"AT\00"
define i8* @get_AT_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_AT_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"AT\00"
define i8* @get_AT_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_AT_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
long long int intFP(long long int x) { return 0; }


x86 assembly (clang, -O0):
<intFP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intFP>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @intFP(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret i64 0
}

LLVM IR (-O2):
define i64 @intFP(i64 %0) {
ret i64 0
}
/* Variables and functions */
double modf(double, double *);
int /*<<< orphan*/ printf(char *, double, double);
int main(int argc, const char *argv[]) {
  double pi = 3.14;
  double intergerPart;
  double floatPart;
  floatPart = modf(pi, &intergerPart);
  printf("My interger part is: %.0f and my float part is %.2f \ng",
         intergerPart, floatPart);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    -0x20(%rbp),%rdi
call   1040 <modf@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    %rsp,%rdi
call   1040 <modf@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"My interger part is: %.0f and my float part is %.2f \0Ag\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 3.140000e+00, double* %6
%9 = load double, double* %6
%10 = call double @modf(double %9, double* %7)
store double %10, double* %8
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), double %11, double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [55 x i8] c"My interger part is: %.0f and my float part is %.2f \0Ag\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call double @modf(double 3.140000e+00, double* %3)
%6 = load double, double* %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), double %6, double %5)
ret i32 0
}
void LIB_Utils_GetSTMUniqueID(unsigned int *paulPartID) {
  paulPartID[0] = ((unsigned long *)0x1FFF7A10)[0];
  paulPartID[1] = ((unsigned long *)0x1FFF7A10)[1];
  paulPartID[2] = ((unsigned long *)0x1FFF7A10)[2];
}


x86 assembly (clang, -O0):
<LIB_Utils_GetSTMUniqueID>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1fff7a10,%eax
mov    (%rax),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1fff7a10,%eax
mov    0x8(%rax),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    $0x1fff7a10,%eax
mov    0x10(%rax),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIB_Utils_GetSTMUniqueID>:
mov    0x1fff7a10,%eax
mov    %eax,(%rdi)
mov    0x1fff7a18,%eax
mov    %eax,0x4(%rdi)
mov    0x1fff7a20,%eax
mov    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @LIB_Utils_GetSTMUniqueID(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i64, i64* inttoptr (i64 536836624 to i64*)
%4 = trunc i64 %3 to i32
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 %4, i32* %6
%7 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 536836624 to i64*), i64 1)
%8 = trunc i64 %7 to i32
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32 %8, i32* %10
%11 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 536836624 to i64*), i64 2)
%12 = trunc i64 %11 to i32
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 2
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @LIB_Utils_GetSTMUniqueID(i32* nocapture writeonly %0) {
%2 = load i64, i64* inttoptr (i64 536836624 to i64*)
%3 = trunc i64 %2 to i32
store i32 %3, i32* %0
%4 = load i64, i64* inttoptr (i64 536836632 to i64*)
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = load i64, i64* inttoptr (i64 536836640 to i64*)
%8 = trunc i64 %7 to i32
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
double exp(double);
double exponential(double x) { return exp(x); }


x86 assembly (clang, -O0):
<exponential>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponential>:
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @exponential(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
ret double %4
}

LLVM IR (-O2):
define double @exponential(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
/* Variables and functions */
int libc_write(int, char *, size_t);
void writeLn(void) {
  char ch;
  int i;
  ch = (char)012;
  i = libc_write(1, &ch, (size_t)1);
}


x86 assembly (clang, -O0):
<writeLn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0xa,-0x1(%rbp)
mov    $0x1,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <libc_write@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeLn>:
push   %rax
movb   $0xa,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
mov    $0x1,%edi
call   1030 <libc_write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @writeLn() {
%1 = alloca i8
%2 = alloca i32
store i8 10, i8* %1
%3 = call i32 @libc_write(i32 1, i8* %1, i64 1)
store i32 %3, i32* %2
ret void
}

LLVM IR (-O2):
define void @writeLn() {
%1 = alloca i8
store i8 10, i8* %1
%2 = call i32 @libc_write(i32 1, i8* %1, i64 1)
ret void
}
/* Variables and functions */
int rand();
int next_rand(int min, int max) {
  return min + (rand() % (int)(max - min + 1));
}


x86 assembly (clang, -O0):
<next_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_rand>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @next_rand(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 (...) @rand()
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = add nsw i32 %9, 1
%11 = srem i32 %6, %10
%12 = add nsw i32 %5, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @next_rand(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
int is_stackable(const int symbology) {
  if (symbology < 55) {
    return 1;
  }
  switch (symbology) {
  case 60:
  case 69:
  case 72:
  case 75:
  case 77:
  case 86:
  case 87:
  case 89:
  case 129:
  case 74:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_stackable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x37,-0x8(%rbp)
jge    111d <is_stackable+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1159 <is_stackable+0x59>
mov    -0x8(%rbp),%eax
add    $0xffffffc4,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x45,%eax
ja     1152 <is_stackable+0x52>
mov    -0x10(%rbp),%rax
lea    0xec3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1159 <is_stackable+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_stackable>:
mov    $0x1,%eax
cmp    $0x37,%edi
jl     1122 <is_stackable+0x22>
add    $0xffffffc4,%edi
cmp    $0x45,%edi
ja     1123 <is_stackable+0x23>
lea    0xee7(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_stackable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 55
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %11
7: ; preds = %1
%8 = load i32, i32* %3
switch i32 %8, label %10 [
i32 60, label %9
i32 69, label %9
i32 72, label %9
i32 75, label %9
i32 77, label %9
i32 86, label %9
i32 87, label %9
i32 89, label %9
i32 129, label %9
i32 74, label %9
]
9: ; preds = %7, %7, %7, %7, %7, %7, %7, %7, %7, %7
store i32 1, i32* %2
br label %11
10: ; preds = %7
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_stackable(i32 %0) {
%2 = icmp slt i32 %0, 55
br i1 %2, label %5, label %3
3: ; preds = %1
switch i32 %0, label %4 [
i32 60, label %5
i32 69, label %5
i32 72, label %5
i32 75, label %5
i32 77, label %5
i32 86, label %5
i32 87, label %5
i32 89, label %5
i32 129, label %5
i32 74, label %5
]
4: ; preds = %3
br label %5
5: ; preds = %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %1, %4
%6 = phi i32 [ 0, %4 ], [ 1, %1 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int greedy(void *foobar) {
  printf(" ** Introduce greedy routing. This line is printed from "
         "greedy_routing.c\n");
  return 0;
}


x86 assembly (clang, -O0):
<greedy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [74 x i8] c" ** Introduce greedy routing. This line is printed from greedy_routing.c\0A\00"
define i32 @greedy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [73 x i8] c" ** Introduce greedy routing. This line is printed from greedy_routing.c\00"
define i32 @greedy(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void testFuncLoopWhile(void) {
  int i = 20U;
  while (i > 10U) {
    i = i - 1U;
  }
  i = 20;
}


x86 assembly (clang, -O0):
<testFuncLoopWhile>:
push   %rbp
mov    %rsp,%rbp
movl   $0x14,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jbe    1123 <testFuncLoopWhile+0x23>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <testFuncLoopWhile+0xb>
movl   $0x14,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testFuncLoopWhile() {
%1 = alloca i32
store i32 20, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp ugt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = sub i32 %6, 1
store i32 %7, i32* %1
br label %2
8: ; preds = %2
store i32 20, i32* %1
ret void
}

LLVM IR (-O2):
define void @testFuncLoopWhile() {
ret void
}
int character_position(char *buffer, int c) {
  int position = -1;
  while (*buffer) {
    if (*buffer++ == c) {
      position++;
      break;
    }
    position++;
  }
  return position;
}


x86 assembly (clang, -O0):
<character_position>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <character_position+0x56>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1148 <character_position+0x48>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <character_position+0x56>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <character_position+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<character_position>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <character_position+0x28>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1127 <character_position+0x27>
movzbl 0x1(%rdi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <character_position+0x10>
add    $0xffffffff,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @character_position(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 -1, i32* %5
br label %6
6: ; preds = %20, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = load i32, i32* %4
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %23
20: ; preds = %10
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %17, %6
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @character_position(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %13
%6 = phi i8 [ %16, %13 ], [ %3, %2 ]
%7 = phi i32 [ %15, %13 ], [ -1, %2 ]
%8 = phi i8* [ %14, %13 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %13
11: ; preds = %5
%12 = add nsw i32 %7, 1
br label %18
13: ; preds = %5
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = add nsw i32 %7, 1
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %13, %2, %11
%19 = phi i32 [ %12, %11 ], [ -1, %2 ], [ %15, %13 ]
ret i32 %19
}
/* Variables and functions */
float second();
float second__() { return (second()); }


x86 assembly (clang, -O0):
<second__>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <second@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<second__>:
xor    %eax,%eax
jmp    1030 <second@plt>

LLVM IR (-O0):
define float @second__() {
%1 = call float (...) @second()
ret float %1
}

LLVM IR (-O2):
define float @second__() {
%1 = tail call float (...) @second()
ret float %1
}
void kolibri_update_extent(struct gui_window *g) {}


x86 assembly (clang, -O0):
<kolibri_update_extent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.gui_window = type opaque
define void @kolibri_update_extent(%struct.gui_window* %0) {
%2 = alloca %struct.gui_window*
store %struct.gui_window* %0, %struct.gui_window** %2
ret void
}

LLVM IR (-O2):
%struct.gui_window = type opaque
define void @kolibri_update_extent(%struct.gui_window* nocapture %0) {
ret void
}
indreg0adrreg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (*p0) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<indreg0adrreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x87a22(%rax),%cx
mov    -0x18(%rbp),%rax
mov    %cx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0adrreg1_set>:
movzwl 0x87a22(%r9),%eax
mov    %ax,(%r8)
ret

LLVM IR (-O0):
define i32 @indreg0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %13
%17 = getelementptr inbounds i16, i16* %16, i64 277777
%18 = load i16, i16* %17
%19 = load i16*, i16** %12
store i16 %18, i16* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @indreg0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture writeonly %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %5, i64 277777
%8 = load i16, i16* %7
store i16 %8, i16* %4
ret i32 undef
}
__attribute__((always_)) void insl(unsigned short port, void *addr,
                                   unsigned long count) {
  asm volatile("rep ; ins"
               "l"
               : "=D"(addr), "=c"(count)
               : "d"(port), "0"(addr), "1"(count));
}


x86 assembly (clang, -O0):
<insl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
rep insl (%dx),%es:(%rdi)
mov    %rdi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insl>:
mov    %rdx,%rcx
mov    %edi,%edx
mov    %rsi,%rdi
rep insl (%dx),%es:(%rdi)
ret

LLVM IR (-O0):
define void @insl(i16 zeroext %0, i8* %1, i64 %2) {
%4 = alloca i16
%5 = alloca i8*
%6 = alloca i64
store i16 %0, i16* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i16, i16* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call { i8*, i64 } asm sideeffect "rep ; insl", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %7, i8* %8, i64 %9)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @insl(i16 zeroext %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep ; insl", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t load_le32_aligned(const uint8_t *p) { return (*((uint32_t *)p)); }


x86 assembly (clang, -O0):
<load_le32_aligned>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_le32_aligned>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @load_le32_aligned(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @load_le32_aligned(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
char *ath_strdup(char *);
int /*<<< orphan*/ printf(char *);
char *my_strdup(char *in) {
  char *out = ath_strdup(in);
  if (out == NULL)
    printf("Error allocating memory for a new string\n");
  return out;
}


x86 assembly (clang, -O0):
<my_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ath_strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <my_strdup+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strdup>:
push   %rbx
call   1040 <ath_strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <my_strdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Error allocating memory for a new string\0A\00"
define i8* @my_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @ath_strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@str = [41 x i8] c"Error allocating memory for a new string\00"
define i8* @my_strdup(i8* %0) {
%2 = tail call i8* @ath_strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}