xunge/DecIR huggingface dataset:
/* Type definitions */
typedef double clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
double ticks2secs(clock_t ticks) { return ticks * 1.0 / CLOCKS_PER_SEC; }


x86 assembly (clang, -O0):
<ticks2secs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    0x2ecb(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ticks2secs>:
mov    0x2ee1(%rip),%rax
divsd  (%rax),%xmm0
ret

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

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @ticks2secs(double %0) {
%2 = load double, double* @CLOCKS_PER_SEC
%3 = fdiv double %0, %2
ret double %3
}
void doNothing(void) {}


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

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

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

LLVM IR (-O2):
define void @doNothing() {
ret void
}
int cmp_int(const void *a, const void *b) { return (*(int *)b - *(int *)a); }


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

x86 assembly (clang, -O2):
<cmp_int>:
mov    (%rsi),%eax
sub    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @cmp_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ RIT_ISR();
int /*<<< orphan*/ WWDT_ISR();
void RIT_WWDT_ISR(void) {
  RIT_ISR();
  WWDT_ISR();
}


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

x86 assembly (clang, -O2):
<RIT_WWDT_ISR>:
push   %rax
xor    %eax,%eax
call   1040 <RIT_ISR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <WWDT_ISR@plt>

LLVM IR (-O0):
define void @RIT_WWDT_ISR() {
%1 = call i32 (...) @RIT_ISR()
%2 = call i32 (...) @WWDT_ISR()
ret void
}

LLVM IR (-O2):
define void @RIT_WWDT_ISR() {
%1 = tail call i32 (...) @RIT_ISR()
%2 = tail call i32 (...) @WWDT_ISR()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_setblockinc(int, int);
void j_setblockinc(int arg0, int arg1) { japi_setblockinc(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_setblockinc>:
jmp    1030 <japi_setblockinc@plt>

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

LLVM IR (-O2):
define void @j_setblockinc(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setblockinc(i32 %0, i32 %1)
ret void
}
int ho_strlen3(const char *str) {
  int len;
  for (len = 0; *str++; len++)
    ;
  return len;
}


x86 assembly (clang, -O0):
<ho_strlen3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     113a <ho_strlen3+0x3a>
jmp    112c <ho_strlen3+0x2c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ho_strlen3+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ho_strlen3(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
scalar_t__ dcr_read(int, int *);
int mvpstb_audio_end(void) {
  int wlr;
  if (dcr_read(0x1B0, &wlr) < 0)
    return -1;
  if (wlr == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<mvpstb_audio_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1b0,%edi
lea    -0x8(%rbp),%rsi
call   1030 <dcr_read@plt>
cmp    $0x0,%rax
jge    113c <mvpstb_audio_end+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <mvpstb_audio_end+0x49>
cmpl   $0x0,-0x8(%rbp)
jne    1152 <mvpstb_audio_end+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1159 <mvpstb_audio_end+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvpstb_audio_end>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x1b0,%edi
call   1030 <dcr_read@plt>
xor    %ecx,%ecx
cmpl   $0x0,0x4(%rsp)
sete   %cl
test   %rax,%rax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mvpstb_audio_end() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @dcr_read(i32 432, i32* %1)
%4 = icmp slt i64 %3, 0
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = select i1 %4, i32 -1, i32 %7
ret i32 %8
}
int fun(long n) {
  long s = 0, m = n;
  while (n) {
    s = s * 10 + n % 10;
    n = n / 10;
  }
  if (s == m)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <fun+0x5c>
imul   $0xa,-0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    -0x28(%rbp),%rax
add    %rdx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
jmp    1118 <fun+0x18>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    1176 <fun+0x76>
movl   $0x1,-0x4(%rbp)
jmp    117d <fun+0x7d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
xor    %ecx,%ecx
test   %rdi,%rdi
je     1157 <fun+0x57>
movabs $0x6666666666666667,%r8
66 66 66
mov    %rdi,%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rcx,%rcx,4),%r9
mov    %rsi,%rax
imul   %r8
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
lea    (%rdx,%rdx,1),%rax
lea    (%rax,%rax,4),%rax
mov    %rsi,%rcx
sub    %rax,%rcx
lea    (%rcx,%r9,2),%rcx
add    $0x9,%rsi
cmp    $0x12,%rsi
mov    %rdx,%rsi
ja     1120 <fun+0x20>
xor    %eax,%eax
cmp    %rdi,%rcx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @fun(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = phi i64 [ %9, %3 ], [ %0, %1 ]
%6 = mul nsw i64 %4, 10
%7 = srem i64 %5, 10
%8 = add nsw i64 %6, %7
%9 = sdiv i64 %5, 10
%10 = add i64 %5, 9
%11 = icmp ult i64 %10, 19
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i64 [ 0, %1 ], [ %8, %3 ]
%14 = icmp eq i64 %13, %0
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
void omp_unset_lock(omp_lock_t *lock) {}


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

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

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

LLVM IR (-O2):
define void @omp_unset_lock(i32* nocapture %0) {
ret void
}
unsigned long EPINonBlockingReadCount(unsigned long ulBase,
                                      unsigned long ulChannel) {
  unsigned long ulOffset;
  ;
  ;
  ulOffset = ulChannel * (0x00000038 - 0x00000028);
  return ((*((volatile unsigned long *)(ulBase + 0x00000028 + ulOffset))));
}


x86 assembly (clang, -O0):
<EPINonBlockingReadCount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x28,%rax
add    -0x18(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPINonBlockingReadCount>:
shl    $0x4,%rsi
mov    0x28(%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @EPINonBlockingReadCount(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 %6, 16
store i64 %7, i64* %5
%8 = load i64, i64* %3
%9 = add i64 %8, 40
%10 = load i64, i64* %5
%11 = add i64 %9, %10
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @EPINonBlockingReadCount(i64 %0, i64 %1) {
%3 = shl i64 %1, 4
%4 = add i64 %0, 40
%5 = add i64 %4, %3
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
ret i64 %7
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  if (y < 1) {
    return 0;
  }
  while (x >= 0) {
    x = x - y;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    1149 <main+0x39>
movl   $0x0,-0x4(%rbp)
jmp    116d <main+0x5d>
jmp    114e <main+0x3e>
cmpl   $0x0,-0x8(%rbp)
jl     1166 <main+0x56>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    114e <main+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int getRank(void) {
  int rank;
  rank = 0;
  return rank;
}


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

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

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

LLVM IR (-O2):
define i32 @getRank() {
ret i32 0
}
int ffs(int i) {
  int bit = 1;
  while (1) {
    if (i == 0) {
      return 0;
    }
    if (i & 1) {
      break;
    }
    i >>= 1;
    ++bit;
  }
  return bit;
}


x86 assembly (clang, -O0):
<ffs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <ffs+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1155 <ffs+0x55>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1138 <ffs+0x38>
jmp    114f <ffs+0x4f>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <ffs+0xe>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffs>:
xor    %eax,%eax
test   %edi,%edi
je     1124 <ffs+0x24>
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
test   $0x1,%dil
jne    1125 <ffs+0x25>
mov    %edi,%edx
sar    %edx
add    $0x1,%ecx
cmp    $0x1,%edi
mov    %edx,%edi
ja     1110 <ffs+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ffs(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %8
%4 = phi i32 [ %10, %8 ], [ 1, %1 ]
%5 = phi i32 [ %9, %8 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = ashr i32 %5, 1
%10 = add nuw nsw i32 %4, 1
%11 = icmp ult i32 %5, 2
br i1 %11, label %12, label %3
12: ; preds = %8, %3, %1
%13 = phi i32 [ 0, %1 ], [ %4, %3 ], [ 0, %8 ]
ret i32 %13
}
/* Variables and functions */
void free_str_list(void *dst) {
  char **d;
  int i;
  if (!dst || !(*(char ***)(dst)))
    return;
  d = (*(char ***)(dst));
  (*(char ***)(dst)) = NULL;
}


x86 assembly (clang, -O0):
<free_str_list>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1121 <free_str_list+0x21>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1126 <free_str_list+0x26>
jmp    113c <free_str_list+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_str_list>:
test   %rdi,%rdi
je     1112 <free_str_list+0x12>
cmpq   $0x0,(%rdi)
je     1112 <free_str_list+0x12>
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @free_str_list(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i8***
%5 = load i8**, i8*** %4
%6 = icmp eq i8** %5, null
br i1 %6, label %8, label %7
7: ; preds = %3
store i8** null, i8*** %4
br label %8
8: ; preds = %1, %3, %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ debug_print_digest_len(int /*<<< orphan*/ *, unsigned char *,
                                          int);
void debug_print_digest_short(FILE *stream, unsigned char *digest) {
  debug_print_digest_len(stream, digest, 4);
}


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

x86 assembly (clang, -O2):
<debug_print_digest_short>:
mov    $0x4,%edx
jmp    1030 <debug_print_digest_len@plt>

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

LLVM IR (-O2):
define void @debug_print_digest_short(i32* %0, i8* %1) {
%3 = tail call i32 @debug_print_digest_len(i32* %0, i8* %1, i32 4)
ret void
}
unsigned int _bkdr_hash(const char *str) {
  unsigned int seed = 31;
  unsigned int hash = 0;
  unsigned char *p = (unsigned char *)str;
  while (*p)
    hash = hash * seed + (*p++);
  return hash;
}


x86 assembly (clang, -O0):
<_bkdr_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1f,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <_bkdr_hash+0x4e>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    111e <_bkdr_hash+0x1e>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bkdr_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <_bkdr_hash+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
movzbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <_bkdr_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_bkdr_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = mul i32 %7, 31
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = zext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
char *numeric_hex_to_bin(char value[]) { return ""; }


x86 assembly (clang, -O0):
<numeric_hex_to_bin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @numeric_hex_to_bin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @numeric_hex_to_bin(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ scale_up_coeffs(int, int, float *, int *);
int /*<<< orphan*/ xscale_calc_coeffs(int, int, float *, int *, float *);
void set_coeffs(int in_dim, int out_dim, float *coeffs, int *borders,
                float *tmp) {
  if (out_dim <= in_dim) {
    xscale_calc_coeffs(in_dim, out_dim, coeffs, borders, tmp);
  } else {
    scale_up_coeffs(in_dim, out_dim, coeffs, borders);
  }
}


x86 assembly (clang, -O0):
<set_coeffs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1162 <set_coeffs+0x42>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1030 <xscale_calc_coeffs@plt>
jmp    1175 <set_coeffs+0x55>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <scale_up_coeffs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_coeffs>:
cmp    %edi,%esi
jle    1129 <set_coeffs+0x9>
jmp    1040 <scale_up_coeffs@plt>
jmp    1030 <xscale_calc_coeffs@plt>

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

LLVM IR (-O2):
define void @set_coeffs(i32 %0, i32 %1, float* %2, i32* %3, float* %4) {
%6 = icmp sgt i32 %1, %0
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 @xscale_calc_coeffs(i32 %0, i32 %1, float* %2, i32* %3, float* %4)
br label %11
9: ; preds = %5
%10 = tail call i32 @scale_up_coeffs(i32 %0, i32 %1, float* %2, i32* %3)
br label %11
11: ; preds = %9, %7
ret void
}
void c_pomp_single_exit_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_single_exit_(%struct.ompregdescr* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned long gfx_pci_config_read(int);
unsigned long gfx_get_frame_buffer_base(void) {
  return gfx_pci_config_read(0x80000910);
}


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

x86 assembly (clang, -O2):
<gfx_get_frame_buffer_base>:
mov    $0x80000910,%edi
jmp    1030 <gfx_pci_config_read@plt>

LLVM IR (-O0):
define i64 @gfx_get_frame_buffer_base() {
%1 = call i64 @gfx_pci_config_read(i32 -2147481328)
ret i64 %1
}

LLVM IR (-O2):
define i64 @gfx_get_frame_buffer_base() {
%1 = tail call i64 @gfx_pci_config_read(i32 -2147481328)
ret i64 %1
}
char cast_uchar_char(unsigned char x) { return (char)x; }


x86 assembly (clang, -O0):
<cast_uchar_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @cast_uchar_char(i8 returned zeroext %0) {
ret i8 %0
}
double stat_int_dist_average(const int *v, int n) {
  assert(v);
  assert(n > 0);
  double s = stat_int_dist_sum(v, n);
  double total = stat_int_sum(v, n);
  return (s / total);
}


x86 assembly (clang, -O0):
<stat_int_dist_average>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <assert@plt>
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <stat_int_dist_sum@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <stat_int_sum@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat_int_dist_average>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <assert@plt>
xor    %edi,%edi
test   %ebp,%ebp
setg   %dil
xor    %eax,%eax
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <stat_int_dist_sum@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <stat_int_sum@plt>
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @stat_int_dist_average(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double
%6 = alloca double
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @assert to i32 (i32*, ...)*)(i32* %7)
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %11)
%13 = load i32*, i32** %3
%14 = load i32, i32* %4
%15 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @stat_int_dist_sum to i32 (i32*, i32, ...)*)(i32* %13, i32 %14)
%16 = sitofp i32 %15 to double
store double %16, double* %5
%17 = load i32*, i32** %3
%18 = load i32, i32* %4
%19 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @stat_int_sum to i32 (i32*, i32, ...)*)(i32* %17, i32 %18)
%20 = sitofp i32 %19 to double
store double %20, double* %6
%21 = load double, double* %5
%22 = load double, double* %6
%23 = fdiv double %21, %22
ret double %23
}

LLVM IR (-O2):
define double @stat_int_dist_average(i32* %0, i32 %1) {
%3 = tail call i32 (i32*, ...) bitcast (i32 (...)* @assert to i32 (i32*, ...)*)(i32* %0)
%4 = icmp sgt i32 %1, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %5)
%7 = tail call i32 (i32*, i32, ...) bitcast (i32 (...)* @stat_int_dist_sum to i32 (i32*, i32, ...)*)(i32* %0, i32 %1)
%8 = sitofp i32 %7 to double
%9 = tail call i32 (i32*, i32, ...) bitcast (i32 (...)* @stat_int_sum to i32 (i32*, i32, ...)*)(i32* %0, i32 %1)
%10 = sitofp i32 %9 to double
%11 = fdiv double %8, %10
ret double %11
}
/* Variables and functions */
int ENOSYS;
int xntrace_special(unsigned char id, unsigned long v) { return -ENOSYS; }


x86 assembly (clang, -O0):
<xntrace_special>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ed1(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @xntrace_special(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @xntrace_special(i8 zeroext %0, i64 %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int bits_setb(uint8_t *vec, size_t size, uint8_t bit) {
  if (size <= (size_t)(bit >> 3))
    return -1;
  *(vec + (bit >> 3)) |= (uint8_t)(1 << (bit & 0x07));
  return 1;
}


x86 assembly (clang, -O0):
<bits_setb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
ja     1131 <bits_setb+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <bits_setb+0x58>
mov    -0x1c(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_setb>:
mov    %edx,%eax
sar    $0x3,%eax
movslq %eax,%r8
mov    $0xffffffff,%eax
cmp    %rsi,%r8
jae    1127 <bits_setb+0x27>
and    $0x7,%dl
mov    $0x1,%esi
mov    %edx,%ecx
shl    %cl,%esi
mov    $0x1,%eax
or     %esi,(%rdi,%r8,4)
ret

LLVM IR (-O0):
define i32 @bits_setb(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i32
store i32* %0, i32** %5
store i64 %1, i64* %6
store i32 %2, i32* %7
%8 = load i64, i64* %6
%9 = load i32, i32* %7
%10 = ashr i32 %9, 3
%11 = sext i32 %10 to i64
%12 = icmp ule i64 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 -1, i32* %4
br label %25
14: ; preds = %3
%15 = load i32, i32* %7
%16 = and i32 %15, 7
%17 = shl i32 1, %16
%18 = load i32*, i32** %5
%19 = load i32, i32* %7
%20 = ashr i32 %19, 3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
%23 = load i32, i32* %22
%24 = or i32 %23, %17
store i32 %24, i32* %22
store i32 1, i32* %4
br label %25
25: ; preds = %14, %13
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @bits_setb(i32* nocapture %0, i64 %1, i32 %2) {
%4 = ashr i32 %2, 3
%5 = sext i32 %4 to i64
%6 = icmp ult i64 %5, %1
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = and i32 %2, 7
%9 = shl nuw nsw i32 1, %8
%10 = getelementptr inbounds i32, i32* %0, i64 %5
%11 = load i32, i32* %10
%12 = or i32 %11, %9
store i32 %12, i32* %10
br label %13
13: ; preds = %3, %7
%14 = phi i32 [ 1, %7 ], [ -1, %3 ]
ret i32 %14
}
double _Normal(double a, double b, double x) {
  return ((b - a) * x + a + b) / 2.;
}


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

x86 assembly (clang, -O2):
<_Normal>:
movapd %xmm1,%xmm3
subsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
mulsd  0xee4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @_Normal(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = load double, double* %6
%11 = load double, double* %4
%12 = call double @llvm.fmuladd.f64(double %9, double %10, double %11)
%13 = load double, double* %5
%14 = fadd double %12, %13
%15 = fdiv double %14, 2.000000e+00
ret double %15
}

LLVM IR (-O2):
define double @_Normal(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %0)
%6 = fadd double %5, %1
%7 = fmul double %6, 5.000000e-01
ret double %7
}
/* Variables and functions */
scalar_t__ floorf(float);
int /*<<< orphan*/ link_failure_floorf();
void test_floorf(float f) {
  if (floorf(f) != floorf(f))
    link_failure_floorf();
}


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

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

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

LLVM IR (-O2):
define void @test_floorf(float %0) {
%2 = tail call i64 @floorf(float %0)
%3 = tail call i64 @floorf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_floorf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("wav2adpcm: 16bit mono wav to aica adpcm and vice-versa (c)2002 BERO\n"
         " wav2adpcm -t <infile.wav> <outfile.wav>   (To adpcm)\n"
         " wav2adpcm -f <infile.wav> <outfile.wav>   (From adpcm)\n");
}


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

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [179 x i8] c"wav2adpcm: 16bit mono wav to aica adpcm and vice-versa (c)2002 BERO\0A wav2adpcm -t <infile.wav> <outfile.wav> (To adpcm)\0A wav2adpcm -f <infile.wav> <outfile.wav> (From adpcm)\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [178 x i8] c"wav2adpcm: 16bit mono wav to aica adpcm and vice-versa (c)2002 BERO\0A wav2adpcm -t <infile.wav> <outfile.wav> (To adpcm)\0A wav2adpcm -f <infile.wav> <outfile.wav> (From adpcm)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([178 x i8], [178 x i8]* @str, i64 0, i64 0))
ret void
}
int gcdint(int x, int y) {
  if (y == 0)
    return x;
  else
    gcdint(y, x % y);
}


x86 assembly (clang, -O0):
<gcdint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <gcdint+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <gcdint+0x34>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcdint@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcdint>:
test   %esi,%esi
je     111b <gcdint+0x1b>
mov    %esi,%edx
mov    %edi,%eax
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcdint+0x10>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcdint(i32 returned %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret i32 %0
}
long int labs(long int j) { return j >= 0 ? j : -j; }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jl     1120 <labs+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<labs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void mid(char ca[]) { printf("Middle elment is %d\n", ca[2]); }


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

x86 assembly (clang, -O2):
<mid>:
movsbl 0x2(%rdi),%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Middle elment is %d\0A\00"
define void @mid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 2
%5 = load i8, i8* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Middle elment is %d\0A\00"
define void @mid(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret void
}
const char *eraSofaVersion(void) { return "20190722"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"20190722\00"
define i8* @eraSofaVersion() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"20190722\00"
define i8* @eraSofaVersion() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
unsigned getval_445() { return 2430634312U; }


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

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

LLVM IR (-O0):
define i32 @getval_445() {
ret i32 -1864332984
}

LLVM IR (-O2):
define i32 @getval_445() {
ret i32 -1864332984
}
int main() {
  printf("%d\n", new_integer());
  int *number = new_integer_ptr();
  printf("%d\n", number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <new_integer@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <new_integer_ptr@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <new_integer@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <new_integer_ptr@plt>
movslq %eax,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @new_integer()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @new_integer_ptr()
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret i32 0
}
int muspcm_unpause(int slot) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @muspcm_unpause(i32 %0) {
ret i32 -1
}
void XtVaCreateManagedWidget() {}


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

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

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

LLVM IR (-O2):
define void @XtVaCreateManagedWidget() {
ret void
}
/* Variables and functions */
scalar_t__ fcitx_utils_isupper(char);
char fcitx_utils_tolower(char c) {
  return fcitx_utils_isupper(c) ? c - 'A' + 'a' : c;
}


x86 assembly (clang, -O0):
<fcitx_utils_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <fcitx_utils_isupper@plt>
cmp    $0x0,%rax
je     1143 <fcitx_utils_tolower+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <fcitx_utils_tolower+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @fcitx_utils_tolower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @fcitx_utils_isupper(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 65
%10 = add nsw i32 %9, 97
br label %14
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
br label %14
14: ; preds = %11, %6
%15 = phi i32 [ %10, %6 ], [ %13, %11 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @fcitx_utils_tolower(i8 signext %0) {
%2 = tail call i64 @fcitx_utils_isupper(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ append_slash(char *, int);
char *qe_pstrcat(char *, int, char const *);
int /*<<< orphan*/ qe_pstrcpy(char *, int, char const *);
char *makepath(char *buf, int buf_size, const char *path,
               const char *filename) {
  qe_pstrcpy(buf, buf_size, path);
  append_slash(buf, buf_size);
  return qe_pstrcat(buf, buf_size, filename);
}


x86 assembly (clang, -O0):
<makepath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1050 <qe_pstrcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <append_slash@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1040 <qe_pstrcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makepath>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <qe_pstrcpy@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <append_slash@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <qe_pstrcat@plt>

LLVM IR (-O0):
define i8* @makepath(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = call i32 @qe_pstrcpy(i8* %9, i32 %10, i8* %11)
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = call i32 @append_slash(i8* %13, i32 %14)
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = load i8*, i8** %8
%19 = call i8* @qe_pstrcat(i8* %16, i32 %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @makepath(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @qe_pstrcpy(i8* %0, i32 %1, i8* %2)
%6 = tail call i32 @append_slash(i8* %0, i32 %1)
%7 = tail call i8* @qe_pstrcat(i8* %0, i32 %1, i8* %3)
ret i8* %7
}