xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
char *dlerror();
int /*<<< orphan*/ sqlite3_snprintf(int, char *, char *, char const *);
void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut) {
  const char *zErr;
  (void)(NotUsed);
  zErr = dlerror();
  if (zErr) {
    sqlite3_snprintf(nBuf, zBufOut, "%s", zErr);
  }
}


x86 assembly (clang, -O0):
<unixDlError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1160 <unixDlError+0x40>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xea5(%rip),%rdx
call   1040 <sqlite3_snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unixDlError>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
xor    %eax,%eax
call   1030 <dlerror@plt>
test   %rax,%rax
je     114e <unixDlError+0x2e>
lea    0xec5(%rip),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <sqlite3_snprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @unixDlError(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32*, i32** %4
%9 = call i8* (...) @dlerror()
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = call i32 @sqlite3_snprintf(i32 %13, i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @unixDlError(i32* nocapture readnone %0, i32 %1, i8* %2) {
%4 = tail call i8* (...) @dlerror()
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @sqlite3_snprintf(i32 %1, i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %8
8: ; preds = %6, %3
ret void
}
void d2i_X509_ATTRIBUTE(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_X509_ATTRIBUTE() {
ret void
}
unsigned long long fib(unsigned int n) {
  if (n == 0)
    return 0;
  if (n == 1)
    return 1;
  return fib(n - 1) + fib(n - 2);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1132 <fib+0x22>
movq   $0x0,-0x8(%rbp)
jmp    1171 <fib+0x61>
cmpl   $0x1,-0xc(%rbp)
jne    1149 <fib+0x39>
movq   $0x1,-0x8(%rbp)
jmp    1171 <fib+0x61>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %r14d,%r14d
test   %ebx,%ebx
je     1137 <fib+0x27>
nopl   (%rax)
cmp    $0x1,%ebx
je     113b <fib+0x2b>
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    %rax,%r14
add    $0xfffffffe,%ebx
test   %ebx,%ebx
jne    1120 <fib+0x10>
xor    %eax,%eax
jmp    1140 <fib+0x30>
mov    $0x1,%eax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fib(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i64 [ 0, %1 ], [ %9, %5 ]
%4 = phi i32 [ %0, %1 ], [ %8, %5 ]
switch i32 %4, label %5 [
i32 0, label %10
i32 1, label %11
]
5: ; preds = %2
%6 = add i32 %4, -1
%7 = tail call i64 @fib(i32 %6)
%8 = add i32 %4, -2
%9 = add i64 %7, %3
br label %2
10: ; preds = %2
br label %11
11: ; preds = %2, %10
%12 = phi i64 [ 0, %10 ], [ 1, %2 ]
%13 = add i64 %12, %3
ret i64 %13
}
int fun720() { return 720; }


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

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

LLVM IR (-O0):
define i32 @fun720() {
ret i32 720
}

LLVM IR (-O2):
define i32 @fun720() {
ret i32 720
}
/* Variables and functions */
scalar_t__ gammaf(float);
int /*<<< orphan*/ link_failure_gammaf();
void test_gammaf(float f) {
  if (gammaf(f) != gammaf(f))
    link_failure_gammaf();
}


x86 assembly (clang, -O0):
<test_gammaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <gammaf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <gammaf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_gammaf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_gammaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_gammaf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <gammaf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <gammaf@plt>
cmp    %rax,%rbx
jne    1149 <test_gammaf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_gammaf@plt>

LLVM IR (-O0):
define void @test_gammaf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @gammaf(float %3)
%5 = load float, float* %2
%6 = call i64 @gammaf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_gammaf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_gammaf(float %0) {
%2 = tail call i64 @gammaf(float %0)
%3 = tail call i64 @gammaf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_gammaf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
void const *OBJ_bsearch_ex_(void const *, void const *, int, int,
                            int (*)(void const *, void const *),
                            int /*<<< orphan*/);
const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
                         int (*cmp)(const void *, const void *)) {
  return OBJ_bsearch_ex_(key, base, num, size, cmp, 0);
}


x86 assembly (clang, -O0):
<OBJ_bsearch_>:
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),%r8
xor    %r9d,%r9d
call   1030 <OBJ_bsearch_ex_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OBJ_bsearch_>:
xor    %r9d,%r9d
jmp    1030 <OBJ_bsearch_ex_@plt>

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

LLVM IR (-O2):
define i8* @OBJ_bsearch_(i8* %0, i8* %1, i32 %2, i32 %3, i32 (i8*, i8*)* %4) {
%6 = tail call i8* @OBJ_bsearch_ex_(i8* %0, i8* %1, i32 %2, i32 %3, i32 (i8*, i8*)* %4, i32 0)
ret i8* %6
}
/* Variables and functions */
unsigned char *haval128_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_haval128(unsigned char *out, const unsigned char *in,
                                    size_t in_len) {
  return haval128_buffer(out, in, in_len);
}


x86 assembly (clang, -O0):
<hash_buffer_haval128>:
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
call   1030 <haval128_buffer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_buffer_haval128>:
jmp    1030 <haval128_buffer@plt>

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

LLVM IR (-O2):
define i8* @hash_buffer_haval128(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @haval128_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
void *kmap_atomic(int /*<<< orphan*/);
int /*<<< orphan*/ pfn_to_page(unsigned long);
void *kmap_atomic_pfn(unsigned long pfn) {
  return kmap_atomic(pfn_to_page(pfn));
}


x86 assembly (clang, -O0):
<kmap_atomic_pfn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pfn_to_page@plt>
mov    %eax,%edi
call   1030 <kmap_atomic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmap_atomic_pfn>:
push   %rax
call   1040 <pfn_to_page@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <kmap_atomic@plt>

LLVM IR (-O0):
define i8* @kmap_atomic_pfn(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @pfn_to_page(i64 %3)
%5 = call i8* @kmap_atomic(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @kmap_atomic_pfn(i64 %0) {
%2 = tail call i32 @pfn_to_page(i64 %0)
%3 = tail call i8* @kmap_atomic(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int get_input(int *, int **);
int /*<<< orphan*/ heap_sort(int *, int);
int set_output(int *, int *);
int main(void) {
  int n = 0, *array;
  int err = get_input(&n, &array);
  heap_sort(array, n);
  err = !err ? set_output(&n, array) : err;
  free(array);
  return err;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <get_input@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <heap_sort@plt>
cmpl   $0x0,-0x14(%rbp)
jne    1191 <main+0x51>
mov    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdi
call   1050 <set_output@plt>
mov    %eax,-0x18(%rbp)
jmp    1197 <main+0x57>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1060 <get_input@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
mov    0x4(%rsp),%esi
call   1040 <heap_sort@plt>
test   %ebx,%ebx
jne    1181 <main+0x41>
mov    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdi
call   1050 <set_output@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%5 = call i32 @get_input(i32* %2, i32** %3)
store i32 %5, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %2
%8 = call i32 @heap_sort(i32* %6, i32 %7)
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %0
%12 = load i32*, i32** %3
%13 = call i32 @set_output(i32* %2, i32* %12)
br label %16
14: ; preds = %0
%15 = load i32, i32* %4
br label %16
16: ; preds = %14, %11
%17 = phi i32 [ %13, %11 ], [ %15, %14 ]
store i32 %17, i32* %4
%18 = load i32*, i32** %3
%19 = call i32 @free(i32* %18)
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32** %2 to i8*
%5 = call i32 @get_input(i32* %1, i32** %2)
%6 = load i32*, i32** %2
%7 = load i32, i32* %1
%8 = call i32 @heap_sort(i32* %6, i32 %7)
%9 = icmp eq i32 %5, 0
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i32*, i32** %2
%12 = call i32 @set_output(i32* %1, i32* %11)
br label %13
13: ; preds = %0, %10
%14 = phi i32 [ %12, %10 ], [ %5, %0 ]
%15 = load i32*, i32** %2
%16 = call i32 @free(i32* %15)
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ countsort(int *, int, int);
int getmax(int *, int);
radixsort(int a[], int n) {
  int i, exp = 1;
  int m = getmax(a, n);
  for (i = 0; m / exp > 0; exp = exp * 10) {
    countsort(a, n, exp);
  }
}


x86 assembly (clang, -O0):
<radixsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <getmax@plt>
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x20(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
cmp    $0x0,%eax
jle    1177 <radixsort+0x57>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1030 <countsort@plt>
imul   $0xa,-0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    114c <radixsort+0x2c>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radixsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
call   1040 <getmax@plt>
test   %eax,%eax
jle    115b <radixsort+0x3b>
mov    %eax,%ebp
mov    $0x1,%ebx
nopl   (%rax)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <countsort@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%ebx
mov    %ebp,%eax
cltd
idiv   %ebx
test   %eax,%eax
jg     1140 <radixsort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @radixsort(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 1, i32* %7
%9 = load i32*, i32** %4
%10 = load i32, i32* %5
%11 = call i32 @getmax(i32* %9, i32 %10)
store i32 %11, i32* %8
store i32 0, i32* %6
br label %12
12: ; preds = %22, %2
%13 = load i32, i32* %8
%14 = load i32, i32* %7
%15 = sdiv i32 %13, %14
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %12
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = load i32, i32* %7
%21 = call i32 @countsort(i32* %18, i32 %19, i32 %20)
br label %22
22: ; preds = %17
%23 = load i32, i32* %7
%24 = mul nsw i32 %23, 10
store i32 %24, i32* %7
br label %12
25: ; preds = %12
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @radixsort(i32* %0, i32 %1) {
%3 = tail call i32 @getmax(i32* %0, i32 %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 1, %2 ]
%7 = tail call i32 @countsort(i32* %0, i32 %1, i32 %6)
%8 = mul nsw i32 %6, 10
%9 = sdiv i32 %3, %8
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %2
ret i32 undef
}
unsigned int countSetBitsMethod1(int n) {
  unsigned int count = 0;
  while (n) {
    n &= (n - 1);
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<countSetBitsMethod1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <countSetBitsMethod1+0x32>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <countSetBitsMethod1+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countSetBitsMethod1>:
xor    %eax,%eax
test   %edi,%edi
je     111c <countSetBitsMethod1+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <countSetBitsMethod1+0x10>
ret

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

LLVM IR (-O2):
define i32 @countSetBitsMethod1(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nsw i32 %5, -1
%7 = and i32 %6, %5
%8 = add i32 %4, 1
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
char *langRomTypeEseSCC128() { return "128kB Ese-SCC"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"128kB Ese-SCC\00"
define i8* @langRomTypeEseSCC128() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"128kB Ese-SCC\00"
define i8* @langRomTypeEseSCC128() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
void RTPollSetCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPollSetCreate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void consoleError(const char *message) {
  printf("[-]console error: %s\n", message);
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"[-]console error: %s\0A\00"
define void @consoleError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"[-]console error: %s\0A\00"
define void @consoleError(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strlen(char *);
void usage(char *argv0, char *msg) {
  if (msg != NULL && strlen(msg) > 0) {
    printf("%s\n\n", msg);
  }
  printf("obtain and release mutex_locks\n\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1170 <usage+0x40>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    1170 <usage+0x40>
mov    -0x10(%rbp),%rsi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
test   %rsi,%rsi
je     1167 <usage+0x27>
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
jle    1167 <usage+0x27>
lea    0xea3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s\0A\0A\00"
@.str.1 = [33 x i8] c"obtain and release mutex_locks\0A\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %7, %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s\0A\0A\00"
@str = [32 x i8] c"obtain and release mutex_locks\0A\00"
define void @usage(i8* nocapture readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i64 @strlen(i8* %1)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %9
9: ; preds = %7, %4, %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ __NR_fsync;
int syscall(int /*<<< orphan*/, int);
__attribute__((always_)) int _syscall_fsync(int fd) {
  return syscall(__NR_fsync, fd);
}


x86 assembly (clang, -O0):
<_syscall_fsync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_fsync>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_fsync = global i32 0
define i32 @_syscall_fsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @__NR_fsync
%4 = load i32, i32* %2
%5 = call i32 @syscall(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@__NR_fsync = global i32 0
define i32 @_syscall_fsync(i32 %0) {
%2 = load i32, i32* @__NR_fsync
%3 = tail call i32 @syscall(i32 %2, i32 %0)
ret i32 %3
}
int loop_despite_inferbo(int p) {
  int k = 100;
  for (int i = 0; i < k; i++) {
    int m = p + 3;
    if (m < 14) {
      p += 9;
    }
  }
  return p;
}


x86 assembly (clang, -O0):
<loop_despite_inferbo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1150 <loop_despite_inferbo+0x50>
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xe,-0x10(%rbp)
jge    113d <loop_despite_inferbo+0x3d>
mov    -0x4(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x4(%rbp)
jmp    1142 <loop_despite_inferbo+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <loop_despite_inferbo+0x15>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_despite_inferbo>:
mov    %edi,%eax
mov    $0x64,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x9(%rax),%edx
cmp    $0xb,%eax
cmovge %eax,%edx
lea    0x9(%rdx),%eax
cmp    $0xb,%edx
cmovge %edx,%eax
lea    0x9(%rax),%edx
cmp    $0xb,%eax
cmovge %eax,%edx
lea    0x9(%rdx),%esi
cmp    $0xb,%edx
cmovge %edx,%esi
lea    0x9(%rsi),%eax
cmp    $0xb,%esi
cmovge %esi,%eax
add    $0xfffffffb,%ecx
jne    1110 <loop_despite_inferbo+0x10>
ret

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

LLVM IR (-O2):
define i32 @loop_despite_inferbo(i32 %0) {
br label %3
2: ; preds = %3
ret i32 %20
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %20, %3 ]
%5 = phi i32 [ 0, %1 ], [ %21, %3 ]
%6 = icmp slt i32 %4, 11
%7 = add nsw i32 %4, 9
%8 = select i1 %6, i32 %7, i32 %4
%9 = icmp slt i32 %8, 11
%10 = add nsw i32 %8, 9
%11 = select i1 %9, i32 %10, i32 %8
%12 = icmp slt i32 %11, 11
%13 = add nsw i32 %11, 9
%14 = select i1 %12, i32 %13, i32 %11
%15 = icmp slt i32 %14, 11
%16 = add nsw i32 %14, 9
%17 = select i1 %15, i32 %16, i32 %14
%18 = icmp slt i32 %17, 11
%19 = add nsw i32 %17, 9
%20 = select i1 %18, i32 %19, i32 %17
%21 = add nuw nsw i32 %5, 5
%22 = icmp eq i32 %21, 100
br i1 %22, label %2, label %3
}
void USBWakeUp_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @USBWakeUp_IRQHandler() {
ret void
}
double sub_double(double a, double b) { return a - b; }


x86 assembly (clang, -O0):
<sub_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_double>:
subsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @sub_double(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
void dbgdbg_output(int output_type, void *param) {
  (void)output_type;
  (void)param;
}


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

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

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

LLVM IR (-O2):
define void @dbgdbg_output(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ tri_externe(char *);
int main(int argc, char *argv[]) {
  tri_externe(argv[1]);
  return EXIT_SUCCESS;
}


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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <tri_externe@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <tri_externe@plt>
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @tri_externe(i8* %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @tri_externe(i8* %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int allocate(int);
int /*<<< orphan*/ deallocate(int);
int /*<<< orphan*/ initialise_memory();
int /*<<< orphan*/ print_memory_freelist();
int main() {
  initialise_memory();
  int temp = allocate(510);
  deallocate(temp);
  print_memory_freelist();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <initialise_memory@plt>
mov    $0x1fe,%edi
call   1060 <allocate@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <deallocate@plt>
mov    $0x0,%al
call   1040 <print_memory_freelist@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <initialise_memory@plt>
mov    $0x1fe,%edi
call   1060 <allocate@plt>
mov    %eax,%edi
call   1030 <deallocate@plt>
xor    %eax,%eax
call   1040 <print_memory_freelist@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @initialise_memory()
%4 = call i32 @allocate(i32 510)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @deallocate(i32 %5)
%7 = call i32 (...) @print_memory_freelist()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialise_memory()
%2 = tail call i32 @allocate(i32 510)
%3 = tail call i32 @deallocate(i32 %2)
%4 = tail call i32 (...) @print_memory_freelist()
ret i32 0
}
int setup_allrouters_membership(struct Interface *iface) { return (0); }


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

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

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

LLVM IR (-O2):
%struct.Interface = type opaque
define i32 @setup_allrouters_membership(%struct.Interface* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xd2() {
  Assert_real((isupper(210) == 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",
              1055, ("isupper should be 0 for 0xd2"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xd2>:
push   %rax
mov    $0xd2,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x41f,%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 0xd2\00"
define void @t_isupper_0xd2() {
%1 = call i64 @isupper(i32 210)
%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 1055, 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 0xd2\00"
define void @t_isupper_0xd2() {
%1 = tail call i64 @isupper(i32 210)
%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 1055, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BLAS_dcopy(int *, double *, int *, double *, int *);
void dcopy(int n, double *dx, int incx, double *dy, int incy) {
  dx++;
  dy++;
  BLAS_dcopy(&n, dx, &incx, dy, &incy);
}


x86 assembly (clang, -O0):
<dcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
call   1030 <BLAS_dcopy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcopy>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
add    $0x8,%rsi
add    $0x8,%rcx
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <BLAS_dcopy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @dcopy(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32
store i32 %0, i32* %6
store double* %1, double** %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double*, double** %7
%12 = getelementptr inbounds double, double* %11, i32 1
store double* %12, double** %7
%13 = load double*, double** %9
%14 = getelementptr inbounds double, double* %13, i32 1
store double* %14, double** %9
%15 = load double*, double** %7
%16 = load double*, double** %9
%17 = call i32 @BLAS_dcopy(i32* %6, double* %15, i32* %8, double* %16, i32* %10)
ret void
}

LLVM IR (-O2):
define void @dcopy(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = getelementptr inbounds double, double* %3, i64 1
%11 = call i32 @BLAS_dcopy(i32* %6, double* %9, i32* %7, double* %10, i32* %8)
ret void
}
float Ffloat(float a) { return a - 10; }


x86 assembly (clang, -O0):
<Ffloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ffloat>:
addss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Ffloat(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 1.000000e+01
ret float %4
}

LLVM IR (-O2):
define float @Ffloat(float %0) {
%2 = fadd float %0, -1.000000e+01
ret float %2
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t OFFS(void *__p) { return (uint16_t)(uint32_t)__p & 0x000F; }


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

x86 assembly (clang, -O2):
<OFFS>:
mov    %rdi,%rax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @OFFS(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
%6 = and i32 %5, 15
ret i32 %6
}

LLVM IR (-O2):
define i32 @OFFS(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 15
ret i32 %4
}
void toomany(s) char *s;
{
  char buffer[200];
  sprintf(buffer, "limit of %d exceeded, too many %s", 32767, s);
  fatal(buffer);
}


x86 assembly (clang, -O0):
<toomany>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xebf(%rip),%rsi
mov    $0x7fff,%edx
mov    $0x0,%al
call   1030 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
mov    $0x0,%al
call   1040 <fatal@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toomany>:
push   %rbx
sub    $0xd0,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x7fff,%edx
xor    %eax,%eax
call   1030 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fatal@plt>
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"limit of %d exceeded, too many %s\00"
define void @toomany(i8* %0) {
%2 = alloca i8*
%3 = alloca [200 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 32767, i8* %5)
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"limit of %d exceeded, too many %s\00"
define void @toomany(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 32767, i8* %0)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ afficherAsciiArt();
int /*<<< orphan*/ appuyezEntree(char *);
int /*<<< orphan*/ choixModeDeJeuxMenu();
int /*<<< orphan*/ system(char *);
void asciiArtDebut(void) {
  system("clear");
  afficherAsciiArt();
  appuyezEntree("\nAPPUYEZ SUR ENTREE POUR COMMENCER\n");
  choixModeDeJeuxMenu();
}


x86 assembly (clang, -O0):
<asciiArtDebut>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1030 <system@plt>
mov    $0x0,%al
call   1060 <afficherAsciiArt@plt>
lea    0xea8(%rip),%rdi
call   1050 <appuyezEntree@plt>
mov    $0x0,%al
call   1040 <choixModeDeJeuxMenu@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<asciiArtDebut>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
call   1060 <afficherAsciiArt@plt>
lea    0xeab(%rip),%rdi
call   1050 <appuyezEntree@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <choixModeDeJeuxMenu@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [36 x i8] c"\0AAPPUYEZ SUR ENTREE POUR COMMENCER\0A\00"
define void @asciiArtDebut() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @afficherAsciiArt()
%3 = call i32 @appuyezEntree(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @choixModeDeJeuxMenu()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [36 x i8] c"\0AAPPUYEZ SUR ENTREE POUR COMMENCER\0A\00"
define void @asciiArtDebut() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @afficherAsciiArt()
%3 = tail call i32 @appuyezEntree(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @choixModeDeJeuxMenu()
ret void
}
void autogroup_fork(struct task_struct *p) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @autogroup_fork(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flyback();
int /*<<< orphan*/ hvflush();
int /*<<< orphan*/ printf(char *);
void fillend(void) {
  hvflush();
  printf("\\X'EndObject gsave eofill grestore 0 setgray stroke'\n");
  flyback();
}


x86 assembly (clang, -O0):
<fillend>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <hvflush@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <flyback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillend>:
push   %rax
xor    %eax,%eax
call   1040 <hvflush@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <flyback@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"\\X'EndObject gsave eofill grestore 0 setgray stroke'\0A\00"
define void @fillend() {
%1 = call i32 (...) @hvflush()
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @flyback()
ret void
}

LLVM IR (-O2):
@str = [53 x i8] c"\\X'EndObject gsave eofill grestore 0 setgray stroke'\00"
define void @fillend() {
%1 = tail call i32 (...) @hvflush()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @flyback()
ret void
}
int test_imm_9Duint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x9D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_9Duint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 674309865472
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(char const *, int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char const *);
int fputs(const char *s, FILE *stream) {
  return fwrite(s, 1, strlen(s), stream);
}


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

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

LLVM IR (-O0):
define i32 @fputs(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 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i32*, i32** %4
%9 = call i32 @fwrite(i8* %5, i32 1, i32 %7, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @fputs(i8* %0, i32* nocapture %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @fwrite(i8* %0, i32 1, i32 %3, i32* %1)
ret i32 %4
}
float __attribute__((no)) float_max2(float a, float b) {
  return ((a) >= (b) ? (a) : (b));
}


x86 assembly (clang, -O0):
<float_max2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     112c <float_max2+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <float_max2+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_max2>:
movaps %xmm1,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @float_max2(float %0, float %1) {
%3 = fcmp oge float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void chaz_ConfWriterPerl_add_global_def(const char *sym, const char *value) {
  (void)sym;
  (void)value;
}


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

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

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

LLVM IR (-O2):
define void @chaz_ConfWriterPerl_add_global_def(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check(int *, int *);
int /*<<< orphan*/ init(int *, int *);
int /*<<< orphan*/ vec_mult(int *);
int /*<<< orphan*/ vec_mult_ref(int *);
int main() {
  int p1[100000], p2[100000];
  int v1[100000], v2[100000];
  init(v1, v2);
  vec_mult_ref(p1);
  vec_mult(p2);
  check(p1, p2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186a10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x124f90(%rbp),%rdi
lea    -0x186a10(%rbp),%rsi
call   1030 <init@plt>
lea    -0x61a90(%rbp),%rdi
call   1040 <vec_mult_ref@plt>
lea    -0xc3510(%rbp),%rdi
call   1060 <vec_mult@plt>
lea    -0x61a90(%rbp),%rdi
lea    -0xc3510(%rbp),%rsi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x186a10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x186a08,%rsp
lea    0x61a80(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <init@plt>
lea    0x124f80(%rsp),%r14
mov    %r14,%rdi
call   1040 <vec_mult_ref@plt>
lea    0xc3500(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <vec_mult@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x186a08,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100000 x i32]
%3 = alloca [100000 x i32]
%4 = alloca [100000 x i32]
%5 = alloca [100000 x i32]
store i32 0, i32* %1
%6 = getelementptr inbounds [100000 x i32], [100000 x i32]* %4, i64 0, i64 0
%7 = getelementptr inbounds [100000 x i32], [100000 x i32]* %5, i64 0, i64 0
%8 = call i32 @init(i32* %6, i32* %7)
%9 = getelementptr inbounds [100000 x i32], [100000 x i32]* %2, i64 0, i64 0
%10 = call i32 @vec_mult_ref(i32* %9)
%11 = getelementptr inbounds [100000 x i32], [100000 x i32]* %3, i64 0, i64 0
%12 = call i32 @vec_mult(i32* %11)
%13 = getelementptr inbounds [100000 x i32], [100000 x i32]* %2, i64 0, i64 0
%14 = getelementptr inbounds [100000 x i32], [100000 x i32]* %3, i64 0, i64 0
%15 = call i32 @check(i32* %13, i32* %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100000 x i32]
%2 = alloca [100000 x i32]
%3 = alloca [100000 x i32]
%4 = alloca [100000 x i32]
%5 = bitcast [100000 x i32]* %1 to i8*
%6 = bitcast [100000 x i32]* %2 to i8*
%7 = bitcast [100000 x i32]* %3 to i8*
%8 = bitcast [100000 x i32]* %4 to i8*
%9 = getelementptr inbounds [100000 x i32], [100000 x i32]* %3, i64 0, i64 0
%10 = getelementptr inbounds [100000 x i32], [100000 x i32]* %4, i64 0, i64 0
%11 = call i32 @init(i32* %9, i32* %10)
%12 = getelementptr inbounds [100000 x i32], [100000 x i32]* %1, i64 0, i64 0
%13 = call i32 @vec_mult_ref(i32* %12)
%14 = getelementptr inbounds [100000 x i32], [100000 x i32]* %2, i64 0, i64 0
%15 = call i32 @vec_mult(i32* %14)
%16 = call i32 @check(i32* %12, i32* %14)
ret i32 0
}