xunge/DecIR huggingface dataset:
unsigned ulog2(unsigned x) {
  unsigned r = 0;
  while (x >>= 1)
    r++;
  return r;
}


x86 assembly (clang, -O0):
<ulog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <ulog2+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ulog2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulog2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <ulog2+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <ulog2+0x10>
ret

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

LLVM IR (-O2):
define i32 @ulog2(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
double __ieee754_j1(double);
double j1(double x) { return __ieee754_j1(x); }


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

x86 assembly (clang, -O2):
<j1>:
jmp    1030 <__ieee754_j1@plt>

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

LLVM IR (-O2):
define double @j1(double %0) {
%2 = tail call double @__ieee754_j1(double %0)
ret double %2
}
char to_upper(char ch) { return ch & 95; }


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

x86 assembly (clang, -O2):
<to_upper>:
mov    %edi,%eax
and    $0x5f,%al
ret

LLVM IR (-O0):
define signext i8 @to_upper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 95
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @to_upper(i8 signext %0) {
%2 = and i8 %0, 95
ret i8 %2
}
void b(__complex__ char *y) { a(0, 0, 0, 0, 0, 0, *y); }


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    0x1(%rax),%al
mov    %cl,-0x10(%rbp)
mov    %al,-0xf(%rbp)
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movzwl -0x10(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <a@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %rax
movzwl (%rdi),%eax
mov    %eax,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
call   1030 <a@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @b({ i8, i8 }* %0) {
%2 = alloca { i8, i8 }*
%3 = alloca { i8, i8 }
store { i8, i8 }* %0, { i8, i8 }** %2
%4 = load { i8, i8 }*, { i8, i8 }** %2
%5 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %4, i32 0, i32 0
%6 = load i8, i8* %5
%7 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %4, i32 0, i32 1
%8 = load i8, i8* %7
%9 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %3, i32 0, i32 0
%10 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %3, i32 0, i32 1
store i8 %6, i8* %9
store i8 %8, i8* %10
%11 = bitcast { i8, i8 }* %3 to i16*
%12 = load i16, i16* %11
%13 = call i32 (i32, i32, i32, i32, i32, i32, i16, ...) bitcast (i32 (...)* @a to i32 (i32, i32, i32, i32, i32, i32, i16, ...)*)(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i16 %12)
ret void
}

LLVM IR (-O2):
define void @b({ i8, i8 }* nocapture %0) {
%2 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %0, i64 0, i32 0
%3 = load i8, i8* %2
%4 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %0, i64 0, i32 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = zext i8 %3 to i16
%9 = or i16 %7, %8
%10 = tail call i32 (i32, i32, i32, i32, i32, i32, i16, ...) bitcast (i32 (...)* @a to i32 (i32, i32, i32, i32, i32, i32, i16, ...)*)(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i16 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, void *);
void tp_print_param_void_ptr(char *name, void *value) {
  printf("\tvoid *%s = %p;\n", name, value);
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"\09void *%s = %p;\0A\00"
define void @tp_print_param_void_ptr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"\09void *%s = %p;\0A\00"
define void @tp_print_param_void_ptr(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
__attribute__((no, noclone)) short foo2(short arg) {
  short ret = 1;
  if (arg + 1 < ((!0) ? -(1 << (sizeof(char) * 8 - 1)) : 0) + 1 ||
      arg + 1 > ((!0) ? ((1 << (sizeof(char) * 8 - 1)) - 1)
                      : ((1 << (sizeof(char) * 8)) - 1)) -
                    1)
    return ret;
  arg = arg + 1;
  ret = (char)arg;
  return arg;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movw   $0x1,-0x6(%rbp)
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0xffffff81,%eax
jl     1131 <foo2+0x31>
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x7e,%eax
jle    113e <foo2+0x3e>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    115c <foo2+0x5c>
movswl -0x4(%rbp),%eax
add    $0x1,%eax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
movsbl %al,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
lea    0x1(%rdi),%ecx
add    $0xffffff82,%edi
movzwl %di,%eax
cmp    $0xff02,%eax
mov    $0x1,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i16 @foo2(i16 signext %0) {
%2 = add i16 %0, 1
%3 = add i16 %0, -126
%4 = icmp ult i16 %3, -254
%5 = select i1 %4, i16 1, i16 %2
ret i16 %5
}
void X509_EXTENSION_new(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_EXTENSION_new() {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare(const void *a, const void *b) {
  return strcmp(*(const char **)a, *(const char **)b);
}


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

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
long x_argument(char, char const *, char *);
long number_argument(const char *argument, char *arg) {
  return x_argument('.', argument, arg);
}


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

x86 assembly (clang, -O2):
<number_argument>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x2e,%edi
jmp    1030 <x_argument@plt>

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

LLVM IR (-O2):
define i64 @number_argument(i8* %0, i8* %1) {
%3 = tail call i64 @x_argument(i8 signext 46, i8* %0, i8* %1)
ret i64 %3
}
int _compare(const void *arg1, const void *arg2) {
  const unsigned long long *x = arg1, *y = arg2;
  if (*x > *y) {
    return 1;
  } else {
    return (*x < *y) ? -1 : 0;
  }
}


x86 assembly (clang, -O0):
<_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jbe    113c <_compare+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115a <_compare+0x5a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovb  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_compare>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
cmp    %rcx,%rax
sbb    %edx,%edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

LLVM IR (-O0):
define i32 @_compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %7
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = load i64*, i64** %7
%15 = load i64, i64* %14
%16 = icmp ugt i64 %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %26
18: ; preds = %2
%19 = load i64*, i64** %6
%20 = load i64, i64* %19
%21 = load i64*, i64** %7
%22 = load i64, i64* %21
%23 = icmp ult i64 %20, %22
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 -1, i32 0
store i32 %25, i32* %3
br label %26
26: ; preds = %18, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
%8 = icmp ult i64 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
struct atben_dsc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ atben_cycle(struct atben_dsc *);
int /*<<< orphan*/ wait_for_power();
void atben_reset_rf(void *handle) {
  struct atben_dsc *dsc = handle;
  atben_cycle(dsc);
  wait_for_power();
}


x86 assembly (clang, -O0):
<atben_reset_rf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atben_cycle@plt>
mov    $0x0,%al
call   1040 <wait_for_power@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.atben_dsc = type { i32 }
define void @atben_reset_rf(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.atben_dsc*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.atben_dsc*
store %struct.atben_dsc* %5, %struct.atben_dsc** %3
%6 = load %struct.atben_dsc*, %struct.atben_dsc** %3
%7 = call i32 @atben_cycle(%struct.atben_dsc* %6)
%8 = call i32 (...) @wait_for_power()
ret void
}

LLVM IR (-O2):
%struct.atben_dsc = type { i32 }
define void @atben_reset_rf(i8* %0) {
%2 = bitcast i8* %0 to %struct.atben_dsc*
%3 = tail call i32 @atben_cycle(%struct.atben_dsc* %2)
%4 = tail call i32 (...) @wait_for_power()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_sorted(int *, size_t);
int /*<<< orphan*/ shuffle(int *, size_t);
void bogo_sort(int *array, size_t n) {
  while (!is_sorted(array, n)) {
    shuffle(array, n);
  }
}


x86 assembly (clang, -O0):
<bogo_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <is_sorted@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1152 <bogo_sort+0x32>
jmp    1164 <bogo_sort+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <shuffle@plt>
jmp    1130 <bogo_sort+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bogo_sort>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
call   1040 <is_sorted@plt>
test   %eax,%eax
jne    114c <bogo_sort+0x2c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <shuffle@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
jmp    1130 <bogo_sort+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @bogo_sort(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %11, %2
%6 = load i32*, i32** %3
%7 = load i64, i64* %4
%8 = call i32 @is_sorted(i32* %6, i64 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %15
11: ; preds = %5
%12 = load i32*, i32** %3
%13 = load i64, i64* %4
%14 = call i32 @shuffle(i32* %12, i64 %13)
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @bogo_sort(i32* %0, i64 %1) {
%3 = tail call i32 @is_sorted(i32* %0, i64 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2, %5
%6 = tail call i32 @shuffle(i32* %0, i64 %1)
%7 = tail call i32 @is_sorted(i32* %0, i64 %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Swig_free(void *);
void _wrap_Swig_free_simple_193f74738ee49c34(void *_swig_go_0) {
  void *arg1 = (void *)0;
  arg1 = *(void **)&_swig_go_0;
  Swig_free(arg1);
}


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

x86 assembly (clang, -O2):
<_wrap_Swig_free_simple_193f74738ee49c34>:
jmp    1030 <Swig_free@plt>

LLVM IR (-O0):
define void @_wrap_Swig_free_simple_193f74738ee49c34(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @Swig_free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @_wrap_Swig_free_simple_193f74738ee49c34(i8* %0) {
%2 = tail call i32 @Swig_free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
unsigned int hweight32(unsigned long);
unsigned int hweight64(unsigned long);
unsigned int hweight_long(unsigned long a) {
  return sizeof(a) == 4 ? hweight32(a) : hweight64(a);
}


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

x86 assembly (clang, -O2):
<hweight_long>:
jmp    1030 <hweight64@plt>

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

LLVM IR (-O2):
define i32 @hweight_long(i64 %0) {
%2 = tail call i32 @hweight64(i64 %0)
ret i32 %2
}
/* Variables and functions */
double __nan();
double nan(char const *tagp) { return __nan(); }


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

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

LLVM IR (-O0):
define double @nan(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call double (...) @__nan()
ret double %3
}

LLVM IR (-O2):
define double @nan(i8* nocapture readnone %0) {
%2 = tail call double (...) @__nan()
ret double %2
}
void BN_get0_nist_prime_521(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_get0_nist_prime_521() {
ret void
}
void quicksort_shuffle(long *array, int length) {}


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

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

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

LLVM IR (-O2):
define void @quicksort_shuffle(i64* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct iterator_dlinkedlist {
  int dummy;
};
struct iterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct iterator_dlinkedlist *);
void dlinkedlist_iterator_free(struct iterator *iterator) {
  if (iterator == NULL) {
    return;
  }
  struct iterator_dlinkedlist *iterator2 =
      (struct iterator_dlinkedlist *)iterator;
  free(iterator2);
}


x86 assembly (clang, -O0):
<dlinkedlist_iterator_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <dlinkedlist_iterator_free+0x1c>
jmp    113d <dlinkedlist_iterator_free+0x2d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlinkedlist_iterator_free>:
test   %rdi,%rdi
je     111a <dlinkedlist_iterator_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.iterator = type { i32 }
%struct.iterator_dlinkedlist = type { i32 }
define void @dlinkedlist_iterator_free(%struct.iterator* %0) {
%2 = alloca %struct.iterator*
%3 = alloca %struct.iterator_dlinkedlist*
store %struct.iterator* %0, %struct.iterator** %2
%4 = load %struct.iterator*, %struct.iterator** %2
%5 = icmp eq %struct.iterator* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
br label %12
7: ; preds = %1
%8 = load %struct.iterator*, %struct.iterator** %2
%9 = bitcast %struct.iterator* %8 to %struct.iterator_dlinkedlist*
store %struct.iterator_dlinkedlist* %9, %struct.iterator_dlinkedlist** %3
%10 = load %struct.iterator_dlinkedlist*, %struct.iterator_dlinkedlist** %3
%11 = call i32 @free(%struct.iterator_dlinkedlist* %10)
br label %12
12: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.iterator = type { i32 }
%struct.iterator_dlinkedlist = type { i32 }
define void @dlinkedlist_iterator_free(%struct.iterator* %0) {
%2 = icmp eq %struct.iterator* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = bitcast %struct.iterator* %0 to %struct.iterator_dlinkedlist*
%5 = tail call i32 @free(%struct.iterator_dlinkedlist* %4)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Welcome to Closed Beta\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"Welcome to Closed Beta\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sum(int);
int main() {
  int i, n, num;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &num);
    sum(num);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1178 <main+0x58>
lea    0xea7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%edi
call   1030 <sum@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    116d <main+0x4d>
xor    %ebp,%ebp
lea    0xeb7(%rip),%r14
lea    0xc(%rsp),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
call   1030 <sum@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %0, %8
%9 = phi i32 [ %13, %8 ], [ 0, %0 ]
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = call i32 @sum(i32 %11)
%13 = add nuw nsw i32 %9, 1
%14 = load i32, i32* %1
%15 = icmp slt i32 %13, %14
br i1 %15, label %8, label %16
16: ; preds = %8, %0
ret i32 0
}
/* Variables and functions */
bool nrf52_errata_98(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_98() {
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
scalar_t__ testread(int, char **);
int main(int argc, char **argv) {
  if (testread(argc, argv))
    fprintf(stderr, "testread passed.\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <testread@plt>
cmp    $0x0,%rax
je     1161 <main+0x41>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <testread@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"testread passed.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i64 @testread(i32 %6, i8** %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %10, %2
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"testread passed.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @testread(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %2
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
int atoi(const char *str) {
  int result = 0;
  for (int i = 0; str[i] != '\0'; i++) {
    result = result * 10 + str[i] - '0';
  }
  return result;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1151 <atoi+0x51>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <atoi+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <atoi+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <atoi+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %24, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %27
13: ; preds = %5
%14 = load i32, i32* %3
%15 = mul nsw i32 %14, 10
%16 = load i8*, i8** %2
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = add nsw i32 %15, %21
%23 = sub nsw i32 %22, 48
store i32 %23, i32* %3
br label %24
24: ; preds = %13
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %5
27: ; preds = %5
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %1
%5 = phi i32 [ 0, %1 ], [ %13, %6 ]
ret i32 %5
6: ; preds = %1, %6
%7 = phi i64 [ %14, %6 ], [ 0, %1 ]
%8 = phi i8 [ %16, %6 ], [ %2, %1 ]
%9 = phi i32 [ %13, %6 ], [ 0, %1 ]
%10 = sext i8 %8 to i32
%11 = mul nsw i32 %9, 10
%12 = add i32 %11, -48
%13 = add i32 %12, %10
%14 = add nuw nsw i64 %7, 1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %4, label %6
}
/* Variables and functions */
double pow(int, double);
double fraction_HI(double z) { return 0.008 * pow(1 + z, 0.6); }


x86 assembly (clang, -O0):
<fraction_HI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeeb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xed2(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xeba(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fraction_HI>:
push   %rax
addsd  0xee7(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xee3(%rip),%xmm0
call   1030 <pow@plt>
mulsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fraction_HI(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double 1.000000e+00, %3
%5 = fptosi double %4 to i32
%6 = call double @pow(i32 %5, double 6.000000e-01)
%7 = fmul double 8.000000e-03, %6
ret double %7
}

LLVM IR (-O2):
define double @fraction_HI(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = fptosi double %2 to i32
%4 = tail call double @pow(i32 %3, double 6.000000e-01)
%5 = fmul double %4, 8.000000e-03
ret double %5
}
/* Variables and functions */
unsigned long thread_s_main();
unsigned long int main_thread() { return thread_s_main(); }


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

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

LLVM IR (-O0):
define i64 @main_thread() {
%1 = call i64 (...) @thread_s_main()
ret i64 %1
}

LLVM IR (-O2):
define i64 @main_thread() {
%1 = tail call i64 (...) @thread_s_main()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ iplc_sim_push_pipeline_stage();
void iplc_sim_process_pipeline_nop() { iplc_sim_push_pipeline_stage(); }


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

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

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

LLVM IR (-O2):
define void @iplc_sim_process_pipeline_nop() {
%1 = tail call i32 (...) @iplc_sim_push_pipeline_stage()
ret void
}
/* Variables and functions */
scalar_t__ ft_isdigit(int);
int ft_ishexa(int c) { return (ft_isdigit(c) || (c >= 'a' && c <= 'f')); }


x86 assembly (clang, -O0):
<ft_ishexa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ft_isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1154 <ft_ishexa+0x44>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     114e <ft_ishexa+0x3e>
cmpl   $0x66,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ishexa>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_isdigit@plt>
test   %rax,%rax
setne  %al
add    $0xffffff9f,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_ishexa(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ft_isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 102
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br label %14
14: ; preds = %12, %1
%15 = phi i1 [ true, %1 ], [ %13, %12 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_ishexa(i32 %0) {
%2 = tail call i64 @ft_isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = add i32 %0, -97
%5 = icmp ult i32 %4, 6
%6 = or i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int u_int32_t;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_le16(int, int /*<<< orphan*/ *);
void __put_unaligned_le32(u_int32_t val, u_char *p) {
  __put_unaligned_le16(val >> 16, p + 2);
  __put_unaligned_le16(val, p);
}


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

x86 assembly (clang, -O2):
<__put_unaligned_le32>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
sar    $0x10,%edi
add    $0x8,%rsi
call   1030 <__put_unaligned_le16@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__put_unaligned_le16@plt>

LLVM IR (-O0):
define void @__put_unaligned_le32(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 = ashr i32 %5, 16
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = call i32 @__put_unaligned_le16(i32 %6, i32* %8)
%10 = load i32, i32* %3
%11 = load i32*, i32** %4
%12 = call i32 @__put_unaligned_le16(i32 %10, i32* %11)
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_le32(i32 %0, i32* %1) {
%3 = ashr i32 %0, 16
%4 = getelementptr inbounds i32, i32* %1, i64 2
%5 = tail call i32 @__put_unaligned_le16(i32 %3, i32* %4)
%6 = tail call i32 @__put_unaligned_le16(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("cl_dx9_media_sharing_intel.h standalone test PASSED.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [54 x i8] c"cl_dx9_media_sharing_intel.h standalone test PASSED.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [53 x i8] c"cl_dx9_media_sharing_intel.h standalone test PASSED.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_60uint16_mem(unsigned short *val) {
  return ((*val) & (-0x60 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_60uint16_mem>:
movzwl (%rdi),%eax
test   $0xffa0,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_60uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -96
%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_60uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -96
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int *csr_fd(void) {
  static int csrsafe = 0;
  return &csrsafe;
}


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

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

LLVM IR (-O0):
@csr_fd.csrsafe = internal global i32 0
define i32* @csr_fd() {
ret i32* @csr_fd.csrsafe
}

LLVM IR (-O2):
@csr_fd.csrsafe = internal global i32 0
define i32* @csr_fd() {
ret i32* @csr_fd.csrsafe
}
/* Variables and functions */
int /*<<< orphan*/ thUnlockMutex(void *);
void thUnlockFastMutex(void *p) { thUnlockMutex(p); }


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

x86 assembly (clang, -O2):
<thUnlockFastMutex>:
jmp    1030 <thUnlockMutex@plt>

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

LLVM IR (-O2):
define void @thUnlockFastMutex(i8* %0) {
%2 = tail call i32 @thUnlockMutex(i8* %0)
ret void
}
int addNumbers(int n) {
  if (n != 0)
    return n + addNumbers(n - 1);
  else
    return n;
}


x86 assembly (clang, -O0):
<addNumbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1145 <addNumbers+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <addNumbers@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    114b <addNumbers+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addNumbers>:
test   %edi,%edi
je     1119 <addNumbers+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @addNumbers(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
void setval_210(unsigned *p) { *p = 3347663060U; }


x86 assembly (clang, -O0):
<setval_210>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xc78948d4,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setval_210>:
movl   $0xc78948d4,(%rdi)
ret

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

LLVM IR (-O2):
define void @setval_210(i32* nocapture writeonly %0) {
store i32 -947304236, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TerminalNewMode(int /*<<< orphan*/);
int /*<<< orphan*/ getconnmode();
void setconnmode() { TerminalNewMode(getconnmode()); }


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

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

LLVM IR (-O0):
define void @setconnmode() {
%1 = call i32 (...) @getconnmode()
%2 = call i32 @TerminalNewMode(i32 %1)
ret void
}

LLVM IR (-O2):
define void @setconnmode() {
%1 = tail call i32 (...) @getconnmode()
%2 = tail call i32 @TerminalNewMode(i32 %1)
ret void
}
void mvebu_cpu_clk_init(void) {}


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

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

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

LLVM IR (-O2):
define void @mvebu_cpu_clk_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ get_file_name(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int main() {
  free(get_file_name(NULL, NULL));
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1040 <get_file_name@plt>
mov    %eax,%edi
call   1030 <free@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <get_file_name@plt>
mov    %eax,%edi
call   1030 <free@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @get_file_name(i32* null, i32* null)
%3 = call i32 @free(i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @get_file_name(i32* null, i32* null)
%2 = tail call i32 @free(i32 %1)
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
reg0reg1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if (r0 <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     113b <reg0reg1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <reg0reg1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0reg1>:
movzwl %di,%ecx
movzwl %si,%edx
xor    %eax,%eax
cmp    %edx,%ecx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @reg0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = and i32 %0, 65535
%8 = and i32 %1, 65535
%9 = icmp ule i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
void *memmove(void *, void const *, int /*<<< orphan*/);
void *memcpy(void *dst, const void *src, uint n) {
  return memmove(dst, src, n);
}


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

x86 assembly (clang, -O2):
<memcpy>:
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define i8* @memcpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @memmove(i8* %0, i8* %1, i32 %2)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ edge(int const, int const, int const,
                        int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                        int /*<<< orphan*/ *);
void pencil_edge(const int rows, const int cols, const int step,
                 const uint8_t src[], uint8_t out[], uint8_t temp[]) {
  edge(rows, cols, step, src, out, temp);
}


x86 assembly (clang, -O0):
<pencil_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1030 <edge@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pencil_edge>:
jmp    1030 <edge@plt>

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

LLVM IR (-O2):
define void @pencil_edge(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5) {
%7 = tail call i32 @edge(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5)
ret void
}