xunge/DecIR huggingface dataset:
unsigned int gcd(unsigned int a, unsigned int b) {
  unsigned int t;
  while (b) {
    t = b;
    b = a % t;
    a = t;
  }
  return a;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1130 <gcd+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111e <gcd+0x1e>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %4
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = urem i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %5
store i32 %14, i32* %3
br label %6
15: ; preds = %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = urem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Type definitions */
struct wloc_req {
  int dummy;
};

/* Variables and functions */
int iw_fill_structure(struct wloc_req *);
extern int wloc_get_wlan_data(struct wloc_req *request) {
  return iw_fill_structure(request);
  return 0;
}


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

x86 assembly (clang, -O2):
<wloc_get_wlan_data>:
jmp    1030 <iw_fill_structure@plt>

LLVM IR (-O0):
%struct.wloc_req = type { i32 }
define i32 @wloc_get_wlan_data(%struct.wloc_req* %0) {
%2 = alloca %struct.wloc_req*
store %struct.wloc_req* %0, %struct.wloc_req** %2
%3 = load %struct.wloc_req*, %struct.wloc_req** %2
%4 = call i32 @iw_fill_structure(%struct.wloc_req* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.wloc_req = type { i32 }
define i32 @wloc_get_wlan_data(%struct.wloc_req* %0) {
%2 = tail call i32 @iw_fill_structure(%struct.wloc_req* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void help(void) {
  printf("jscompress version 1.0 Copyright (c) 2008-2018 Fabrice Bellard\n"
         "usage: jscompress [options] filename\n"
         "Javascript compressor\n"
         "\n"
         "-h          print this help\n"
         "-n          do not compress spaces\n"
         "-H          keep the first comment\n"
         "-c          compress to file\n"
         "-C name     compress to C source ('name' is the variable name)\n"
         "-D symbol   define preprocessor symbol\n"
         "-U symbol   undefine preprocessor symbol\n"
         "-o outfile  set the output filename (default=%s)\n",
         "out.js");
  exit(1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0x1089(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x108c(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [443 x i8] c"jscompress version 1.0 Copyright (c) 2008-2018 Fabrice Bellard\0Ausage: jscompress [options] filename\0AJavascript compressor\0A\0A-h print this help\0A-n do not compress spaces\0A-H keep the first comment\0A-c compress to file\0A-C name compress to C source ('name' is the variable name)\0A-D symbol define preprocessor symbol\0A-U symbol undefine preprocessor symbol\0A-o outfile set the output filename (default=%s)\0A\00"
@.str.1 = [7 x i8] c"out.js\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([443 x i8], [443 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [443 x i8] c"jscompress version 1.0 Copyright (c) 2008-2018 Fabrice Bellard\0Ausage: jscompress [options] filename\0AJavascript compressor\0A\0A-h print this help\0A-n do not compress spaces\0A-H keep the first comment\0A-c compress to file\0A-C name compress to C source ('name' is the variable name)\0A-D symbol define preprocessor symbol\0A-U symbol undefine preprocessor symbol\0A-o outfile set the output filename (default=%s)\0A\00"
@.str.1 = [7 x i8] c"out.js\00"
define void @help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([443 x i8], [443 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int printf(char *, int);
int main(void) {
  int bph2o = 212;
  int rv;
  rv = printf("%d F is water's boiling point.\n", bph2o);
  printf("The printf() function printed %d characters.\n", rv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd4,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xd4,%esi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"%d F is water's boiling point.\0A\00"
@.str.1 = [46 x i8] c"The printf() function printed %d characters.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 212, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"%d F is water's boiling point.\0A\00"
@.str.1 = [46 x i8] c"The printf() function printed %d characters.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 212)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
int main(int argc, const char *argv[]) {
  long double f = 1;
  while (f) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
fld1
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1133 <main+0x33>
jp     1133 <main+0x33>
jmp    1138 <main+0x38>
jmp    1117 <main+0x17>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %6
br label %7
7: ; preds = %10, %2
%8 = load x86_fp80, x86_fp80* %6
%9 = fcmp une x86_fp80 %8, 0xK00000000000000000000
br i1 %9, label %10, label %11
10: ; preds = %7
br label %7
11: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char const *, int /*<<< orphan*/);
int opencam(const char *path) { return open(path, O_RDWR); }


x86 assembly (clang, -O0):
<opencam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opencam>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
define i32 @opencam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@O_RDWR = global i32 0
define i32 @opencam(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* %0, i32 %2)
ret i32 %3
}
void x86_64_function() {}


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

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

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

LLVM IR (-O2):
define void @x86_64_function() {
ret void
}
int main(void) {
  int x = 5;
  struct foo {
    int f1, f2;
  } a[] = {1, 2, 3, 4, 5};
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee8(%rip),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.foo = type { i32, i32 }
@__const.main.a = [3 x %struct.foo] [%struct.foo { i32 1, i32 2 }, %struct.foo { i32 3, i32 4 }, %struct.foo { i32 5, i32 0 }]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x %struct.foo]
store i32 5, i32* %1
%3 = bitcast [3 x %struct.foo]* %2 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void ECAPOneShotModeConfig(unsigned int baseAdd, unsigned int stopVal) {
  (*((volatile unsigned short *)(baseAdd + (0x2A)))) |= (0x0001u);
  (*((volatile unsigned short *)(baseAdd + (0x2A)))) &= 0xfffffff9;
  (*((volatile unsigned short *)(baseAdd + (0x2A)))) |= stopVal;
}


x86 assembly (clang, -O0):
<ECAPOneShotModeConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2a,%eax
mov    %eax,%eax
mov    (%rax),%cx
movzwl %cx,%ecx
or     $0x1,%ecx
mov    %cx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x2a,%eax
mov    %eax,%eax
mov    (%rax),%cx
movzwl %cx,%ecx
and    $0xfffffff9,%ecx
mov    %cx,(%rax)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x2a,%eax
mov    %eax,%eax
mov    (%rax),%cx
movzwl %cx,%ecx
or     %edx,%ecx
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECAPOneShotModeConfig>:
add    $0x2a,%edi
orw    $0x1,(%rdi)
andw   $0xfff9,(%rdi)
or     %si,(%rdi)
ret

LLVM IR (-O0):
define void @ECAPOneShotModeConfig(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 = add i32 %5, 42
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i16*
%9 = load volatile i16, i16* %8
%10 = zext i16 %9 to i32
%11 = or i32 %10, 1
%12 = trunc i32 %11 to i16
store volatile i16 %12, i16* %8
%13 = load i32, i32* %3
%14 = add i32 %13, 42
%15 = zext i32 %14 to i64
%16 = inttoptr i64 %15 to i16*
%17 = load volatile i16, i16* %16
%18 = zext i16 %17 to i32
%19 = and i32 %18, -7
%20 = trunc i32 %19 to i16
store volatile i16 %20, i16* %16
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = add i32 %22, 42
%24 = zext i32 %23 to i64
%25 = inttoptr i64 %24 to i16*
%26 = load volatile i16, i16* %25
%27 = zext i16 %26 to i32
%28 = or i32 %27, %21
%29 = trunc i32 %28 to i16
store volatile i16 %29, i16* %25
ret void
}

LLVM IR (-O2):
define void @ECAPOneShotModeConfig(i32 %0, i32 %1) {
%3 = add i32 %0, 42
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i16*
%6 = load volatile i16, i16* %5
%7 = or i16 %6, 1
store volatile i16 %7, i16* %5
%8 = load volatile i16, i16* %5
%9 = and i16 %8, -7
store volatile i16 %9, i16* %5
%10 = load volatile i16, i16* %5
%11 = trunc i32 %1 to i16
%12 = or i16 %10, %11
store volatile i16 %12, i16* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hpet_fasync();
int main() { hpet_fasync(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @hpet_fasync()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hpet_fasync()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LibUsefulSetValue(char *, char *);
void HTTPSetProxy(char *Proxy) { LibUsefulSetValue("HTTP:Proxy", Proxy); }


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

x86 assembly (clang, -O2):
<HTTPSetProxy>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <LibUsefulSetValue@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"HTTP:Proxy\00"
define void @HTTPSetProxy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @LibUsefulSetValue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"HTTP:Proxy\00"
define void @HTTPSetProxy(i8* %0) {
%2 = tail call i32 @LibUsefulSetValue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct ht_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ht_add(struct ht_table *, char *, int /*<<< orphan*/ *,
                          void (*)());
void ht_add_function(struct ht_table *ht, char *key, void (*function)(void)) {
  ht_add(ht, key, NULL, function);
}


x86 assembly (clang, -O0):
<ht_add_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edx
call   1030 <ht_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_add_function>:
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <ht_add@plt>

LLVM IR (-O0):
%struct.ht_table = type { i32 }
define void @ht_add_function(%struct.ht_table* %0, i8* %1, void ()* %2) {
%4 = alloca %struct.ht_table*
%5 = alloca i8*
%6 = alloca void ()*
store %struct.ht_table* %0, %struct.ht_table** %4
store i8* %1, i8** %5
store void ()* %2, void ()** %6
%7 = load %struct.ht_table*, %struct.ht_table** %4
%8 = load i8*, i8** %5
%9 = load void ()*, void ()** %6
%10 = bitcast void ()* %9 to void (...)*
%11 = call i32 @ht_add(%struct.ht_table* %7, i8* %8, i32* null, void (...)* %10)
ret void
}

LLVM IR (-O2):
%struct.ht_table = type { i32 }
define void @ht_add_function(%struct.ht_table* %0, i8* %1, void ()* %2) {
%4 = bitcast void ()* %2 to void (...)*
%5 = tail call i32 @ht_add(%struct.ht_table* %0, i8* %1, i32* null, void (...)* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int closedir(int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) int softboundcets_closedir(DIR *dir) {
  return closedir(dir);
}


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

x86 assembly (clang, -O2):
<softboundcets_closedir>:
jmp    1030 <closedir@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_closedir(i32* %0) {
%2 = tail call i32 @closedir(i32* %0)
ret i32 %2
}
void foo204(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo204(i32 %0) {
ret void
}
OP(ed, de) {}


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 */
int /*<<< orphan*/ expectation_passed();
int /*<<< orphan*/ refute_equal_failed(long, long, char const *, int);
void _refute_equal(long exp, long act, const char *file, int line) {
  if (exp == act)
    refute_equal_failed(exp, act, file, line);
  else
    expectation_passed();
}


x86 assembly (clang, -O0):
<_refute_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    115e <_refute_equal+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <refute_equal_failed@plt>
jmp    1165 <_refute_equal+0x45>
mov    $0x0,%al
call   1040 <expectation_passed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_refute_equal>:
cmp    %rsi,%rdi
jne    112d <_refute_equal+0xd>
mov    %rdi,%rsi
jmp    1030 <refute_equal_failed@plt>
xor    %eax,%eax
jmp    1040 <expectation_passed@plt>

LLVM IR (-O0):
define void @_refute_equal(i64 %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i64 %0, i64* %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = load i8*, i8** %7
%16 = load i32, i32* %8
%17 = call i32 @refute_equal_failed(i64 %13, i64 %14, i8* %15, i32 %16)
br label %20
18: ; preds = %4
%19 = call i32 (...) @expectation_passed()
br label %20
20: ; preds = %18, %12
ret void
}

LLVM IR (-O2):
define void @_refute_equal(i64 %0, i64 %1, i8* %2, i32 %3) {
%5 = icmp eq i64 %0, %1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @refute_equal_failed(i64 %0, i64 %0, i8* %2, i32 %3)
br label %10
8: ; preds = %4
%9 = tail call i32 (...) @expectation_passed()
br label %10
10: ; preds = %8, %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t *ip_srcaddr(uint8_t *p_ip) { return p_ip + 12; }


x86 assembly (clang, -O0):
<ip_srcaddr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_srcaddr>:
lea    0x30(%rdi),%rax
ret

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

LLVM IR (-O2):
define i32* @ip_srcaddr(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 12
ret i32* %2
}
int test_imm_29int8_mem(signed char *val) {
  return ((*val) & (0x29 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_29int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x29,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_29int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 41
%7 = icmp ne i32 %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_29int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 41
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double hmmtop_log(double);
void hmmtop_onelog(double *x, double *y, int h) {
  int i;
  for (i = 0; i < h; i++)
    y[i] = hmmtop_log(x[i]);
}


x86 assembly (clang, -O0):
<hmmtop_onelog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1163 <hmmtop_onelog+0x53>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <hmmtop_log@plt>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <hmmtop_onelog+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmmtop_onelog>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    114a <hmmtop_onelog+0x3a>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
call   1030 <hmmtop_log@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <hmmtop_onelog+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @hmmtop_onelog(double* nocapture %0, double* nocapture writeonly %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = getelementptr inbounds double, double* %0, i64 %8
%10 = load double, double* %9
%11 = tail call double @hmmtop_log(double %10)
%12 = getelementptr inbounds double, double* %1, i64 %8
store double %11, double* %12
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
__attribute__((always_)) const int xisnanl(long double x) { return x != x; }


x86 assembly (clang, -O0):
<xisnanl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fucomip %st(0),%st
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisnanl>:
fldt   0x8(%rsp)
xor    %eax,%eax
fucomip %st(0),%st
setp   %al
ret

LLVM IR (-O0):
define i32 @xisnanl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = fcmp une x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @xisnanl(x86_fp80 %0) {
%2 = fcmp uno x86_fp80 %0, 0xK00000000000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int64_t;

/* Variables and functions */
int /*<<< orphan*/ extract_arguments(int *, char ***);
int /*<<< orphan*/ rst_init(int /*<<< orphan*/, int /*<<< orphan*/);
void rst_initialize(u_int64_t id1, u_int64_t id2, int *argc, char ***argv) {
  if (argv != NULL)
    extract_arguments(argc, argv);
  rst_init(id1, id2);
}


x86 assembly (clang, -O0):
<rst_initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114e <rst_initialize+0x2e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <extract_arguments@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <rst_init@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rst_initialize>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
test   %rcx,%rcx
je     1137 <rst_initialize+0x17>
mov    %rdx,%rdi
mov    %rcx,%rsi
call   1030 <extract_arguments@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <rst_init@plt>

LLVM IR (-O0):
define void @rst_initialize(i32 %0, i32 %1, i32* %2, i8*** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i8***
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i8*** %3, i8**** %8
%9 = load i8***, i8**** %8
%10 = icmp ne i8*** %9, null
br i1 %10, label %11, label %15
11: ; preds = %4
%12 = load i32*, i32** %7
%13 = load i8***, i8**** %8
%14 = call i32 @extract_arguments(i32* %12, i8*** %13)
br label %15
15: ; preds = %11, %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @rst_init(i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @rst_initialize(i32 %0, i32 %1, i32* %2, i8*** %3) {
%5 = icmp eq i8*** %3, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @extract_arguments(i32* %2, i8*** %3)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @rst_init(i32 %0, i32 %1)
ret void
}
void foo809() {}


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

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

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

LLVM IR (-O2):
define void @foo809() {
ret void
}
void iiEllisCleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @iiEllisCleanup() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  time_t rawtime;
  struct tm *ptm;
  time(&rawtime);
  ptm = gmtime(&rawtime);
  printf(" %2d:%02d\n", (ptm->tm_hour + 3) % 24, ptm->tm_min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <time@plt>
lea    -0x8(%rbp),%rdi
call   1050 <gmtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x3,%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1050 <gmtime@plt>
mov    (%rax),%ecx
mov    0x4(%rax),%edx
mov    %ecx,%eax
add    $0x3,%eax
cltq
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
shr    $0x22,%rax
add    %esi,%eax
shl    $0x3,%eax
lea    (%rax,%rax,2),%eax
neg    %eax
lea    (%rcx,%rax,1),%esi
add    $0x3,%esi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32 }
@.str = [11 x i8] c" %2d:%02d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 0, i32* %1
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @gmtime(i32* %2)
store %struct.tm* %5, %struct.tm** %3
%6 = load %struct.tm*, %struct.tm** %3
%7 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 3
%10 = srem i32 %9, 24
%11 = load %struct.tm*, %struct.tm** %3
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 1
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %13)
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32, i32 }
@.str = [11 x i8] c" %2d:%02d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @gmtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = add nsw i32 %6, 3
%8 = srem i32 %7, 24
%9 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 1
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
ret i32 0
}
int ft_isascii(int c) { return ((c >= 0) && (c <= 0177)); }


x86 assembly (clang, -O0):
<ft_isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <ft_isascii+0x20>
cmpl   $0x7f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
void foo_2_1_2_1_2_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_1_2_1_2_2_2() {
ret void
}
signed short int signedshortint_ignoring_longdouble(signed short int x,
                                                    long double y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshortint_ignoring_longdouble>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
fldt   0x10(%rbp)
mov    %ax,-0x2(%rbp)
fstpt  -0x20(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @signedshortint_ignoring_longdouble(i16 signext %0, x86_fp80 %1) {
%3 = alloca i16
%4 = alloca x86_fp80
store i16 %0, i16* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshortint_ignoring_longdouble(i16 returned signext %0, x86_fp80 %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ ICPrint();
int /*<<< orphan*/ ICPrintParents();
int /*<<< orphan*/ ICPrintString();
int /*<<< orphan*/ ICPrintingString();
int main(int argc, char **argv) {
  ICPrint();
  ICPrintParents();
  ICPrintingString();
  ICPrintString();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <ICPrint@plt>
mov    $0x0,%al
call   1030 <ICPrintParents@plt>
mov    $0x0,%al
call   1040 <ICPrintingString@plt>
mov    $0x0,%al
call   1050 <ICPrintString@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <ICPrint@plt>
xor    %eax,%eax
call   1030 <ICPrintParents@plt>
xor    %eax,%eax
call   1040 <ICPrintingString@plt>
xor    %eax,%eax
call   1050 <ICPrintString@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @ICPrint()
%7 = call i32 (...) @ICPrintParents()
%8 = call i32 (...) @ICPrintingString()
%9 = call i32 (...) @ICPrintString()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ICPrint()
%4 = tail call i32 (...) @ICPrintParents()
%5 = tail call i32 (...) @ICPrintingString()
%6 = tail call i32 (...) @ICPrintString()
ret i32 0
}
/* Variables and functions */
int DigitRoot(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%d\n", DigitRoot(1729));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x6c1,%edi
call   1040 <DigitRoot@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6c1,%edi
call   1040 <DigitRoot@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @DigitRoot(i32 1729)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @DigitRoot(i32 1729)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cfe_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<cfe_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cfe_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("ipv4range 0.1 Beta\n");
  printf("Usage: ipv4range [OPTION]... RANGE\n");
  printf("Try 'ipv4range -h for more information.'\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"ipv4range 0.1 Beta\0A\00"
@.str.1 = [36 x i8] c"Usage: ipv4range [OPTION]... RANGE\0A\00"
@.str.2 = [42 x i8] c"Try 'ipv4range -h for more information.'\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"ipv4range 0.1 Beta\00"
@str.3 = [35 x i8] c"Usage: ipv4range [OPTION]... RANGE\00"
@str.4 = [41 x i8] c"Try 'ipv4range -h for more information.'\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display(char *);
int /*<<< orphan*/ irq_install();
int /*<<< orphan*/ isr_install();
void main() {
  isr_install();
  irq_install();
  display("Text Editor. Type END to halt the CPU\n ");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <isr_install@plt>
mov    $0x0,%al
call   1030 <irq_install@plt>
lea    0xeb7(%rip),%rdi
call   1040 <display@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <isr_install@plt>
xor    %eax,%eax
call   1030 <irq_install@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1040 <display@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Text Editor. Type END to halt the CPU\0A \00"
define void @main() {
%1 = call i32 (...) @isr_install()
%2 = call i32 (...) @irq_install()
%3 = call i32 @display(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Text Editor. Type END to halt the CPU\0A \00"
define void @main() {
%1 = tail call i32 (...) @isr_install()
%2 = tail call i32 (...) @irq_install()
%3 = tail call i32 @display(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float a, b;
  b = 2.0e20 + 1.0;
  a = b - 2.0e20;
  printf("%f\n", a);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xed8(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeba(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
store float 0x4425AF1D80000000, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double %4, 2.000000e+20
%6 = fptrunc double %5 to float
store float %6, float* %1
%7 = load float, float* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %7)
%9 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 0x428D29CF00000000)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sumar(int, int);
int main(void) {
  int suma = sumar(5, 3);
  printf("La suma es: %d \n", suma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x3,%esi
call   1040 <sumar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x3,%esi
call   1040 <sumar@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"La suma es: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @sumar(i32 5, i32 3)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"La suma es: %d \0A\00"
define i32 @main() {
%1 = tail call i32 @sumar(i32 5, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void ARGBScale() {}


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

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

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

LLVM IR (-O2):
define void @ARGBScale() {
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int /*<<< orphan*/ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
int /*<<< orphan*/ srrand(int /*<<< orphan*/);
void tsrand() {
  struct timeval tv;
  struct timezone tz;
  gettimeofday(&tv, &tz);
  srrand(tv.tv_usec);
}


x86 assembly (clang, -O0):
<tsrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%edi
call   1040 <srrand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsrand>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <gettimeofday@plt>
mov    0x8(%rsp),%edi
add    $0x18,%rsp
jmp    1040 <srrand@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define void @tsrand() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @srrand(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define void @tsrand() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @srrand(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ t_setdefault();
void t_cls() {
  t_setdefault();
  fprintf(stdout, "\e[1;1H\e[2J");
}


x86 assembly (clang, -O0):
<t_cls>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <t_setdefault@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_cls>:
push   %rax
xor    %eax,%eax
call   1040 <t_setdefault@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
pop    %rax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [11 x i8] c"\1B[1;1H\1B[2J\00"
define void @t_cls() {
%1 = call i32 (...) @t_setdefault()
%2 = load i32, i32* @stdout
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [11 x i8] c"\1B[1;1H\1B[2J\00"
define void @t_cls() {
%1 = tail call i32 (...) @t_setdefault()
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, world\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printValue(int value, int bits) {
  if (bits > 0) {
    printValue(value >> 1, bits - 1);
    printf("%d", (value & 1));
  }
}


x86 assembly (clang, -O0):
<printValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    115b <printValue+0x3b>
mov    -0x4(%rbp),%edi
sar    $0x1,%edi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
call   1040 <printValue@plt>
mov    -0x4(%rbp),%esi
and    $0x1,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printValue>:
test   %esi,%esi
jle    1143 <printValue+0x23>
push   %rbx
mov    %edi,%ebx
sar    %edi
add    $0xffffffff,%esi
call   1040 <printValue@plt>
and    $0x1,%ebx
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @printValue(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %3
%9 = ashr i32 %8, 1
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = load i32, i32* %3
%13 = and i32 %12, 1
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printValue(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = ashr i32 %0, 1
%7 = add nsw i32 %1, -1
tail call void @printValue(i32 %6, i32 %7)
%8 = and i32 %0, 1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %4
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double get_systime() {
  struct timeval tv = {.tv_sec = 0, .tv_usec = 0};
  (void)gettimeofday(&tv, NULL);
  return (double)tv.tv_sec + (double)tv.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<get_systime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xea7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_systime>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq (%rsp),%xmm0
mulsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @get_systime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @get_systime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}