xunge/DecIR huggingface dataset:
/* Variables and functions */
double pow_pos(int, double);
double u_eq44(int, double);
double g_eq43_c0(int l, double r, double q, double a) {
  double r1 = 1.0 / r;
  double r1_l1 = pow_pos(l + 1, r1);
  return q * r1_l1 * u_eq44(2 * l, a * r);
}


x86 assembly (clang, -O0):
<g_eq43_c0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  0xebe(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
movsd  -0x28(%rbp),%xmm0
call   1040 <pow_pos@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
movsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <u_eq44@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_eq43_c0>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x8(%rsp)
movapd %xmm0,%xmm1
movsd  %xmm0,0x10(%rsp)
mov    %edi,%ebx
movsd  0xebb(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0x1(%rbx),%edi
call   1040 <pow_pos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
add    %ebx,%ebx
movsd  0x18(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
mov    %ebx,%edi
call   1030 <u_eq44@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @g_eq43_c0(i32 %0, double %1, double %2, double %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %6
%12 = fdiv double 1.000000e+00, %11
store double %12, double* %9
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = load double, double* %9
%16 = call double @pow_pos(i32 %14, double %15)
store double %16, double* %10
%17 = load double, double* %7
%18 = load double, double* %10
%19 = fmul double %17, %18
%20 = load i32, i32* %5
%21 = mul nsw i32 2, %20
%22 = load double, double* %8
%23 = load double, double* %6
%24 = fmul double %22, %23
%25 = call double @u_eq44(i32 %21, double %24)
%26 = fmul double %19, %25
ret double %26
}

LLVM IR (-O2):
define double @g_eq43_c0(i32 %0, double %1, double %2, double %3) {
%5 = fdiv double 1.000000e+00, %1
%6 = add nsw i32 %0, 1
%7 = tail call double @pow_pos(i32 %6, double %5)
%8 = fmul double %7, %2
%9 = shl nsw i32 %0, 1
%10 = fmul double %1, %3
%11 = tail call double @u_eq44(i32 %9, double %10)
%12 = fmul double %8, %11
ret double %12
}
int _constexpr_assert_failure(const char *msg) {
  static int i = 0;
  return i;
}


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

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

LLVM IR (-O0):
@_constexpr_assert_failure.i = internal global i32 0
define i32 @_constexpr_assert_failure(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @_constexpr_assert_failure.i
ret i32 %3
}

LLVM IR (-O2):
define i32 @_constexpr_assert_failure(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
void *dlopen(char *, int /*<<< orphan*/);
void *malloc(int);
void *LoadIpv4() {
  void *IpLib = malloc(sizeof(void));
  IpLib = dlopen("./ipv4_lib.so", RTLD_LAZY);
  if (!IpLib)
    return 0;
  else
    return IpLib;
}


x86 assembly (clang, -O0):
<LoadIpv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xeba(%rip),%rdi
call   1030 <dlopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1167 <LoadIpv4+0x47>
movq   $0x0,-0x8(%rbp)
jmp    116f <LoadIpv4+0x4f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadIpv4>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <dlopen@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"./ipv4_lib.so\00"
@RTLD_LAZY = global i32 0
define i8* @LoadIpv4() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @malloc(i32 1)
store i8* %3, i8** %2
%4 = load i32, i32* @RTLD_LAZY
%5 = call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %0
store i8* null, i8** %1
br label %11
9: ; preds = %0
%10 = load i8*, i8** %2
store i8* %10, i8** %1
br label %11
11: ; preds = %9, %8
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
@.str = [14 x i8] c"./ipv4_lib.so\00"
@RTLD_LAZY = global i32 0
define i8* @LoadIpv4() {
%1 = load i32, i32* @RTLD_LAZY
%2 = tail call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %2
}
int fnmatch(const char *pattern, const char *string, int flags) { return -1; }


x86 assembly (clang, -O0):
<fnmatch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fnmatch(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
ret i32 -1
}

LLVM IR (-O2):
define i32 @fnmatch(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void countTillThisNum(int num) {
  int *ptr = &num;
  if (*ptr == 0)
    return;
  countTillThisNum(*ptr - 1);
  printf("%d\n", *ptr);
}


x86 assembly (clang, -O0):
<countTillThisNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1145 <countTillThisNum+0x25>
jmp    1165 <countTillThisNum+0x45>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
sub    $0x1,%edi
call   1030 <countTillThisNum@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countTillThisNum>:
test   %edi,%edi
je     113e <countTillThisNum+0x1e>
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <countTillThisNum@plt>
lea    0xeca(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @countTillThisNum(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1, %4
ret void
4: ; preds = %1
%5 = add nsw i32 %0, -1
tail call void @countTillThisNum(i32 %5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
double *double_alloc(int n) {
  double *v;
  if ((v = (double *)malloc(n * sizeof(double))) == NULL) {
    fprintf(stderr, "FATAL ERROR: Out of memory\n");
    exit(1);
  }
  return v;
}


x86 assembly (clang, -O0):
<double_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1177 <double_alloc+0x47>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_alloc>:
push   %rax
shl    $0x3,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <double_alloc+0x10>
pop    %rcx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define double* @double_alloc(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to double*
store double* %9, double** %3
%10 = icmp eq double* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = load double*, double** %3
ret double* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define double* @double_alloc(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %3 to double*
ret double* %10
}
/* Variables and functions */
int /*<<< orphan*/ pr_inf_skip(char *, char const *);
int stress_pidfd_supported(const char *name) {
  pr_inf_skip(
      "%s: stressor will be skipped, system call not supported at build time\n",
      name);
  return -1;
}


x86 assembly (clang, -O0):
<stress_pidfd_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <pr_inf_skip@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_pidfd_supported>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <pr_inf_skip@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [71 x i8] c"%s: stressor will be skipped, system call not supported at build time\0A\00"
define i32 @stress_pidfd_supported(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @pr_inf_skip(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 -1
}

LLVM IR (-O2):
@.str = [71 x i8] c"%s: stressor will be skipped, system call not supported at build time\0A\00"
define i32 @stress_pidfd_supported(i8* %0) {
%2 = tail call i32 @pr_inf_skip(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 -1
}
/* Variables and functions */
int backtrace(void **, int);
int dl_get_stack_depth(void) {
  static void *tmp[50];
  int res = backtrace(tmp, 50) - 12;
  return res < 0 ? 0 : res;
}


x86 assembly (clang, -O0):
<dl_get_stack_depth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f21(%rip),%rdi
mov    $0x32,%esi
call   1030 <backtrace@plt>
sub    $0xc,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1143 <dl_get_stack_depth+0x33>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <dl_get_stack_depth+0x39>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dl_get_stack_depth>:
push   %rax
lea    0x2f28(%rip),%rdi
mov    $0x32,%esi
call   1030 <backtrace@plt>
cmp    $0xd,%eax
mov    $0xc,%ecx
cmovl  %ecx,%eax
add    $0xfffffff4,%eax
pop    %rcx
ret

LLVM IR (-O0):
@dl_get_stack_depth.tmp = internal global [50 x i8*] zeroinitializer
define i32 @dl_get_stack_depth() {
%1 = alloca i32
%2 = call i32 @backtrace(i8** getelementptr inbounds ([50 x i8*], [50 x i8*]* @dl_get_stack_depth.tmp, i64 0, i64 0), i32 50)
%3 = sub nsw i32 %2, 12
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
br label %9
7: ; preds = %0
%8 = load i32, i32* %1
br label %9
9: ; preds = %7, %6
%10 = phi i32 [ 0, %6 ], [ %8, %7 ]
ret i32 %10
}

LLVM IR (-O2):
@dl_get_stack_depth.tmp = internal global [50 x i8*] zeroinitializer
define i32 @dl_get_stack_depth() {
%1 = tail call i32 @backtrace(i8** getelementptr inbounds ([50 x i8*], [50 x i8*]* @dl_get_stack_depth.tmp, i64 0, i64 0), i32 50)
%2 = icmp sgt i32 %1, 12
%3 = select i1 %2, i32 %1, i32 12
%4 = add nsw i32 %3, -12
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mytool1_print(char *);
int main(int argc, char **argv) {
  mytool1_print("hello");
  mytool1_print("hello");
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @mytool1_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @mytool1_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mytool1_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @mytool1_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int clean_buff(const int fd, char **buff_p, char *(*buff_sp)[8192]) {
  free(*buff_p);
  *buff_p = 0;
  (*buff_sp)[fd] = 0;
  return (0);
}


x86 assembly (clang, -O0):
<clean_buff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_buff>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
movslq %ebp,%rax
movq   $0x0,(%r14,%rax,8)
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @clean_buff(i32 %0, i8** %1, [8192 x i8*]* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8192 x i8*]*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store [8192 x i8*]* %2, [8192 x i8*]** %6
%7 = load i8**, i8*** %5
%8 = load i8*, i8** %7
%9 = call i32 @free(i8* %8)
%10 = load i8**, i8*** %5
store i8* null, i8** %10
%11 = load [8192 x i8*]*, [8192 x i8*]** %6
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [8192 x i8*], [8192 x i8*]* %11, i64 0, i64 %13
store i8* null, i8** %14
ret i32 0
}

LLVM IR (-O2):
define i32 @clean_buff(i32 %0, i8** nocapture %1, [8192 x i8*]* nocapture writeonly %2) {
%4 = load i8*, i8** %1
%5 = tail call i32 @free(i8* %4)
store i8* null, i8** %1
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds [8192 x i8*], [8192 x i8*]* %2, i64 0, i64 %6
store i8* null, i8** %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SerialP__SerialFrameComm__delimiterReceived();
void HdlcTranslateC__SerialFrameComm__delimiterReceived(void) {
  SerialP__SerialFrameComm__delimiterReceived();
}


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

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

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

LLVM IR (-O2):
define void @HdlcTranslateC__SerialFrameComm__delimiterReceived() {
%1 = tail call i32 (...) @SerialP__SerialFrameComm__delimiterReceived()
ret void
}
double compute_dice(double area1, double area2, double intersection_area) {
  return 2 * intersection_area / (area1 + area2);
}


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

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

LLVM IR (-O0):
define double @compute_dice(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = fmul double 2.000000e+00, %7
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fadd double %9, %10
%12 = fdiv double %8, %11
ret double %12
}

LLVM IR (-O2):
define double @compute_dice(double %0, double %1, double %2) {
%4 = fmul double %2, 2.000000e+00
%5 = fadd double %0, %1
%6 = fdiv double %4, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
testEqualTo() { printf("%d == %d = %d\n", 10, 4, 10 == 4); }


x86 assembly (clang, -O0):
<testEqualTo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testEqualTo>:
lea    0xee9(%rip),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
xor    %ecx,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%d == %d = %d\0A\00"
define i32 @testEqualTo() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 10, i32 4, i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d == %d = %d\0A\00"
define i32 @testEqualTo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 10, i32 4, i32 0)
ret i32 undef
}
/* Variables and functions */
int item();
int organism();
int target(void) {
  int state;
  do {
    state = organism();
    if (!state)
      break;
    state = item();
  } while (0);
  return state;
}


x86 assembly (clang, -O0):
<target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <organism@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1141 <target+0x21>
jmp    114b <target+0x2b>
mov    $0x0,%al
call   1030 <item@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target>:
push   %rax
xor    %eax,%eax
call   1040 <organism@plt>
test   %eax,%eax
je     1134 <target+0x14>
xor    %eax,%eax
pop    %rcx
jmp    1030 <item@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @target() {
%1 = tail call i32 (...) @organism()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @item()
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 0, %0 ]
ret i32 %6
}
char *not_null() { return "Hello, world!"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
define i8* @not_null() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i8* @not_null() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct hashids_t {
  int dummy;
};

/* Variables and functions */
struct hashids_t *hashids_init3(char const *, unsigned int, char *);
struct hashids_t *hashids_init2(const char *salt,
                                unsigned int min_hash_length) {
  return hashids_init3(salt, min_hash_length,
                       "abcdefghijklmnopqrstuvwxyz"
                       "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                       "1234567890");
}


x86 assembly (clang, -O0):
<hashids_init2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <hashids_init3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashids_init2>:
lea    0xee9(%rip),%rdx
jmp    1030 <hashids_init3@plt>

LLVM IR (-O0):
%struct.hashids_t = type { i32 }
@.str = [63 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\00"
define %struct.hashids_t* @hashids_init2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call %struct.hashids_t* @hashids_init3(i8* %5, i32 %6, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
ret %struct.hashids_t* %7
}

LLVM IR (-O2):
%struct.hashids_t = type { i32 }
@.str = [63 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\00"
define %struct.hashids_t* @hashids_init2(i8* %0, i32 %1) {
%3 = tail call %struct.hashids_t* @hashids_init3(i8* %0, i32 %1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
ret %struct.hashids_t* %3
}
/* Variables and functions */
scalar_t__ printf(char *);
int main() {
  if (printf("Hello world!\n")) {
  }
}


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>
cmp    $0x0,%rax
je     113a <main+0x2a>
jmp    113a <main+0x2a>
mov    -0x4(%rbp),%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 = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %0
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void I2CFlagStatusClear(unsigned long ulBase, unsigned long ulFlag) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000014))) &= ~(ulFlag);
}


x86 assembly (clang, -O0):
<I2CFlagStatusClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CFlagStatusClear>:
not    %rsi
and    %rsi,0x14(%rdi)
ret

LLVM IR (-O0):
define void @I2CFlagStatusClear(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
%6 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 20
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @I2CFlagStatusClear(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 20
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
int f(int *a) { return (int)a; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
int compare_ints(const void *x, const void *y) {
  if (*(int *)x > *(int *)y)
    return 1;
  else if (*(int *)x == *(int *)y)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<compare_ints>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <compare_ints+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    114f <compare_ints+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1148 <compare_ints+0x48>
movl   $0x0,-0x4(%rbp)
jmp    114f <compare_ints+0x4f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_ints>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setne  %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_ints(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
void RTManifestRetain(void) {}


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

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

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

LLVM IR (-O2):
define void @RTManifestRetain() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("usage: passgen characters length [output_file]\nwhere:\ncharacters  "
         "- all the possible characters to use\nlength      - the length of "
         "the password\noutput_file - [optional] output file. if none "
         "specified, it will use\nstdout.\n");
}


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

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

LLVM IR (-O0):
@.str = [222 x i8] c"usage: passgen characters length [output_file]\0Awhere:\0Acharacters - all the possible characters to use\0Alength - the length of the password\0Aoutput_file - [optional] output file. if none specified, it will use\0Astdout.\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([222 x i8], [222 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [221 x i8] c"usage: passgen characters length [output_file]\0Awhere:\0Acharacters - all the possible characters to use\0Alength - the length of the password\0Aoutput_file - [optional] output file. if none specified, it will use\0Astdout.\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([221 x i8], [221 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t elf_rinfo(uint64_t ri) { return ((ri & ~0xFF) << 24) | (ri & 0xFF); }


x86 assembly (clang, -O0):
<elf_rinfo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff00,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_rinfo>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @elf_rinfo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -256
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @elf_rinfo(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct ether_header {
  int /*<<< orphan*/ ether_shost;
};

/* Variables and functions */
int /*<<< orphan*/ ETHER_ADDR_LEN;
int /*<<< orphan*/ bcopy(int /*<<< orphan*/, int /*<<< orphan*/ *,
                         int /*<<< orphan*/);
int inet_get_mac_addr_src(void *data, uint8_t *mac_addr) {
  struct ether_header *eth_hdr;
  eth_hdr = data;
  bcopy(eth_hdr->ether_shost, mac_addr, ETHER_ADDR_LEN);
  return 0;
}


x86 assembly (clang, -O0):
<inet_get_mac_addr_src>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
call   1030 <bcopy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_get_mac_addr_src>:
push   %rax
mov    (%rdi),%edi
mov    0x2ed6(%rip),%rax
mov    (%rax),%edx
call   1030 <bcopy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ether_header = type { i32 }
@ETHER_ADDR_LEN = global i32 0
define i32 @inet_get_mac_addr_src(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca %struct.ether_header*
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.ether_header*
store %struct.ether_header* %7, %struct.ether_header** %5
%8 = load %struct.ether_header*, %struct.ether_header** %5
%9 = getelementptr inbounds %struct.ether_header, %struct.ether_header* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = load i32*, i32** %4
%12 = load i32, i32* @ETHER_ADDR_LEN
%13 = call i32 @bcopy(i32 %10, i32* %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@ETHER_ADDR_LEN = global i32 0
define i32 @inet_get_mac_addr_src(i8* nocapture %0, i32* %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = load i32, i32* @ETHER_ADDR_LEN
%6 = tail call i32 @bcopy(i32 %4, i32* %1, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "usage: cksum [-b] [-o 1 | 2] [file ...]\n");
  (void)fprintf(stderr, "       sum [file ...]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"usage: cksum [-b] [-o 1 | 2] [file ...]\0A\00"
@.str.1 = [23 x i8] c" sum [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"usage: cksum [-b] [-o 1 | 2] [file ...]\0A\00"
@.str.1 = [23 x i8] c" sum [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t get8bit(const uint8_t **ptr) {
  uint8_t t8;
  t8 = (*ptr)[0];
  (*ptr)++;
  return t8;
}


x86 assembly (clang, -O0):
<get8bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get8bit>:
mov    (%rdi),%rcx
mov    (%rcx),%eax
add    $0x4,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @get8bit(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
store i32 %7, i32* %3
%8 = load i32**, i32*** %2
%9 = load i32*, i32** %8
%10 = getelementptr inbounds i32, i32* %9, i32 1
store i32* %10, i32** %8
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @get8bit(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %2, i64 1
store i32* %4, i32** %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void printtxt(void *info, const char *buffer) { printf("%s", buffer); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @printtxt(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 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printtxt(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
void RTSemSpinMutexTryRequest(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemSpinMutexTryRequest() {
ret void
}
/* Variables and functions */
size_t hash_scramble(size_t h) {
  h = ((h >> 16) ^ h) * 0x45d9f3b;
  h = ((h >> 16) ^ h) * 0x45d9f3b;
  h = (h >> 16) ^ h;
  return h;
}


x86 assembly (clang, -O0):
<hash_scramble>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
xor    -0x8(%rbp),%rax
imul   $0x45d9f3b,%rax,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
xor    -0x8(%rbp),%rax
imul   $0x45d9f3b,%rax,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_scramble>:
mov    %rdi,%rax
shr    $0x10,%rax
xor    %rdi,%rax
imul   $0x45d9f3b,%rax,%rax
mov    %rax,%rcx
shr    $0x10,%rcx
xor    %rax,%rcx
imul   $0x45d9f3b,%rcx,%rcx
mov    %rcx,%rax
shr    $0x10,%rax
xor    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @hash_scramble(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = load i64, i64* %2
%6 = xor i64 %4, %5
%7 = mul i64 %6, 73244475
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = lshr i64 %8, 16
%10 = load i64, i64* %2
%11 = xor i64 %9, %10
%12 = mul i64 %11, 73244475
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = lshr i64 %13, 16
%15 = load i64, i64* %2
%16 = xor i64 %14, %15
store i64 %16, i64* %2
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
define i64 @hash_scramble(i64 %0) {
%2 = lshr i64 %0, 16
%3 = xor i64 %2, %0
%4 = mul i64 %3, 73244475
%5 = lshr i64 %4, 16
%6 = xor i64 %5, %4
%7 = mul i64 %6, 73244475
%8 = lshr i64 %7, 16
%9 = xor i64 %8, %7
ret i64 %9
}
int cmp_relocs(const void *va, const void *vb) {
  const unsigned long *a, *b;
  a = va;
  b = vb;
  return (*a == *b) ? 0 : (*a > *b) ? 1 : -1;
}


x86 assembly (clang, -O0):
<cmp_relocs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
jne    113a <cmp_relocs+0x3a>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    115b <cmp_relocs+0x5b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_relocs>:
mov    (%rdi),%rax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%rax
seta   %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_relocs(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 eq i64 %5, %6
%8 = icmp ugt i64 %5, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Type definitions */
struct symbol_table_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ context_local();
int /*<<< orphan*/ symbol_table_link(int /*<<< orphan*/,
                                     struct symbol_table_s *);
void scope_using_namespace(struct symbol_table_s *table) {
  symbol_table_link(context_local(), table);
}


x86 assembly (clang, -O0):
<scope_using_namespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <context_local@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <symbol_table_link@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scope_using_namespace>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <context_local@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <symbol_table_link@plt>

LLVM IR (-O0):
%struct.symbol_table_s = type { i32 }
define void @scope_using_namespace(%struct.symbol_table_s* %0) {
%2 = alloca %struct.symbol_table_s*
store %struct.symbol_table_s* %0, %struct.symbol_table_s** %2
%3 = call i32 (...) @context_local()
%4 = load %struct.symbol_table_s*, %struct.symbol_table_s** %2
%5 = call i32 @symbol_table_link(i32 %3, %struct.symbol_table_s* %4)
ret void
}

LLVM IR (-O2):
%struct.symbol_table_s = type { i32 }
define void @scope_using_namespace(%struct.symbol_table_s* %0) {
%2 = tail call i32 (...) @context_local()
%3 = tail call i32 @symbol_table_link(i32 %2, %struct.symbol_table_s* %0)
ret void
}
const char *flagname(int resolve) {
  switch (resolve) {
  case 0x10:
    return "RESOLVE_IN_ROOT";
  case 0x08:
    return "RESOLVE_BENEATH";
  }
  return "(unknown)";
}


x86 assembly (clang, -O0):
<flagname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x8,%eax
je     113c <flagname+0x3c>
jmp    111b <flagname+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
jne    114c <flagname+0x4c>
jmp    112c <flagname+0x2c>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <flagname+0x57>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <flagname+0x57>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flagname>:
cmp    $0x8,%edi
lea    0xf06(%rip),%rax
lea    0xf0f(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x10,%edi
lea    0xee1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"RESOLVE_IN_ROOT\00"
@.str.1 = [16 x i8] c"RESOLVE_BENEATH\00"
@.str.2 = [10 x i8] c"(unknown)\00"
define i8* @flagname(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 16, label %5
i32 8, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [16 x i8] c"RESOLVE_IN_ROOT\00"
@.str.1 = [16 x i8] c"RESOLVE_BENEATH\00"
@.str.2 = [10 x i8] c"(unknown)\00"
define i8* @flagname(i32 %0) {
%2 = icmp eq i32 %0, 8
%3 = select i1 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 16
%5 = select i1 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ u_long;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ NS_GET32(int /*<<< orphan*/, int /*<<< orphan*/ const *);
u_long ns_get32(const u_char *src) {
  u_long dst;
  NS_GET32(dst, src);
  return (dst);
}


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

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

LLVM IR (-O0):
define i32 @ns_get32(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32, i32* %3
%5 = load i32*, i32** %2
%6 = call i32 @NS_GET32(i32 %4, i32* %5)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @ns_get32(i32* %0) {
%2 = tail call i32 @NS_GET32(i32 undef, i32* %0)
ret i32 undef
}
/* Variables and functions */
uintptr_t align(uintptr_t ptr, size_t align) {
  uintptr_t mod = ptr % align;
  if (mod) {
    ptr -= mod;
    ptr += align;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<align>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1142 <align+0x42>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<align>:
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1116 <align+0x16>
mov    %rdi,%rax
xor    %edx,%edx
div    %rsi
jmp    111c <align+0x1c>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
add    %rdi,%rsi
sub    %rdx,%rsi
test   %rdx,%rdx
cmove  %rdi,%rsi
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @align(i64 %0, i64 %1) {
%3 = urem i64 %0, %1
%4 = icmp eq i64 %3, 0
%5 = add i64 %1, %0
%6 = sub i64 %5, %3
%7 = select i1 %4, i64 %0, i64 %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ __RESETFAULTMASK();
void NVIC_RESETFAULTMASK(void) { __RESETFAULTMASK(); }


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

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

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

LLVM IR (-O2):
define void @NVIC_RESETFAULTMASK() {
%1 = tail call i32 (...) @__RESETFAULTMASK()
ret void
}
/* Variables and functions */
char *skipchar(char *, char);
char *skips(char *);
char *skipchar_s(char *in, char c) {
  in = skips(in);
  if (*in == '\n')
    return in;
  in = skipchar(in, c);
  in = skips(in);
  return in;
}


x86 assembly (clang, -O0):
<skipchar_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <skips@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    115c <skipchar_s+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1182 <skipchar_s+0x62>
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1040 <skipchar@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <skips@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipchar_s>:
push   %rbx
mov    %esi,%ebx
call   1030 <skips@plt>
cmpb   $0xa,(%rax)
jne    112f <skipchar_s+0xf>
pop    %rbx
ret
movsbl %bl,%esi
mov    %rax,%rdi
call   1040 <skipchar@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1030 <skips@plt>

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

LLVM IR (-O2):
define i8* @skipchar_s(i8* %0, i8 signext %1) {
%3 = tail call i8* @skips(i8* %0)
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 10
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i8* @skipchar(i8* %3, i8 signext %1)
%8 = tail call i8* @skips(i8* %7)
br label %9
9: ; preds = %2, %6
%10 = phi i8* [ %8, %6 ], [ %3, %2 ]
ret i8* %10
}