xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double);
double display_ratio(double maximum_speed, double minimum_speed, double ratio) {
  printf("The ratio between successive speeds of a six-speed gearbox with "
         "maximum speed %.1lf RPM and minimum speed %.1lf RPM is %lf.\n\n",
         maximum_speed, minimum_speed, ratio);
  return 0;
}


x86 assembly (clang, -O0):
<display_ratio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_ratio>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [126 x i8] c"The ratio between successive speeds of a six-speed gearbox with maximum speed %.1lf RPM and minimum speed %.1lf RPM is %lf.\0A\0A\00"
define double @display_ratio(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0), double %7, double %8, double %9)
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [126 x i8] c"The ratio between successive speeds of a six-speed gearbox with maximum speed %.1lf RPM and minimum speed %.1lf RPM is %lf.\0A\0A\00"
define double @display_ratio(double %0, double %1, double %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %2)
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main() {
  int buf[20];
  int i;
  for (i = 0; i <= 20; ++i)
    buf[i] = i;
  f();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x14,-0x64(%rbp)
jg     1149 <main+0x39>
mov    -0x64(%rbp),%ecx
movslq -0x64(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1126 <main+0x16>
mov    $0x0,%al
call   1030 <f@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 20
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %10
store i32 %8, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = call i32 (...) @f()
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 0
}
void ScaleFilterCols_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleFilterCols_Any_NEON() {
ret void
}
void XtGetSelectionRequest() {}


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

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

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

LLVM IR (-O2):
define void @XtGetSelectionRequest() {
ret void
}
void do_umount(argc, argv) char **argv;
{
  if (umount(argv[1]) < 0)
    perror(argv[1]);
}


x86 assembly (clang, -O0):
<do_umount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1030 <umount@plt>
cmp    $0x0,%eax
jge    1156 <do_umount+0x36>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_umount>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
xor    %eax,%eax
call   1030 <umount@plt>
test   %eax,%eax
js     1135 <do_umount+0x15>
pop    %rbx
ret
mov    0x8(%rbx),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <perror@plt>

LLVM IR (-O0):
define void @do_umount(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @umount to i32 (i8*, ...)*)(i8* %7)
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %13)
br label %15
15: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
define void @do_umount(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @umount to i32 (i8*, ...)*)(i8* %4)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %8)
br label %10
10: ; preds = %7, %2
ret void
}
unsigned int_hash(int i, int hash_size) { return i % hash_size; }


x86 assembly (clang, -O0):
<int_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_hash>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @int_hash(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 = load i32, i32* %4
%7 = srem i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @int_hash(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ r4030_delay();
unsigned int r4030_read_reg32(unsigned long addr) {
  unsigned int ret = *((volatile unsigned int *)addr);
  r4030_delay();
  return ret;
}


x86 assembly (clang, -O0):
<r4030_read_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <r4030_delay@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r4030_read_reg32>:
push   %rbx
mov    (%rdi),%ebx
xor    %eax,%eax
call   1030 <r4030_delay@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @r4030_read_reg32(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
store i32 %6, i32* %3
%7 = call i32 (...) @r4030_delay()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @r4030_read_reg32(i64 %0) {
%2 = inttoptr i64 %0 to i32*
%3 = load volatile i32, i32* %2
%4 = tail call i32 (...) @r4030_delay()
ret i32 %3
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)11483;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local1++;
    }
    output[0UL] = ((state[0UL] >> (unsigned short)13) |
                   (state[0UL] << (unsigned short)3)) *
                  (unsigned short)4365;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0x2cdb,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    1140 <RandomFunc+0x40>
mov    -0x14(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
sar    $0xd,%eax
movzwl -0x12(%rbp),%ecx
shl    $0x3,%ecx
or     %ecx,%eax
imul   $0x110d,%eax,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x2cdb,%eax
rol    $0x3,%ax
imul   $0x110d,%eax,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 11483
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %18, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i32
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i16, i16* %6
%20 = add i16 %19, 1
store i16 %20, i16* %6
br label %14
21: ; preds = %14
%22 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%23 = load i16, i16* %22
%24 = zext i16 %23 to i32
%25 = ashr i32 %24, 13
%26 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%27 = load i16, i16* %26
%28 = zext i16 %27 to i32
%29 = shl i32 %28, 3
%30 = or i32 %25, %29
%31 = mul nsw i32 %30, 4365
%32 = trunc i32 %31 to i16
%33 = load i16*, i16** %4
%34 = getelementptr inbounds i16, i16* %33, i64 0
store i16 %32, i16* %34
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 11483
%5 = tail call i16 @llvm.fshl.i16(i16 %4, i16 %4, i16 3)
%6 = mul i16 %5, 4365
store i16 %6, i16* %1
ret void
}
/* Variables and functions */
char *trap_TranslateString(char const *);
char *CG_TranslateString(const char *string) {
  return trap_TranslateString(string);
}


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

x86 assembly (clang, -O2):
<CG_TranslateString>:
jmp    1030 <trap_TranslateString@plt>

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

LLVM IR (-O2):
define i8* @CG_TranslateString(i8* %0) {
%2 = tail call i8* @trap_TranslateString(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ SIZE_MAX;
int strcncasecmp(char const *, char const *, int, int /*<<< orphan*/);
int strccasecmp(const char *a, const char *b, int stop) {
  return strcncasecmp(a, b, stop, SIZE_MAX);
}


x86 assembly (clang, -O0):
<strccasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ecx
call   1030 <strcncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strccasecmp>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <strcncasecmp@plt>

LLVM IR (-O0):
@SIZE_MAX = global i32 0
define i32 @strccasecmp(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = load i32, i32* @SIZE_MAX
%11 = call i32 @strcncasecmp(i8* %7, i8* %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@SIZE_MAX = global i32 0
define i32 @strccasecmp(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @SIZE_MAX
%5 = tail call i32 @strcncasecmp(i8* %0, i8* %1, i32 %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_neq(void) { write_instr(0x18); }


x86 assembly (clang, -O0):
<eval_neq>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
call   1030 <write_instr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_neq>:
mov    $0x18,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_neq() {
%1 = call i32 @write_instr(i32 24)
ret void
}

LLVM IR (-O2):
define void @eval_neq() {
%1 = tail call i32 @write_instr(i32 24)
ret void
}
int fs450_set_tv_cc_data(unsigned char data1, unsigned char data2) {
  return (0);
}


x86 assembly (clang, -O0):
<fs450_set_tv_cc_data>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fs450_set_tv_cc_data(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @fs450_set_tv_cc_data(i8 zeroext %0, i8 zeroext %1) {
ret i32 0
}
double fmod(double x, double y) {
  double res = 0.0;
  asm volatile("1:\tfprem\n\t"
               "fstsw   %%ax\n\t"
               "sahf\n\t"
               "jp      1b\n\t"
               "fstp    %%st(1)"
               : "=t"(res)
               : "0"(x), "u"(y)
               : "ax", "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<fmod>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
fldl   -0x20(%rbp)
fldl   -0x28(%rbp)
fxch   %st(1)
fprem
fstsw  %ax
sahf
jp     1132 <fmod+0x32>
fstp   %st(1)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmod>:
movsd  %xmm0,-0x8(%rsp)
movsd  %xmm1,-0x10(%rsp)
fldl   -0x8(%rsp)
fldl   -0x10(%rsp)
fxch   %st(1)
fprem
fstsw  %ax
sahf
jp     1116 <fmod+0x16>
fstp   %st(1)
fstpl  -0x18(%rsp)
movsd  -0x18(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @fmod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
%6 = load double, double* %3
%7 = load double, double* %4
%8 = call double asm sideeffect "1:\09fprem\0A\09fstsw %ax\0A\09sahf\0A\09jp 1b\0A\09fstp %st(1)", "={st},0,{st(1)},~{ax},~{st(1)},~{dirflag},~{fpsr},~{flags}"(double %6, double %7)
store double %8, double* %5
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @fmod(double %0, double %1) {
%3 = tail call double asm sideeffect "1:\09fprem\0A\09fstsw %ax\0A\09sahf\0A\09jp 1b\0A\09fstp %st(1)", "={st},0,{st(1)},~{ax},~{st(1)},~{dirflag},~{fpsr},~{flags}"(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ xlEnter(char *);
int /*<<< orphan*/ xlThrowError(int /*<<< orphan*/);
void xlCleanup(void) { xlThrowError(xlEnter("CLEANUP")); }


x86 assembly (clang, -O0):
<xlCleanup>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <xlEnter@plt>
mov    %eax,%edi
call   1030 <xlThrowError@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xlCleanup>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <xlEnter@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <xlThrowError@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"CLEANUP\00"
define void @xlCleanup() {
%1 = call i32 @xlEnter(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @xlThrowError(i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"CLEANUP\00"
define void @xlCleanup() {
%1 = tail call i32 @xlEnter(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @xlThrowError(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Lcd8_Cmd(int);
void Lcd8_Shift_Right() { Lcd8_Cmd(0x1C); }


x86 assembly (clang, -O0):
<Lcd8_Shift_Right>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c,%edi
call   1030 <Lcd8_Cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lcd8_Shift_Right>:
mov    $0x1c,%edi
jmp    1030 <Lcd8_Cmd@plt>

LLVM IR (-O0):
define void @Lcd8_Shift_Right() {
%1 = call i32 @Lcd8_Cmd(i32 28)
ret void
}

LLVM IR (-O2):
define void @Lcd8_Shift_Right() {
%1 = tail call i32 @Lcd8_Cmd(i32 28)
ret void
}
void MatInvert(const struct Matrix *m, struct Matrix *r) {}


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

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

LLVM IR (-O0):
%struct.Matrix = type opaque
define void @MatInvert(%struct.Matrix* %0, %struct.Matrix* %1) {
%3 = alloca %struct.Matrix*
%4 = alloca %struct.Matrix*
store %struct.Matrix* %0, %struct.Matrix** %3
store %struct.Matrix* %1, %struct.Matrix** %4
ret void
}

LLVM IR (-O2):
%struct.Matrix = type opaque
define void @MatInvert(%struct.Matrix* nocapture %0, %struct.Matrix* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(int checkthis, char **vector) {
  if (checkthis < 2) {
    printf("USAGE: %s [string]\n", vector[0]);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1156 <usage+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
cmp    $0x1,%edi
jle    1126 <usage+0x6>
ret
push   %rax
mov    (%rsi),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"USAGE: %s [string]\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"USAGE: %s [string]\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
int sign_unext(int x, int len) {
  int len_ones;
  len_ones = (1 << len) - 1;
  return x & len_ones;
}


x86 assembly (clang, -O0):
<sign_unext>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign_unext>:
mov    %esi,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @sign_unext(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* %4
%7 = shl i32 1, %6
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = and i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sign_unext(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
double besselI0(double x) {
  double bessel = 1;
  int i = 100;
  do
    bessel = bessel * x / (i * i) + 1;
  while (--i);
  return bessel;
}


x86 assembly (clang, -O0):
<besselI0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xec2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    111d <besselI0+0x1d>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<besselI0>:
mov    $0x64,%eax
movsd  0xef3(%rip),%xmm2
movapd %xmm2,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mulsd  %xmm0,%xmm1
mov    %eax,%ecx
imul   %eax,%ecx
xorps  %xmm3,%xmm3
cvtsi2sd %ecx,%xmm3
divsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
lea    -0x1(%rax),%ecx
imul   %ecx,%ecx
xorps  %xmm3,%xmm3
cvtsi2sd %ecx,%xmm3
mulsd  %xmm0,%xmm1
divsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
add    $0xfffffffe,%eax
jne    1120 <besselI0+0x20>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @besselI0(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store double %0, double* %2
store double 1.000000e+00, double* %3
store i32 100, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load double, double* %3
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = load i32, i32* %4
%10 = load i32, i32* %4
%11 = mul nsw i32 %9, %10
%12 = sitofp i32 %11 to double
%13 = fdiv double %8, %12
%14 = fadd double %13, 1.000000e+00
store double %14, double* %3
br label %15
15: ; preds = %5
%16 = load i32, i32* %4
%17 = add nsw i32 %16, -1
store i32 %17, i32* %4
%18 = icmp ne i32 %17, 0
br i1 %18, label %5, label %19
19: ; preds = %15
%20 = load double, double* %3
ret double %20
}

LLVM IR (-O2):
define double @besselI0(double %0) {
br label %2
2: ; preds = %2, %1
%3 = phi double [ 1.000000e+00, %1 ], [ %15, %2 ]
%4 = phi i32 [ 100, %1 ], [ %16, %2 ]
%5 = fmul double %3, %0
%6 = mul nsw i32 %4, %4
%7 = sitofp i32 %6 to double
%8 = fdiv double %5, %7
%9 = fadd double %8, 1.000000e+00
%10 = add nsw i32 %4, -1
%11 = fmul double %9, %0
%12 = mul nsw i32 %10, %10
%13 = sitofp i32 %12 to double
%14 = fdiv double %11, %13
%15 = fadd double %14, 1.000000e+00
%16 = add nsw i32 %4, -2
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %2
18: ; preds = %2
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ICPrintPapa() { printf("Hello, papa!\n"); }


x86 assembly (clang, -O0):
<ICPrintPapa>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ICPrintPapa>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, papa!\0A\00"
define void @ICPrintPapa() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, papa!\00"
define void @ICPrintPapa() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct shmid_ds {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int /*<<< orphan*/ errExit(char *);
int shmctl(int const, int /*<<< orphan*/, struct shmid_ds *);
void close_shm(const int shm_id) {
  struct shmid_ds shm_desc;
  if (shmctl(shm_id, IPC_RMID, &shm_desc) == -1)
    errExit("shmctl()failed\n");
}


x86 assembly (clang, -O0):
<close_shm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1040 <shmctl@plt>
cmp    $0xffffffff,%eax
jne    1155 <close_shm+0x35>
lea    0xeb0(%rip),%rdi
call   1030 <errExit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_shm>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1040 <shmctl@plt>
cmp    $0xffffffff,%eax
je     1139 <close_shm+0x19>
pop    %rax
ret
lea    0xec0(%rip),%rdi
call   1030 <errExit@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.shmid_ds = type { i32 }
@IPC_RMID = global i32 0
@.str = [16 x i8] c"shmctl()failed\0A\00"
define void @close_shm(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.shmid_ds
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @IPC_RMID
%6 = call i32 @shmctl(i32 %4, i32 %5, %struct.shmid_ds* %3)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @errExit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
%struct.shmid_ds = type { i32 }
@IPC_RMID = global i32 0
@.str = [16 x i8] c"shmctl()failed\0A\00"
define void @close_shm(i32 %0) {
%2 = alloca %struct.shmid_ds
%3 = bitcast %struct.shmid_ds* %2 to i8*
%4 = load i32, i32* @IPC_RMID
%5 = call i32 @shmctl(i32 %0, i32 %4, %struct.shmid_ds* %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @errExit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}
int get_salt_size(void) { return 16; }


x86 assembly (clang, -O0):
<get_salt_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_salt_size>:
mov    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @get_salt_size() {
ret i32 16
}

LLVM IR (-O2):
define i32 @get_salt_size() {
ret i32 16
}
void rop3_40_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T ^ S;
  stk1 = *D & stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_40_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_40_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_40_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8, i8* %6
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %6
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_40_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
void Mixer_SetChannelProperties(int channel) {}


x86 assembly (clang, -O0):
<Mixer_SetChannelProperties>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @Mixer_SetChannelProperties(i32 %0) {
ret void
}
void Cyc_Absyn_dummy_exp_pop(void *a, struct Cyc_Absyn_Exp *e) { ; }


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

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

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type opaque
define void @Cyc_Absyn_dummy_exp_pop(i8* %0, %struct.Cyc_Absyn_Exp* %1) {
%3 = alloca i8*
%4 = alloca %struct.Cyc_Absyn_Exp*
store i8* %0, i8** %3
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %4
ret void
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type opaque
define void @Cyc_Absyn_dummy_exp_pop(i8* nocapture %0, %struct.Cyc_Absyn_Exp* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chk_change_scene_dun();
void chk_change_scene_town(void) { chk_change_scene_dun(); }


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

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

LLVM IR (-O0):
define void @chk_change_scene_town() {
%1 = call i32 (...) @chk_change_scene_dun()
ret void
}

LLVM IR (-O2):
define void @chk_change_scene_town() {
%1 = tail call i32 (...) @chk_change_scene_dun()
ret void
}
OP(ed, ff) {}


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

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
unsigned int udivmodsi4(unsigned int, unsigned int, int /*<<< orphan*/);
unsigned int __udivsi3(unsigned int a, unsigned int b) {
  return udivmodsi4(a, b, 0);
}


x86 assembly (clang, -O0):
<__udivsi3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <udivmodsi4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__udivsi3>:
xor    %edx,%edx
jmp    1030 <udivmodsi4@plt>

LLVM IR (-O0):
define i32 @__udivsi3(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 = load i32, i32* %4
%7 = call i32 @udivmodsi4(i32 %5, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @__udivsi3(i32 %0, i32 %1) {
%3 = tail call i32 @udivmodsi4(i32 %0, i32 %1, i32 0)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int _fileno;
};
typedef TYPE_1__ FILE;

/* Variables and functions */
int getFileDescriptor(FILE *stream) { return stream->_fileno; }


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

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

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @getFileDescriptor(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @getFileDescriptor(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void printUsageList(char *pgmName) {
  fprintf(stderr, "Usage: %s %s\n", pgmName,
          "-l"
          " <path>");
}


x86 assembly (clang, -O0):
<printUsageList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
lea    0xed7(%rip),%rcx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsageList>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
lea    0xee4(%rip),%rcx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"Usage: %s %s\0A\00"
@.str.1 = [10 x i8] c"-l <path>\00"
define void @printUsageList(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"Usage: %s %s\0A\00"
@.str.1 = [10 x i8] c"-l <path>\00"
define void @printUsageList(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int view_set_bg(struct view *v) {
  (void)v;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.view = type opaque
define i32 @view_set_bg(%struct.view* %0) {
%2 = alloca %struct.view*
store %struct.view* %0, %struct.view** %2
%3 = load %struct.view*, %struct.view** %2
ret i32 0
}

LLVM IR (-O2):
%struct.view = type opaque
define i32 @view_set_bg(%struct.view* nocapture readnone %0) {
ret i32 0
}
void file1() { printf("Control in function %s\n", __func__); }


x86 assembly (clang, -O0):
<file1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<file1>:
lea    0xee9(%rip),%rdi
lea    0xefa(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Control in function %s\0A\00"
@__func__.file1 = [6 x i8] c"file1\00"
define void @file1() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.file1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Control in function %s\0A\00"
@__func__.file1 = [6 x i8] c"file1\00"
define void @file1() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.file1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int connect_unix_socket(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int dbus_connect_system(void) {
  char system[] = "/var/run/dbus/system_bus_socket";
  return connect_unix_socket(system, 0, strlen(system));
}


x86 assembly (clang, -O0):
<dbus_connect_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1030 <connect_unix_socket@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbus_connect_system>:
push   %rbx
sub    $0x20,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
call   1030 <connect_unix_socket@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.dbus_connect_system.system = [32 x i8] c"/var/run/dbus/system_bus_socket\00"
define i32 @dbus_connect_system() {
%1 = alloca [32 x i8]
%2 = bitcast [32 x i8]* %1 to i8*
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @connect_unix_socket(i8* %3, i32 0, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@__const.dbus_connect_system.system = [32 x i8] c"/var/run/dbus/system_bus_socket\00"
define i32 @dbus_connect_system() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @connect_unix_socket(i8* %2, i32 0, i32 %3)
ret i32 %4
}
int blk_should_fake_timeout(struct request_queue *q) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.request_queue = type opaque
define i32 @blk_should_fake_timeout(%struct.request_queue* nocapture readnone %0) {
ret i32 0
}
void cpy_hxgrm(int *hexagram_1, int *hexagram_2) {
  int cntr1;
  for (cntr1 = 0; cntr1 < 6; cntr1++) {
    *hexagram_2 = *hexagram_1;
    hexagram_1++;
    hexagram_2++;
  }
  hexagram_1 -= 6;
  hexagram_2 -= 6;
}


x86 assembly (clang, -O0):
<cpy_hxgrm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    114f <cpy_hxgrm+0x4f>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <cpy_hxgrm+0x13>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffe8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffe8,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy_hxgrm>:
mov    (%rdi),%eax
mov    %eax,(%rsi)
mov    0x4(%rdi),%eax
mov    %eax,0x4(%rsi)
mov    0x8(%rdi),%eax
mov    %eax,0x8(%rsi)
mov    0xc(%rdi),%eax
mov    %eax,0xc(%rsi)
mov    0x10(%rdi),%eax
mov    %eax,0x10(%rsi)
mov    0x14(%rdi),%eax
mov    %eax,0x14(%rsi)
ret

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

LLVM IR (-O2):
define void @cpy_hxgrm(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
store i32 %3, i32* %1
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = getelementptr inbounds i32, i32* %1, i64 2
%9 = load i32, i32* %7
store i32 %9, i32* %8
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = getelementptr inbounds i32, i32* %1, i64 3
%12 = load i32, i32* %10
store i32 %12, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 4
%14 = getelementptr inbounds i32, i32* %1, i64 4
%15 = load i32, i32* %13
store i32 %15, i32* %14
%16 = getelementptr inbounds i32, i32* %0, i64 5
%17 = getelementptr inbounds i32, i32* %1, i64 5
%18 = load i32, i32* %16
store i32 %18, i32* %17
ret void
}
void bitset_set(unsigned char *bitset, unsigned long bit) {
  bitset[bit >> 3] |= 1 << (bit & 0x07);
}


x86 assembly (clang, -O0):
<bitset_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
movzbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitset_set>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0x1,%al
shl    %cl,%al
shr    $0x3,%rsi
or     %al,(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @bitset_set(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 7
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = lshr i64 %10, 3
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %14, %8
%16 = trunc i32 %15 to i8
store i8 %16, i8* %12
ret void
}

LLVM IR (-O2):
define void @bitset_set(i8* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i8
%4 = and i8 %3, 7
%5 = shl nuw i8 1, %4
%6 = lshr i64 %1, 3
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = or i8 %8, %5
store i8 %9, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ on_off();
void LED_alternate() {
  for (int i = 0; i < 20; ++i) {
    on_off();
  }
}


x86 assembly (clang, -O0):
<LED_alternate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jge    113e <LED_alternate+0x2e>
mov    $0x0,%al
call   1030 <on_off@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <LED_alternate+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LED_alternate>:
push   %rax
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
call   1030 <on_off@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <on_off@plt>

LLVM IR (-O0):
define void @LED_alternate() {
%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, 20
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 (...) @on_off()
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 @LED_alternate() {
%1 = tail call i32 (...) @on_off()
%2 = tail call i32 (...) @on_off()
%3 = tail call i32 (...) @on_off()
%4 = tail call i32 (...) @on_off()
%5 = tail call i32 (...) @on_off()
%6 = tail call i32 (...) @on_off()
%7 = tail call i32 (...) @on_off()
%8 = tail call i32 (...) @on_off()
%9 = tail call i32 (...) @on_off()
%10 = tail call i32 (...) @on_off()
%11 = tail call i32 (...) @on_off()
%12 = tail call i32 (...) @on_off()
%13 = tail call i32 (...) @on_off()
%14 = tail call i32 (...) @on_off()
%15 = tail call i32 (...) @on_off()
%16 = tail call i32 (...) @on_off()
%17 = tail call i32 (...) @on_off()
%18 = tail call i32 (...) @on_off()
%19 = tail call i32 (...) @on_off()
%20 = tail call i32 (...) @on_off()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool read_defect_data_12_is_glist_valid(uint8_t *data) {
  return data[1] & 0x08;
}


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

x86 assembly (clang, -O2):
<read_defect_data_12_is_glist_valid>:
mov    0x4(%rdi),%eax
and    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @read_defect_data_12_is_glist_valid(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 8
ret i32 %6
}

LLVM IR (-O2):
define i32 @read_defect_data_12_is_glist_valid(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = and i32 %3, 8
ret i32 %4
}
/* Type definitions */
struct node {
  int dummy;
};
struct generator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wp(struct generator *, char *, struct node *);
void generate_false(struct generator *g, struct node *p) { wp(g, "~M~f~C", p); }


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

x86 assembly (clang, -O2):
<generate_false>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <wp@plt>

LLVM IR (-O0):
%struct.generator = type { i32 }
%struct.node = type { i32 }
@.str = [7 x i8] c"~M~f~C\00"
define void @generate_false(%struct.generator* %0, %struct.node* %1) {
%3 = alloca %struct.generator*
%4 = alloca %struct.node*
store %struct.generator* %0, %struct.generator** %3
store %struct.node* %1, %struct.node** %4
%5 = load %struct.generator*, %struct.generator** %3
%6 = load %struct.node*, %struct.node** %4
%7 = call i32 @wp(%struct.generator* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.node* %6)
ret void
}

LLVM IR (-O2):
%struct.generator = type { i32 }
%struct.node = type { i32 }
@.str = [7 x i8] c"~M~f~C\00"
define void @generate_false(%struct.generator* %0, %struct.node* %1) {
%3 = tail call i32 @wp(%struct.generator* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.node* %1)
ret void
}