xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char *);
char *parse(char *);
int /*<<< orphan*/ printf(char *);
char *read(char *);
int main() {
  char *fileContents = read("../test/testfile.vs");
  if (fileContents == NULL) {
    printf("Error reading the source file.");
    exit(1);
  }
  char *convertedCode = parse(fileContents);
  printf(convertedCode);
  free(convertedCode);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1050 <read@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1190 <main+0x40>
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rdi
call   1060 <parse@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1050 <read@plt>
test   %rax,%rax
je     1181 <main+0x31>
mov    %rax,%rdi
call   1060 <parse@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"../test/testfile.vs\00"
@.str.1 = [31 x i8] c"Error reading the source file.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @read(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %0
%11 = load i8*, i8** %2
%12 = call i8* @parse(i8* %11)
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = call i32 @printf(i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"../test/testfile.vs\00"
@.str.1 = [31 x i8] c"Error reading the source file.\00"
define i32 @main() {
%1 = tail call i8* @read(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
%7 = tail call i8* @parse(i8* %1)
%8 = tail call i32 @printf(i8* dereferenceable(1) %7)
%9 = tail call i32 @free(i8* %7)
ret i32 0
}
int updateAcpiThermal() { return 0; }


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

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

LLVM IR (-O0):
define i32 @updateAcpiThermal() {
ret i32 0
}

LLVM IR (-O2):
define i32 @updateAcpiThermal() {
ret i32 0
}
/* Variables and functions */
long sum(long *, long);
void csum(long *in, long *out, long n) {
  for (long i = 0; i < n; i++) {
    out[i] = sum(in, i);
  }
}


x86 assembly (clang, -O0):
<csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1167 <csum+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <sum@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <csum+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
jle    1148 <csum+0x38>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <sum@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <csum+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @csum(i64* %0, i64* nocapture writeonly %1, i64 %2) {
%4 = icmp sgt i64 %2, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = tail call i64 @sum(i64* %0, i64 %7)
%9 = getelementptr inbounds i64, i64* %1, i64 %7
store i64 %8, i64* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %5, label %6
}
void debug_board_write_byte(const char ch) {
  __asm__ __volatile__("int $0x40" : : "a"(63), "b"(1), "c"(ch));
}


x86 assembly (clang, -O0):
<debug_board_write_byte>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    $0x3f,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_board_write_byte>:
push   %rbx
mov    %edi,%ecx
mov    $0x3f,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @debug_board_write_byte(i8 signext %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 63, i32 1, i8 %0)
ret void
}
/* Variables and functions */
int main(void) { return 1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
void init_offload_dev(struct toedev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.toedev = type opaque
define void @init_offload_dev(%struct.toedev* nocapture %0) {
ret void
}
equate_bitmapheaders(src, dest) struct bitmapheader *src, *dest;
{}


x86 assembly (clang, -O0):
<equate_bitmapheaders>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bitmapheader = type opaque
define i32 @equate_bitmapheaders(%struct.bitmapheader* %0, %struct.bitmapheader* %1) {
%3 = alloca i32
%4 = alloca %struct.bitmapheader*
%5 = alloca %struct.bitmapheader*
store %struct.bitmapheader* %0, %struct.bitmapheader** %4
store %struct.bitmapheader* %1, %struct.bitmapheader** %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.bitmapheader = type opaque
define i32 @equate_bitmapheaders(%struct.bitmapheader* nocapture readnone %0, %struct.bitmapheader* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x88() {
  Assert_real((ispunct(136) == 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_ispunct.c",
              685, ("ispunct should be 0 for 0x88"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x88>:
push   %rax
mov    $0x88,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ad,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x88\00"
define void @t_ispunct_0x88() {
%1 = call i64 @ispunct(i32 136)
%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 685, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x88\00"
define void @t_ispunct_0x88() {
%1 = tail call i64 @ispunct(i32 136)
%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 685, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double fabs(int /*<<< orphan*/);
int /*<<< orphan*/ random_laplace();
double random_exponential(void) { return fabs(random_laplace()); }


x86 assembly (clang, -O0):
<random_exponential>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random_laplace@plt>
mov    %eax,%edi
call   1040 <fabs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_exponential>:
push   %rax
xor    %eax,%eax
call   1030 <random_laplace@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <fabs@plt>

LLVM IR (-O0):
define double @random_exponential() {
%1 = call i32 (...) @random_laplace()
%2 = call double @fabs(i32 %1)
ret double %2
}

LLVM IR (-O2):
define double @random_exponential() {
%1 = tail call i32 (...) @random_laplace()
%2 = tail call double @fabs(i32 %1)
ret double %2
}
int AsciiToHex(int c) {
  if (c >= 'a' && c <= 'f') {
    c += 10 - 'a';
  } else if (c >= 'A' && c <= 'F') {
    c += 10 - 'A';
  } else if (c >= '0' && c <= '9') {
    c -= '0';
  } else {
    c = 0;
  }
  return c;
}


x86 assembly (clang, -O0):
<AsciiToHex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1129 <AsciiToHex+0x29>
cmpl   $0x66,-0x4(%rbp)
jg     1129 <AsciiToHex+0x29>
mov    -0x4(%rbp),%eax
add    $0xffffffa9,%eax
mov    %eax,-0x4(%rbp)
jmp    117e <AsciiToHex+0x7e>
cmpl   $0x41,-0x4(%rbp)
jl     114b <AsciiToHex+0x4b>
cmpl   $0x46,-0x4(%rbp)
jg     114b <AsciiToHex+0x4b>
mov    -0x4(%rbp),%eax
add    $0xffffffc9,%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <AsciiToHex+0x79>
cmpl   $0x30,-0x4(%rbp)
jl     116d <AsciiToHex+0x6d>
cmpl   $0x39,-0x4(%rbp)
jg     116d <AsciiToHex+0x6d>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <AsciiToHex+0x74>
movl   $0x0,-0x4(%rbp)
jmp    1179 <AsciiToHex+0x79>
jmp    117e <AsciiToHex+0x7e>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AsciiToHex>:
mov    %edi,%eax
lea    -0x61(%rax),%ecx
cmp    $0x5,%ecx
ja     110e <AsciiToHex+0xe>
add    $0xffffffa9,%eax
ret
lea    -0x41(%rax),%ecx
cmp    $0x5,%ecx
ja     111a <AsciiToHex+0x1a>
add    $0xffffffc9,%eax
ret
add    $0xffffffd0,%eax
xor    %ecx,%ecx
cmp    $0xa,%eax
cmovb  %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @AsciiToHex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 102
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -87
store i32 %10, i32* %2
br label %32
11: ; preds = %5, %1
%12 = load i32, i32* %2
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 70
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = add nsw i32 %18, -55
store i32 %19, i32* %2
br label %31
20: ; preds = %14, %11
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %29
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 57
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = load i32, i32* %2
%28 = sub nsw i32 %27, 48
store i32 %28, i32* %2
br label %30
29: ; preds = %23, %20
store i32 0, i32* %2
br label %30
30: ; preds = %29, %26
br label %31
31: ; preds = %30, %17
br label %32
32: ; preds = %31, %8
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @AsciiToHex(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nsw i32 %0, -87
br label %15
6: ; preds = %1
%7 = add i32 %0, -65
%8 = icmp ult i32 %7, 6
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = add nsw i32 %0, -55
br label %15
11: ; preds = %6
%12 = add i32 %0, -48
%13 = icmp ult i32 %12, 10
%14 = select i1 %13, i32 %12, i32 0
br label %15
15: ; preds = %11, %9, %4
%16 = phi i32 [ %5, %4 ], [ %10, %9 ], [ %14, %11 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int main() {
  while (1) {
    int x = __VERIFIER_nondet_int() % 100;
    if (x >= 100)
      __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jl     1152 <main+0x32>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %10
%4 = call i32 (...) @__VERIFIER_nondet_int()
%5 = srem i32 %4, 100
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 100
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 (...) @__VERIFIER_error()
br label %10
10: ; preds = %8, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
br label %1
}
void inc(int *x) { (*x)++; }


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

x86 assembly (clang, -O2):
<inc>:
addl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @inc(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ readChunkFromFile(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/, int);
int32_t readDwordFromFile(FILE *pFile, uint32_t *dst, int32_t startPos) {
  return readChunkFromFile(pFile, dst, startPos, sizeof(uint32_t));
}


x86 assembly (clang, -O0):
<readDwordFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x4,%ecx
call   1030 <readChunkFromFile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readDwordFromFile>:
mov    $0x4,%ecx
jmp    1030 <readChunkFromFile@plt>

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

LLVM IR (-O2):
define i32 @readDwordFromFile(i32* %0, i32* %1, i32 %2) {
%4 = tail call i32 @readChunkFromFile(i32* %0, i32* %1, i32 %2, i32 4)
ret i32 %4
}
void seq_release(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<seq_release>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_release>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.seq_release = [12 x i8] c"seq_release\00"
define void @seq_release() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.seq_release, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.seq_release = [12 x i8] c"seq_release\00"
define void @seq_release() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.seq_release, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_channels();
int /*<<< orphan*/ save_bans();
int /*<<< orphan*/ userdb_dump();
void dump_state(void) {
  userdb_dump();
  save_bans();
  dump_channels();
}


x86 assembly (clang, -O0):
<dump_state>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <userdb_dump@plt>
mov    $0x0,%al
call   1030 <save_bans@plt>
mov    $0x0,%al
call   1050 <dump_channels@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_state>:
push   %rax
xor    %eax,%eax
call   1040 <userdb_dump@plt>
xor    %eax,%eax
call   1030 <save_bans@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <dump_channels@plt>

LLVM IR (-O0):
define void @dump_state() {
%1 = call i32 (...) @userdb_dump()
%2 = call i32 (...) @save_bans()
%3 = call i32 (...) @dump_channels()
ret void
}

LLVM IR (-O2):
define void @dump_state() {
%1 = tail call i32 (...) @userdb_dump()
%2 = tail call i32 (...) @save_bans()
%3 = tail call i32 (...) @dump_channels()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void os_init_network() { signal(SIGPIPE, SIG_IGN); }


x86 assembly (clang, -O0):
<os_init_network>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_init_network>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @os_init_network() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @signal(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @os_init_network() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
ret void
}
/* Variables and functions */
float tanhf(float);
float futrts_tanh32(float x) { return tanhf(x); }


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

x86 assembly (clang, -O2):
<futrts_tanh32>:
jmp    1030 <tanhf@plt>

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

LLVM IR (-O2):
define float @futrts_tanh32(float %0) {
%2 = tail call float @tanhf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ lre_keyword_dump();
int /*<<< orphan*/ printf(char *);
void lre_help(void) {
  printf("----------------------------------------------------\n");
  lre_keyword_dump();
  printf("----------------------------------------------------\n");
}


x86 assembly (clang, -O0):
<lre_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <lre_keyword_dump@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lre_help>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <lre_keyword_dump@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"----------------------------------------------------\0A\00"
define void @lre_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @lre_keyword_dump()
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.1 = [53 x i8] c"----------------------------------------------------\00"
define void @lre_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.1, i64 0, i64 0))
%2 = tail call i32 (...) @lre_keyword_dump()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char *);
bool is_directory(char *in_dir) {
  DIR *dir = NULL;
  if ((in_dir == NULL) || (*in_dir == '\0')) {
    return (false);
  }
  dir = opendir(in_dir);
  if (dir == NULL) {
    return false;
  } else {
    closedir(dir);
    return true;
  }
}


x86 assembly (clang, -O0):
<is_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114f <is_directory+0x2f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    115b <is_directory+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    118f <is_directory+0x6f>
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117f <is_directory+0x5f>
movl   $0x0,-0x4(%rbp)
jmp    118f <is_directory+0x6f>
mov    -0x18(%rbp),%rdi
call   1040 <closedir@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_directory>:
push   %rbx
xor    %ebx,%ebx
test   %rdi,%rdi
je     1144 <is_directory+0x24>
cmpb   $0x0,(%rdi)
je     1144 <is_directory+0x24>
call   1030 <opendir@plt>
test   %rax,%rax
je     1144 <is_directory+0x24>
mov    %rax,%rdi
call   1040 <closedir@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_directory(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* null, i32** %4
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %22
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = call i32* @opendir(i8* %14)
store i32* %15, i32** %4
%16 = load i32*, i32** %4
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 0, i32* %2
br label %22
19: ; preds = %13
%20 = load i32*, i32** %4
%21 = call i32 @closedir(i32* %20)
store i32 1, i32* %2
br label %22
22: ; preds = %19, %18, %12
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @is_directory(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = tail call i32* @opendir(i8* %0)
%8 = icmp eq i32* %7, null
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @closedir(i32* %7)
br label %11
11: ; preds = %6, %1, %3, %9
%12 = phi i32 [ 1, %9 ], [ 0, %3 ], [ 0, %1 ], [ 0, %6 ]
ret i32 %12
}
void foo_1_1_1_2_1_1_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_1_1_1_2_1() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int print(int /*<<< orphan*/ *, char **, size_t, char const *,
          int /*<<< orphan*/);
int vsnprintf(char *buffer, size_t n, const char *format, va_list ap) {
  int rv;
  rv = print(NULL, &buffer, n, format, ap);
  return rv;
}


x86 assembly (clang, -O0):
<vsnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
lea    -0x8(%rbp),%rsi
call   1030 <print@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsnprintf>:
push   %rax
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
call   1030 <print@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @print(i32* null, i8** %5, i64 %10, i8* %11, i32 %12)
store i32 %13, i32* %9
%14 = load i32, i32* %9
ret i32 %14
}

LLVM IR (-O2):
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
store i8* %0, i8** %5
%6 = call i32 @print(i32* null, i8** %5, i64 %1, i8* %2, i32 %3)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int NGROUPS;
int /*<<< orphan*/ getgroups(int, int /*<<< orphan*/ *);
int main() {
  gid_t gidset[NGROUPS];
  getgroups(NGROUPS, gidset);
  getgroups(-1, gidset);
  getgroups(NGROUPS, (gid_t *)-1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x20(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x18(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1030 <getgroups@plt>
mov    -0x20(%rbp),%rsi
mov    $0xffffffff,%edi
call   1030 <getgroups@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffffffffffff,%rsi
call   1030 <getgroups@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
mov    %rsp,%rbx
lea    0xf(,%rdi,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rsi
call   1030 <getgroups@plt>
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <getgroups@plt>
mov    (%r14),%edi
mov    $0xffffffffffffffff,%rsi
call   1030 <getgroups@plt>
xor    %eax,%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@NGROUPS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
store i32 0, i32* %1
%4 = load i32, i32* @NGROUPS
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
store i8* %6, i8** %2
%7 = alloca i32, i64 %5
store i64 %5, i64* %3
%8 = load i32, i32* @NGROUPS
%9 = call i32 @getgroups(i32 %8, i32* %7)
%10 = call i32 @getgroups(i32 -1, i32* %7)
%11 = load i32, i32* @NGROUPS
%12 = call i32 @getgroups(i32 %11, i32* inttoptr (i64 -1 to i32*))
store i32 0, i32* %1
%13 = load i8*, i8** %2
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@NGROUPS = global i32 0
define i32 @main() {
%1 = load i32, i32* @NGROUPS
%2 = zext i32 %1 to i64
%3 = alloca i32, i64 %2
%4 = call i32 @getgroups(i32 %1, i32* %3)
%5 = call i32 @getgroups(i32 -1, i32* %3)
%6 = load i32, i32* @NGROUPS
%7 = call i32 @getgroups(i32 %6, i32* inttoptr (i64 -1 to i32*))
ret i32 0
}
void hug_mutex_init() {}


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

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

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

LLVM IR (-O2):
define void @hug_mutex_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t direct_write16(volatile uint16_t *addr, uint16_t dat) {
  *addr = dat;
  return dat;
}


x86 assembly (clang, -O0):
<direct_write16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<direct_write16>:
mov    %esi,%eax
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @direct_write16(i32* %0, i32 returned %1) {
store volatile i32 %1, i32* %0
ret i32 %1
}
/* Variables and functions */
scalar_t__ geteuid();
scalar_t__ getuid();
int has_ping_cap() {
  if (getuid() == 0 || geteuid() == 0) {
    return 0x4;
  }
  return 0;
}


x86 assembly (clang, -O0):
<has_ping_cap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
cmp    $0x0,%rax
je     114a <has_ping_cap+0x2a>
mov    $0x0,%al
call   1040 <geteuid@plt>
cmp    $0x0,%rax
jne    1156 <has_ping_cap+0x36>
movl   $0x4,-0x4(%rbp)
jmp    115d <has_ping_cap+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_ping_cap>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
test   %rax,%rax
je     1144 <has_ping_cap+0x24>
xor    %eax,%eax
call   1040 <geteuid@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
shl    $0x2,%eax
pop    %rcx
ret
mov    $0x4,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @has_ping_cap() {
%1 = tail call i64 (...) @getuid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 (...) @geteuid()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 4, i32 0
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 4, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ test49_Client_handle__E(int);
void test49_Client_pollen__run__E() { test49_Client_handle__E(3); }


x86 assembly (clang, -O0):
<test49_Client_pollen__run__E>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <test49_Client_handle__E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test49_Client_pollen__run__E>:
mov    $0x3,%edi
jmp    1030 <test49_Client_handle__E@plt>

LLVM IR (-O0):
define void @test49_Client_pollen__run__E() {
%1 = call i32 @test49_Client_handle__E(i32 3)
ret void
}

LLVM IR (-O2):
define void @test49_Client_pollen__run__E() {
%1 = tail call i32 @test49_Client_handle__E(i32 3)
ret void
}
unsigned int ioapic_read(int reg) {
  (*(volatile unsigned int *)0xfec00000l) = reg;
  return (*(volatile unsigned int *)0xfec00010l);
}


x86 assembly (clang, -O0):
<ioapic_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0xfec00000,%eax
mov    %ecx,(%rax)
mov    $0xfec00010,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioapic_read>:
mov    $0xfec00000,%eax
mov    %edi,(%rax)
mov    0x10(%rax),%eax
ret

LLVM IR (-O0):
define i32 @ioapic_read(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 4273995776 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 4273995792 to i32*)
ret i32 %4
}

LLVM IR (-O2):
define i32 @ioapic_read(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 4273995776 to i32*)
%2 = load volatile i32, i32* inttoptr (i64 4273995792 to i32*)
ret i32 %2
}
double pathcon_nm9_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<pathcon_nm9_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <pathcon_nm9_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <pathcon_nm9_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <pathcon_nm9_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <pathcon_nm9_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm9_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pathcon_nm9_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @pathcon_nm9_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ glPopClientAttrib();
void qglPopClientAttrib(void) { glPopClientAttrib(); }


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

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

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

LLVM IR (-O2):
define void @qglPopClientAttrib() {
%1 = tail call i32 (...) @glPopClientAttrib()
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *__libc_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<__libc_realloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @__libc_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @__libc_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
double coulomb_spin_factor(double mass, double kinetic) {
  const double e = kinetic + mass;
  return kinetic * (e + mass) / (e * e);
}


x86 assembly (clang, -O0):
<coulomb_spin_factor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<coulomb_spin_factor>:
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @coulomb_spin_factor(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fadd double %6, %7
store double %8, double* %5
%9 = load double, double* %4
%10 = load double, double* %5
%11 = load double, double* %3
%12 = fadd double %10, %11
%13 = fmul double %9, %12
%14 = load double, double* %5
%15 = load double, double* %5
%16 = fmul double %14, %15
%17 = fdiv double %13, %16
ret double %17
}

LLVM IR (-O2):
define double @coulomb_spin_factor(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fadd double %3, %0
%5 = fmul double %4, %1
%6 = fmul double %3, %3
%7 = fdiv double %5, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void recv() {
  for (;;) {
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<recv>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <recv+0x9>
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1119 <recv+0x9>

x86 assembly (clang, -O2):
<recv>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <recv+0x10>

LLVM IR (-O0):
define void @recv() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @sleep(i32 1)
br label %1
}

LLVM IR (-O2):
define void @recv() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 1)
br label %1
}
/* Variables and functions */
float exp(float);
float f(float x) { return exp(x); }


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

x86 assembly (clang, -O2):
<f>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define float @f(float %0) {
%2 = tail call float @exp(float %0)
ret float %2
}
double get_num_elect(double delta) {
  double nelec;
  nelec = 1000.0 * delta / 3.68;
  return (nelec);
}


x86 assembly (clang, -O0):
<get_num_elect>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num_elect>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @get_num_elect(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 1.000000e+03, %4
%6 = fdiv double %5, 3.680000e+00
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @get_num_elect(double %0) {
%2 = fmul double %0, 1.000000e+03
%3 = fdiv double %2, 3.680000e+00
ret double %3
}
void print_inout(long *in1, long *in2, long *out) {
  printf("%s:%d: "
         "input values are %ld and %ld"
         "\n",
         __FUNCTION__, 170, *in1, *in2);
  printf("%s:%d: "
         "max of squares is %ld"
         "\n",
         __FUNCTION__, 171, *out);
}


x86 assembly (clang, -O0):
<print_inout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    (%rax),%r8
lea    0xec7(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0xaa,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
lea    0xed7(%rip),%rdi
lea    0xec4(%rip),%rsi
mov    $0xab,%edx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_inout>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    (%rdi),%rcx
mov    (%rsi),%r8
lea    0xedc(%rip),%rdi
lea    0xefa(%rip),%r14
mov    %r14,%rsi
mov    $0xaa,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%rcx
lea    0xeed(%rip),%rdi
mov    %r14,%rsi
mov    $0xab,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"%s:%d: input values are %ld and %ld\0A\00"
@__FUNCTION__.print_inout = [12 x i8] c"print_inout\00"
@.str.1 = [30 x i8] c"%s:%d: max of squares is %ld\0A\00"
define void @print_inout(i64* %0, i64* %1, i64* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64*
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = load i64*, i64** %5
%10 = load i64, i64* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.print_inout, i64 0, i64 0), i32 170, i64 %8, i64 %10)
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.print_inout, i64 0, i64 0), i32 171, i64 %13)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"%s:%d: input values are %ld and %ld\0A\00"
@__FUNCTION__.print_inout = [12 x i8] c"print_inout\00"
@.str.1 = [30 x i8] c"%s:%d: max of squares is %ld\0A\00"
define void @print_inout(i64* nocapture %0, i64* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %0
%5 = load i64, i64* %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.print_inout, i64 0, i64 0), i32 170, i64 %4, i64 %5)
%7 = load i64, i64* %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.print_inout, i64 0, i64 0), i32 171, i64 %7)
ret void
}
/* Variables and functions */
double funcAngCor_alpha1_3minus_2plus_15097_L3(double *, double *);
double sin(double);
double fitAngDist_alpha1_3minus_2plus_15097_L3(double *x, double *par) {
  double result;
  result = funcAngCor_alpha1_3minus_2plus_15097_L3(x, &par[0]) *
           sin(x[0] * 0.0174533);
  return result;
}


x86 assembly (clang, -O0):
<fitAngDist_alpha1_3minus_2plus_15097_L3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <funcAngCor_alpha1_3minus_2plus_15097_L3@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeb2(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitAngDist_alpha1_3minus_2plus_15097_L3>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <funcAngCor_alpha1_3minus_2plus_15097_L3@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
mulsd  0xec1(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fitAngDist_alpha1_3minus_2plus_15097_L3(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = call double @funcAngCor_alpha1_3minus_2plus_15097_L3(double* %6, double* %8)
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fmul double %12, 1.745330e-02
%14 = call double @sin(double %13)
%15 = fmul double %9, %14
store double %15, double* %5
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @fitAngDist_alpha1_3minus_2plus_15097_L3(double* %0, double* %1) {
%3 = tail call double @funcAngCor_alpha1_3minus_2plus_15097_L3(double* %0, double* %1)
%4 = load double, double* %0
%5 = fmul double %4, 1.745330e-02
%6 = tail call double @sin(double %5)
%7 = fmul double %3, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = 5, y = 2;
  assert(x + y == 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = add nsw i32 %4, %5
%7 = icmp eq i32 %6, 7
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ StudentModel_addStudentSubject(char *, char *);
void Controller_addStudentSubject(char studentNumber[], char subject[]) {
  StudentModel_addStudentSubject(studentNumber, subject);
  return;
}


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

x86 assembly (clang, -O2):
<Controller_addStudentSubject>:
jmp    1030 <StudentModel_addStudentSubject@plt>

LLVM IR (-O0):
define void @Controller_addStudentSubject(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
%7 = call i32 @StudentModel_addStudentSubject(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @Controller_addStudentSubject(i8* %0, i8* %1) {
%3 = tail call i32 @StudentModel_addStudentSubject(i8* %0, i8* %1)
ret void
}
__attribute__((always_)) __attribute__((always_)) unsigned long long
__native_read_tsc(void) {
  unsigned long long val;
  asm volatile("rdtsc" : "=A"(val));
  return (val);
}


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

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

LLVM IR (-O0):
define i64 @__native_read_tsc() {
%1 = alloca i64
%2 = call i64 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @__native_read_tsc() {
%1 = tail call i64 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}