xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
bool print_s(float s) {
  printf("%f\n", s);
  return true;
}


x86 assembly (clang, -O0):
<print_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @print_s(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %0)
ret i32 1
}
/* Variables and functions */
float powf(float, float);
float gamma_plain_b(float a, float g) { return powf(a, g); }


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

x86 assembly (clang, -O2):
<gamma_plain_b>:
jmp    1030 <powf@plt>

LLVM IR (-O0):
define float @gamma_plain_b(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 = call float @powf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @gamma_plain_b(float %0, float %1) {
%3 = tail call float @powf(float %0, float %1)
ret float %3
}
/* Variables and functions */
char *malloc_err(size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
char *DuplicateString(const char *str) {
  char *ptr = NULL;
  size_t size = 0;
  if (str == NULL)
    return NULL;
  size = strlen(str);
  ptr = malloc_err(size + 1);
  strcpy(ptr, str);
  return ptr;
}


x86 assembly (clang, -O0):
<DuplicateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1164 <DuplicateString+0x34>
movq   $0x0,-0x8(%rbp)
jmp    1197 <DuplicateString+0x67>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc_err@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DuplicateString>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115a <DuplicateString+0x2a>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc_err@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115d <DuplicateString+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @DuplicateString(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add i64 %4, 1
%6 = tail call i8* @malloc_err(i64 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %9
}
/* Variables and functions */
int bit_ceil_log2_impl(int);
int bit_ceil_log2(int n) {
  if (n <= 0)
    return -1;
  else
    return bit_ceil_log2_impl(n);
}


x86 assembly (clang, -O0):
<bit_ceil_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <bit_ceil_log2+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    113c <bit_ceil_log2+0x2c>
mov    -0x8(%rbp),%edi
call   1030 <bit_ceil_log2_impl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_ceil_log2>:
test   %edi,%edi
jle    1119 <bit_ceil_log2+0x9>
jmp    1030 <bit_ceil_log2_impl@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @bit_ceil_log2(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @bit_ceil_log2_impl(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ -1, %1 ]
ret i32 %6
}
double zdld64(double out) {
  double dout;
  dout = out;
  return dout;
}


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

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

LLVM IR (-O0):
define double @zdld64(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
%5 = load double, double* %3
ret double %5
}

LLVM IR (-O2):
define double @zdld64(double returned %0) {
ret double %0
}
void avcodec_default_get_format() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_default_get_format() {
ret void
}
int GenericCallback(int dwContext, int *lpdwParam) {
  return dwContext + lpdwParam[0] + lpdwParam[1] + lpdwParam[2] + lpdwParam[3];
}


x86 assembly (clang, -O0):
<GenericCallback>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
mov    -0x10(%rbp),%rcx
add    0x4(%rcx),%eax
mov    -0x10(%rbp),%rcx
add    0x8(%rcx),%eax
mov    -0x10(%rbp),%rcx
add    0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenericCallback>:
movdqu (%rsi),%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @GenericCallback(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = add nsw i32 %5, %8
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = add nsw i32 %9, %12
%14 = load i32*, i32** %4
%15 = getelementptr inbounds i32, i32* %14, i64 2
%16 = load i32, i32* %15
%17 = add nsw i32 %13, %16
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 3
%20 = load i32, i32* %19
%21 = add nsw i32 %17, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @GenericCallback(i32 %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %4)
%6 = add nsw i32 %5, %0
ret i32 %6
}
void vbe_biosfn_return_protected_mode_interface(AX) {}


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

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

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

LLVM IR (-O2):
define void @vbe_biosfn_return_protected_mode_interface(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo1();
int /*<<< orphan*/ foo2();
int /*<<< orphan*/ foo3();
int main() {
  foo1();
  foo2();
  foo3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <foo1@plt>
mov    $0x0,%al
call   1030 <foo2@plt>
mov    $0x0,%al
call   1040 <foo3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo1()
%3 = call i32 (...) @foo2()
%4 = call i32 (...) @foo3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo1()
%2 = tail call i32 (...) @foo2()
%3 = tail call i32 (...) @foo3()
ret i32 0
}
void test_struct(struct A *a __attribute__((unused)),
                 struct B *b __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
%struct.A = type opaque
%struct.B = type opaque
define void @test_struct(%struct.A* nocapture %0, %struct.B* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ printf(char *, char const *);
void die(const char *s) {
  errno ? perror(s) : printf("ERROR: %s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
cmpq   $0x0,(%rax)
je     115b <die+0x2b>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    116b <die+0x3b>
mov    -0x8(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rsi
mov    0x2ea5(%rip),%rax
cmpq   $0x0,(%rax)
je     1153 <die+0x23>
mov    %rsi,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@errno = global i64 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @die(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fact2(int);
int mul(int, int /*<<< orphan*/);
int fact1(int n) {
  if (n == 0)
    return 1;
  else
    return mul(n, fact2(n - 1));
}


x86 assembly (clang, -O0):
<fact1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1141 <fact1+0x21>
movl   $0x1,-0x4(%rbp)
jmp    115f <fact1+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fact2@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <mul@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fact1>:
test   %edi,%edi
je     1139 <fact1+0x19>
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <fact2@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <mul@plt>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @fact1(i32 %0) {
%2 = alloca i32
%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 i32 1, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = call i32 @fact2(i32 %10)
%12 = call i32 @mul(i32 %8, i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @fact1(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @fact2(i32 %4)
%6 = tail call i32 @mul(i32 %0, i32 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 1, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int imgL(char *filename) {
  FILE *fp;
  int n, int_var, l;
  fp = fopen(filename, "r");
  fseek(fp, 18, 0);
  n = fread(&int_var, sizeof(int), 1, fp);
  l = int_var;
  fclose(fp);
  return l;
}


x86 assembly (clang, -O0):
<imgL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x12,%esi
xor    %edx,%edx
call   1050 <fseek@plt>
mov    -0x10(%rbp),%rcx
lea    -0x18(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imgL>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x12,%esi
xor    %edx,%edx
call   1050 <fseek@plt>
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    0x4(%rsp),%ebp
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @imgL(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %8, i32** %3
%9 = load i32*, i32** %3
%10 = call i32 @fseek(i32* %9, i32 18, i32 0)
%11 = load i32*, i32** %3
%12 = call i32 @fread(i32* %5, i32 4, i32 1, i32* %11)
store i32 %12, i32* %4
%13 = load i32, i32* %5
store i32 %13, i32* %6
%14 = load i32*, i32** %3
%15 = call i32 @fclose(i32* %14)
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @imgL(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fseek(i32* %4, i32 18, i32 0)
%6 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %4)
%7 = load i32, i32* %2
%8 = tail call i32 @fclose(i32* %4)
ret i32 %7
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int htonl(int);
int64_t hton64(int64_t val) {
  int64_t high, low;
  low = (int64_t)(val & 0x00000000FFFFFFFF);
  val >>= 32;
  high = (int64_t)(val & 0x00000000FFFFFFFF);
  low = htonl(low);
  high = htonl(high);
  return (int64_t)low << 32 | high;
}


x86 assembly (clang, -O0):
<hton64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
or     -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hton64>:
push   %rax
call   1030 <htonl@plt>
pop    %rax
jmp    1030 <htonl@plt>

LLVM IR (-O0):
define i32 @hton64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, -1
store i32 %6, i32* %4
%7 = load i32, i32* %2
%8 = ashr i32 %7, 32
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, -1
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @htonl(i32 %11)
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = call i32 @htonl(i32 %13)
store i32 %14, i32* %3
%15 = load i32, i32* %4
%16 = shl i32 %15, 32
%17 = load i32, i32* %3
%18 = or i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @hton64(i32 %0) {
%2 = tail call i32 @htonl(i32 %0)
%3 = tail call i32 @htonl(i32 poison)
ret i32 poison
}
/* Variables and functions */
double erf(double);
int /*<<< orphan*/ printf(char *, double);
double sqrt(double);
int main(int argc, char const *argv[]) {
  double sigma = 1.0;
  double bound = 1.125;
  double probability = 0.5 * erf(bound / (sigma * sqrt(2.0)));
  printf("N(0,1) ~ P[0, 1.125] = %lf\n", probability);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe8c(%rip),%xmm0
call   1040 <sqrt@plt>
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1050 <erf@plt>
movaps %xmm0,%xmm1
movsd  0xe5a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <erf@plt>
mulsd  0xed2(%rip),%xmm0
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"N(0,1) ~ P[0, 1.125] = %lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e+00, double* %6
store double 1.125000e+00, double* %7
%9 = load double, double* %7
%10 = load double, double* %6
%11 = call double @sqrt(double 2.000000e+00)
%12 = fmul double %10, %11
%13 = fdiv double %9, %12
%14 = call double @erf(double %13)
%15 = fmul double 5.000000e-01, %14
store double %15, double* %8
%16 = load double, double* %8
%17 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"N(0,1) ~ P[0, 1.125] = %lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @erf(double 0x3FE974B2334F2346)
%4 = fmul double %3, 5.000000e-01
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
void foo173() {}


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

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

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

LLVM IR (-O2):
define void @foo173() {
ret void
}
void gtk_tree_row_reference_get_type() {}


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

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

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

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

/* Variables and functions */
int offset(int /*<<< orphan*/, int, int, int);
scalar_t__ owl_escape_value(int);
int autohelperowl_attackpat30(struct pattern *patt, int transformation,
                              int move, int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(0, 2, move, transformation);
  return owl_escape_value(a) > 0;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat30>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0x2,%esi
call   1040 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <owl_escape_value@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat30>:
push   %rax
mov    %esi,%ecx
xor    %edi,%edi
mov    $0x2,%esi
call   1040 <offset@plt>
mov    %eax,%edi
call   1030 <owl_escape_value@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat30(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 2, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i64 @owl_escape_value(i32 %18)
%20 = icmp sgt i64 %19, 0
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat30(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 2, i32 %2, i32 %1)
%7 = tail call i64 @owl_escape_value(i32 %6)
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
double rnd_32int();
double rnd_r1(void) { return rnd_32int() * (1.0 / 4294967295.0); }


x86 assembly (clang, -O0):
<rnd_r1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rnd_32int@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd_r1>:
push   %rax
xor    %eax,%eax
call   1030 <rnd_32int@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rnd_r1() {
%1 = call double (...) @rnd_32int()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}

LLVM IR (-O2):
define double @rnd_r1() {
%1 = tail call double (...) @rnd_32int()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}
int rem(int a, int b) { return a % b; }


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

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

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

LLVM IR (-O2):
define i32 @rem(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
unsigned long PECIDomainValueGet(unsigned long ulBase, unsigned long ulDomain) {
  ;
  ;
  return (
      (((*((volatile unsigned long *)(ulBase + 0x00000040 + (ulDomain * 4)))) &
        0x0000FFFF)));
}


x86 assembly (clang, -O0):
<PECIDomainValueGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rax
mov    -0x10(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    (%rax),%rax
and    $0xffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PECIDomainValueGet>:
mov    0x40(%rdi,%rsi,4),%rax
movzwl %ax,%eax
ret

LLVM IR (-O0):
define i64 @PECIDomainValueGet(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 = add i64 %5, 64
%7 = load i64, i64* %4
%8 = mul i64 %7, 4
%9 = add i64 %6, %8
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, 65535
ret i64 %12
}

LLVM IR (-O2):
define i64 @PECIDomainValueGet(i64 %0, i64 %1) {
%3 = add i64 %0, 64
%4 = shl i64 %1, 2
%5 = add i64 %3, %4
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 65535
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ ClearBuffer256();
void dxl_hal_clear(void) { ClearBuffer256(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
FILE *fdopen(int fd, const char *mode) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<fdopen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdopen>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32* @fdopen(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i32* @fdopen(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32* null
}
/* Type definitions */
struct stat {
  scalar_t__ st_size;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
unsigned long get_file_size(const char *path) {
  struct stat buf;
  if (stat(path, &buf) < 0) {
    return 0;
  }
  return (unsigned long)buf.st_size;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    1140 <get_file_size+0x30>
movq   $0x0,-0x8(%rbp)
jmp    1148 <get_file_size+0x38>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
js     1124 <get_file_size+0x14>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i64 0, i64* %2
br label %12
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i64, i64* %10
store i64 %11, i64* %2
br label %12
12: ; preds = %9, %8
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = select i1 %5, i64 0, i64 %7
ret i64 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_store_ps1(float *, int /*<<< orphan*/);
void test_mm_store_ps1(float *x, __m128 y) { _mm_store_ps1(x, y); }


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

x86 assembly (clang, -O2):
<test_mm_store_ps1>:
jmp    1030 <_mm_store_ps1@plt>

LLVM IR (-O0):
define void @test_mm_store_ps1(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load float*, float** %3
%6 = load i32, i32* %4
%7 = call i32 @_mm_store_ps1(float* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @test_mm_store_ps1(float* %0, i32 %1) {
%3 = tail call i32 @_mm_store_ps1(float* %0, i32 %1)
ret void
}
void loop() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <loop+0x9>
jmp    1109 <loop+0x9>

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

LLVM IR (-O0):
define void @loop() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @loop() {
br label %1
1: ; preds = %0, %1
br label %1
}
void MirrorRow_C() {}


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

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

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

LLVM IR (-O2):
define void @MirrorRow_C() {
ret void
}
void PrintResult(void) {}


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

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

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

LLVM IR (-O2):
define void @PrintResult() {
ret void
}
/* Variables and functions */
unsigned char *zrealloc(unsigned char *, unsigned int);
unsigned char *zipmapResize(unsigned char *zm, unsigned int len) {
  zm = zrealloc(zm, len);
  zm[len - 1] = 255;
  return zm;
}


x86 assembly (clang, -O0):
<zipmapResize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <zrealloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movb   $0xff,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zipmapResize>:
push   %rbx
mov    %esi,%ebx
call   1030 <zrealloc@plt>
add    $0xffffffff,%ebx
movb   $0xff,(%rax,%rbx,1)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @zipmapResize(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 i32, i32* %4
%7 = call i8* @zrealloc(i8* %5, i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = sub i32 %9, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
store i8 -1, i8* %12
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @zipmapResize(i8* %0, i32 %1) {
%3 = tail call i8* @zrealloc(i8* %0, i32 %1)
%4 = add i32 %1, -1
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %3, i64 %5
store i8 -1, i8* %6
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ AssertFailure(char *, int);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTDisableSIR(unsigned long ulBase) {
  {
    if (!(UARTBaseValid(ulBase))) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          572);
    }
  };
  (*((volatile unsigned long *)(ulBase + 0x00000030))) &=
      ~(0x00000002 | 0x00000004);
}


x86 assembly (clang, -O0):
<UARTDisableSIR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    114f <UARTDisableSIR+0x2f>
lea    0xebb(%rip),%rdi
mov    $0x23c,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rcx
and    $0xfffffffffffffff9,%rcx
mov    %rcx,0x30(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTDisableSIR>:
push   %rbx
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
test   %eax,%eax
jne    113e <UARTDisableSIR+0x1e>
lea    0xecc(%rip),%rdi
mov    $0x23c,%esi
call   1030 <AssertFailure@plt>
andq   $0xfffffffffffffff9,0x30(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTDisableSIR(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @UARTBaseValid(i64 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 572)
br label %8
8: ; preds = %6, %1
%9 = load i64, i64* %2
%10 = add i64 %9, 48
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, -7
store volatile i64 %13, i64* %11
ret void
}

LLVM IR (-O2):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTDisableSIR(i64 %0) {
%2 = tail call i32 @UARTBaseValid(i64 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 572)
br label %6
6: ; preds = %4, %1
%7 = add i64 %0, 48
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, -7
store volatile i64 %10, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cstr_mem_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @cstr_mem_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void foo5b() {}


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

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

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

LLVM IR (-O2):
define void @foo5b() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int scanf(char *, unsigned long long *, int *);
int solve(unsigned long long, int);
int main() {
  unsigned long long n = 0;
  int m = 0, res = 0;
  res = scanf("%llu %d", &n, &m);
  printf("%d", solve(n, m));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xea4(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1050 <scanf@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <solve@plt>
mov    %eax,%esi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xeb4(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0xc(%rsp),%esi
call   1030 <solve@plt>
lea    0xe95(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%llu %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i32
%3 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %1, i32* %2)
%6 = load i64, i64* %1
%7 = load i32, i32* %2
%8 = call i32 @solve(i64 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
void dummy_copy(struct rb_node *old, struct rb_node *new) {}


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

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

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

LLVM IR (-O2):
%struct.rb_node = type opaque
define void @dummy_copy(%struct.rb_node* nocapture %0, %struct.rb_node* nocapture %1) {
ret void
}
void TimerIntEnable(unsigned long ulBase, unsigned long ulIntFlags) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000018))) |= ulIntFlags;
}


x86 assembly (clang, -O0):
<TimerIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerIntEnable>:
or     %rsi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @TimerIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 24
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @TimerIntEnable(i64 %0, i64 %1) {
%3 = add i64 %0, 24
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = or i64 %5, %1
store volatile i64 %6, i64* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int *, unsigned char *, int);
int print_encoded_mime_type(int /*<<< orphan*/ *, char *, int, unsigned int *,
                            int, char *);
int print_encoded_content_type(FILE *fp, char *hdr, int hdrlen,
                               unsigned char *payload, int paylen,
                               char *prefix) {
  unsigned int type;
  memcpy(&type, payload, sizeof(unsigned int));
  return print_encoded_mime_type(fp, hdr, hdrlen, &type, paylen, prefix);
}


x86 assembly (clang, -O0):
<print_encoded_content_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x20(%rbp),%rsi
lea    -0x34(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x24(%rbp),%r8d
mov    -0x30(%rbp),%r9
lea    -0x34(%rbp),%rcx
call   1040 <print_encoded_mime_type@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_encoded_content_type>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8d,%r15d
mov    %edx,%r12d
mov    %rsi,%rbp
mov    %rdi,%rbx
lea    0x4(%rsp),%r13
mov    %r13,%rdi
mov    %rcx,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
mov    %r13,%rcx
mov    %r15d,%r8d
mov    %r14,%r9
call   1040 <print_encoded_mime_type@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @print_encoded_content_type(i32* %0, i8* %1, i32 %2, i8* %3, i32 %4, i8* %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
store i32* %0, i32** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%14 = load i8*, i8** %10
%15 = call i32 @memcpy(i32* %13, i8* %14, i32 4)
%16 = load i32*, i32** %7
%17 = load i8*, i8** %8
%18 = load i32, i32* %9
%19 = load i32, i32* %11
%20 = load i8*, i8** %12
%21 = call i32 @print_encoded_mime_type(i32* %16, i8* %17, i32 %18, i32* %13, i32 %19, i8* %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @print_encoded_content_type(i32* %0, i8* %1, i32 %2, i8* %3, i32 %4, i8* %5) {
%7 = alloca i32
%8 = bitcast i32* %7 to i8*
%9 = call i32 @memcpy(i32* %7, i8* %3, i32 4)
%10 = call i32 @print_encoded_mime_type(i32* %0, i8* %1, i32 %2, i32* %7, i32 %4, i8* %5)
ret i32 %10
}
/* Variables and functions */
double drand48();
double f1(double k) { return k * drand48(); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <drand48@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <drand48@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double (...) @drand48()
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @f1(double %0) {
%2 = tail call double (...) @drand48()
%3 = fmul double %2, %0
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t double_to_uint64(double d) {
  union {
    double d;
    uint64_t n;
  } tmp;
  tmp.d = d;
  return tmp.n;
}


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

x86 assembly (clang, -O2):
<double_to_uint64>:
movq   %xmm0,%rax
ret

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

LLVM IR (-O2):
define i32 @double_to_uint64(double %0) {
%2 = bitcast double %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ towers();
int main() {
  int i;
  for (i = 0; i < 500; i++)
    towers();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1f4,-0x8(%rbp)
jge    1148 <main+0x38>
mov    $0x0,%al
call   1030 <towers@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1f4,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <towers@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @towers()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 500
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srandom_unlocked(unsigned long);
void srandom(unsigned long x) {
  ;
  srandom_unlocked(x);
  ;
}


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

x86 assembly (clang, -O2):
<srandom>:
jmp    1030 <srandom_unlocked@plt>

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

LLVM IR (-O2):
define void @srandom(i64 %0) {
%2 = tail call i32 @srandom_unlocked(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XMaxRequestSize() {
  printf("XMaxRequestSize called\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<XMaxRequestSize>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"XMaxRequestSize called\0A\00"
define i32 @XMaxRequestSize() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"XMaxRequestSize called\00"
define i32 @XMaxRequestSize() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}