xunge/DecIR huggingface dataset:
int comp(const void *elem1, const void *elem2) {
  double f = *((double *)elem1);
  double s = *((double *)elem2);
  if (f > s)
    return 1;
  if (f < s)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1142 <comp+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1169 <comp+0x69>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1162 <comp+0x62>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <comp+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printname(void *item) {
  char *name = item;
  printf("%s", name);
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @printname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%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 @printname(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double exp(double);
int /*<<< orphan*/ printf(char *, double, ...);
void main() {
  int i = 0;
  double x = 0;
  double y = 0;
  double rez = 0.0;
  x = 3.0;
  y = 4.0;
  printf("x = %lf; y = %lf;\n", x, y);
  rez = exp(x);
  printf("rez = %lf;\n", rez);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea4(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe9e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe8f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf00(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
movsd  0xed2(%rip),%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"x = %lf; y = %lf;\0A\00"
@.str.1 = [12 x i8] c"rez = %lf;\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
store double 3.000000e+00, double* %2
store double 4.000000e+00, double* %3
%5 = load double, double* %2
%6 = load double, double* %3
%7 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %5, double %6)
%8 = load double, double* %2
%9 = call double @exp(double %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double %10)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"x = %lf; y = %lf;\0A\00"
@.str.1 = [12 x i8] c"rez = %lf;\0A\00"
define void @main() {
%1 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double 4.000000e+00)
%2 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double 0x403415E5BF6FB106)
ret void
}
/* Variables and functions */
char *find_substr(char *string, char *substr) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @find_substr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @find_substr(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
int iso_error_get_severity(int e) { return (e & 0x7F000000); }


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

x86 assembly (clang, -O2):
<iso_error_get_severity>:
mov    %edi,%eax
and    $0x7f000000,%eax
ret

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

LLVM IR (-O2):
define i32 @iso_error_get_severity(i32 %0) {
%2 = and i32 %0, 2130706432
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ NOTICEREF;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ NOTICEREF_it;
void NOTICEREF_free(NOTICEREF *a) {
  ASN1_item_free((ASN1_VALUE *)a, &NOTICEREF_it);
}


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

x86 assembly (clang, -O2):
<NOTICEREF_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@NOTICEREF_it = global i32 0
define void @NOTICEREF_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @NOTICEREF_it)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

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


x86 assembly (clang, -O0):
<crash_fgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crash_fgetc>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <fgetc@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"this_file_doesnt_exists\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @crash_fgetc() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @fgetc(i32* %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %1
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"this_file_doesnt_exists\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @crash_fgetc() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @fgetc(i32* %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%4 = tail call i32 @fclose(i32* %1)
ret void
}
/* Variables and functions */
long function(char *);
long func() {
  long a = function("asdf");
  return a;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <function@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
define i64 @func() {
%1 = alloca i64
%2 = call i64 @function(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define i64 @func() {
%1 = tail call i64 @function(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ thr0(int /*<<< orphan*/);
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int /*<<< orphan*/ thr3(int /*<<< orphan*/);
int /*<<< orphan*/ thr4(int /*<<< orphan*/);
int /*<<< orphan*/ thr5(int /*<<< orphan*/);
int /*<<< orphan*/ thr6(int /*<<< orphan*/);
int /*<<< orphan*/ thr7(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr0(0);
__CPROVER_ASYNC_1:
  thr1(0);
__CPROVER_ASYNC_2:
  thr2(0);
__CPROVER_ASYNC_3:
  thr3(0);
__CPROVER_ASYNC_4:
  thr4(0);
__CPROVER_ASYNC_5:
  thr5(0);
__CPROVER_ASYNC_6:
  thr6(0);
__CPROVER_ASYNC_7:
  thr7(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1070 <thr0@plt>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1090 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1080 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %edi,%edi
call   10a0 <thr7@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1070 <thr0@plt>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1090 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1080 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %edi,%edi
call   10a0 <thr7@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @thr0(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @thr1(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @thr2(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @thr3(i32 0)
br label %10
10: ; preds = %8
%11 = call i32 @thr4(i32 0)
br label %12
12: ; preds = %10
%13 = call i32 @thr5(i32 0)
br label %14
14: ; preds = %12
%15 = call i32 @thr6(i32 0)
br label %16
16: ; preds = %14
%17 = call i32 @thr7(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr0(i32 0)
%2 = tail call i32 @thr1(i32 0)
%3 = tail call i32 @thr2(i32 0)
%4 = tail call i32 @thr3(i32 0)
%5 = tail call i32 @thr4(i32 0)
%6 = tail call i32 @thr5(i32 0)
%7 = tail call i32 @thr6(i32 0)
%8 = tail call i32 @thr7(i32 0)
ret i32 0
}
unsigned int kdev_minor(unsigned int kdev) { return kdev & ((1UL << 20) - 1); }


x86 assembly (clang, -O0):
<kdev_minor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kdev_minor>:
mov    %edi,%eax
and    $0xfffff,%eax
ret

LLVM IR (-O0):
define i32 @kdev_minor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = and i64 %4, 1048575
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @kdev_minor(i32 %0) {
%2 = and i32 %0, 1048575
ret i32 %2
}
void i2d_OCSP_CRLID(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_OCSP_CRLID() {
ret void
}
/* Variables and functions */
char *strchr(char const *, int);
const char *fieldStart(const char *s, size_t index, int sep) {
  for (; s && index; --index, s++)
    s = strchr(s, sep);
  return s;
}


x86 assembly (clang, -O0):
<fieldStart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x15(%rbp)
je     113e <fieldStart+0x2e>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    114e <fieldStart+0x3e>
jmp    117b <fieldStart+0x6b>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <fieldStart+0x13>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fieldStart>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rax
test   %rdi,%rdi
je     1144 <fieldStart+0x34>
mov    %rsi,%rbx
test   %rsi,%rsi
je     1144 <fieldStart+0x34>
mov    %edx,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rdi
mov    %ebp,%esi
call   1030 <strchr@plt>
add    $0x1,%rax
add    $0xffffffffffffffff,%rbx
jne    1130 <fieldStart+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @fieldStart(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
br label %7
7: ; preds = %19, %3
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i64, i64* %5
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ false, %7 ], [ %12, %10 ]
br i1 %14, label %15, label %24
15: ; preds = %13
%16 = load i8*, i8** %4
%17 = load i32, i32* %6
%18 = call i8* @strchr(i8* %16, i32 %17)
store i8* %18, i8** %4
br label %19
19: ; preds = %15
%20 = load i64, i64* %5
%21 = add i64 %20, -1
store i64 %21, i64* %5
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %4
br label %7
24: ; preds = %13
%25 = load i8*, i8** %4
ret i8* %25
}

LLVM IR (-O2):
define i8* @fieldStart(i8* %0, i64 %1, i32 %2) {
%4 = icmp ne i8* %0, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %14
7: ; preds = %3, %7
%8 = phi i8* [ %12, %7 ], [ %0, %3 ]
%9 = phi i64 [ %11, %7 ], [ %1, %3 ]
%10 = tail call i8* @strchr(i8* %8, i32 %2)
%11 = add i64 %9, -1
%12 = getelementptr inbounds i8, i8* %10, i64 1
%13 = icmp eq i64 %11, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %3
%15 = phi i8* [ %0, %3 ], [ %12, %7 ]
ret i8* %15
}
/* Variables and functions */
scalar_t__ MP_sema(int);
int /*<<< orphan*/ MP_semaset(int, int /*<<< orphan*/);
void MP_p1wait2() {
  MP_semaset(1, 0);
  while (MP_sema(1) == 0)
    ;
}


x86 assembly (clang, -O0):
<MP_p1wait2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <MP_semaset@plt>
mov    $0x1,%edi
call   1040 <MP_sema@plt>
cmp    $0x0,%rax
jne    1149 <MP_p1wait2+0x29>
jmp    1130 <MP_p1wait2+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MP_p1wait2>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <MP_semaset@plt>
nopl   (%rax)
mov    $0x1,%edi
call   1040 <MP_sema@plt>
test   %rax,%rax
je     1130 <MP_p1wait2+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @MP_p1wait2() {
%1 = call i32 @MP_semaset(i32 1, i32 0)
br label %2
2: ; preds = %5, %0
%3 = call i64 @MP_sema(i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @MP_p1wait2() {
%1 = tail call i32 @MP_semaset(i32 1, i32 0)
br label %2
2: ; preds = %2, %0
%3 = tail call i64 @MP_sema(i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
ret void
}
/* Variables and functions */
double acos(double);
double ECacos(double x) {
  double y;
  double r;
  y = x;
  r = acos(y);
  return (r);
}


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

x86 assembly (clang, -O2):
<ECacos>:
jmp    1030 <acos@plt>

LLVM IR (-O0):
define double @ECacos(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @acos(double %6)
store double %7, double* %4
%8 = load double, double* %4
ret double %8
}

LLVM IR (-O2):
define double @ECacos(double %0) {
%2 = tail call double @acos(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, unsigned int);
void horizontal_line_copy(const unsigned char *source,
                          unsigned int source_width, unsigned char *dest,
                          unsigned int dest_width) {
  (void)dest_width;
  memcpy(dest, source, source_width);
}


x86 assembly (clang, -O0):
<horizontal_line_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<horizontal_line_copy>:
mov    %rdx,%rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @horizontal_line_copy(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @memcpy(i8* %2, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_restart_syscall;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
int main() {
  syscall(__NR_restart_syscall);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ee0(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__NR_restart_syscall = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @__NR_restart_syscall
%3 = call i32 @syscall(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@__NR_restart_syscall = global i32 0
define i32 @main() {
%1 = load i32, i32* @__NR_restart_syscall
%2 = tail call i32 @syscall(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ staticPrintTime();
void AMCTimeMark() {
  printf("##TIME: ");
  staticPrintTime();
  return;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"##TIME: \00"
define void @AMCTimeMark() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @staticPrintTime()
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"##TIME: \00"
define void @AMCTimeMark() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @staticPrintTime()
ret void
}
double dot(double *va, double *vb) {
  double dsum = 0.0;
  long i;
  for (i = 1; i <= 3; i++)
    dsum += va[i] * vb[i];
  return dsum;
}


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jg     1164 <dot+0x64>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <dot+0x1c>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot>:
movsd  0x8(%rdi),%xmm0
movsd  0x10(%rdi),%xmm1
mulsd  0x8(%rsi),%xmm0
xorpd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
mulsd  0x10(%rsi),%xmm1
addsd  %xmm2,%xmm1
movsd  0x18(%rdi),%xmm0
mulsd  0x18(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca i64
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %5
store i64 1, i64* %6
br label %7
7: ; preds = %21, %2
%8 = load i64, i64* %6
%9 = icmp sle i64 %8, 3
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = load double*, double** %3
%12 = load i64, i64* %6
%13 = getelementptr inbounds double, double* %11, i64 %12
%14 = load double, double* %13
%15 = load double*, double** %4
%16 = load i64, i64* %6
%17 = getelementptr inbounds double, double* %15, i64 %16
%18 = load double, double* %17
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %14, double %18, double %19)
store double %20, double* %5
br label %21
21: ; preds = %10
%22 = load i64, i64* %6
%23 = add nsw i64 %22, 1
store i64 %23, i64* %6
br label %7
24: ; preds = %7
%25 = load double, double* %5
ret double %25
}

LLVM IR (-O2):
define double @dot(double* nocapture %0, double* nocapture %1) {
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = tail call double @llvm.fmuladd.f64(double %4, double %6, double 0.000000e+00)
%8 = getelementptr inbounds double, double* %0, i64 2
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %10
%12 = tail call double @llvm.fmuladd.f64(double %9, double %11, double %7)
%13 = getelementptr inbounds double, double* %0, i64 3
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %1, i64 3
%16 = load double, double* %15
%17 = tail call double @llvm.fmuladd.f64(double %14, double %16, double %12)
ret double %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void two() { printf("two\n"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"two\0A\00"
define void @two() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"two\00"
define void @two() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double timestamp(void) {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return ((double)(tv.tv_sec) + (double)(tv.tv_usec / 1e6));
}


x86 assembly (clang, -O0):
<timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xeca(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timestamp>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdl 0x8(%rsp),%xmm0
divsd  0xecb(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define double @timestamp() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define double @timestamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %10, %6
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ termflag_set();
void terminate(void) { termflag_set(); }


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

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

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

LLVM IR (-O2):
define void @terminate() {
%1 = tail call i32 (...) @termflag_set()
ret void
}
int fun954() { return 954; }


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

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

LLVM IR (-O0):
define i32 @fun954() {
ret i32 954
}

LLVM IR (-O2):
define i32 @fun954() {
ret i32 954
}
setsuf(s, ch) char s[];
{
  char *os;
  os = s;
  while (*s++)
    ;
  s[-2] = ch;
  return (os);
}


x86 assembly (clang, -O0):
<setsuf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1130 <setsuf+0x30>
jmp    1113 <setsuf+0x13>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,-0x2(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setsuf>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <setsuf+0x10>
mov    %sil,-0x2(%rcx)
ret

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

LLVM IR (-O2):
define i32 @setsuf(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = trunc i32 %1 to i8
%10 = getelementptr inbounds i8, i8* %4, i64 -1
store i8 %9, i8* %10
%11 = ptrtoint i8* %0 to i64
%12 = trunc i64 %11 to i32
ret i32 %12
}
int WHILEBODY() {}


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

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

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

LLVM IR (-O2):
define i32 @WHILEBODY() {
ret i32 undef
}
int dummyfn2(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<dummyfn2>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @dummyfn2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
double DegtoRad(double);
double cos(double);
double HeadWind(double WindSpeed, double WindAngle) {
  double Wangle = DegtoRad(WindAngle);
  return (cos(Wangle) * WindSpeed);
}


x86 assembly (clang, -O0):
<HeadWind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <DegtoRad@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <cos@plt>
mulsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HeadWind>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
call   1030 <DegtoRad@plt>
call   1040 <cos@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @HeadWind(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = call double @DegtoRad(double %6)
store double %7, double* %5
%8 = load double, double* %5
%9 = call double @cos(double %8)
%10 = load double, double* %3
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @HeadWind(double %0, double %1) {
%3 = tail call double @DegtoRad(double %1)
%4 = tail call double @cos(double %3)
%5 = fmul double %4, %0
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strlen(char const *);
scalar_t__ xrealloc(char *, size_t);
char *append(char *str1, const char *str2) {
  size_t len1, len2;
  len1 = strlen(str1);
  len2 = strlen(str2);
  str1 = (char *)xrealloc(str1, len1 + len2 + 1);
  memcpy(str1 + len1, str2, len2 + 1);
  return str1;
}


x86 assembly (clang, -O0):
<append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    -0x20(%rbp),%rsi
add    $0x1,%rsi
call   1040 <xrealloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
add    $0x1,%rdx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    (%rax,%rbx,1),%rsi
add    $0x1,%rsi
lea    0x1(%rax),%r12
mov    %r15,%rdi
call   1040 <xrealloc@plt>
mov    %rax,%r15
add    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1050 <memcpy@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @append(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 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = load i64, i64* %6
%14 = add i64 %12, %13
%15 = add i64 %14, 1
%16 = call i64 @xrealloc(i8* %11, i64 %15)
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %3
%18 = load i8*, i8** %3
%19 = load i64, i64* %5
%20 = getelementptr inbounds i8, i8* %18, i64 %19
%21 = load i8*, i8** %4
%22 = load i64, i64* %6
%23 = add i64 %22, 1
%24 = call i32 @memcpy(i8* %20, i8* %21, i64 %23)
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
define i8* @append(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %4, 1
%6 = add i64 %5, %3
%7 = tail call i64 @xrealloc(i8* %0, i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = getelementptr inbounds i8, i8* %8, i64 %3
%10 = tail call i32 @memcpy(i8* %9, i8* %1, i64 %5)
ret i8* %8
}
unsigned t11(signed char input) {
  unsigned output;
  __asm__("nop" : "=a"(output) : "0"(input));
  return output;
}


x86 assembly (clang, -O0):
<t11>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
nop
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @t11(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = call i32 asm "nop", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @t11(i8 signext %0) {
%2 = zext i8 %0 to i32
%3 = tail call i32 asm "nop", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ extern_func1_5(int, char *, unsigned long);
void extern_func1_4(int a, char *b, unsigned long c) {
  extern_func1_5(a, b, c);
}


x86 assembly (clang, -O0):
<extern_func1_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <extern_func1_5@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extern_func1_4>:
jmp    1030 <extern_func1_5@plt>

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

LLVM IR (-O2):
define void @extern_func1_4(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @extern_func1_5(i32 %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, void *);
int main() {
  struct timeval t;
  gettimeofday(&t, (void *)0);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
store i32 0, i32* %1
%3 = call i32 @gettimeofday(%struct.timeval* %2, i8* null)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i8* null)
ret i32 0
}
/* Variables and functions */
int strcmp(char *, char *);
int compareAlias(char *data, char *alias) { return strcmp(data, alias); }


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

x86 assembly (clang, -O2):
<compareAlias>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compareAlias(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
void *csGetLibrarySymbol(void *library, const char *procedureName) {
  return NULL;
}


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

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

LLVM IR (-O0):
define i8* @csGetLibrarySymbol(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @csGetLibrarySymbol(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
int test_imm_A8int16_reg(short val) {
  return ((val) & (0xA8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A8int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xa8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A8int16_reg>:
test   $0xa8,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A8int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 168
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A8int16_reg(i16 signext %0) {
%2 = and i16 %0, 168
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int somaCubos(int);
int main() {
  printf("Soma dos n primeiros cubos de 1 a 7: %d", somaCubos(7));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1040 <somaCubos@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Soma dos n primeiros cubos de 1 a 7: %d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @somaCubos(i32 7)
%3 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Soma dos n primeiros cubos de 1 a 7: %d\00"
define i32 @main() {
%1 = tail call i32 @somaCubos(i32 7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double abs(double a) { return (a >= 0) ? a : -a; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <abs+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <abs+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @abs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @abs(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float result;
  result = (3.31e-8 * 2.01e-7) / (7.16e-6 * 2.01e-8);
  printf("result = %e", result);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"result = %e\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0x3FA7AB5580000000, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"result = %e\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x3FA7AB5580000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ leftshiftone(char *, int);
void shiftleft(char s[], int n, int m) {
  while (m--) {
    leftshiftone(s, n);
  }
}


x86 assembly (clang, -O0):
<shiftleft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     1147 <shiftleft+0x37>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <leftshiftone@plt>
jmp    1122 <shiftleft+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shiftleft>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
je     1130 <shiftleft+0x20>
mov    %edx,%ebx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rbp,%rdi
mov    %r14d,%esi
call   1030 <leftshiftone@plt>
add    $0xffffffff,%ebx
jne    1120 <shiftleft+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @shiftleft(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %10, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %7, %5 ], [ %2, %3 ]
%7 = add nsw i32 %6, -1
%8 = tail call i32 @leftshiftone(i8* %0, i32 %1)
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %3
ret void
}
unsigned int g3(unsigned int a) {
  return ((a >> 24) & 0x000000ff) | ((a << 8) & 0xffffff00U);
}


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

x86 assembly (clang, -O2):
<g3>:
mov    %edi,%eax
rol    $0x8,%eax
ret

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

LLVM IR (-O2):
define i32 @g3(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 8)
ret i32 %2
}
float maxf(float x, float y) { return x > y ? x : y; }


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

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

LLVM IR (-O0):
define float @maxf(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 @maxf(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}