xunge/DecIR huggingface dataset:
float __floatdisf(long long x) { return x; }


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

x86 assembly (clang, -O2):
<__floatdisf>:
cvtsi2ss %rdi,%xmm0
ret

LLVM IR (-O0):
define float @__floatdisf(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to float
ret float %4
}

LLVM IR (-O2):
define float @__floatdisf(i64 %0) {
%2 = sitofp i64 %0 to float
ret float %2
}
/* Variables and functions */
int randmt();
unsigned long long randi53(void) {
  const unsigned int lo = randmt();
  const unsigned int hi = randmt() & 0x1FFFFF;
  return (((unsigned long long)hi << 32) | lo);
}


x86 assembly (clang, -O0):
<randi53>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <randmt@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <randmt@plt>
and    $0x1fffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x20,%rax
mov    -0x4(%rbp),%ecx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randi53>:
push   %rbx
xor    %eax,%eax
call   1030 <randmt@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <randmt@plt>
and    $0x1fffff,%eax
shl    $0x20,%rax
mov    %ebx,%ecx
or     %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @randi53() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @randmt()
store i32 %3, i32* %1
%4 = call i32 (...) @randmt()
%5 = and i32 %4, 2097151
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = shl i64 %7, 32
%9 = load i32, i32* %1
%10 = zext i32 %9 to i64
%11 = or i64 %8, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @randi53() {
%1 = tail call i32 (...) @randmt()
%2 = tail call i32 (...) @randmt()
%3 = and i32 %2, 2097151
%4 = zext i32 %3 to i64
%5 = shl nuw nsw i64 %4, 32
%6 = zext i32 %1 to i64
%7 = or i64 %5, %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x16() {
  Assert_real((isupper(22) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              115, ("isupper should be 0 for 0x16"));
}


x86 assembly (clang, -O0):
<t_isupper_0x16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x73,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x16>:
push   %rax
mov    $0x16,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x73,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x16\00"
define void @t_isupper_0x16() {
%1 = call i64 @isupper(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x16\00"
define void @t_isupper_0x16() {
%1 = tail call i64 @isupper(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int i;
  int j;
  assume(i == 0 && j == 0);
  while (i < 100) {
    j += 2;
    i++;
  }
  assert(j == 200);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    1148 <main+0x28>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x64,-0x8(%rbp)
jge    1176 <main+0x56>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <main+0x35>
cmpl   $0xc8,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 0
br label %9
9: ; preds = %6, %0
%10 = phi i1 [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assume(i32 %11)
br label %13
13: ; preds = %16, %9
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 100
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 2
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %13
21: ; preds = %13
%22 = load i32, i32* %3
%23 = icmp eq i32 %22, 200
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
void other(void (*funcp)()) { funcp(); }


x86 assembly (clang, -O0):
<other>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<other>:
xor    %eax,%eax
jmp    *%rdi

LLVM IR (-O0):
define void @other(void (...)* %0) {
%2 = alloca void (...)*
store void (...)* %0, void (...)** %2
%3 = load void (...)*, void (...)** %2
ret void
}

LLVM IR (-O2):
define void @other(void (...)* nocapture %0) {
tail call void (...) %0()
ret void
}
void iNemoEngineAPI_ChangeFormFactor(int formFactorNumber) {}


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

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

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

LLVM IR (-O2):
define void @iNemoEngineAPI_ChangeFormFactor(i32 %0) {
ret void
}
/* Variables and functions */
int japi_frame(char *);
int j_frame(char *arg0) { return (japi_frame(arg0)); }


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

x86 assembly (clang, -O2):
<j_frame>:
jmp    1030 <japi_frame@plt>

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

LLVM IR (-O2):
define i32 @j_frame(i8* %0) {
%2 = tail call i32 @japi_frame(i8* %0)
ret i32 %2
}
/* Variables and functions */
int fsize(char const *);
int FILE_SIZE__(const char *fname, int len) { return fsize(fname); }


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

x86 assembly (clang, -O2):
<FILE_SIZE__>:
jmp    1030 <fsize@plt>

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

LLVM IR (-O2):
define i32 @FILE_SIZE__(i8* %0, i32 %1) {
%3 = tail call i32 @fsize(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  puts(((n >= 4) && (n % 2 == 0)) ? "YES" : "NO");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmpl   $0x4,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1162 <main+0x42>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
lea    0xe9b(%rip),%rdi
lea    0xe90(%rip),%rax
test   $0x1,%cl
cmovne %rax,%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   $0x1,%al
lea    0xec4(%rip),%rdi
lea    0xec1(%rip),%rcx
cmovne %rcx,%rdi
cmp    $0x4,%eax
cmovl  %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i32, i32* %2
%8 = srem i32 %7, 2
%9 = icmp eq i32 %8, 0
br label %10
10: ; preds = %6, %0
%11 = phi i1 [ false, %0 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%14 = call i32 @puts(i8* %13)
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 3
%6 = and i32 %4, 1
%7 = icmp eq i32 %6, 0
%8 = and i1 %5, %7
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int __attribute__((no, noclone)) foo(long unsigned int addr) {
  int i;
  int **q = (int **)addr;
  *q = &i;
  i = 0;
  bar();
  return i;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lea    -0xc(%rbp),%rcx
mov    %rcx,(%rax)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0x4(%rsp),%rax
mov    %rax,(%rdi)
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
call   1030 <bar@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @foo(i64 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = inttoptr i64 %0 to i32**
store i32* %2, i32** %4
store i32 0, i32* %2
%5 = call i32 (...) @bar()
%6 = load i32, i32* %2
ret i32 %6
}
int CK_Cross_toupper(int c) {
  return ((c >= 'a') && (c <= 'z')) ? (c - 'a' + 'A') : c;
}


x86 assembly (clang, -O0):
<CK_Cross_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     112c <CK_Cross_toupper+0x2c>
cmpl   $0x7a,-0x4(%rbp)
jg     112c <CK_Cross_toupper+0x2c>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <CK_Cross_toupper+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CK_Cross_toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @CK_Cross_toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 97
%11 = add nsw i32 %10, 65
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @CK_Cross_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int f(int x) { return x + 2; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mem_copy_dword2dword_little(int /*<<< orphan*/ *,
                                               int /*<<< orphan*/ const);
uint32_t arch_mem_copy_dword2dword_little(uint32_t *dword_d,
                                          const uint32_t dword_s) {
  return mem_copy_dword2dword_little(dword_d, dword_s);
}


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

x86 assembly (clang, -O2):
<arch_mem_copy_dword2dword_little>:
jmp    1030 <mem_copy_dword2dword_little@plt>

LLVM IR (-O0):
define i32 @arch_mem_copy_dword2dword_little(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 @mem_copy_dword2dword_little(i32* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @arch_mem_copy_dword2dword_little(i32* %0, i32 %1) {
%3 = tail call i32 @mem_copy_dword2dword_little(i32* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_ptx_bar_sync(int /*<<< orphan*/);
__attribute__((device)) void sync() { __builtin_ptx_bar_sync(0); }


x86 assembly (clang, -O0):
<sync>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <__builtin_ptx_bar_sync@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync>:
xor    %edi,%edi
jmp    1030 <__builtin_ptx_bar_sync@plt>

LLVM IR (-O0):
define void @sync() {
%1 = call i32 @__builtin_ptx_bar_sync(i32 0)
ret void
}

LLVM IR (-O2):
define void @sync() {
%1 = tail call i32 @__builtin_ptx_bar_sync(i32 0)
ret void
}
/* Variables and functions */
void xfree(void *in) {}


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

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

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

LLVM IR (-O2):
define void @xfree(i8* nocapture %0) {
ret void
}
void carg_test(void) {
  check_float(carg(({
                __complex__ double __retval;
                __real__ __retval = (2.0);
                __imag__ __retval = (0);
                __retval;
              })),
              0, 0, 0);
}


x86 assembly (clang, -O0):
<carg_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1040 <carg@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
mov    $0x1,%al
call   1030 <check_float@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carg_test>:
push   %rax
movsd  0xed7(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <carg@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%al
pop    %rcx
jmp    1030 <check_float@plt>

LLVM IR (-O0):
define void @carg_test() {
%1 = alloca { double, double }
%2 = alloca { double, double }
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
store double 2.000000e+00, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double 0.000000e+00, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
%9 = load double, double* %8
%10 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%11 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
store double %7, double* %10
store double %9, double* %11
%12 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%13 = load double, double* %12
%14 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
%15 = load double, double* %14
%16 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%17 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %13, double* %16
store double %15, double* %17
%18 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%19 = load double, double* %18
%20 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%21 = load double, double* %20
%22 = call double @carg(double %19, double %21)
%23 = call i32 (double, i32, i32, i32, ...) bitcast (i32 (...)* @check_float to i32 (double, i32, i32, i32, ...)*)(double %22, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @carg_test() {
%1 = tail call double @carg(double 2.000000e+00, double 0.000000e+00)
%2 = tail call i32 (double, i32, i32, i32, ...) bitcast (i32 (...)* @check_float to i32 (double, i32, i32, i32, ...)*)(double %1, i32 0, i32 0, i32 0)
ret void
}
void gtk_list_store_insert_with_values() {}


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

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

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

LLVM IR (-O2):
define void @gtk_list_store_insert_with_values() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ plcvm_get_s8(int /*<<< orphan*/);
int /*<<< orphan*/ plcvm_pop();
int /*<<< orphan*/ plcvm_push(int /*<<< orphan*/);
void cb_ldm_s1_s(void) { plcvm_push(plcvm_get_s8(plcvm_pop())); }


x86 assembly (clang, -O0):
<cb_ldm_s1_s>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <plcvm_pop@plt>
mov    %eax,%edi
call   1050 <plcvm_get_s8@plt>
mov    %eax,%edi
call   1040 <plcvm_push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_ldm_s1_s>:
push   %rax
xor    %eax,%eax
call   1030 <plcvm_pop@plt>
mov    %eax,%edi
call   1050 <plcvm_get_s8@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <plcvm_push@plt>

LLVM IR (-O0):
define void @cb_ldm_s1_s() {
%1 = call i32 (...) @plcvm_pop()
%2 = call i32 @plcvm_get_s8(i32 %1)
%3 = call i32 @plcvm_push(i32 %2)
ret void
}

LLVM IR (-O2):
define void @cb_ldm_s1_s() {
%1 = tail call i32 (...) @plcvm_pop()
%2 = tail call i32 @plcvm_get_s8(i32 %1)
%3 = tail call i32 @plcvm_push(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_wday;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int weekday(time_t bt) {
  struct tm *tp;
  tp = localtime(&bt);
  return tp->tm_wday;
}


x86 assembly (clang, -O0):
<weekday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<weekday>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @weekday(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 %0, i32* %2
%4 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %4, %struct.tm** %3
%5 = load %struct.tm*, %struct.tm** %3
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @weekday(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call %struct.tm* @localtime(i32* %2)
%4 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int fline__close();
int teardown() { return fline__close(); }


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

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

LLVM IR (-O0):
define i32 @teardown() {
%1 = call i32 (...) @fline__close()
ret i32 %1
}

LLVM IR (-O2):
define i32 @teardown() {
%1 = tail call i32 (...) @fline__close()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ ByteSwap64(int /*<<< orphan*/);
double bswap_dbl(double x) {
  union {
    uint64_t i;
    double d;
  } u;
  u.d = x;
  u.i = ByteSwap64(u.i);
  return u.d;
}


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

x86 assembly (clang, -O2):
<bswap_dbl>:
push   %rbx
movq   %xmm0,%rbx
mov    %ebx,%edi
call   1030 <ByteSwap64@plt>
mov    %eax,%eax
movabs $0xffffffff00000000,%rcx
ff ff ff
and    %rbx,%rcx
or     %rax,%rcx
movq   %rcx,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
%union.anon = type { double }
define double @bswap_dbl(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
%8 = call i32 @ByteSwap64(i32 %7)
%9 = bitcast %union.anon* %3 to i32*
store i32 %8, i32* %9
%10 = bitcast %union.anon* %3 to double*
%11 = load double, double* %10
ret double %11
}

LLVM IR (-O2):
define double @bswap_dbl(double %0) {
%2 = bitcast double %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @ByteSwap64(i32 %3)
%5 = zext i32 %4 to i64
%6 = and i64 %2, -4294967296
%7 = or i64 %6, %5
%8 = bitcast i64 %7 to double
ret double %8
}
/* Type definitions */
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ perror(char *);
DIR *dir_exists(char *dir) {
  DIR *fd;
  struct dirent *in;
  if (NULL == (fd = opendir(dir))) {
    perror("Error : Failed to open stations directory");
    return NULL;
  }
  return fd;
}


x86 assembly (clang, -O0):
<dir_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,%rcx
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1160 <dir_exists+0x40>
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
movq   $0x0,-0x8(%rbp)
jmp    1168 <dir_exists+0x48>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dir_exists>:
push   %rbx
call   1030 <opendir@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1133 <dir_exists+0x13>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xec6(%rip),%rdi
call   1040 <perror@plt>
jmp    112e <dir_exists+0xe>

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [42 x i8] c"Error : Failed to open stations directory\00"
define i32* @dir_exists(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca %struct.dirent*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32* @opendir(i8* %6)
store i32* %7, i32** %4
%8 = icmp eq i32* null, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
store i32* null, i32** %2
br label %13
11: ; preds = %1
%12 = load i32*, i32** %4
store i32* %12, i32** %2
br label %13
13: ; preds = %11, %9
%14 = load i32*, i32** %2
ret i32* %14
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [42 x i8] c"Error : Failed to open stations directory\00"
define noalias i32* @dir_exists(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret i32* %2
}
/* Variables and functions */
int f(int);
int main() { return f(13); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xd,%edi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xd,%edi
jmp    1030 <f@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 13)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 13)
ret i32 %1
}
unsigned int cell_value(unsigned char c, unsigned int age) {
  if (!c) {
    return 0;
  } else if (c > age) {
    return (3);
  } else {
    return (1);
  }
}


x86 assembly (clang, -O0):
<cell_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %esi,-0xc(%rbp)
cmpb   $0x0,-0x5(%rbp)
jne    1123 <cell_value+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1143 <cell_value+0x43>
movzbl -0x5(%rbp),%eax
cmp    -0xc(%rbp),%eax
jbe    113c <cell_value+0x3c>
movl   $0x3,-0x4(%rbp)
jmp    1143 <cell_value+0x43>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cell_value>:
xor    %eax,%eax
cmp    %esi,%edi
seta   %al
test   %edi,%edi
lea    0x1(%rax,%rax,1),%eax
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @cell_value(i8 zeroext %0, i32 %1) {
%3 = icmp eq i8 %0, 0
%4 = zext i8 %0 to i32
%5 = icmp ugt i32 %4, %1
%6 = select i1 %5, i32 3, i32 1
%7 = select i1 %3, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ alias2();
int loop2_linear(int k) {
  for (int i = 0; i < k; i++) {
    alias2();
  }
  return 0;
}


x86 assembly (clang, -O0):
<loop2_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1143 <loop2_linear+0x33>
mov    $0x0,%al
call   1030 <alias2@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <loop2_linear+0x12>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop2_linear>:
push   %rbx
test   %edi,%edi
jle    112c <loop2_linear+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <alias2@plt>
add    $0xffffffff,%ebx
jne    1120 <loop2_linear+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @loop2_linear(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret i32 0
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 (...) @alias2()
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
void os_stop_sample(void) {}


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

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

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

LLVM IR (-O2):
define void @os_stop_sample() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t hexCharToInt(char c) {
  if (c >= 'a') {
    return 10 + c - 'a';
  }
  return c - '0';
}


x86 assembly (clang, -O0):
<hexCharToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <hexCharToInt+0x29>
movsbl -0x5(%rbp),%eax
add    $0xa,%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1133 <hexCharToInt+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexCharToInt>:
lea    -0x30(%rdi),%ecx
lea    -0x57(%rdi),%eax
cmp    $0x61,%dil
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hexCharToInt(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = add nsw i32 10, %9
%11 = sub nsw i32 %10, 97
store i32 %11, i32* %2
br label %16
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 48
store i32 %15, i32* %2
br label %16
16: ; preds = %12, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @hexCharToInt(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp sgt i8 %0, 96
%4 = select i1 %3, i32 -87, i32 -48
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int write(int, void *, long);
int File_write(int fd, void *x, long size) {
  int c;
  if ((c = write(fd, x, size)) == -1)
    return -1;
  else
    return c;
}


x86 assembly (clang, -O0):
<File_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
jne    114b <File_write+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <File_write+0x41>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<File_write>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @File_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
void taskstats_tgid_free(struct signal_struct *sig) {}


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

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

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

LLVM IR (-O2):
%struct.signal_struct = type opaque
define void @taskstats_tgid_free(%struct.signal_struct* nocapture %0) {
ret void
}
float continuous_fitness_function(unsigned char input, unsigned char output) {
  return (float)input - output;
}


x86 assembly (clang, -O0):
<continuous_fitness_function>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
cvtsi2ss %eax,%xmm0
movzbl -0x2(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<continuous_fitness_function>:
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @continuous_fitness_function(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = uitofp i8 %5 to float
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = sitofp i32 %8 to float
%10 = fsub float %6, %9
ret float %10
}

LLVM IR (-O2):
define float @continuous_fitness_function(i8 zeroext %0, i8 zeroext %1) {
%3 = uitofp i8 %0 to float
%4 = uitofp i8 %1 to float
%5 = fsub float %3, %4
ret float %5
}
__attribute__((always_)) void cli(void) { asm volatile("cli"); }


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

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

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

LLVM IR (-O2):
define void @cli() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void exatest_title(const char *title, const char *subtible) {
  printf("\n");
  printf("---------------------------------------------------------------------"
         "-----------\n");
  printf("%s %s\n", title, subtible);
  printf("---------------------------------------------------------------------"
         "-----------\n");
}


x86 assembly (clang, -O0):
<exatest_title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exatest_title>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebb(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
lea    0xea5(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [82 x i8] c"--------------------------------------------------------------------------------\0A\00"
@.str.2 = [7 x i8] c"%s %s\0A\00"
define void @exatest_title(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %7, i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"%s %s\0A\00"
@str.3 = [81 x i8] c"--------------------------------------------------------------------------------\00"
define void @exatest_title(i8* %0, i8* %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_message_to_stdout(const char *message) {
  (void)fputs(message, stdout);
}


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

x86 assembly (clang, -O2):
<print_message_to_stdout>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @print_message_to_stdout(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret void
}
char *str_zcpy(dst, src, dsize)
char *dst;
const char *src;
int dsize;
{
  if (dsize > 0) {
    int len = strlen(src);
    if (len >= dsize)
      len = dsize - 1;
    memcpy(dst, src, len);
    dst[len] = '\0';
  }
  return dst;
}


x86 assembly (clang, -O0):
<str_zcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    117b <str_zcpy+0x5b>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     115e <str_zcpy+0x3e>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_zcpy>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
test   %edx,%edx
jle    1157 <str_zcpy+0x37>
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rbx),%ecx
cmp    %ebx,%eax
cmovl  %eax,%ecx
movslq %ecx,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%r15,%rbx,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @str_zcpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %29
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = call i64 @strlen(i8* %11)
%13 = trunc i64 %12 to i32
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = load i32, i32* %6
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = load i32, i32* %6
%19 = sub nsw i32 %18, 1
store i32 %19, i32* %7
br label %20
20: ; preds = %17, %10
%21 = load i8*, i8** %4
%22 = load i8*, i8** %5
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = load i8*, i8** %4
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
store i8 0, i8* %28
br label %29
29: ; preds = %20, %3
%30 = load i8*, i8** %4
ret i8* %30
}

LLVM IR (-O2):
define i8* @str_zcpy(i8* returned writeonly %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%7 = trunc i64 %6 to i32
%8 = icmp slt i32 %7, %2
%9 = add nsw i32 %2, -1
%10 = select i1 %8, i32 %7, i32 %9
%11 = sext i32 %10 to i64
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %11, i1 false)
%12 = getelementptr inbounds i8, i8* %0, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %5, %3
ret i8* %0
}
void swapv3(int *a, int *b) {
  *a = *a ^ *b;
  *b = *a ^ *b;
  *a = *a ^ *b;
}


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

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

LLVM IR (-O0):
define void @swapv3(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = xor i32 %6, %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = xor i32 %12, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = xor i32 %18, %20
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @swapv3(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = xor i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = xor i32 %8, %7
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _sl4_hash_key_free_str(void *key) { free(key); }


x86 assembly (clang, -O0):
<_sl4_hash_key_free_str>:
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):
<_sl4_hash_key_free_str>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @_sl4_hash_key_free_str(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 @_sl4_hash_key_free_str(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heapify(int *, int, int);
void make_heap(int A[], int n) {
  int k;
  for (k = n / 2; k >= 0; --k)
    heapify(A, n, k);
}


x86 assembly (clang, -O0):
<make_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1154 <make_heap+0x44>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <make_heap+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_heap>:
push   %rbp
push   %r14
push   %rbx
cmp    $0xffffffff,%esi
jl     1141 <make_heap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%ebp
shr    $0x1f,%ebp
add    %esi,%ebp
sar    %ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <heapify@plt>
add    $0xffffffff,%ebp
jb     1130 <make_heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @make_heap(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 = sdiv i32 %6, 2
store i32 %7, i32* %5
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32*, i32** %3
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @heapify(i32* %12, i32 %13, i32 %14)
br label %16
16: ; preds = %11
%17 = load i32, i32* %5
%18 = add nsw i32 %17, -1
store i32 %18, i32* %5
br label %8
19: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @make_heap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, -2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = sdiv i32 %1, 2
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = tail call i32 @heapify(i32* %0, i32 %1, i32 %7)
%9 = add nsw i32 %7, -1
%10 = icmp eq i32 %7, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret void
}
/* Variables and functions */
unsigned long LONG_MAX;
unsigned long table_next_power(unsigned long size) {
  unsigned long i = 64;
  if (size > LONG_MAX)
    return LONG_MAX;
  for (;;) {
    if (i >= size)
      return i;
    i *= 2;
  }
}


x86 assembly (clang, -O0):
<table_next_power>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x40,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ec5(%rip),%rcx
cmp    (%rcx),%rax
jbe    1137 <table_next_power+0x37>
mov    0x2eb5(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <table_next_power+0x68>
jmp    113c <table_next_power+0x3c>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1157 <table_next_power+0x57>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <table_next_power+0x68>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113c <table_next_power+0x3c>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_next_power>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
cmp    %rdi,%rax
jb     112b <table_next_power+0x2b>
mov    $0x40,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rcx,%rax
add    %rcx,%rcx
cmp    %rdi,%rax
jb     1120 <table_next_power+0x20>
ret

LLVM IR (-O0):
@LONG_MAX = global i64 0
define i64 @table_next_power(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 64, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* @LONG_MAX
%7 = icmp ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i64, i64* @LONG_MAX
store i64 %9, i64* %2
br label %20
10: ; preds = %1
br label %11
11: ; preds = %17, %10
%12 = load i64, i64* %4
%13 = load i64, i64* %3
%14 = icmp uge i64 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i64, i64* %4
store i64 %16, i64* %2
br label %20
17: ; preds = %11
%18 = load i64, i64* %4
%19 = mul i64 %18, 2
store i64 %19, i64* %4
br label %11
20: ; preds = %15, %8
%21 = load i64, i64* %2
ret i64 %21
}

LLVM IR (-O2):
@LONG_MAX = global i64 0
define i64 @table_next_power(i64 %0) {
%2 = load i64, i64* @LONG_MAX
%3 = icmp ult i64 %2, %0
br i1 %3, label %8, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 64, %1 ]
%6 = icmp ult i64 %5, %0
%7 = shl i64 %5, 1
br i1 %6, label %4, label %8
8: ; preds = %4, %1
%9 = phi i64 [ %2, %1 ], [ %5, %4 ]
ret i64 %9
}