xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cblas_cdotc_sub(int const, void const *, int const,
                                   void const *, int const, void *);
void acc_cdotc_sub_(const int *N, const void *X, const int *incX, const void *Y,
                    const int *incY, void *dotc) {
  cblas_cdotc_sub(*N, X, *incX, Y, *incY, dotc);
}


x86 assembly (clang, -O0):
<acc_cdotc_sub_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    (%rax),%r8d
mov    -0x30(%rbp),%r9
call   1030 <cblas_cdotc_sub@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acc_cdotc_sub_>:
mov    (%rdi),%edi
mov    (%rdx),%edx
mov    (%r8),%r8d
jmp    1030 <cblas_cdotc_sub@plt>

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

LLVM IR (-O2):
define void @acc_cdotc_sub_(i32* nocapture %0, i8* %1, i32* nocapture %2, i8* %3, i32* nocapture %4, i8* %5) {
%7 = load i32, i32* %0
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = tail call i32 @cblas_cdotc_sub(i32 %7, i8* %1, i32 %8, i8* %3, i32 %9, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printChar(char);
void nextLine() {
  printChar('\r');
  printChar('\n');
}


x86 assembly (clang, -O0):
<nextLine>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%edi
call   1030 <printChar@plt>
mov    $0xa,%edi
call   1030 <printChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextLine>:
push   %rax
mov    $0xd,%edi
call   1030 <printChar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <printChar@plt>

LLVM IR (-O0):
define void @nextLine() {
%1 = call i32 @printChar(i8 signext 13)
%2 = call i32 @printChar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @nextLine() {
%1 = tail call i32 @printChar(i8 signext 13)
%2 = tail call i32 @printChar(i8 signext 10)
ret void
}
/* Variables and functions */
int getchar();
scalar_t__ isspace(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int c;
  c = getchar();
  if (isspace(c)) {
    printf("c = 0x%02x, Standard White Space Characters!\n", c);
  } else {
    printf("c = 0x%02x, Not Standard White Space Characters!\n", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     116f <main+0x3f>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <main+0x4e>
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <isspace@plt>
test   %rax,%rax
lea    0xee3(%rip),%rax
lea    0xeae(%rip),%rdi
cmove  %rax,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"c = 0x%02x, Standard White Space Characters!\0A\00"
@.str.1 = [50 x i8] c"c = 0x%02x, Not Standard White Space Characters!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @isspace(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %13
10: ; preds = %0
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"c = 0x%02x, Standard White Space Characters!\0A\00"
@.str.1 = [50 x i8] c"c = 0x%02x, Not Standard White Space Characters!\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = tail call i64 @isspace(i32 %1)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i32 %1)
ret i32 0
}
int f_i4(int i0, int i1, int i2, int i3) { return i3; }


x86 assembly (clang, -O0):
<f_i4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_i4>:
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f_i4(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_i4(i32 %0, i32 %1, i32 %2, i32 returned %3) {
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ crush_hash32_rjenkins1_2(int /*<<< orphan*/,
                                            int /*<<< orphan*/);
__u32 crush_hash32_2(int type, __u32 a, __u32 b) {
  switch (type) {
  case 0:
    return crush_hash32_rjenkins1_2(a, b);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<crush_hash32_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    1144 <crush_hash32_2+0x34>
jmp    1131 <crush_hash32_2+0x21>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <crush_hash32_rjenkins1_2@plt>
mov    %eax,-0x4(%rbp)
jmp    114b <crush_hash32_2+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crush_hash32_2>:
test   %edi,%edi
je     1117 <crush_hash32_2+0x7>
xor    %eax,%eax
ret
mov    %esi,%edi
mov    %edx,%esi
jmp    1030 <crush_hash32_rjenkins1_2@plt>

LLVM IR (-O0):
define i32 @crush_hash32_2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
switch i32 %8, label %13 [
i32 0, label %9
]
9: ; preds = %3
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @crush_hash32_rjenkins1_2(i32 %10, i32 %11)
store i32 %12, i32* %4
br label %14
13: ; preds = %3
store i32 0, i32* %4
br label %14
14: ; preds = %13, %9
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
define i32 @crush_hash32_2(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @crush_hash32_rjenkins1_2(i32 %1, i32 %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ 0, %3 ]
ret i32 %8
}
int psh_num_builtins() { return 8; }


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

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

LLVM IR (-O0):
define i32 @psh_num_builtins() {
ret i32 8
}

LLVM IR (-O2):
define i32 @psh_num_builtins() {
ret i32 8
}
unsigned char char64(unsigned char c) {
  return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
      [c & 0x3f];
}


x86 assembly (clang, -O0):
<char64>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x3f,%eax
movslq %eax,%rcx
lea    0xee5(%rip),%rax
movzbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char64>:
and    $0x3f,%edi
lea    0xef6(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define zeroext i8 @char64(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 63
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %6
%8 = load i8, i8* %7
ret i8 %8
}

LLVM IR (-O2):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define zeroext i8 @char64(i8 zeroext %0) {
%2 = and i8 %0, 63
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
/* Variables and functions */
scalar_t__ avx512_enabled();
int tst_audit10_aux();
int do_test(void) {
  if (avx512_enabled())
    return tst_audit10_aux();
  else
    return 77;
}


x86 assembly (clang, -O0):
<do_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <avx512_enabled@plt>
cmp    $0x0,%rax
je     1148 <do_test+0x28>
mov    $0x0,%al
call   1030 <tst_audit10_aux@plt>
mov    %eax,-0x4(%rbp)
jmp    114f <do_test+0x2f>
movl   $0x4d,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_test>:
push   %rax
xor    %eax,%eax
call   1040 <avx512_enabled@plt>
test   %rax,%rax
je     1135 <do_test+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <tst_audit10_aux@plt>
mov    $0x4d,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @do_test() {
%1 = alloca i32
%2 = call i64 (...) @avx512_enabled()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @tst_audit10_aux()
store i32 %5, i32* %1
br label %7
6: ; preds = %0
store i32 77, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @do_test() {
%1 = tail call i64 (...) @avx512_enabled()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @tst_audit10_aux()
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 77, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *zerobuf(void) {
  static char buf[512];
  memset(buf, 0, 512);
  return buf;
}


x86 assembly (clang, -O0):
<zerobuf>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1030 <memset@plt>
lea    0x2f12(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zerobuf>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@zerobuf.buf = internal global [512 x i8] zeroinitializer
define i8* @zerobuf() {
%1 = call i32 @memset(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @zerobuf.buf, i64 0, i64 0), i32 0, i32 512)
ret i8* getelementptr inbounds ([512 x i8], [512 x i8]* @zerobuf.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@zerobuf.buf = internal global [512 x i8] zeroinitializer
define i8* @zerobuf() {
%1 = tail call i32 @memset(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @zerobuf.buf, i64 0, i64 0), i32 0, i32 512)
ret i8* getelementptr inbounds ([512 x i8], [512 x i8]* @zerobuf.buf, i64 0, i64 0)
}
int factorial(int n) {
  int fac;
  fac = 1;
  while (n--)
    fac *= n;
  return fac;
}


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1131 <factorial+0x31>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110e <factorial+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @factorial(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
unsigned getval_399() { return 3269495112U; }


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

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

LLVM IR (-O0):
define i32 @getval_399() {
ret i32 -1025472184
}

LLVM IR (-O2):
define i32 @getval_399() {
ret i32 -1025472184
}
/* Variables and functions */
int /*<<< orphan*/ utest_control();
void utest_adts_list(void) {
  utest_control();
  return;
}


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

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

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

LLVM IR (-O2):
define void @utest_adts_list() {
%1 = tail call i32 (...) @utest_control()
ret void
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  if (isupper(c)) {
    return c - 'A' + 'a';
  }
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113e <tolower+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <tolower+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void SHAREMIND_MAP_KEY_FREE_char(char *const dest) { (void)dest; }


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_char(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int srand(int);
int srandom(int x) { return srand(x); }


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

x86 assembly (clang, -O2):
<srandom>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define i32 @srandom(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret i32 %2
}
short error_get_module_error(const int error) {
  return (error & ((1 << ((4))) - 1));
}


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

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

LLVM IR (-O0):
define signext i16 @error_get_module_error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
%5 = trunc i32 %4 to i16
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @error_get_module_error(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = and i16 %2, 15
ret i16 %3
}
void swapchar(void *a, void *b) {
  char t = *((char *)b);
  *((char *)b) = *((char *)a);
  *((char *)a) = t;
}


x86 assembly (clang, -O0):
<swapchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapchar>:
mov    (%rsi),%al
mov    (%rdi),%cl
mov    %cl,(%rsi)
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @swapchar(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8, i8* %0
store i8 %4, i8* %1
store i8 %3, i8* %0
ret void
}
int elf16(unsigned char *buf, int le) {
  if (le)
    return buf[0] | buf[1] << 8;
  return buf[0] << 8 | buf[1];
}


x86 assembly (clang, -O0):
<elf16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1131 <elf16+0x31>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <elf16+0x48>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf16>:
movzbl (%rdi),%ecx
test   %esi,%esi
je     1111 <elf16+0x11>
movzbl 0x1(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
ret
shl    $0x8,%ecx
movzbl 0x1(%rdi),%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @elf16(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = load i8, i8* %0
%5 = zext i8 %4 to i32
br i1 %3, label %12, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl nuw nsw i32 %9, 8
%11 = or i32 %10, %5
br label %18
12: ; preds = %2
%13 = shl nuw nsw i32 %5, 8
%14 = getelementptr inbounds i8, i8* %0, i64 1
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = or i32 %13, %16
br label %18
18: ; preds = %12, %6
%19 = phi i32 [ %11, %6 ], [ %17, %12 ]
ret i32 %19
}
int __crow_eq(int a, int b) { return a == b; }


x86 assembly (clang, -O0):
<__crow_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__crow_eq>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @__crow_eq(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 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__crow_eq(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int test_uvarint(int);
char *test_uvarint2() {
  do {
    if (!(test_uvarint(0x01c8) == 200))
      return "error, test_uvarint2";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_uvarint2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1c8,%edi
call   1030 <test_uvarint@plt>
cmp    $0xc8,%eax
je     113d <test_uvarint2+0x2d>
lea    0xecc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114a <test_uvarint2+0x3a>
jmp    1142 <test_uvarint2+0x32>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uvarint2>:
push   %rax
mov    $0x1c8,%edi
call   1030 <test_uvarint@plt>
xor    %ecx,%ecx
cmp    $0xc8,%eax
lea    0xed7(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"error, test_uvarint2\00"
define i8* @test_uvarint2() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i32 @test_uvarint(i32 456)
%4 = icmp eq i32 %3, 200
br i1 %4, label %6, label %5
5: ; preds = %2
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %1
br label %8
6: ; preds = %2
br label %7
7: ; preds = %6
store i8* null, i8** %1
br label %8
8: ; preds = %7, %5
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@.str = [21 x i8] c"error, test_uvarint2\00"
define i8* @test_uvarint2() {
%1 = tail call i32 @test_uvarint(i32 456)
%2 = icmp eq i32 %1, 200
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ one;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(char *, int);
int main(void) {
  int one = 1;
  if (sizeof(int) != 4 * sizeof(char))
    exit(0);
  foo((char *)&one, sizeof(one));
  foo((char *)&one, sizeof(one));
  if (one != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <foo@plt>
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <foo@plt>
cmpl   $0x1,-0x8(%rbp)
je     1173 <main+0x43>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x1,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <foo@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <foo@plt>
cmpl   $0x1,0xc(%rsp)
jne    116a <main+0x3a>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @foo(i8* %3, i32 4)
%5 = bitcast i32* %2 to i8*
%6 = call i32 @foo(i8* %5, i32 4)
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @foo(i8* %2, i32 4)
%4 = call i32 @foo(i8* %2, i32 4)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
%10 = call i32 @exit(i32 0)
unreachable
}
int ord(char c) { return (int)c; }


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

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

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

LLVM IR (-O2):
define i32 @ord(i8 signext %0) {
%2 = sext i8 %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ FATAL(char *, char const *);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *tostring(const char *s) {
  char *p;
  p = (char *)malloc(strlen(s) + 1);
  if (p == NULL)
    FATAL("out of space in tostring on %s", s);
  strcpy(p, s);
  return (p);
}


x86 assembly (clang, -O0):
<tostring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1180 <tostring+0x40>
mov    -0x8(%rbp),%rsi
lea    0xe85(%rip),%rdi
call   1030 <FATAL@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tostring>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116c <tostring+0x2c>
lea    0xe9c(%rip),%rdi
mov    %r14,%rsi
call   1030 <FATAL@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"out of space in tostring on %s\00"
define i8* @tostring(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 i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @FATAL(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %1
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = call i32 @strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [31 x i8] c"out of space in tostring on %s\00"
define i8* @tostring(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @FATAL(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %1
%10 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ be32toh(scalar_t__);
int cmp(const void *a, const void *b) {
  uint32_t x = be32toh(*(uint32_t *)(a)), y = be32toh(*(uint32_t *)(b));
  return x < y ? -1 : x > y ? 1 : 0;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <be32toh@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <be32toh@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    115b <cmp+0x4b>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1173 <cmp+0x63>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rdi),%rdi
call   1030 <be32toh@plt>
mov    %rax,%r14
mov    (%rbx),%rdi
call   1030 <be32toh@plt>
xor    %ecx,%ecx
cmp    %rax,%r14
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = tail call i64 @be32toh(i64 %4)
%6 = bitcast i8* %1 to i64*
%7 = load i64, i64* %6
%8 = tail call i64 @be32toh(i64 %7)
%9 = icmp slt i64 %5, %8
%10 = icmp sgt i64 %5, %8
%11 = zext i1 %10 to i32
%12 = select i1 %9, i32 -1, i32 %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Nombre: Federico Pereira\n");
  printf("Teléfono: 5491161002324\n");
  printf("Mail: <lord.basex@gmail.com>\n");
  printf("Fecha de nacimiento: 15/01/1978\n");
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Nombre: Federico Pereira\0A\00"
@.str.1 = [26 x i8] c"Tel\C3\A9fono: 5491161002324\0A\00"
@.str.2 = [30 x i8] c"Mail: <lord.basex@gmail.com>\0A\00"
@.str.3 = [33 x i8] c"Fecha de nacimiento: 15/01/1978\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"Nombre: Federico Pereira\00"
@str.4 = [25 x i8] c"Tel\C3\A9fono: 5491161002324\00"
@str.5 = [29 x i8] c"Mail: <lord.basex@gmail.com>\00"
@str.6 = [32 x i8] c"Fecha de nacimiento: 15/01/1978\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
int s4l(int a, int b) { return a * 4 + b; }


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

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

LLVM IR (-O0):
define i32 @s4l(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, 4
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @s4l(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 2
%4 = add nsw i32 %3, %1
ret i32 %4
}
double GetTime(double *sln, int yardage) {
  double size = sln[50001 * 10 + 1];
  if (yardage < size) {
    return sln[10 * yardage + 3];
  } else
    return 0;
}


x86 assembly (clang, -O0):
<GetTime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x3d0958(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    114d <GetTime+0x4d>
mov    -0x10(%rbp),%rax
imul   $0xa,-0x14(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <GetTime+0x55>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTime>:
cvtsi2sd %esi,%xmm1
movsd  0x3d0958(%rdi),%xmm2
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
jbe    1122 <GetTime+0x22>
add    %esi,%esi
lea    (%rsi,%rsi,4),%eax
cltq
movsd  0x18(%rdi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @GetTime(double* %0, i32 %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
store double* %0, double** %4
store i32 %1, i32* %5
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 500011
%9 = load double, double* %8
store double %9, double* %6
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = load double, double* %6
%13 = fcmp olt double %11, %12
br i1 %13, label %14, label %22
14: ; preds = %2
%15 = load double*, double** %4
%16 = load i32, i32* %5
%17 = mul nsw i32 10, %16
%18 = add nsw i32 %17, 3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %15, i64 %19
%21 = load double, double* %20
store double %21, double* %3
br label %23
22: ; preds = %2
store double 0.000000e+00, double* %3
br label %23
23: ; preds = %22, %14
%24 = load double, double* %3
ret double %24
}

LLVM IR (-O2):
define double @GetTime(double* nocapture %0, i32 %1) {
%3 = getelementptr inbounds double, double* %0, i64 500011
%4 = load double, double* %3
%5 = sitofp i32 %1 to double
%6 = fcmp ogt double %4, %5
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = mul nsw i32 %1, 10
%9 = add nsw i32 %8, 3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
br label %13
13: ; preds = %2, %7
%14 = phi double [ %12, %7 ], [ 0.000000e+00, %2 ]
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ c(char *);
int /*<<< orphan*/ resolve_back();
void Again() {
  c("branch");
  resolve_back();
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"branch\00"
define void @Again() {
%1 = call i32 @c(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @resolve_back()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"branch\00"
define void @Again() {
%1 = tail call i32 @c(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @resolve_back()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_umst(int, int);
void co__mst(int mr, int vr) { e_umst(mr, vr); }


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

x86 assembly (clang, -O2):
<co__mst>:
jmp    1030 <e_umst@plt>

LLVM IR (-O0):
define void @co__mst(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 = call i32 @e_umst(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @co__mst(i32 %0, i32 %1) {
%3 = tail call i32 @e_umst(i32 %0, i32 %1)
ret void
}
void NV21ToRGB24Row_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @NV21ToRGB24Row_Any_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_if_queue();
int /*<<< orphan*/ netlink_interface_lookup();
void init_interface_queue(void) {
  init_if_queue();
  netlink_interface_lookup();
}


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

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

LLVM IR (-O0):
define void @init_interface_queue() {
%1 = call i32 (...) @init_if_queue()
%2 = call i32 (...) @netlink_interface_lookup()
ret void
}

LLVM IR (-O2):
define void @init_interface_queue() {
%1 = tail call i32 (...) @init_if_queue()
%2 = tail call i32 (...) @netlink_interface_lookup()
ret void
}
char *strcpy(char *restrict dest, const char *restrict src) {
  const unsigned char *s = (const unsigned char *)src;
  unsigned char *d = (unsigned char *)dest;
  while ((*d++ = *s++)) {
  }
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    -0x20(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     114b <strcpy+0x4b>
jmp    111c <strcpy+0x1c>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* noalias returned writeonly %0, i8* noalias nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
void *mbuff_attach_at(char const *, int, int /*<<< orphan*/ *);
void *mbuff_attach(const char *name, int size) {
  return mbuff_attach_at(name, size, NULL);
}


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

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

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

LLVM IR (-O2):
define i8* @mbuff_attach(i8* %0, i32 %1) {
%3 = tail call i8* @mbuff_attach_at(i8* %0, i32 %1, i32* null)
ret i8* %3
}
/* Variables and functions */
scalar_t__ EINVAL;
scalar_t__ ERANGE;
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
unsigned long strtoul(char const *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ usage();
unsigned long int xstrtoul(const char *nptr) {
  unsigned long int r = strtoul(nptr, NULL, 10);
  if (errno == EINVAL || errno == ERANGE) {
    usage();
    exit(EXIT_FAILURE);
  }
  return r;
}


x86 assembly (clang, -O0):
<xstrtoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e7f(%rip),%rax
mov    (%rax),%rax
mov    0x2e65(%rip),%rcx
cmp    (%rcx),%rax
je     1186 <xstrtoul+0x56>
mov    0x2e65(%rip),%rax
mov    (%rax),%rax
mov    0x2e6b(%rip),%rcx
cmp    (%rcx),%rax
jne    119b <xstrtoul+0x6b>
mov    $0x0,%al
call   1030 <usage@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtoul>:
push   %rax
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    0x2e94(%rip),%rcx
mov    (%rcx),%rcx
mov    0x2e7a(%rip),%rdx
cmp    (%rdx),%rcx
je     1161 <xstrtoul+0x31>
mov    0x2e8e(%rip),%rdx
cmp    (%rdx),%rcx
je     1161 <xstrtoul+0x31>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <usage@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@EINVAL = global i64 0
@ERANGE = global i64 0
@EXIT_FAILURE = global i32 0
define i64 @xstrtoul(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strtoul(i8* %4, i32* null, i32 10)
store i64 %5, i64* %3
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINVAL
%8 = icmp eq i64 %6, %7
br i1 %8, label %13, label %9
9: ; preds = %1
%10 = load i64, i64* @errno
%11 = load i64, i64* @ERANGE
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %9, %1
%14 = call i32 (...) @usage()
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %9
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
@errno = global i64 0
@EINVAL = global i64 0
@ERANGE = global i64 0
@EXIT_FAILURE = global i32 0
define i64 @xstrtoul(i8* nocapture %0) {
%2 = tail call i64 @strtoul(i8* nocapture %0, i32* null, i32 10)
%3 = load i64, i64* @errno
%4 = load i64, i64* @EINVAL
%5 = icmp eq i64 %3, %4
%6 = load i64, i64* @ERANGE
%7 = icmp eq i64 %3, %6
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = tail call i32 (...) @usage()
%11 = load i32, i32* @EXIT_FAILURE
%12 = tail call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ do_east();
int /*<<< orphan*/ do_south();
void do_south_east_corner(void) {
  do_south();
  do_east();
}


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

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

LLVM IR (-O0):
define void @do_south_east_corner() {
%1 = call i32 (...) @do_south()
%2 = call i32 (...) @do_east()
ret void
}

LLVM IR (-O2):
define void @do_south_east_corner() {
%1 = tail call i32 (...) @do_south()
%2 = tail call i32 (...) @do_east()
ret void
}
/* Variables and functions */
int partition(int *, int, int);
void quicksort(int a[], int l, int r) {
  int j;
  if (l < r) {
    j = partition(a, l, r);
    quicksort(a, l, j - 1);
    quicksort(a, j + 1, r);
  }
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quicksort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quicksort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %3
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @partition(i32* %12, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
br label %24
24: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quicksort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void abort_me(int countdown) {
  if (countdown == 0) {
    abort();
  } else {
    abort_me(--countdown);
  }
}


x86 assembly (clang, -O0):
<abort_me>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113c <abort_me+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x4(%rbp)
call   1040 <abort_me@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abort_me>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @abort_me(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, -1
store i32 %9, i32* %2
br label %10
10: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @abort_me(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}