xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ vmentry();
int /*<<< orphan*/ vmexit();
int write(int, unsigned long long *, int);
void notify(int fd) {
  unsigned long long v = 1;
  int r;
  vmexit();
  r = write(fd, &v, sizeof v);
  assert(r == sizeof v);
  vmentry();
}


x86 assembly (clang, -O0):
<notify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <vmexit@plt>
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1040 <write@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x8,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x0,%al
call   1060 <vmentry@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notify>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movq   $0x1,0x8(%rsp)
xor    %eax,%eax
call   1030 <vmexit@plt>
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
mov    $0x8,%edx
call   1040 <write@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1060 <vmentry@plt>

LLVM IR (-O0):
define void @notify(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i32 %0, i32* %2
store i64 1, i64* %3
%5 = call i32 (...) @vmexit()
%6 = load i32, i32* %2
%7 = call i32 @write(i32 %6, i64* %3, i32 8)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = icmp eq i64 %9, 8
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 (...) @vmentry()
ret void
}

LLVM IR (-O2):
define void @notify(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 1, i64* %2
%4 = tail call i32 (...) @vmexit()
%5 = call i32 @write(i32 %0, i64* %2, i32 8)
%6 = icmp eq i32 %5, 8
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 (...) @vmentry()
ret void
}
double max(double x, double y) {
  if (x < y) {
    return y;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <max+0x31>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <max+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %5
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %4
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @max(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
void pause() {
  printf("Press enter to continue...\n");
  getchar();
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Press enter to continue...\0A\00"
define void @pause() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"Press enter to continue...\00"
define void @pause() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ im_a_minion_01();
int /*<<< orphan*/ im_a_minion_02();
void testFuncStatementNotCoverage(void) {
  int int1 = 1U;
  int int2 = 2U;
  int int3 = 3U;
  int int4 = 4U;
  if (int4 < int3) {
    int4 = int3;
  }
  if (int2 > int1) {
    if (int1 > int2) {
      im_a_minion_01();
    }
  }
  if (int2 > int1) {
    if (int3 < int2) {
      im_a_minion_02();
    }
  }
}


x86 assembly (clang, -O0):
<testFuncStatementNotCoverage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1156 <testFuncStatementNotCoverage+0x36>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    117a <testFuncStatementNotCoverage+0x5a>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1175 <testFuncStatementNotCoverage+0x55>
mov    $0x0,%al
call   1030 <im_a_minion_01@plt>
jmp    117a <testFuncStatementNotCoverage+0x5a>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    119e <testFuncStatementNotCoverage+0x7e>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1199 <testFuncStatementNotCoverage+0x79>
mov    $0x0,%al
call   1040 <im_a_minion_02@plt>
jmp    119e <testFuncStatementNotCoverage+0x7e>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testFuncStatementNotCoverage() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
store i32 4, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = load i32, i32* %3
store i32 %9, i32* %4
br label %10
10: ; preds = %8, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %1
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %21
14: ; preds = %10
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = icmp sgt i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 (...) @im_a_minion_01()
br label %20
20: ; preds = %18, %14
br label %21
21: ; preds = %20, %10
%22 = load i32, i32* %2
%23 = load i32, i32* %1
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %32
25: ; preds = %21
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 (...) @im_a_minion_02()
br label %31
31: ; preds = %29, %25
br label %32
32: ; preds = %31, %21
ret void
}

LLVM IR (-O2):
define void @testFuncStatementNotCoverage() {
ret void
}
float evaluate_bw(float size, float usec) { return (size * 1E6) / usec; }


x86 assembly (clang, -O0):
<evaluate_bw>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<evaluate_bw>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @evaluate_bw(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fmul double %6, 1.000000e+06
%8 = load float, float* %4
%9 = fpext float %8 to double
%10 = fdiv double %7, %9
%11 = fptrunc double %10 to float
ret float %11
}

LLVM IR (-O2):
define float @evaluate_bw(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fmul double %3, 1.000000e+06
%5 = fpext float %1 to double
%6 = fdiv double %4, %5
%7 = fptrunc double %6 to float
ret float %7
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __list_splice(struct list_head *, struct list_head *,
                                 struct list_head *);
int /*<<< orphan*/ list_empty(struct list_head *);
struct list_head *list_get_tail(struct list_head *);
void list_splice_tail(struct list_head *list, struct list_head *head) {
  struct list_head *tail = list_get_tail(head);
  if (!list_empty(list))
    __list_splice(list, tail, head);
}


x86 assembly (clang, -O0):
<list_splice_tail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <list_get_tail@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <list_empty@plt>
cmp    $0x0,%eax
jne    1170 <list_splice_tail+0x40>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <__list_splice@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_splice_tail>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <list_get_tail@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1050 <list_empty@plt>
test   %eax,%eax
je     1158 <list_splice_tail+0x28>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <__list_splice@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_splice_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
%5 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%6 = load %struct.list_head*, %struct.list_head** %4
%7 = call %struct.list_head* @list_get_tail(%struct.list_head* %6)
store %struct.list_head* %7, %struct.list_head** %5
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @list_empty(%struct.list_head* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load %struct.list_head*, %struct.list_head** %3
%13 = load %struct.list_head*, %struct.list_head** %5
%14 = load %struct.list_head*, %struct.list_head** %4
%15 = call i32 @__list_splice(%struct.list_head* %12, %struct.list_head* %13, %struct.list_head* %14)
br label %16
16: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_splice_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call %struct.list_head* @list_get_tail(%struct.list_head* %1)
%4 = tail call i32 @list_empty(%struct.list_head* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @__list_splice(%struct.list_head* %0, %struct.list_head* %3, %struct.list_head* %1)
br label %8
8: ; preds = %6, %2
ret void
}
int isalpha(int c) {
  return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
}


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1120 <isalpha+0x20>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113f <isalpha+0x3f>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1139 <isalpha+0x39>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
int calculer_horaire(int heure, int minute) { return ((heure * 60) + minute); }


x86 assembly (clang, -O0):
<calculer_horaire>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x3c,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculer_horaire>:
imul   $0x3c,%edi,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @calculer_horaire(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 60
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @calculer_horaire(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 60
%4 = add nsw i32 %3, %1
ret i32 %4
}
/* Variables and functions */
char *ey_fileextension(char const *);
int /*<<< orphan*/ strcmp(char const *, char *);
int ey_file_is_library(const char *filename) {
  const char *ext = ey_fileextension(filename);
  if (ext[0])
    ext++;
  return !strcmp(ext, "so");
}


x86 assembly (clang, -O0):
<ey_file_is_library>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ey_fileextension@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <ey_file_is_library+0x32>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ey_file_is_library>:
push   %rax
call   1030 <ey_fileextension@plt>
cmpb   $0x1,(%rax)
sbb    $0xffffffffffffffff,%rax
lea    0xecc(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"so\00"
define i32 @ey_file_is_library(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @ey_fileextension(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %1
%14 = load i8*, i8** %3
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"so\00"
define i32 @ey_file_is_library(i8* %0) {
%2 = tail call i8* @ey_fileextension(i8* %0)
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
%5 = zext i1 %4 to i64
%6 = getelementptr i8, i8* %2, i64 %5
%7 = tail call i32 @strcmp(i8* %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
unsigned xrop3_16_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_16_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_16_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %7
%28 = load i32, i32* %9
%29 = and i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %7
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_16_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
double _constOne(const int numInputs, const double *inputs,
                 const double *connectionWeights) {
  return 1;
}


x86 assembly (clang, -O0):
<_constOne>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  0xee9(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @_constOne(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @_constOne(i32 %0, double* nocapture readnone %1, double* nocapture readnone %2) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void vector_normal_free(void *data, size_t len) { free(data); }


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

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

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

LLVM IR (-O2):
define void @vector_normal_free(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
int fun903() { return 903; }


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

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

LLVM IR (-O0):
define i32 @fun903() {
ret i32 903
}

LLVM IR (-O2):
define i32 @fun903() {
ret i32 903
}
void dbmap(const char *str) {}


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

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

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

LLVM IR (-O2):
define void @dbmap(i8* nocapture %0) {
ret void
}
void CpuId() {}


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

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

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

LLVM IR (-O2):
define void @CpuId() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char *argv[]) {
  double f = 1.33000004291534424;
  printf("%40.30f\n", f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"%40.30f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 0x3FF547AE20000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ZBX_UNUSED(char const *);
void cu_xml_error_func(void *ctx, const char *msg, ...) {
  ZBX_UNUSED(ctx);
  ZBX_UNUSED(msg);
}


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

x86 assembly (clang, -O2):
<cu_xml_error_func>:
push   %rbx
mov    %rsi,%rbx
call   1030 <ZBX_UNUSED@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ZBX_UNUSED@plt>

LLVM IR (-O0):
define void @cu_xml_error_func(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 @ZBX_UNUSED(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @ZBX_UNUSED(i8* %7)
ret void
}

LLVM IR (-O2):
define void @cu_xml_error_func(i8* %0, i8* %1, ...) {
%3 = tail call i32 @ZBX_UNUSED(i8* %0)
%4 = tail call i32 @ZBX_UNUSED(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __gmp_exception(int);
void __gmp_divide_by_zero(void) {
  { __gmp_exception(2); }
}


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

x86 assembly (clang, -O2):
<__gmp_divide_by_zero>:
mov    $0x2,%edi
jmp    1030 <__gmp_exception@plt>

LLVM IR (-O0):
define void @__gmp_divide_by_zero() {
%1 = call i32 @__gmp_exception(i32 2)
ret void
}

LLVM IR (-O2):
define void @__gmp_divide_by_zero() {
%1 = tail call i32 @__gmp_exception(i32 2)
ret void
}
void foo759(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo759(i32 %0) {
ret void
}
int pixellib_xmm_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pixellib_xmm_init() {
ret i32 0
}
int main(void) {
  printf("Perimiter: %f\n",
         poly_perim(3, (double[]){1, 1, 4}, (double[]){2, 5, 5}));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2efa(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2ef7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ef4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rsi
mov    0x2eed(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2eea(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2ee7(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x38(%rbp),%rdx
mov    $0x3,%edi
mov    $0x0,%al
call   1040 <poly_perim@plt>
mov    %eax,%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x30(%rsp)
movups 0xed9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0xeea(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0x20(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x3,%edi
xor    %eax,%eax
call   1040 <poly_perim@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Perimiter: %f\0A\00"
@constinit = private global [3 x double] [double 1.000000e+00, double 1.000000e+00, double 4.000000e+00]
@constinit.1 = private global [3 x double] [double 2.000000e+00, double 5.000000e+00, double 5.000000e+00]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x double]
%3 = alloca [3 x double]
store i32 0, i32* %1
%4 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%5 = bitcast [3 x double]* %2 to i8*
%6 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%8 = bitcast [3 x double]* %3 to i8*
%9 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%10 = call i32 (i32, double*, double*, ...) bitcast (i32 (...)* @poly_perim to i32 (i32, double*, double*, ...)*)(i32 3, double* %6, double* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Perimiter: %f\0A\00"
@constinit = [3 x double] [double 1.000000e+00, double 1.000000e+00, double 4.000000e+00]
@constinit.1 = [3 x double] [double 2.000000e+00, double 5.000000e+00, double 5.000000e+00]
define i32 @main() {
%1 = alloca [3 x double]
%2 = alloca [3 x double]
%3 = bitcast [3 x double]* %1 to i8*
%4 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
%5 = bitcast [3 x double]* %2 to i8*
%6 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%7 = call i32 (i32, double*, double*, ...) bitcast (i32 (...)* @poly_perim to i32 (i32, double*, double*, ...)*)(i32 3, double* %4, double* %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
double exp(double);
double f(double x) { return x * exp(x) - 5; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xebb(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
addsd  0xed8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @exp(double %4)
%6 = call double @llvm.fmuladd.f64(double %3, double %5, double -5.000000e+00)
ret double %6
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = tail call double @exp(double %0)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double -5.000000e+00)
ret double %3
}
float maximumf(float a, float b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<maximumf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <maximumf+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <maximumf+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximumf>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @maximumf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @maximumf(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
double exp(double);
double f2(double x) { return exp(-x * x) - x * x; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
sub    $0x18,%rsp
movapd 0xee4(%rip),%xmm1
xorpd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
movapd %xmm0,(%rsp)
call   1030 <exp@plt>
addsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @f2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = call double @exp(double %6)
%8 = load double, double* %2
%9 = load double, double* %2
%10 = fneg double %8
%11 = call double @llvm.fmuladd.f64(double %10, double %9, double %7)
ret double %11
}

LLVM IR (-O2):
define double @f2(double %0) {
%2 = fneg double %0
%3 = fmul double %2, %0
%4 = tail call double @exp(double %3)
%5 = tail call double @llvm.fmuladd.f64(double %2, double %0, double %4)
ret double %5
}
/* Variables and functions */
char *qmalloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *qstrdup(const char *__string) {
  char *p = qmalloc(strlen(__string) + 1);
  if (p)
    strcpy(p, __string);
  return p;
}


x86 assembly (clang, -O0):
<qstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <qmalloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <qstrdup+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <qmalloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <qstrdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @qstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @qmalloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ test2();
int main(int argc, char *argv[]) {
  test2();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help_trace(int argc, char **argv) {
  printf("\n\033[1mtrace <host> [-options]\033[0m\n"
         "  Print the path packets take to network <host>. <host> can be an ip "
         "address or name.\n"
         "    options:\n"
         "      -P <protocol>  Use IP <protocol> in trace packets\n"
         "                     1 - icmp, 17 - udp (default), 6 - tcp  \n"
         "      -m <ttl>       maximum TTL, default 8\n"
         "      <ttl>          Same as -m option, compatible with the old "
         "version\n\n"
         "  Note: 1. Using names requires DNS to be set.\n"
         "        2. Use Ctrl+C to stop the command.\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [457 x i8] c"\0A\1B[1mtrace <host> [-options]\1B[0m\0A Print the path packets take to network <host>. <host> can be an ip address or name.\0A options:\0A -P <protocol> Use IP <protocol> in trace packets\0A 1 - icmp, 17 - udp (default), 6 - tcp \0A -m <ttl> maximum TTL, default 8\0A <ttl> Same as -m option, compatible with the old version\0A\0A Note: 1. Using names requires DNS to be set.\0A 2. Use Ctrl+C to stop the command.\0A\00"
define i32 @help_trace(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([457 x i8], [457 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [456 x i8] c"\0A\1B[1mtrace <host> [-options]\1B[0m\0A Print the path packets take to network <host>. <host> can be an ip address or name.\0A options:\0A -P <protocol> Use IP <protocol> in trace packets\0A 1 - icmp, 17 - udp (default), 6 - tcp \0A -m <ttl> maximum TTL, default 8\0A <ttl> Same as -m option, compatible with the old version\0A\0A Note: 1. Using names requires DNS to be set.\0A 2. Use Ctrl+C to stop the command.\00"
define i32 @help_trace(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([456 x i8], [456 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(int argc, const char *argv[]) {
  printf("3 * 3 + 5 * 2 = %d.\n", 3 * 3 + 5 * 2);
  printf("11/3 = %d remainder of %d.\n", 11 / 3, 11 % 3);
  printf("11/3.0 = %f.\n", 11 / (float)3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x13,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"3 * 3 + 5 * 2 = %d.\0A\00"
@.str.1 = [28 x i8] c"11/3 = %d remainder of %d.\0A\00"
@.str.2 = [14 x i8] c"11/3.0 = %f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 19)
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 2)
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 3)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"3 * 3 + 5 * 2 = %d.\0A\00"
@.str.1 = [28 x i8] c"11/3 = %d remainder of %d.\0A\00"
@.str.2 = [14 x i8] c"11/3.0 = %f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 19)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 2)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 3)
ret i32 0
}
void add_new_entry() {}


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

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

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

LLVM IR (-O2):
define void @add_new_entry() {
ret void
}
void security_skb_free(struct sk_buff *skb) {}


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

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

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

LLVM IR (-O2):
%struct.sk_buff = type opaque
define void @security_skb_free(%struct.sk_buff* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bell_duration;
};
typedef TYPE_1__ XKeyboardControl;

/* Variables and functions */
int get_XKeyboardControl_bell_duration(void *_p) {
  return (int)((XKeyboardControl *)_p)->bell_duration;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XKeyboardControl_bell_duration(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timeval {
  unsigned long tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t gettime(void) {
  struct timeval tv;
  int res;
  res = gettimeofday(&tv, NULL);
  if (res < 0) {
    return 0;
  }
  return (uint64_t)tv.tv_usec + tv.tv_sec * 1000000UL;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    113f <gettime+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1152 <gettime+0x42>
mov    -0x10(%rbp),%rax
imul   $0xf4240,-0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,(%rsp),%rcx
add    0x8(%rsp),%rcx
test   %eax,%eax
cmovs  %rbx,%rcx
mov    %rcx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @gettime() {
%1 = alloca i64
%2 = alloca %struct.timeval
%3 = alloca i32
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i64 0, i64* %1
br label %15
8: ; preds = %0
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%12 = load i64, i64* %11
%13 = mul i64 %12, 1000000
%14 = add i64 %10, %13
store i64 %14, i64* %1
br label %15
15: ; preds = %8, %7
%16 = load i64, i64* %1
ret i64 %16
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp slt i32 %3, 0
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = mul i64 %8, 1000000
%10 = add i64 %9, %6
%11 = select i1 %4, i64 0, i64 %10
ret i64 %11
}
/* Variables and functions */
void *do_alloc(size_t);
void *do_alloc_large(size_t);
size_t ind(size_t);
void *myalloc(size_t len) {
  (len = (len + 0x7) & 0xFFFFFFF8);
  size_t i = ind(len);
  if (i != 9) {
    return do_alloc(i);
  } else {
    return do_alloc_large(len);
  }
}


x86 assembly (clang, -O0):
<myalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x7,%rax
movabs $0xfffffff8,%rcx
and    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <ind@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x9,-0x18(%rbp)
je     117f <myalloc+0x4f>
mov    -0x18(%rbp),%rdi
call   1040 <do_alloc@plt>
mov    %rax,-0x8(%rbp)
jmp    118c <myalloc+0x5c>
mov    -0x10(%rbp),%rdi
call   1030 <do_alloc_large@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myalloc>:
push   %rbx
mov    %rdi,%rbx
add    $0x7,%ebx
and    $0xfffffff8,%ebx
mov    %rbx,%rdi
call   1050 <ind@plt>
cmp    $0x9,%rax
jne    1151 <myalloc+0x21>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <do_alloc_large@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <do_alloc@plt>

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

LLVM IR (-O2):
define i8* @myalloc(i64 %0) {
%2 = add i64 %0, 7
%3 = and i64 %2, 4294967288
%4 = tail call i64 @ind(i64 %3)
%5 = icmp eq i64 %4, 9
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i8* @do_alloc(i64 %4)
br label %10
8: ; preds = %1
%9 = tail call i8* @do_alloc_large(i64 %3)
br label %10
10: ; preds = %8, %6
%11 = phi i8* [ %7, %6 ], [ %9, %8 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ qprintf(char *, int);
void q_msleep(int ms) { qprintf("*** msleep(%d)\n", ms); }


x86 assembly (clang, -O0):
<q_msleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <qprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_msleep>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <qprintf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"*** msleep(%d)\0A\00"
define void @q_msleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @qprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"*** msleep(%d)\0A\00"
define void @q_msleep(i32 %0) {
%2 = tail call i32 @qprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ v3_servo_set(short, short);
int set_servos(int fd, short vel) {
  short i;
  for (i = 0; i < 4; i++) {
    v3_servo_set(i, vel);
  }
}


x86 assembly (clang, -O0):
<set_servos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
movswl -0xc(%rbp),%eax
cmp    $0x4,%eax
jge    1156 <set_servos+0x46>
mov    -0xc(%rbp),%ax
movswl %ax,%edi
movswl -0xa(%rbp),%esi
call   1030 <v3_servo_set@plt>
mov    -0xc(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xc(%rbp)
jmp    1128 <set_servos+0x18>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_servos>:
push   %rbx
mov    %esi,%ebx
xor    %edi,%edi
call   1030 <v3_servo_set@plt>
mov    $0x1,%edi
mov    %ebx,%esi
call   1030 <v3_servo_set@plt>
mov    $0x2,%edi
mov    %ebx,%esi
call   1030 <v3_servo_set@plt>
mov    $0x3,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <v3_servo_set@plt>

LLVM IR (-O0):
define i32 @set_servos(i32 %0, i16 signext %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
%6 = alloca i16
store i32 %0, i32* %4
store i16 %1, i16* %5
store i16 0, i16* %6
br label %7
7: ; preds = %15, %2
%8 = load i16, i16* %6
%9 = sext i16 %8 to i32
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i16, i16* %6
%13 = load i16, i16* %5
%14 = call i32 @v3_servo_set(i16 signext %12, i16 signext %13)
br label %15
15: ; preds = %11
%16 = load i16, i16* %6
%17 = add i16 %16, 1
store i16 %17, i16* %6
br label %7
18: ; preds = %7
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @set_servos(i32 %0, i16 signext %1) {
%3 = tail call i32 @v3_servo_set(i16 signext 0, i16 signext %1)
%4 = tail call i32 @v3_servo_set(i16 signext 1, i16 signext %1)
%5 = tail call i32 @v3_servo_set(i16 signext 2, i16 signext %1)
%6 = tail call i32 @v3_servo_set(i16 signext 3, i16 signext %1)
ret i32 undef
}
viewport_(xlow, xhigh, ylow, yhigh) int *xlow, *ylow, *xhigh, *yhigh;
{ viewport(*xlow, *xhigh, *ylow, *yhigh); }


x86 assembly (clang, -O0):
<viewport_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    $0x0,%al
call   1030 <viewport@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<viewport_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
mov    (%rdx),%edx
mov    (%rcx),%ecx
xor    %eax,%eax
jmp    1030 <viewport@plt>

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

LLVM IR (-O2):
define i32 @viewport_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @viewport to i32 (i32, i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 %7, i32 %8)
ret i32 undef
}