xunge/DecIR huggingface dataset:
AIBV_plant_IMPL() {}


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

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

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

LLVM IR (-O2):
define i32 @AIBV_plant_IMPL() {
ret i32 undef
}
void EC_POINTs_mul(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_POINTs_mul() {
ret void
}
void free_3d_double(double ***p, int ndim1) {
  int i;
  free(p[0][0]);
  for (i = 0; i < ndim1; i++)
    free(p[i]);
  free(p);
}


x86 assembly (clang, -O0):
<free_3d_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <free_3d_double+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1135 <free_3d_double+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_3d_double>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
test   %ebp,%ebp
jle    1142 <free_3d_double+0x32>
mov    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <free_3d_double+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_3d_double(double*** nocapture %0, i32 %1) {
%3 = bitcast double*** %0 to i8***
%4 = load i8**, i8*** %3
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = icmp sgt i32 %1, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = zext i32 %1 to i64
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ 0, %7 ], [ %14, %9 ]
%11 = getelementptr inbounds double**, double*** %0, i64 %10
%12 = bitcast double*** %11 to i8**
%13 = load i8*, i8** %12
tail call void @free(i8* %13)
%14 = add nuw nsw i64 %10, 1
%15 = icmp eq i64 %14, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %2
%17 = bitcast double*** %0 to i8*
tail call void @free(i8* %17)
ret void
}
int main(void) {
  'x';
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int lm_add_lockspace_dlm(struct lockspace *ls, int adopt) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.lockspace = type opaque
define i32 @lm_add_lockspace_dlm(%struct.lockspace* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ adddep(char *);
void adddep2(char *file, char *line) { adddep(file); }


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

x86 assembly (clang, -O2):
<adddep2>:
jmp    1030 <adddep@plt>

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

LLVM IR (-O2):
define void @adddep2(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @adddep(i8* %0)
ret void
}
/* Type definitions */
struct t_hashtable {
  int dummy;
};
struct t_gui_completion {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_completion_list_add(struct t_gui_completion *,
                                           char const *, int /*<<< orphan*/,
                                           char *);
void completion_list_map_add_secured_data_cb(void *data,
                                             struct t_hashtable *hashtable,
                                             const void *key,
                                             const void *value) {
  (void)hashtable;
  (void)value;
  gui_completion_list_add((struct t_gui_completion *)data, (const char *)key, 0,
                          "sort");
}


x86 assembly (clang, -O0):
<completion_list_map_add_secured_data_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
lea    0xec7(%rip),%rcx
call   1030 <gui_completion_list_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<completion_list_map_add_secured_data_cb>:
lea    0xee9(%rip),%rcx
mov    %rdx,%rsi
xor    %edx,%edx
jmp    1030 <gui_completion_list_add@plt>

LLVM IR (-O0):
%struct.t_hashtable = type { i32 }
%struct.t_gui_completion = type { i32 }
@.str = [5 x i8] c"sort\00"
define void @completion_list_map_add_secured_data_cb(i8* %0, %struct.t_hashtable* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_hashtable*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store %struct.t_hashtable* %1, %struct.t_hashtable** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.t_hashtable*, %struct.t_hashtable** %6
%10 = load i8*, i8** %8
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to %struct.t_gui_completion*
%13 = load i8*, i8** %7
%14 = call i32 @gui_completion_list_add(%struct.t_gui_completion* %12, i8* %13, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.t_hashtable = type { i32 }
%struct.t_gui_completion = type { i32 }
@.str = [5 x i8] c"sort\00"
define void @completion_list_map_add_secured_data_cb(i8* %0, %struct.t_hashtable* nocapture readnone %1, i8* %2, i8* nocapture readnone %3) {
%5 = bitcast i8* %0 to %struct.t_gui_completion*
%6 = tail call i32 @gui_completion_list_add(%struct.t_gui_completion* %5, i8* %2, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned int uint16_t;

/* Variables and functions */
unsigned int crc16(unsigned int, unsigned char);
unsigned int calculate_crc16(unsigned char *data, unsigned char len) {
  uint16_t crc;
  unsigned char aux = 0;
  crc = 0xFFFF;
  while (aux < len) {
    crc = crc16(crc, data[aux]);
    aux++;
  }
  return crc;
}


x86 assembly (clang, -O0):
<calculate_crc16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movb   $0x0,-0x11(%rbp)
movl   $0xffff,-0x10(%rbp)
movzbl -0x11(%rbp),%eax
movzbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jge    1161 <calculate_crc16+0x51>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rax
movzbl -0x11(%rbp),%ecx
movzbl (%rax,%rcx,1),%esi
call   1030 <crc16@plt>
mov    %eax,-0x10(%rbp)
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    112d <calculate_crc16+0x1d>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_crc16>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1147 <calculate_crc16+0x37>
mov    %rdi,%r14
movzbl %sil,%r15d
mov    $0xffff,%eax
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%esi
mov    %eax,%edi
call   1030 <crc16@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <calculate_crc16+0x20>
jmp    114c <calculate_crc16+0x3c>
mov    $0xffff,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @calculate_crc16(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
store i8 0, i8* %6
store i32 65535, i32* %5
br label %7
7: ; preds = %13, %2
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %23
13: ; preds = %7
%14 = load i32, i32* %5
%15 = load i8*, i8** %3
%16 = load i8, i8* %6
%17 = zext i8 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = call i32 @crc16(i32 %14, i8 zeroext %19)
store i32 %20, i32* %5
%21 = load i8, i8* %6
%22 = add i8 %21, 1
store i8 %22, i8* %6
br label %7
23: ; preds = %7
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @calculate_crc16(i8* nocapture %0, i8 zeroext %1) {
%3 = icmp eq i8 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i8 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = phi i32 [ 65535, %4 ], [ %11, %6 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = tail call i32 @crc16(i32 %8, i8 zeroext %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = phi i32 [ 65535, %2 ], [ %11, %6 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_spinlock_t;

/* Variables and functions */
int /*<<< orphan*/ lksmith_postlock(void const *, int);
int lksmith_prelock(void const *, int /*<<< orphan*/);
int r_pthread_spin_lock(int /*<<< orphan*/ *);
int pthread_spin_lock(pthread_spinlock_t *lock) {
  int ret = lksmith_prelock((const void *)lock, 0);
  if (ret)
    return ret;
  ret = r_pthread_spin_lock(lock);
  lksmith_postlock((const void *)lock, ret);
  return ret;
}


x86 assembly (clang, -O0):
<pthread_spin_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <lksmith_prelock@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     115f <pthread_spin_lock+0x2f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117d <pthread_spin_lock+0x4d>
mov    -0x10(%rbp),%rdi
call   1030 <r_pthread_spin_lock@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <lksmith_postlock@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_spin_lock>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <lksmith_prelock@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1157 <pthread_spin_lock+0x27>
mov    %rbx,%rdi
call   1030 <r_pthread_spin_lock@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <lksmith_postlock@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @pthread_spin_lock(i32* %0) {
%2 = bitcast i32* %0 to i8*
%3 = tail call i32 @lksmith_prelock(i8* %2, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @r_pthread_spin_lock(i32* %0)
%7 = tail call i32 @lksmith_postlock(i8* %2, i32 %6)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %6, %5 ], [ %3, %1 ]
ret i32 %9
}
int test_imm_97int8_reg(signed char val) {
  return ((val) & (-0x97 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_97int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff69,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_97int8_reg(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, -151
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_97int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -151
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void free_order(int *order) { free(order); }


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

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

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

LLVM IR (-O2):
define void @free_order(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ roundl(long double);
long int lroundl(long double x) { return (long long int)roundl(x); }


x86 assembly (clang, -O0):
<lroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <roundl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lroundl>:
jmp    1030 <roundl@plt>

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

LLVM IR (-O2):
define i64 @lroundl(x86_fp80 %0) {
%2 = tail call i64 @roundl(x86_fp80 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ wBuiltinArrayBound(int /*<<< orphan*/);
void wBuiltinLBound() { wBuiltinArrayBound(0); }


x86 assembly (clang, -O0):
<wBuiltinLBound>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <wBuiltinArrayBound@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBuiltinLBound>:
xor    %edi,%edi
jmp    1030 <wBuiltinArrayBound@plt>

LLVM IR (-O0):
define void @wBuiltinLBound() {
%1 = call i32 @wBuiltinArrayBound(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBuiltinLBound() {
%1 = tail call i32 @wBuiltinArrayBound(i32 0)
ret void
}
void foo115() {}


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

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

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

LLVM IR (-O2):
define void @foo115() {
ret void
}
/* Variables and functions */
int strlen(char *);
double strtod(char *, char **);
double __GLeeGetVersionNumber(char *versionStr) {
  char *endPtr = &versionStr[strlen(versionStr) - 1];
  return strtod(versionStr, &endPtr) + 0.01;
}


x86 assembly (clang, -O0):
<__GLeeGetVersionNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <strtod@plt>
movsd  0xe9b(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__GLeeGetVersionNumber>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <strlen@plt>
cltq
add    %rbx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strtod@plt>
addsd  0xeb0(%rip),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @__GLeeGetVersionNumber(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sub nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
store i8* %9, i8** %3
%10 = load i8*, i8** %2
%11 = call double @strtod(i8* %10, i8** %3)
%12 = fadd double %11, 1.000000e-02
ret double %12
}

LLVM IR (-O2):
define double @__GLeeGetVersionNumber(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8* %7, i8** %2
%8 = call double @strtod(i8* %0, i8** %2)
%9 = fadd double %8, 1.000000e-02
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void noCh(char arr[]) {
  int i, chCt = 0;
  for (i = 0; arr[i] != '\0'; i++) {
    chCt++;
  }
  printf("There are %d characters in the sentence.\n", chCt);
}


x86 assembly (clang, -O0):
<noCh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1156 <noCh+0x46>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <noCh+0x1a>
mov    -0x10(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noCh>:
cmpb   $0x0,(%rdi)
je     1137 <noCh+0x27>
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rsi,1)
lea    0x1(%rsi),%rsi
jne    1120 <noCh+0x10>
lea    0xece(%rip),%rdi
jmp    1030 <printf@plt>
xor    %esi,%esi
lea    0xec0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"There are %d characters in the sentence.\0A\00"
define void @noCh(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%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 %19
13: ; preds = %5
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %16
16: ; preds = %13
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %5
19: ; preds = %5
%20 = load i32, i32* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %20)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"There are %d characters in the sentence.\0A\00"
define void @noCh(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ 0, %1 ]
%6 = add nuw nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %6 to i32
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 0, %1 ], [ %11, %10 ]
%14 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %13)
ret void
}
/* Variables and functions */
int absolute(int);
int getIntLen(int x) {
  int len = 0;
  x = absolute(x);
  while (x > 0) {
    x /= 10;
    len++;
  }
  return (len) ? len : 1;
}


x86 assembly (clang, -O0):
<getIntLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <absolute@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1153 <getIntLen+0x43>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <getIntLen+0x1d>
cmpl   $0x0,-0x8(%rbp)
je     1168 <getIntLen+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1175 <getIntLen+0x65>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1175 <getIntLen+0x65>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getIntLen>:
push   %rax
call   1030 <absolute@plt>
test   %eax,%eax
jle    1146 <getIntLen+0x36>
mov    %eax,%ecx
xor    %eax,%eax
mov    $0xcccccccd,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ecx,%esi
imul   %rdx,%rsi
shr    $0x23,%rsi
add    $0x1,%eax
cmp    $0x9,%ecx
mov    %esi,%ecx
ja     1130 <getIntLen+0x20>
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getIntLen(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @absolute(i32 %4)
store i32 %5, i32* %2
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 10
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %6
14: ; preds = %6
%15 = load i32, i32* %3
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = load i32, i32* %3
br label %20
19: ; preds = %14
br label %20
20: ; preds = %19, %17
%21 = phi i32 [ %18, %17 ], [ 1, %19 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @getIntLen(i32 %0) {
%2 = tail call i32 @absolute(i32 %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32 [ %7, %4 ], [ %2, %1 ]
%7 = udiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = icmp ult i32 %6, 10
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %11
}
unsigned long UnlockSCURegHost(unsigned long MMIOBase, unsigned long Key) {
  *(volatile unsigned long *)((unsigned long)(0x1E6E0000) +
                              (unsigned long)(0x00 + 0x2000)) =
      (unsigned long)(Key);
  return *(volatile unsigned long *)((unsigned long)(0x1E6E0000) +
                                     (unsigned long)(0x00 + 0x2000));
}


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

x86 assembly (clang, -O2):
<UnlockSCURegHost>:
mov    %rsi,0x1e6e2000
1e
mov    0x1e6e2000,%rax
1e
ret

LLVM IR (-O0):
define i64 @UnlockSCURegHost(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
store volatile i64 %5, i64* inttoptr (i64 510533632 to i64*)
%6 = load volatile i64, i64* inttoptr (i64 510533632 to i64*)
ret i64 %6
}

LLVM IR (-O2):
define i64 @UnlockSCURegHost(i64 %0, i64 %1) {
store volatile i64 %1, i64* inttoptr (i64 510533632 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 510533632 to i64*)
ret i64 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

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

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


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

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

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

LLVM IR (-O2):
define void @set_XColormapEvent_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void crash_notes_save_cpus(void) {}


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

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

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

LLVM IR (-O2):
define void @crash_notes_save_cpus() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AnalyzeKeys(int *);
int /*<<< orphan*/ Interface();
void Execute() {
  int key;
  while (1) {
    Interface();
    AnalyzeKeys(&key);
  }
}


x86 assembly (clang, -O0):
<Execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Interface@plt>
lea    -0x4(%rbp),%rdi
call   1040 <AnalyzeKeys@plt>
jmp    1128 <Execute+0x8>

x86 assembly (clang, -O2):
<Execute>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <Interface@plt>
mov    %rbx,%rdi
call   1040 <AnalyzeKeys@plt>
jmp    1130 <Execute+0x10>

LLVM IR (-O0):
define void @Execute() {
%1 = alloca i32
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @Interface()
%4 = call i32 @AnalyzeKeys(i32* %1)
br label %2
}

LLVM IR (-O2):
define void @Execute() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @Interface()
%5 = call i32 @AnalyzeKeys(i32* %1)
br label %3
}
char func_c() { return 'c'; }


x86 assembly (clang, -O0):
<func_c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x63,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_c>:
mov    $0x63,%al
ret

LLVM IR (-O0):
define signext i8 @func_c() {
ret i8 99
}

LLVM IR (-O2):
define signext i8 @func_c() {
ret i8 99
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
void nocrash_getc() {
  FILE *f;
  int i;
  f = fopen("this_file_doesnt_exist", "r");
  if (f) {
    i = getc(f);
    printf("i =%i\n", i);
    fclose(f);
  }
}


x86 assembly (clang, -O0):
<nocrash_getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     118e <nocrash_getc+0x4e>
mov    -0x8(%rbp),%rdi
call   1060 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nocrash_getc>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     117b <nocrash_getc+0x3b>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <getc@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @nocrash_getc() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %13
6: ; preds = %0
%7 = load i32*, i32** %1
%8 = call i32 @getc(i32* %7)
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = load i32*, i32** %1
%12 = call i32 @fclose(i32* %11)
br label %13
13: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @nocrash_getc() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @getc(i32* %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = tail call i32 @fclose(i32* %1)
br label %7
7: ; preds = %3, %0
ret void
}
int seqgt2(unsigned long a, unsigned short win, unsigned long b) {
  long l = ((a + win) - b);
  return l > 0;
}


x86 assembly (clang, -O0):
<seqgt2>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movzwl -0xa(%rbp),%ecx
add    %rcx,%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<seqgt2>:
mov    %esi,%ecx
add    %rdi,%rcx
sub    %rdx,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setg   %al
ret

LLVM IR (-O0):
define i32 @seqgt2(i64 %0, i16 zeroext %1, i64 %2) {
%4 = alloca i64
%5 = alloca i16
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i16 %1, i16* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i16, i16* %5
%10 = zext i16 %9 to i64
%11 = add i64 %8, %10
%12 = load i64, i64* %6
%13 = sub i64 %11, %12
store i64 %13, i64* %7
%14 = load i64, i64* %7
%15 = icmp sgt i64 %14, 0
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @seqgt2(i64 %0, i16 zeroext %1, i64 %2) {
%4 = zext i16 %1 to i64
%5 = add i64 %4, %0
%6 = sub i64 %5, %2
%7 = icmp sgt i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
void RTco_signal(__attribute__((unused)) int sid) {}


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

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

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

LLVM IR (-O2):
define void @RTco_signal(i32 %0) {
ret void
}
/* Type definitions */
struct connInfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ writeErrorMsg(struct connInfo *, int, int /*<<< orphan*/ *);
void writeError(struct connInfo *info, int errNo) {
  writeErrorMsg(info, errNo, NULL);
}


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

x86 assembly (clang, -O2):
<writeError>:
xor    %edx,%edx
jmp    1030 <writeErrorMsg@plt>

LLVM IR (-O0):
%struct.connInfo = type { i32 }
define void @writeError(%struct.connInfo* %0, i32 %1) {
%3 = alloca %struct.connInfo*
%4 = alloca i32
store %struct.connInfo* %0, %struct.connInfo** %3
store i32 %1, i32* %4
%5 = load %struct.connInfo*, %struct.connInfo** %3
%6 = load i32, i32* %4
%7 = call i32 @writeErrorMsg(%struct.connInfo* %5, i32 %6, i32* null)
ret void
}

LLVM IR (-O2):
%struct.connInfo = type { i32 }
define void @writeError(%struct.connInfo* %0, i32 %1) {
%3 = tail call i32 @writeErrorMsg(%struct.connInfo* %0, i32 %1, i32* null)
ret void
}
void wpa_supplicant_dbus_notify_certification(struct wpa_supplicant *wpa_s,
                                              int depth, const char *subject,
                                              const char *cert_hash,
                                              const struct wpabuf *cert) {}


x86 assembly (clang, -O0):
<wpa_supplicant_dbus_notify_certification>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%struct.wpabuf = type opaque
define void @wpa_supplicant_dbus_notify_certification(%struct.wpa_supplicant* %0, i32 %1, i8* %2, i8* %3, %struct.wpabuf* %4) {
%6 = alloca %struct.wpa_supplicant*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca %struct.wpabuf*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store %struct.wpabuf* %4, %struct.wpabuf** %10
ret void
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpabuf = type opaque
define void @wpa_supplicant_dbus_notify_certification(%struct.wpa_supplicant* nocapture %0, i32 %1, i8* nocapture %2, i8* nocapture %3, %struct.wpabuf* nocapture %4) {
ret void
}
void GetClockTicks(double *t) {
  unsigned long lo, hi;
  __asm__ __volatile__(
      "rdtsc ;		movl %%eax, %0 ;		movl %%edx, %1 "
      :
      : "m"(lo), "m"(hi));
  *t = (double)lo + (double)0xFFFFFFFF * hi;
}


x86 assembly (clang, -O0):
<GetClockTicks>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
rdtsc
mov    %eax,-0x10(%rbp)
mov    %edx,-0x18(%rbp)
movaps 0xef9(%rip),%xmm3
movq   -0x10(%rbp),%xmm1
punpckldq %xmm3,%xmm1
movapd 0xef8(%rip),%xmm2
subpd  %xmm2,%xmm1
movaps %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  %xmm0,%xmm1
movq   -0x18(%rbp),%xmm0
punpckldq %xmm3,%xmm0
subpd  %xmm2,%xmm0
movaps %xmm0,%xmm2
unpckhpd %xmm0,%xmm0
addsd  %xmm2,%xmm0
movsd  0xea9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetClockTicks>:
rdtsc
mov    %eax,-0x8(%rsp)
mov    %edx,-0x10(%rsp)
movapd 0xeee(%rip),%xmm0
movsd  -0x8(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movapd 0xeed(%rip),%xmm2
subpd  %xmm2,%xmm1
movapd %xmm1,%xmm3
unpckhpd %xmm1,%xmm3
addsd  %xmm1,%xmm3
movsd  -0x10(%rsp),%xmm1
unpcklps %xmm0,%xmm1
subpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  0xecc(%rip),%xmm0
addsd  %xmm3,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @GetClockTicks(double* %0) {
%2 = alloca double*
%3 = alloca i64
%4 = alloca i64
store double* %0, double** %2
%5 = load i64, i64* %3
%6 = uitofp i64 %5 to double
%7 = load i64, i64* %4
%8 = uitofp i64 %7 to double
%9 = call double @llvm.fmuladd.f64(double 0x41EFFFFFFFE00000, double %8, double %6)
%10 = load double*, double** %2
store double %9, double* %10
ret void
}

LLVM IR (-O2):
define void @GetClockTicks(double* nocapture writeonly %0) {
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = load i64, i64* %2
%7 = uitofp i64 %6 to double
%8 = load i64, i64* %3
%9 = uitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 0x41EFFFFFFFE00000, double %7)
store double %10, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int is_valid_item(int option, int num_items, int min_items) {
  int valid = 0;
  if ((option >= min_items) && (option <= num_items)) {
    valid = 1;
  } else {
    printf("Please enter valid input.\n");
  }
  return valid;
}


x86 assembly (clang, -O0):
<is_valid_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     114c <is_valid_item+0x3c>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114c <is_valid_item+0x3c>
movl   $0x1,-0x10(%rbp)
jmp    1158 <is_valid_item+0x48>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_item>:
cmp    %esi,%edi
jg     111e <is_valid_item+0xe>
mov    $0x1,%eax
cmp    %edx,%edi
jl     111e <is_valid_item+0xe>
ret
push   %rax
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Please enter valid input.\0A\00"
define i32 @is_valid_item(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %7
br label %18
16: ; preds = %11, %3
%17 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %15
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@str = [26 x i8] c"Please enter valid input.\00"
define i32 @is_valid_item(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %2
%5 = icmp sgt i32 %0, %1
%6 = or i1 %5, %4
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ colog_operation(char *);
int /*<<< orphan*/ colog_show_result();
int colog_analysis(char *filename) {
  colog_operation(filename);
  colog_show_result();
  return (0);
}


x86 assembly (clang, -O0):
<colog_analysis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <colog_operation@plt>
mov    $0x0,%al
call   1030 <colog_show_result@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colog_analysis>:
push   %rax
call   1040 <colog_operation@plt>
xor    %eax,%eax
call   1030 <colog_show_result@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @colog_analysis(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @colog_operation(i8* %3)
%5 = call i32 (...) @colog_show_result()
ret i32 0
}

LLVM IR (-O2):
define i32 @colog_analysis(i8* %0) {
%2 = tail call i32 @colog_operation(i8* %0)
%3 = tail call i32 (...) @colog_show_result()
ret i32 0
}
void interrupt_usage_fault(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @interrupt_usage_fault() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_get_inner_normal(int n, int i, double *normal) {
  int *b, fail;
  fail = _ada_use_c2phc(87, &i, b, normal);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_get_inner_normal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x57,%edi
lea    -0x8(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_get_inner_normal>:
push   %rax
mov    %rdx,%rcx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x57,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @celcon_get_inner_normal(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
store i32 %1, i32* %4
%5 = call i32 @_ada_use_c2phc(i32 87, i32* %4, i32* undef, double* %2)
ret i32 %5
}
/* Type definitions */
union bpf_attr {
  int map_fd;
  void *next_key;
  void *key;
};
typedef int /*<<< orphan*/ attr;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_GET_NEXT_KEY;
int /*<<< orphan*/ bzero(union bpf_attr *, int);
void *ptr_to_u64(void *);
int sys_bpf(int /*<<< orphan*/, union bpf_attr *, int);
int bpf_map_get_next_key(int fd, const void *key, void *next_key) {
  union bpf_attr attr;
  bzero(&attr, sizeof(attr));
  attr.map_fd = fd;
  attr.key = ptr_to_u64(key);
  attr.next_key = ptr_to_u64(next_key);
  return sys_bpf(BPF_MAP_GET_NEXT_KEY, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_map_get_next_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x8,%esi
call   1050 <bzero@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ptr_to_u64@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <ptr_to_u64@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1030 <sys_bpf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_map_get_next_key>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rsi,%rdi
call   1040 <ptr_to_u64@plt>
mov    %rbx,%rdi
call   1040 <ptr_to_u64@plt>
mov    %rax,0x8(%rsp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
mov    $0x8,%edx
call   1030 <sys_bpf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%union.bpf_attr = type { i8* }
@BPF_MAP_GET_NEXT_KEY = global i32 0
define i32 @bpf_map_get_next_key(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %union.bpf_attr
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = call i32 @bzero(%union.bpf_attr* %7, i32 8)
%9 = load i32, i32* %4
%10 = bitcast %union.bpf_attr* %7 to i32*
store i32 %9, i32* %10
%11 = load i8*, i8** %5
%12 = call i8* @ptr_to_u64(i8* %11)
%13 = bitcast %union.bpf_attr* %7 to i8**
store i8* %12, i8** %13
%14 = load i8*, i8** %6
%15 = call i8* @ptr_to_u64(i8* %14)
%16 = bitcast %union.bpf_attr* %7 to i8**
store i8* %15, i8** %16
%17 = load i32, i32* @BPF_MAP_GET_NEXT_KEY
%18 = call i32 @sys_bpf(i32 %17, %union.bpf_attr* %7, i32 8)
ret i32 %18
}

LLVM IR (-O2):
%union.bpf_attr = type { i8* }
@BPF_MAP_GET_NEXT_KEY = global i32 0
define i32 @bpf_map_get_next_key(i32 %0, i8* %1, i8* %2) {
%4 = alloca %union.bpf_attr
%5 = bitcast %union.bpf_attr* %4 to i8*
%6 = tail call i8* @ptr_to_u64(i8* %1)
%7 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %4, i64 0, i32 0
%8 = tail call i8* @ptr_to_u64(i8* %2)
store i8* %8, i8** %7
%9 = load i32, i32* @BPF_MAP_GET_NEXT_KEY
%10 = call i32 @sys_bpf(i32 %9, %union.bpf_attr* %4, i32 8)
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ CONF;

/* Variables and functions */
int def_to_int(const CONF *conf, char c) { return c - '0'; }


x86 assembly (clang, -O0):
<def_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
sub    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_to_int>:
lea    -0x30(%rsi),%eax
ret

LLVM IR (-O0):
define i32 @def_to_int(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 48
ret i32 %7
}

LLVM IR (-O2):
define i32 @def_to_int(i32* nocapture readnone %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = add nsw i32 %3, -48
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
void childend(int signo) { wait(NULL); }


x86 assembly (clang, -O0):
<childend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <wait@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<childend>:
xor    %edi,%edi
jmp    1030 <wait@plt>

LLVM IR (-O0):
define void @childend(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @wait(i32* null)
ret void
}

LLVM IR (-O2):
define void @childend(i32 %0) {
%2 = tail call i32 @wait(i32* null)
ret void
}
adrx0imm1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (((short *)10000000)[x0]) = 33; }


x86 assembly (clang, -O0):
<adrx0imm1_set>:
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)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movw   $0x21,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0imm1_set>:
movslq %edx,%rax
movw   $0x21,0x989680(%rax,%rax,1)
ret

LLVM IR (-O0):
define i32 @adrx0imm1_set(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 i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %17
store i16 33, i16* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @adrx0imm1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %7
store i16 33, i16* %8
ret i32 undef
}
int compare(const void *a, const void *b) { return (*(int *)b - *(int *)a); }


x86 assembly (clang, -O0):
<compare>:
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):
<compare>:
mov    (%rsi),%eax
sub    (%rdi),%eax
ret

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** %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 @compare(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
}