xunge/DecIR huggingface dataset:
/* Variables and functions */
double cosh(double);
double Cosh(double a, double b) { return cosh(a); }


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

x86 assembly (clang, -O2):
<Cosh>:
jmp    1030 <cosh@plt>

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

LLVM IR (-O2):
define double @Cosh(double %0, double %1) {
%3 = tail call double @cosh(double %0)
ret double %3
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t multimap_minU32(uint32_t a, uint32_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<multimap_minU32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <multimap_minU32+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <multimap_minU32+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multimap_minU32>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @multimap_minU32(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void doFree(void *p) { free(p); }


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

LLVM IR (-O0):
define void @doFree(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 @doFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ selectoin_sort(int *, int);
int main(void) {
  int i, j;
  int temp;
  int num[] = {2, 3, 6, 1, 7, 3, 0, 1};
  selectoin_sort(num, 8);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1030 <selectoin_sort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <selectoin_sort@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.num = [8 x i32] [i32 2, i32 3, i32 6, i32 1, i32 7, i32 3, i32 0, i32 1]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [8 x i32]
%5 = bitcast [8 x i32]* %4 to i8*
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%7 = call i32 @selectoin_sort(i32* %6, i32 8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.num = [8 x i32] [i32 2, i32 3, i32 6, i32 1, i32 7, i32 3, i32 0, i32 1]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @selectoin_sort(i32* %3, i32 8)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x1;
  int x2;
  x1 = __VERIFIER_nondet_int();
  x2 = __VERIFIER_nondet_int();
  while (x1 <= 10) {
    x2 = 1000;
    while (x2 > 1) {
      x2 = x2 - 1;
    }
    x1 = x1 + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     116a <main+0x5a>
movl   $0x3e8,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    115c <main+0x4c>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1144 <main+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@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 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 10
br i1 %8, label %9, label %19
9: ; preds = %6
store i32 1000, i32* %3
br label %10
10: ; preds = %13, %9
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %3
br label %10
16: ; preds = %10
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %6
19: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int meat_main(unsigned int, char const *const *);
int main(int argc, char **argv) {
  return meat_main((unsigned int)(argc), (char const *const *)(argv));
}


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <meat_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <meat_main@plt>

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @meat_main(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @meat_main(i32 %0, i8** %1)
ret i32 %3
}
const char *Box_Description(void) {
  return "The `Box` type is another wrapper around a C pointer with one "
         "additional "
         "behaviour as compared to `Ref`. When a `Box` object is deleted it "
         "will "
         "also call `del` on the object it points to. The means a `Box` is "
         "considered a pointer type that _owns_ the object it points to, and "
         "so is "
         "responsible for it's destruction. Due to this `Box`s must point to "
         "valid "
         "Cello objects and so can't be initalised with `NULL` or anything "
         "else "
         "invalid. "
         "\n\n"
         "While this might not seem that useful when there is Garbage "
         "Collection "
         "this can be very useful when Garbage Collection is turned off, and "
         "when "
         "used in conjunction with collections.";
}


x86 assembly (clang, -O0):
<Box_Description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Box_Description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [617 x i8] c"The `Box` type is another wrapper around a C pointer with one additional behaviour as compared to `Ref`. When a `Box` object is deleted it will also call `del` on the object it points to. The means a `Box` is considered a pointer type that _owns_ the object it points to, and so is responsible for it's destruction. Due to this `Box`s must point to valid Cello objects and so can't be initalised with `NULL` or anything else invalid. \0A\0AWhile this might not seem that useful when there is Garbage Collection this can be very useful when Garbage Collection is turned off, and when used in conjunction with collections.\00"
define i8* @Box_Description() {
ret i8* getelementptr inbounds ([617 x i8], [617 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [617 x i8] c"The `Box` type is another wrapper around a C pointer with one additional behaviour as compared to `Ref`. When a `Box` object is deleted it will also call `del` on the object it points to. The means a `Box` is considered a pointer type that _owns_ the object it points to, and so is responsible for it's destruction. Due to this `Box`s must point to valid Cello objects and so can't be initalised with `NULL` or anything else invalid. \0A\0AWhile this might not seem that useful when there is Garbage Collection this can be very useful when Garbage Collection is turned off, and when used in conjunction with collections.\00"
define i8* @Box_Description() {
ret i8* getelementptr inbounds ([617 x i8], [617 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_PRINTABLE_it;
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
ASN1_STRING *d2i_ASN1_PRINTABLE(ASN1_STRING **a, const unsigned char **in,
                                long len) {
  return (ASN1_STRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                      &ASN1_PRINTABLE_it);
}


x86 assembly (clang, -O0):
<d2i_ASN1_PRINTABLE>:
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),%rdx
mov    0x2eb1(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_ASN1_PRINTABLE>:
mov    0x2ed1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@ASN1_PRINTABLE_it = global i32 0
define i32* @d2i_ASN1_PRINTABLE(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @ASN1_PRINTABLE_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@ASN1_PRINTABLE_it = global i32 0
define i32* @d2i_ASN1_PRINTABLE(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @ASN1_PRINTABLE_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
void version(void) {
  const char *VERSION = "tagger 1.0";
  const char *LICENSE =
      "Written by Cedric Francoys\nCopyright (C) 2015, Some Rights "
      "Reserved\nLicense GPLv3+: GNU GPL version 3 or later "
      "<http://gnu.org/licenses/gpl.html>.\nThis is free software: you are "
      "free to change and redistribute it.\nThere is NO WARRANTY, to the "
      "extent permitted by law.";
  puts(VERSION);
  puts(LICENSE);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"tagger 1.0\00"
@.str.1 = [268 x i8] c"Written by Cedric Francoys\0ACopyright (C) 2015, Some Rights Reserved\0ALicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\00"
define void @version() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([268 x i8], [268 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = call i32 @puts(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @puts(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"tagger 1.0\00"
@.str.1 = [268 x i8] c"Written by Cedric Francoys\0ACopyright (C) 2015, Some Rights Reserved\0ALicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([268 x i8], [268 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void wake_lock(struct wake_lock *lock) {}


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

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

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

LLVM IR (-O2):
%struct.wake_lock = type opaque
define void @wake_lock(%struct.wake_lock* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ReflexTestData_GetLed();
int32_t LedModel_GetLed() { return ReflexTestData_GetLed(); }


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

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

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

LLVM IR (-O2):
define i32 @LedModel_GetLed() {
%1 = tail call i32 (...) @ReflexTestData_GetLed()
ret i32 %1
}
/* Variables and functions */
int sock_enable_blocking(int, int /*<<< orphan*/);
int sock_make_socket_non_blocking(int sfd) {
  return sock_enable_blocking(sfd, 0);
}


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

x86 assembly (clang, -O2):
<sock_make_socket_non_blocking>:
xor    %esi,%esi
jmp    1030 <sock_enable_blocking@plt>

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

LLVM IR (-O2):
define i32 @sock_make_socket_non_blocking(i32 %0) {
%2 = tail call i32 @sock_enable_blocking(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, int);
void trashMemory(void *mem, int len) {
  if (len == 0) {
    return;
  }
  memset(mem, 0x00, len);
  memset(mem, 0xFF, len);
  memset(mem, 0x00, len);
}


x86 assembly (clang, -O0):
<trashMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112e <trashMemory+0x1e>
jmp    115b <trashMemory+0x4b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0xff,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trashMemory>:
test   %esi,%esi
je     1148 <trashMemory+0x38>
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %esi,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memset@plt>
ret

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

LLVM IR (-O2):
define void @trashMemory(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
%6 = tail call i32 @memset(i8* %0, i32 255, i32 %1)
%7 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
br label %8
8: ; preds = %2, %4
ret void
}
/* Type definitions */
struct string {
  int dummy;
};

/* Variables and functions */
struct string *string_set2(struct string *, char const *, int);
scalar_t__ strlen(char const *);
struct string *string_set(struct string *str, const char *data) {
  return string_set2(str, data, (int)strlen(data));
}


x86 assembly (clang, -O0):
<string_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <string_set2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_set>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <string_set2@plt>

LLVM IR (-O0):
%struct.string = type { i32 }
define %struct.string* @string_set(%struct.string* %0, i8* %1) {
%3 = alloca %struct.string*
%4 = alloca i8*
store %struct.string* %0, %struct.string** %3
store i8* %1, i8** %4
%5 = load %struct.string*, %struct.string** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = trunc i64 %8 to i32
%10 = call %struct.string* @string_set2(%struct.string* %5, i8* %6, i32 %9)
ret %struct.string* %10
}

LLVM IR (-O2):
%struct.string = type { i32 }
define %struct.string* @string_set(%struct.string* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = trunc i64 %3 to i32
%5 = tail call %struct.string* @string_set2(%struct.string* %0, i8* %1, i32 %4)
ret %struct.string* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void hello_dl() { printf("\n%s\n\n", "hello world from a dynamic library\n"); }


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

x86 assembly (clang, -O2):
<hello_dl>:
lea    0xee9(%rip),%rdi
lea    0xee8(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@.str.1 = [36 x i8] c"hello world from a dynamic library\0A\00"
define void @hello_dl() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@.str.1 = [36 x i8] c"hello world from a dynamic library\0A\00"
define void @hello_dl() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int cmdline_parser_required(struct gengetopt_args_info *args_info,
                            const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<cmdline_parser_required>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_parser_required>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.gengetopt_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @cmdline_parser_required(%struct.gengetopt_args_info* %0, i8* %1) {
%3 = alloca %struct.gengetopt_args_info*
%4 = alloca i8*
store %struct.gengetopt_args_info* %0, %struct.gengetopt_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.gengetopt_args_info*, %struct.gengetopt_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @cmdline_parser_required(%struct.gengetopt_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
int __signbit(double x) { return __builtin_signbit(x); }


x86 assembly (clang, -O0):
<__signbit>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__signbit>:
movmskpd %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @__signbit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = bitcast double %3 to i64
%5 = icmp slt i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @__signbit(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ read_polars();
void init_polar() { read_polars(); }


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

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

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

LLVM IR (-O2):
define void @init_polar() {
%1 = tail call i32 (...) @read_polars()
ret void
}
int InterruptEnabled(int InterruptSource) {
  return (((volatile unsigned long *)(0xE000E000 +
                                      (0x100)))[(InterruptSource >> 5)] &
          (1 << (InterruptSource & 31))) != 0;
}


x86 assembly (clang, -O0):
<InterruptEnabled>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
movslq %eax,%rcx
mov    $0xe000e100,%eax
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<InterruptEnabled>:
mov    %edi,%ecx
mov    %edi,%eax
mov    $0x1,%edx
shl    %cl,%edx
sar    $0x5,%eax
movslq %eax,%rcx
movslq %edx,%rdx
mov    $0xe000e100,%esi
xor    %eax,%eax
and    (%rsi,%rcx,8),%rdx
setne  %al
ret

LLVM IR (-O0):
define i32 @InterruptEnabled(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 5
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i64, i64* inttoptr (i64 3758153984 to i64*), i64 %5
%7 = load volatile i64, i64* %6
%8 = load i32, i32* %2
%9 = and i32 %8, 31
%10 = shl i32 1, %9
%11 = sext i32 %10 to i64
%12 = and i64 %7, %11
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @InterruptEnabled(i32 %0) {
%2 = ashr i32 %0, 5
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i64, i64* inttoptr (i64 3758153984 to i64*), i64 %3
%5 = load volatile i64, i64* %4
%6 = and i32 %0, 31
%7 = shl nuw i32 1, %6
%8 = sext i32 %7 to i64
%9 = and i64 %5, %8
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
void consumer_c() {}


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

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

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

LLVM IR (-O2):
define void @consumer_c() {
ret void
}
/* Variables and functions */
unsigned long strtoul(char const *, int /*<<< orphan*/ *, unsigned int);
int strict_strtoul(const char *str, unsigned int base, unsigned long *val) {
  *val = strtoul(str, NULL, base);
  return 0;
}


x86 assembly (clang, -O0):
<strict_strtoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtoul@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strict_strtoul>:
push   %rbx
mov    %rdx,%rbx
mov    %esi,%edx
xor    %esi,%esi
call   1030 <strtoul@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @strict_strtoul(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i64 @strtoul(i8* %7, i32* null, i32 %8)
%10 = load i64*, i64** %6
store i64 %9, i64* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @strict_strtoul(i8* nocapture %0, i32 %1, i64* nocapture writeonly %2) {
%4 = tail call i64 @strtoul(i8* nocapture %0, i32* null, i32 %1)
store i64 %4, i64* %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int file_exist(char *filename) {
  FILE *fp;
  if ((fp = fopen(filename, "wb")) == NULL) {
    return (0);
  } else {
    return (1);
  }
}


x86 assembly (clang, -O0):
<file_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1146 <file_exist+0x36>
movl   $0x0,-0x4(%rbp)
jmp    114d <file_exist+0x3d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exist>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <fopen@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
define i32 @file_exist(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define i32 @file_exist(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
int length(char *str) {
  int i = 0;
  int count = 0;
  while (*(str + i) != '\0') {
    count++;
    i++;
  }
  return count;
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1142 <length+0x42>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <length+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
cmpb   $0x0,(%rdi)
je     111c <length+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <length+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ 0, %1 ]
%6 = add nuw nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %6 to i32
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 0, %1 ], [ %11, %10 ]
ret i32 %13
}
int _sub(int x, int y, void *garb) { return x - y; }


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

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

LLVM IR (-O0):
define i32 @_sub(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = sub nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @_sub(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = sub nsw i32 %0, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ srand48(int /*<<< orphan*/);
int /*<<< orphan*/ test_arithmetic_incremental();
int /*<<< orphan*/ test_pythagorean_inequality();
int /*<<< orphan*/ test_variance_incremental();
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand48(time(NULL));
  test_pythagorean_inequality();
  test_arithmetic_incremental();
  test_variance_incremental();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1070 <srand48@plt>
mov    $0x0,%al
call   1040 <test_pythagorean_inequality@plt>
mov    $0x0,%al
call   1060 <test_arithmetic_incremental@plt>
mov    $0x0,%al
call   1030 <test_variance_incremental@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1070 <srand48@plt>
xor    %eax,%eax
call   1040 <test_pythagorean_inequality@plt>
xor    %eax,%eax
call   1060 <test_arithmetic_incremental@plt>
xor    %eax,%eax
call   1030 <test_variance_incremental@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand48(i32 %2)
%4 = call i32 (...) @test_pythagorean_inequality()
%5 = call i32 (...) @test_arithmetic_incremental()
%6 = call i32 (...) @test_variance_incremental()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand48(i32 %1)
%3 = tail call i32 (...) @test_pythagorean_inequality()
%4 = tail call i32 (...) @test_arithmetic_incremental()
%5 = tail call i32 (...) @test_variance_incremental()
ret i32 0
}
unsigned xrop3_242_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~S;
  stk2 = D & stk3;
  stk1 = T | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_242_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_242_0_0>:
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
not    %dil
movzbl %dil,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_242_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
ret i32 %31
}

LLVM IR (-O2):
define i32 @xrop3_242_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %0, -1
%6 = zext i8 %5 to i32
%7 = or i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdout;
void output_close(FILE *outp) {
  if (outp != stdout)
    fclose(outp);
}


x86 assembly (clang, -O0):
<output_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2eb9(%rip),%rcx
cmp    (%rcx),%rax
je     1139 <output_close+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_close>:
mov    0x2ec9(%rip),%rax
cmp    %rdi,(%rax)
je     1121 <output_close+0x11>
jmp    1030 <fclose@plt>
ret

LLVM IR (-O0):
@stdout = global i32* null
define void @output_close(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** @stdout
%5 = icmp ne i32* %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32*, i32** %2
%8 = call i32 @fclose(i32* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@stdout = global i32* null
define void @output_close(i32* nocapture %0) {
%2 = load i32*, i32** @stdout
%3 = icmp eq i32* %2, %0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x36() {
  Assert_real((isbdigit(54) == 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_isbdigit.c",
              275, ("isbdigit should be 0 for 6"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x36>:
push   %rax
mov    $0x36,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x113,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for 6\00"
define void @t_isbdigit_0x36() {
%1 = call i64 @isbdigit(i32 54)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 275, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for 6\00"
define void @t_isbdigit_0x36() {
%1 = tail call i64 @isbdigit(i32 54)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 275, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int read16(unsigned int);
unsigned int read32(unsigned int addr) {
  unsigned int data;
  data = read16(addr + 0);
  data |= ((unsigned int)read16(addr + 2)) << 16;
  return (data);
}


x86 assembly (clang, -O0):
<read32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x0,%edi
call   1030 <read16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x2,%edi
call   1030 <read16@plt>
shl    $0x10,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <read16@plt>
mov    %eax,%ebp
add    $0x2,%ebx
mov    %ebx,%edi
call   1030 <read16@plt>
shl    $0x10,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 0
%6 = call i32 @read16(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = add i32 %7, 2
%9 = call i32 @read16(i32 %8)
%10 = shl i32 %9, 16
%11 = load i32, i32* %3
%12 = or i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @read32(i32 %0) {
%2 = tail call i32 @read16(i32 %0)
%3 = add i32 %0, 2
%4 = tail call i32 @read16(i32 %3)
%5 = shl i32 %4, 16
%6 = or i32 %5, %2
ret i32 %6
}
/* Type definitions */
struct nibTwoCache {
  int dummy;
};
struct dnaSeq {
  int dummy;
};

/* Variables and functions */
struct dnaSeq *nibTwoCacheSeqPartExt(struct nibTwoCache *, char *, int, int,
                                     int, int *);
struct dnaSeq *nibTwoCacheSeqPart(struct nibTwoCache *ntc, char *seqName,
                                  int start, int size, int *retFullSeqSize) {
  return nibTwoCacheSeqPartExt(ntc, seqName, start, size, 1, retFullSeqSize);
}


x86 assembly (clang, -O0):
<nibTwoCacheSeqPart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r9
mov    $0x1,%r8d
call   1030 <nibTwoCacheSeqPartExt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibTwoCacheSeqPart>:
mov    %r8,%r9
mov    $0x1,%r8d
jmp    1030 <nibTwoCacheSeqPartExt@plt>

LLVM IR (-O0):
%struct.dnaSeq = type { i32 }
%struct.nibTwoCache = type { i32 }
define %struct.dnaSeq* @nibTwoCacheSeqPart(%struct.nibTwoCache* %0, i8* %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca %struct.nibTwoCache*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
store %struct.nibTwoCache* %0, %struct.nibTwoCache** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load %struct.nibTwoCache*, %struct.nibTwoCache** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32*, i32** %10
%16 = call %struct.dnaSeq* @nibTwoCacheSeqPartExt(%struct.nibTwoCache* %11, i8* %12, i32 %13, i32 %14, i32 1, i32* %15)
ret %struct.dnaSeq* %16
}

LLVM IR (-O2):
%struct.dnaSeq = type { i32 }
%struct.nibTwoCache = type { i32 }
define %struct.dnaSeq* @nibTwoCacheSeqPart(%struct.nibTwoCache* %0, i8* %1, i32 %2, i32 %3, i32* %4) {
%6 = tail call %struct.dnaSeq* @nibTwoCacheSeqPartExt(%struct.nibTwoCache* %0, i8* %1, i32 %2, i32 %3, i32 1, i32* %4)
ret %struct.dnaSeq* %6
}
void auth_check_all_netgroups(void) {}


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

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

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

LLVM IR (-O2):
define void @auth_check_all_netgroups() {
ret void
}
/* Type definitions */
struct shim_linux_dirent64 {
  int dummy;
};

/* Variables and functions */
int shim_enosys(int /*<<< orphan*/, unsigned int, struct shim_linux_dirent64 *,
                unsigned int);
int shim_getdents64(unsigned int fd, struct shim_linux_dirent64 *dirp,
                    unsigned int count) {
  return shim_enosys(0, fd, dirp, count);
}


x86 assembly (clang, -O0):
<shim_getdents64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_getdents64>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
%struct.shim_linux_dirent64 = type { i32 }
define i32 @shim_getdents64(i32 %0, %struct.shim_linux_dirent64* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.shim_linux_dirent64*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.shim_linux_dirent64* %1, %struct.shim_linux_dirent64** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.shim_linux_dirent64*, %struct.shim_linux_dirent64** %5
%9 = load i32, i32* %6
%10 = call i32 @shim_enosys(i32 0, i32 %7, %struct.shim_linux_dirent64* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.shim_linux_dirent64 = type { i32 }
define i32 @shim_getdents64(i32 %0, %struct.shim_linux_dirent64* %1, i32 %2) {
%4 = tail call i32 @shim_enosys(i32 0, i32 %0, %struct.shim_linux_dirent64* %1, i32 %2)
ret i32 %4
}
void up_window_close(void) {}


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

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

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

LLVM IR (-O2):
define void @up_window_close() {
ret void
}
/* Variables and functions */
int f206(int *);
int f207(int *p) { return f206(p); }


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

x86 assembly (clang, -O2):
<f207>:
jmp    1030 <f206@plt>

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

LLVM IR (-O2):
define i32 @f207(i32* %0) {
%2 = tail call i32 @f206(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int close_file(FILE *fd) {
  if (fd == NULL)
    return 0;
  fclose(fd);
  return 1;
}


x86 assembly (clang, -O0):
<close_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <close_file+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1143 <close_file+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_file>:
test   %rdi,%rdi
je     1125 <close_file+0x15>
push   %rax
call   1030 <fclose@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @close_file(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
store i32 1, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @close_file(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fclose(i32* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 1, %3 ], [ 0, %1 ]
ret i32 %6
}
void gtk_menu_item_set_submenu() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_item_set_submenu() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aquacc_read_fd_list_delete_by_fd(int);
int /*<<< orphan*/ aquacc_write_fd_list_delete_by_fd(int);
void aquacc_fd_list_delete_by_fd(int fd) {
  aquacc_read_fd_list_delete_by_fd(fd);
  aquacc_write_fd_list_delete_by_fd(fd);
}


x86 assembly (clang, -O0):
<aquacc_fd_list_delete_by_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <aquacc_read_fd_list_delete_by_fd@plt>
mov    -0x4(%rbp),%edi
call   1040 <aquacc_write_fd_list_delete_by_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aquacc_fd_list_delete_by_fd>:
push   %rbx
mov    %edi,%ebx
call   1030 <aquacc_read_fd_list_delete_by_fd@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <aquacc_write_fd_list_delete_by_fd@plt>

LLVM IR (-O0):
define void @aquacc_fd_list_delete_by_fd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @aquacc_read_fd_list_delete_by_fd(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @aquacc_write_fd_list_delete_by_fd(i32 %5)
ret void
}

LLVM IR (-O2):
define void @aquacc_fd_list_delete_by_fd(i32 %0) {
%2 = tail call i32 @aquacc_read_fd_list_delete_by_fd(i32 %0)
%3 = tail call i32 @aquacc_write_fd_list_delete_by_fd(i32 %0)
ret void
}