xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double sqrt(double);
int main(void) {
  double x1 = 1, y1 = 5, x2 = 4, y2 = 7, side_1, side_2, distance;
  side_1 = x2 - x1;
  side_2 = y2 - y1;
  distance = sqrt(side_1 * side_1 + side_2 * side_2);
  printf("The distance between the two points is "
         "%5.2f \n",
         distance);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb7(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xea2(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"The distance between the two points is %5.2f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %1
store double 1.000000e+00, double* %2
store double 5.000000e+00, double* %3
store double 4.000000e+00, double* %4
store double 7.000000e+00, double* %5
%9 = load double, double* %4
%10 = load double, double* %2
%11 = fsub double %9, %10
store double %11, double* %6
%12 = load double, double* %5
%13 = load double, double* %3
%14 = fsub double %12, %13
store double %14, double* %7
%15 = load double, double* %6
%16 = load double, double* %6
%17 = load double, double* %7
%18 = load double, double* %7
%19 = fmul double %17, %18
%20 = call double @llvm.fmuladd.f64(double %15, double %16, double %19)
%21 = call double @sqrt(double %20)
store double %21, double* %8
%22 = load double, double* %8
%23 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"The distance between the two points is %5.2f \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 0x400CD82B446159F3)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c, x, y, z;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  c = 0;
  while (x < y) {
    if (x < z) {
      x = x + 1;
    } else {
      z = z + 1;
    }
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1181 <main+0x71>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    116a <main+0x5a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1173 <main+0x63>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x34>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
long get_current_time() {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return ts.tv_sec * 1000 + (ts.tv_nsec / 1000000);
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
movslq (%rsp),%rax
imul   $0x3e8,%rax,%rcx
movslq 0x4(%rsp),%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_current_time() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000000
%10 = add nsw i32 %6, %9
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_current_time() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000000
%11 = add nsw i32 %10, %7
%12 = sext i32 %11 to i64
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void pmu_adc_enable() {
  mbus_remote_register_write(
      0x6, 0x3B,
      ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) |
       (1 << 6) | (1 << 7) | (1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) |
       (0 << 12) | (1 << 13) | (1 << 14) | (1 << 15) | (1 << 16) | (1 << 17) |
       (1 << 18) | (0 << 19) | (1 << 20)));
  delay(100);
}


x86 assembly (clang, -O0):
<pmu_adc_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x3b,%esi
mov    $0x17efff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_adc_enable>:
push   %rax
mov    $0x6,%edi
mov    $0x3b,%esi
mov    $0x17efff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @pmu_adc_enable() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 59, i32 1568767)
%2 = call i32 @delay(i32 100)
ret void
}

LLVM IR (-O2):
define void @pmu_adc_enable() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 59, i32 1568767)
%2 = tail call i32 @delay(i32 100)
ret void
}
int test_imm_A9uint16_reg(unsigned short val) {
  return ((val) & (-0xA9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A9uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff57,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A9uint16_reg>:
test   $0xff57,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A9uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -169
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ printf(char *, int, int);
int my_close(int d) {
  int ret = close(d);
  printf("--> %d = close(%d)\n", ret, d);
  return ret;
}


x86 assembly (clang, -O0):
<my_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_close>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <close@plt>
mov    %eax,%ebp
lea    0xecd(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"--> %d = close(%d)\0A\00"
define i32 @my_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int int_least32_t;

/* Variables and functions */
int_least32_t Foo(int_least32_t X) {
  if (X < 0)
    X = 0;
  if (X > 191)
    X = 191;
  return X << 23;
}


x86 assembly (clang, -O0):
<Foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1118 <Foo+0x18>
movl   $0x0,-0x4(%rbp)
cmpl   $0xbf,-0x4(%rbp)
jle    112c <Foo+0x2c>
movl   $0xbf,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x17,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Foo>:
xor    %ecx,%ecx
test   %edi,%edi
cmovns %edi,%ecx
cmp    $0xbf,%ecx
mov    $0xbf,%eax
cmovb  %ecx,%eax
shl    $0x17,%eax
ret

LLVM IR (-O0):
define i32 @Foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 0, i32* %2
br label %6
6: ; preds = %5, %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 191
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 191, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
%12 = shl i32 %11, 23
ret i32 %12
}

LLVM IR (-O2):
define i32 @Foo(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
%4 = icmp ult i32 %3, 191
%5 = select i1 %4, i32 %3, i32 191
%6 = shl nuw nsw i32 %5, 23
ret i32 %6
}
/* Variables and functions */
char *getItemName(void *context, size_t item) {
  switch (item) {
  case 0:
    return "shortterm";
  case 1:
    return "midterm";
  case 2:
    return "longterm";
  };
  return NULL;
}


x86 assembly (clang, -O0):
<getItemName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
test   %rax,%rax
je     1148 <getItemName+0x48>
jmp    1122 <getItemName+0x22>
mov    -0x20(%rbp),%rax
sub    $0x1,%rax
je     1158 <getItemName+0x58>
jmp    1135 <getItemName+0x35>
mov    -0x20(%rbp),%rax
sub    $0x2,%rax
je     1168 <getItemName+0x68>
jmp    1178 <getItemName+0x78>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <getItemName+0x80>
lea    0xeab(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <getItemName+0x80>
lea    0xea3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <getItemName+0x80>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getItemName>:
cmp    $0x2,%rsi
ja     1115 <getItemName+0x15>
lea    0xf0f(%rip),%rcx
movslq (%rcx,%rsi,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"shortterm\00"
@.str.1 = [8 x i8] c"midterm\00"
@.str.2 = [9 x i8] c"longterm\00"
define i8* @getItemName(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
switch i64 %6, label %10 [
i64 0, label %7
i64 1, label %8
i64 2, label %9
]
7: ; preds = %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %3
br label %11
8: ; preds = %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %11
9: ; preds = %2
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %11
10: ; preds = %2
store i8* null, i8** %3
br label %11
11: ; preds = %10, %9, %8, %7
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [10 x i8] c"shortterm\00"
@.str.1 = [8 x i8] c"midterm\00"
@.str.2 = [9 x i8] c"longterm\00"
@reltable.getItemName = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.getItemName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.getItemName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.getItemName to i64)) to i32)]
define i8* @getItemName(i8* nocapture readnone %0, i64 %1) {
%3 = icmp ult i64 %1, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = shl i64 %1, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.getItemName to i8*), i64 %5)
br label %7
7: ; preds = %2, %4
%8 = phi i8* [ %6, %4 ], [ null, %2 ]
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t op_minus(uint32_t a, uint32_t b) { return -a; }


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

x86 assembly (clang, -O2):
<op_minus>:
mov    %edi,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @op_minus(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 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @op_minus(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_count_cover(char *, int);
float acosf(float);
float HMM_ACosF(float Radians) {
  { _hmt_count_cover("HMM_ACosF", 452); };
  float Result = acosf(Radians);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_ACosF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x1c4,%esi
call   1030 <_hmt_count_cover@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <acosf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_ACosF>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0xed2(%rip),%rdi
mov    $0x1c4,%esi
call   1030 <_hmt_count_cover@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1040 <acosf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_ACosF\00"
define float @HMM_ACosF(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i32 @_hmt_count_cover(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 452)
%5 = load float, float* %2
%6 = call float @acosf(float %5)
store float %6, float* %3
%7 = load float, float* %3
ret float %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_ACosF\00"
define float @HMM_ACosF(float %0) {
%2 = tail call i32 @_hmt_count_cover(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 452)
%3 = tail call float @acosf(float %0)
ret float %3
}
/* Type definitions */
struct msqid_ds {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, int, struct msqid_ds *);
int msgctl(int q, int cmd, struct msqid_ds *buf) {
  return syscall(304, q, cmd | 0x100, buf);
}


x86 assembly (clang, -O0):
<msgctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
or     $0x100,%edx
mov    -0x10(%rbp),%rcx
mov    $0x130,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgctl>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
or     $0x100,%edx
mov    $0x130,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.msqid_ds = type { i32 }
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.msqid_ds*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.msqid_ds* %2, %struct.msqid_ds** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = or i32 %8, 256
%10 = load %struct.msqid_ds*, %struct.msqid_ds** %6
%11 = call i32 @syscall(i32 304, i32 %7, i32 %9, %struct.msqid_ds* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.msqid_ds = type { i32 }
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* %2) {
%4 = or i32 %1, 256
%5 = tail call i32 @syscall(i32 304, i32 %0, i32 %4, %struct.msqid_ds* %2)
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int send_event;
};
typedef TYPE_1__ XFocusInEvent;

/* Variables and functions */
void set_XFocusInEvent_send_event(void *_p, int _v) {
  ((XFocusInEvent *)_p)->send_event = (int)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XFocusInEvent_send_event(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XFocusInEvent_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 10;
  int b = 90;
  int ret = add(a, b);
  printf("c call cpp result = %d", ret);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x5a,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x5a,%esi
call   1030 <add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"c call cpp result = %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @add(i32 10, i32 90)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
double mjd2jd(dj)
double dj;
{ return (dj + 2400000.5); }


x86 assembly (clang, -O0):
<mjd2jd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @mjd2jd(double %0) {
%2 = fadd double %0, 0x41424F8040000000
ret double %2
}
void math_cos(void) {
  double d = lua_check_number(1, "cos");
  lua_pushnumber(cos(((d)*3.14159265358979323846 / 180.0)));
}


x86 assembly (clang, -O0):
<math_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <lua_check_number@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xeac(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <cos@plt>
mov    $0x1,%al
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_cos>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <lua_check_number@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xeb0(%rip),%xmm0
divsd  0xeb0(%rip),%xmm0
call   1050 <cos@plt>
mov    $0x1,%al
pop    %rcx
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cos\00"
define void @math_cos() {
%1 = alloca double
%2 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @lua_check_number to i32 (i32, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = sitofp i32 %2 to double
store double %3, double* %1
%4 = load double, double* %1
%5 = fmul double %4, 0x400921FB54442D18
%6 = fdiv double %5, 1.800000e+02
%7 = call double @cos(double %6)
%8 = call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cos\00"
define void @math_cos() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @lua_check_number to i32 (i32, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = sitofp i32 %1 to double
%3 = fmul double %2, 0x400921FB54442D18
%4 = fdiv double %3, 1.800000e+02
%5 = tail call double @cos(double %4)
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ gl_log(char const *, char *, int);
int /*<<< orphan*/ stderr;
void glfw_error_callback(int error, const char *description) {
  fputs(description, stderr);
  gl_log(
      description,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/yuwang01/OculusSPH/refs/heads/master/help.h",
      490);
}


x86 assembly (clang, -O0):
<glfw_error_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x1ea,%edx
call   1040 <gl_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glfw_error_callback>:
push   %rbx
mov    %rsi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1ea,%edx
pop    %rbx
jmp    1040 <gl_log@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/yuwang01/OculusSPH/refs/heads/master/help.h\00"
define void @glfw_error_callback(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i8*, i8** %4
%9 = call i32 @gl_log(i8* %8, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 490)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/yuwang01/OculusSPH/refs/heads/master/help.h\00"
define void @glfw_error_callback(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* %1, i32 %3)
%5 = tail call i32 @gl_log(i8* %1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 490)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ err;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_ERROR;
int /*<<< orphan*/ getsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, unsigned int *);
int os_get_sockerr(int fd) {
  int err = 0;
  unsigned int len = sizeof(err);
  getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len);
  return err;
}


x86 assembly (clang, -O0):
<os_get_sockerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%r8
call   1030 <getsockopt@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_get_sockerr>:
push   %rax
movl   $0x0,(%rsp)
movl   $0x4,0x4(%rsp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rcx
lea    0x4(%rsp),%r8
call   1030 <getsockopt@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_ERROR = global i32 0
define i32 @os_get_sockerr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 4, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* @SOL_SOCKET
%7 = load i32, i32* @SO_ERROR
%8 = call i32 @getsockopt(i32 %5, i32 %6, i32 %7, i32* %3, i32* %4)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_ERROR = global i32 0
define i32 @os_get_sockerr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = load i32, i32* @SOL_SOCKET
%7 = load i32, i32* @SO_ERROR
%8 = call i32 @getsockopt(i32 %0, i32 %6, i32 %7, i32* %2, i32* %3)
%9 = load i32, i32* %2
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int recv(int, char *, int, int /*<<< orphan*/);
void *threadrecv(void *vargp) {
  int connfd = *((int *)vargp);
  char temp[100];
  while (1) {
    int idata = 0;
    idata = recv(connfd, temp, 100, 0);
    if (idata > 0) {
      printf("server :\n%s\n", temp);
    }
  }
  return NULL;
}


x86 assembly (clang, -O0):
<threadrecv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0x64,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x0,-0x74(%rbp)
jle    116f <threadrecv+0x4f>
lea    -0x70(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
jmp    1138 <threadrecv+0x18>

x86 assembly (clang, -O2):
<threadrecv>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    (%rdi),%ebx
mov    %rsp,%r14
lea    0xecb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x64,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %eax,%eax
jle    1140 <threadrecv+0x20>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
jmp    1140 <threadrecv+0x20>

LLVM IR (-O0):
@.str = [13 x i8] c"server :\0A%s\0A\00"
define i8* @threadrecv(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [100 x i8]
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %3
br label %9
9: ; preds = %1, %18
store i32 0, i32* %5
%10 = load i32, i32* %3
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%12 = call i32 @recv(i32 %10, i8* %11, i32 100, i32 0)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %15, %9
br label %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"server :\0A%s\0A\00"
define noalias i8* @threadrecv(i8* nocapture %0) {
%2 = alloca [100 x i8]
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
br label %6
6: ; preds = %11, %1
%7 = call i32 @recv(i32 %4, i8* %5, i32 100, i32 0)
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %11
11: ; preds = %9, %6
br label %6
}
int test_imm_F5int16_reg(short val) {
  return ((val) & (0xF5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F5int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xf5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F5int16_reg>:
test   $0xf5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F5int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 245
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_F5int16_reg(i16 signext %0) {
%2 = and i16 %0, 245
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ NoDepF_func();
void NoDepE_func() {
  static int firstcall = 1;
  if (firstcall) {
    firstcall = 0;
    NoDepF_func();
  }
}


x86 assembly (clang, -O0):
<NoDepE_func>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f0d(%rip)
je     1132 <NoDepE_func+0x22>
movl   $0x0,0x2efd(%rip)
mov    $0x0,%al
call   1030 <NoDepF_func@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<NoDepE_func>:
cmpb   $0x0,0x2f15(%rip)
je     111a <NoDepE_func+0xa>
ret
movb   $0x1,0x2f0b(%rip)
xor    %eax,%eax
jmp    1030 <NoDepF_func@plt>

LLVM IR (-O0):
@NoDepE_func.firstcall = internal global i32 1
define void @NoDepE_func() {
%1 = load i32, i32* @NoDepE_func.firstcall
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
store i32 0, i32* @NoDepE_func.firstcall
%4 = call i32 (...) @NoDepF_func()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@NoDepE_func.firstcall = internal unnamed_addr global i1 false
define void @NoDepE_func() {
%1 = load i1, i1* @NoDepE_func.firstcall
br i1 %1, label %4, label %2
2: ; preds = %0
store i1 true, i1* @NoDepE_func.firstcall
%3 = tail call i32 (...) @NoDepF_func()
br label %4
4: ; preds = %2, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_u64_xxh64s_data64(double const *, size_t, uintptr_t);
uint64_t rgph_u64_xxh64s_f64a(const double *key, size_t len, uintptr_t seed) {
  return rgph_u64_xxh64s_data64(key, len, seed);
}


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

x86 assembly (clang, -O2):
<rgph_u64_xxh64s_f64a>:
jmp    1030 <rgph_u64_xxh64s_data64@plt>

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

LLVM IR (-O2):
define i32 @rgph_u64_xxh64s_f64a(double* %0, i64 %1, i64 %2) {
%4 = tail call i32 @rgph_u64_xxh64s_data64(double* %0, i64 %1, i64 %2)
ret i32 %4
}
unsigned int bitset_empty(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bitset_empty() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CunitTestFramework(char, char *, int, char *);
int main(int argc, char *argv[]) {
  char RunMode = 'a';
  char *ProductList = "";
  int NeedCoverage = 0;
  char *ResultDestination = "./Fosslogy_C_Test-Results.xml";
  CunitTestFramework(RunMode, ProductList, NeedCoverage, ResultDestination);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x61,-0x11(%rbp)
lea    0xeec(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xebd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x11(%rbp),%al
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
movsbl %al,%edi
call   1030 <CunitTestFramework@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf05(%rip),%rsi
lea    0xee1(%rip),%rcx
mov    $0x61,%edi
xor    %edx,%edx
call   1030 <CunitTestFramework@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [30 x i8] c"./Fosslogy_C_Test-Results.xml\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 97, i8* %6
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %7
store i32 0, i32* %8
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8** %9
%10 = load i8, i8* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = load i8*, i8** %9
%14 = call i32 @CunitTestFramework(i8 signext %10, i8* %11, i32 %12, i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [30 x i8] c"./Fosslogy_C_Test-Results.xml\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @CunitTestFramework(i8 signext 97, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ isupper(int const);
int tolower(const int c) { return ((isupper(c) != 0) ? (c + 32) : c); }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <tolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 32
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Type definitions */
struct program_counter {
  int dummy;
};

/* Variables and functions */
int *combine_multiplier_accumulator(struct program_counter *);
int /*<<< orphan*/ free(int *);
long long signed_byte_value(int *, int);
long long compute_multiplier_accumulator(struct program_counter *pc) {
  int *combined = combine_multiplier_accumulator(pc);
  long long output = signed_byte_value(combined, 38 + 36);
  free(combined);
  return output;
}


x86 assembly (clang, -O0):
<compute_multiplier_accumulator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <combine_multiplier_accumulator@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x4a,%esi
call   1040 <signed_byte_value@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_multiplier_accumulator>:
push   %r14
push   %rbx
push   %rax
call   1050 <combine_multiplier_accumulator@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x4a,%esi
call   1040 <signed_byte_value@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.program_counter = type { i32 }
define i64 @compute_multiplier_accumulator(%struct.program_counter* %0) {
%2 = alloca %struct.program_counter*
%3 = alloca i32*
%4 = alloca i64
store %struct.program_counter* %0, %struct.program_counter** %2
%5 = load %struct.program_counter*, %struct.program_counter** %2
%6 = call i32* @combine_multiplier_accumulator(%struct.program_counter* %5)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i64 @signed_byte_value(i32* %7, i32 74)
store i64 %8, i64* %4
%9 = load i32*, i32** %3
%10 = call i32 @free(i32* %9)
%11 = load i64, i64* %4
ret i64 %11
}

LLVM IR (-O2):
%struct.program_counter = type { i32 }
define i64 @compute_multiplier_accumulator(%struct.program_counter* %0) {
%2 = tail call i32* @combine_multiplier_accumulator(%struct.program_counter* %0)
%3 = tail call i64 @signed_byte_value(i32* %2, i32 74)
%4 = tail call i32 @free(i32* %2)
ret i64 %3
}
int test_imm_3Eint8_mem(signed char *val) {
  return ((*val) & (-0x3E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Eint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffc2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_3Eint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -62
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "usage: head [-n lines] [file ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: head [-n lines] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: head [-n lines] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void t2t(double *x, double *y) {
  y[0] = x[0];
  y[1] = x[1];
  y[2] = x[2];
}


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

x86 assembly (clang, -O2):
<t2t>:
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rsi)
ret

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

LLVM IR (-O2):
define void @t2t(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
store double %3, double* %1
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %1, i64 1
store double %5, double* %6
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 2
store double %8, double* %9
ret void
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int open(char const *, int, int);
int /*<<< orphan*/ perror(char *);
int log_init(const char *filename) {
  int fd;
  fd = open(filename, O_CREAT | O_RDWR, 0644);
  if (fd < 0)
    perror("open");
  return (fd);
}


x86 assembly (clang, -O0):
<log_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ea0(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
call   1030 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1165 <log_init+0x45>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_init>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    $0x1a4,%edx
call   1030 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1147 <log_init+0x27>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
jmp    1143 <log_init+0x23>

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@.str = [5 x i8] c"open\00"
define i32 @log_init(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_CREAT
%6 = load i32, i32* @O_RDWR
%7 = or i32 %5, %6
%8 = call i32 @open(i8* %4, i32 %7, i32 420)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %1
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@.str = [5 x i8] c"open\00"
define i32 @log_init(i8* nocapture %0) {
%2 = load i32, i32* @O_CREAT
%3 = load i32, i32* @O_RDWR
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4, i32 420)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret i32 %5
}
int AdvancedAI_Bid(void *p, void *g) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @AdvancedAI_Bid(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_gr_size_x() { exit(1); }


x86 assembly (clang, -O0):
<caml_gr_size_x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_gr_size_x>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_gr_size_x() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_gr_size_x() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *zalloc(size_t len) {
  void *ptr = malloc(len);
  if (ptr)
    memset(ptr, 0, len);
  return ptr;
}


x86 assembly (clang, -O0):
<zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <zalloc+0x33>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <zalloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @zalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i64, i64* %2
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @zalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}