xunge/DecIR huggingface dataset:
long long int _f_llrint(double x) {
  long long int _result;
  asm("fistpll %0" : "=m"(_result) : "t"(x) : "st");
  return _result;
}


x86 assembly (clang, -O0):
<_f_llrint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
fistpll -0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_f_llrint>:
movsd  %xmm0,-0x10(%rsp)
fldl   -0x10(%rsp)
fistpll -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @_f_llrint(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @_f_llrint(double %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i64, i64* %2
ret i64 %4
}
/* Type definitions */
struct gpio {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gpio_mode(struct gpio *, int, int);
void gpio_uart1(void) { gpio_mode((struct gpio *)0x40010800, 9, 3 | 8); }


x86 assembly (clang, -O0):
<gpio_uart1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40010800,%edi
mov    $0x9,%esi
mov    $0xb,%edx
call   1030 <gpio_mode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_uart1>:
mov    $0x40010800,%edi
mov    $0x9,%esi
mov    $0xb,%edx
jmp    1030 <gpio_mode@plt>

LLVM IR (-O0):
%struct.gpio = type { i32 }
define void @gpio_uart1() {
%1 = call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073809408 to %struct.gpio*), i32 9, i32 11)
ret void
}

LLVM IR (-O2):
%struct.gpio = type { i32 }
define void @gpio_uart1() {
%1 = tail call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073809408 to %struct.gpio*), i32 9, i32 11)
ret void
}
/* Variables and functions */
scalar_t__ isalnum(char);
bool is_end_of_token(char c) {
  return !(isalnum(c) || c == '_' || c == '-' || c == '.' || c == '/');
}


x86 assembly (clang, -O0):
<is_end_of_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    117c <is_end_of_token+0x6c>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     117c <is_end_of_token+0x6c>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     117c <is_end_of_token+0x6c>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     117c <is_end_of_token+0x6c>
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_end_of_token>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1124 <is_end_of_token+0x14>
pop    %rbx
ret
lea    -0x2d(%rbx),%ecx
cmp    $0x32,%cl
ja     113f <is_end_of_token+0x2f>
movzbl %cl,%ecx
movabs $0x4000000000003,%rdx
bt     %rcx,%rdx
jb     1122 <is_end_of_token+0x12>
xor    %eax,%eax
cmp    $0x2f,%bl
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_end_of_token(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %22, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br i1 %9, label %22, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 45
br i1 %13, label %22, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 46
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 47
br label %22
22: ; preds = %18, %14, %10, %6, %1
%23 = phi i1 [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %21, %18 ]
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @is_end_of_token(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i8 %0, label %6 [
i8 95, label %9
i8 46, label %9
i8 45, label %9
]
6: ; preds = %5
%7 = icmp ne i8 %0, 47
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %5, %1, %6
%10 = phi i32 [ 0, %5 ], [ %8, %6 ], [ 0, %1 ], [ 0, %5 ], [ 0, %5 ]
ret i32 %10
}
void XtAppMainLoop() {}


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

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

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

LLVM IR (-O2):
define void @XtAppMainLoop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itex2MML_restart();
int /*<<< orphan*/ itex2MML_setup(char const *, size_t);
int itex2MML_yyparse(int /*<<< orphan*/);
int itex2MML_filter(const char *buffer, size_t length) {
  itex2MML_setup(buffer, length);
  itex2MML_restart();
  return itex2MML_yyparse(0);
}


x86 assembly (clang, -O0):
<itex2MML_filter>:
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 <itex2MML_setup@plt>
mov    $0x0,%al
call   1040 <itex2MML_restart@plt>
xor    %edi,%edi
call   1050 <itex2MML_yyparse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itex2MML_filter>:
push   %rax
call   1030 <itex2MML_setup@plt>
xor    %eax,%eax
call   1040 <itex2MML_restart@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <itex2MML_yyparse@plt>

LLVM IR (-O0):
define i32 @itex2MML_filter(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @itex2MML_setup(i8* %5, i64 %6)
%8 = call i32 (...) @itex2MML_restart()
%9 = call i32 @itex2MML_yyparse(i32 0)
ret i32 %9
}

LLVM IR (-O2):
define i32 @itex2MML_filter(i8* %0, i64 %1) {
%3 = tail call i32 @itex2MML_setup(i8* %0, i64 %1)
%4 = tail call i32 (...) @itex2MML_restart()
%5 = tail call i32 @itex2MML_yyparse(i32 0)
ret i32 %5
}
void __attribute__((__warning__("curl_easy_setopt expects a 'void *' or 'char "
                                "*' argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_postfields(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_postfields() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
float *id(float *f) { return f; }


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

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

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

LLVM IR (-O2):
define float* @id(float* readnone returned %0) {
ret float* %0
}
void INT_Excep_CAC_FERRF(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_CAC_FERRF() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ read_cmd();
int /*<<< orphan*/ stdout;
void repl() {
  while (1) {
    read_cmd();
    fflush(stdout);
  }
}


x86 assembly (clang, -O0):
<repl>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <repl+0x9>
mov    $0x0,%al
call   1030 <read_cmd@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
jmp    1129 <repl+0x9>

x86 assembly (clang, -O2):
<repl>:
push   %rbx
mov    0x2eb8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <read_cmd@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
jmp    1130 <repl+0x10>

LLVM IR (-O0):
@stdout = global i32 0
define void @repl() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @read_cmd()
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
br label %1
}

LLVM IR (-O2):
@stdout = global i32 0
define void @repl() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @read_cmd()
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ seteuid(int /*<<< orphan*/);
void set_cron_uid() {
  if (seteuid(0) < 0) {
    perror("seteuid");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<set_cron_uid>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <seteuid@plt>
cmp    $0x0,%rax
jge    115b <set_cron_uid+0x2b>
lea    0xeb4(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cron_uid>:
push   %rax
xor    %edi,%edi
call   1050 <seteuid@plt>
test   %rax,%rax
js     113f <set_cron_uid+0xf>
pop    %rax
ret
lea    0xeba(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"seteuid\00"
define void @set_cron_uid() {
%1 = call i64 @seteuid(i32 0)
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
6: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"seteuid\00"
define void @set_cron_uid() {
%1 = tail call i64 @seteuid(i32 0)
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int simplenum(int);
int main() {
  int k;
  printf("%d\n", simplenum(k));
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @simplenum(i32 undef)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int simple_hash_key(void *key) { return (int)key; }


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

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

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

LLVM IR (-O2):
define i32 @simple_hash_key(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int system(char *);
int main() {
  printf("LinkJVM Updater v1.0\n(c)2013, Markus Klein\nMIT License");
  return system(
      "cd /tmp;	echo 'Fetching latest LinkJVM package...';	wget "
      "http://files.mklein.co.at/LinkJVM/packages/latest.ipk;	echo "
      "'Installing latest LinkJVM package...';	opkg upgrade "
      "latest.ipk;	echo 'Done.';");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf03(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"LinkJVM Updater v1.0\0A(c)2013, Markus Klein\0AMIT License\00"
@.str.1 = [196 x i8] c"cd /tmp;\09echo 'Fetching latest LinkJVM package...';\09wget http://files.mklein.co.at/LinkJVM/packages/latest.ipk;\09echo 'Installing latest LinkJVM package...';\09opkg upgrade latest.ipk;\09echo 'Done.';\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([196 x i8], [196 x i8]* @.str.1, i64 0, i64 0))
ret i32 %3
}

LLVM IR (-O2):
@.str = [55 x i8] c"LinkJVM Updater v1.0\0A(c)2013, Markus Klein\0AMIT License\00"
@.str.1 = [196 x i8] c"cd /tmp;\09echo 'Fetching latest LinkJVM package...';\09wget http://files.mklein.co.at/LinkJVM/packages/latest.ipk;\09echo 'Installing latest LinkJVM package...';\09opkg upgrade latest.ipk;\09echo 'Done.';\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([196 x i8], [196 x i8]* @.str.1, i64 0, i64 0))
ret i32 %2
}
int unsignedLongCmpFn(const void *p1, const void *p2) {
  unsigned long v1, v2;
  v1 = *((unsigned long *)p1);
  v2 = *((unsigned long *)p2);
  if (v1 == v2)
    return 0;
  return (v1 < v2) ? -1 : +1;
}


x86 assembly (clang, -O0):
<unsignedLongCmpFn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    113c <unsignedLongCmpFn+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1157 <unsignedLongCmpFn+0x57>
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rsi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovb  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @unsignedLongCmpFn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
%8 = icmp ult i64 %4, %6
%9 = select i1 %8, i32 -1, i32 1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ sqrt(float);
float length2(float *v) { return (float)sqrt(v[0] * v[0] + v[1] * v[1]); }


x86 assembly (clang, -O0):
<length2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length2>:
push   %rax
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @length2(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fmul float %11, %14
%16 = call float @llvm.fmuladd.f32(float %5, float %8, float %15)
%17 = call i64 @sqrt(float %16)
%18 = sitofp i64 %17 to float
ret float %18
}

LLVM IR (-O2):
define float @length2(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = tail call i64 @sqrt(float %6)
%8 = sitofp i64 %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void debug(int x) { fprintf(stdout, "Info >> %d\n", x); }


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"Info >> %d\0A\00"
define void @debug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"Info >> %d\0A\00"
define void @debug(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int sign(int x) {
  if (x > 0)
    return 1;
  if (x < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111d <sign+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    113a <sign+0x3a>
cmpl   $0x0,-0x8(%rbp)
jge    1133 <sign+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    113a <sign+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
mov    %edi,%ecx
sar    $0x1f,%ecx
test   %edi,%edi
mov    $0x1,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @sign(i32 %0) {
%2 = ashr i32 %0, 31
%3 = icmp slt i32 %0, 1
%4 = select i1 %3, i32 %2, i32 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ CD_initialize(char *);
int /*<<< orphan*/ PARSE_initialize();
int /*<<< orphan*/ PARSE_set(char *, int);
void initialize(char *progname) {
  CD_initialize(progname);
  PARSE_initialize();
  PARSE_set(NULL, 1);
  PARSE_set("stack", 2);
  PARSE_set("by name", 3);
}


x86 assembly (clang, -O0):
<initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <CD_initialize@plt>
mov    $0x0,%al
call   1040 <PARSE_initialize@plt>
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <PARSE_set@plt>
lea    0xe9f(%rip),%rdi
mov    $0x2,%esi
call   1050 <PARSE_set@plt>
lea    0xe94(%rip),%rdi
mov    $0x3,%esi
call   1050 <PARSE_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize>:
push   %rax
call   1030 <CD_initialize@plt>
xor    %eax,%eax
call   1040 <PARSE_initialize@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <PARSE_set@plt>
lea    0xeb0(%rip),%rdi
mov    $0x2,%esi
call   1050 <PARSE_set@plt>
lea    0xea5(%rip),%rdi
mov    $0x3,%esi
pop    %rax
jmp    1050 <PARSE_set@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"stack\00"
@.str.1 = [8 x i8] c"by name\00"
define void @initialize(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @CD_initialize(i8* %3)
%5 = call i32 (...) @PARSE_initialize()
%6 = call i32 @PARSE_set(i8* null, i32 1)
%7 = call i32 @PARSE_set(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%8 = call i32 @PARSE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"stack\00"
@.str.1 = [8 x i8] c"by name\00"
define void @initialize(i8* %0) {
%2 = tail call i32 @CD_initialize(i8* %0)
%3 = tail call i32 (...) @PARSE_initialize()
%4 = tail call i32 @PARSE_set(i8* null, i32 1)
%5 = tail call i32 @PARSE_set(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = tail call i32 @PARSE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
int ntmtest_assert(int got, int line, const char *filepath) {
  if (got) {
    printf("PASS\t%04d\t%s\n", line, filepath);
    return 0;
  }
  printf("FAIL\t%04d\t%s\n", line, filepath);
  return 1;
}


x86 assembly (clang, -O0):
<ntmtest_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114b <ntmtest_assert+0x3b>
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1165 <ntmtest_assert+0x55>
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntmtest_assert>:
push   %rbx
xor    %ebx,%ebx
test   %edi,%edi
sete   %bl
lea    0xeef(%rip),%rax
lea    0xeda(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"PASS\09%04d\09%s\0A\00"
@.str.1 = [14 x i8] c"FAIL\09%04d\09%s\0A\00"
define i32 @ntmtest_assert(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %12)
store i32 0, i32* %4
br label %18
14: ; preds = %3
%15 = load i32, i32* %6
%16 = load i8*, i8** %7
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %15, i8* %16)
store i32 1, i32* %4
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
@.str = [14 x i8] c"PASS\09%04d\09%s\0A\00"
@.str.1 = [14 x i8] c"FAIL\09%04d\09%s\0A\00"
define i32 @ntmtest_assert(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
%6 = zext i1 %4 to i32
%7 = tail call i32 @printf(i8* %5, i32 %1, i8* %2)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((destructor)) void plugin_dtor(void) {
  printf("INFO: Calling plugin destructor.\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"INFO: Calling plugin destructor.\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @plugin_dtor, i8* null }]
define void @plugin_dtor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @plugin_dtor, i8* null }]
@str = [33 x i8] c"INFO: Calling plugin destructor.\00"
define void @plugin_dtor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int *);
void aligned_free(void *aligned_memory) {
  uint8_t *memory = (uint8_t *)aligned_memory;
  uint8_t offset = memory[-1];
  free(memory - offset);
}


x86 assembly (clang, -O0):
<aligned_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aligned_free>:
movslq -0x4(%rdi),%rax
shl    $0x2,%rax
sub    %rax,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @aligned_free(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 -1
%9 = load i32, i32* %8
store i32 %9, i32* %4
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = sub i64 0, %12
%14 = getelementptr inbounds i32, i32* %10, i64 %13
%15 = call i32 @free(i32* %14)
ret void
}

LLVM IR (-O2):
define void @aligned_free(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 -4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = sub nsw i64 0, %6
%8 = getelementptr inbounds i32, i32* %2, i64 %7
%9 = tail call i32 @free(i32* %8)
ret void
}
int ZeroFill(char *buf, int size) {
  int i;
  for (i = 0; i < size; i++)
    buf[i] = 0;
  return 0;
}


x86 assembly (clang, -O0):
<ZeroFill>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <ZeroFill+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <ZeroFill+0x12>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZeroFill>:
test   %esi,%esi
jle    1122 <ZeroFill+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ZeroFill(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 10;
  void *v;
  v = &i;
  int p = *((int *)v);
  printf("%d", p);
  return 0;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gdk_image_new() {
ret void
}
/* Variables and functions */
unsigned char *ripemd256_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_ripemd256(unsigned char *out,
                                     const unsigned char *in, size_t in_len) {
  return ripemd256_buffer(out, in, in_len);
}


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

x86 assembly (clang, -O2):
<hash_buffer_ripemd256>:
jmp    1030 <ripemd256_buffer@plt>

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

LLVM IR (-O2):
define i8* @hash_buffer_ripemd256(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @ripemd256_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
unsigned int f15(unsigned int);
unsigned int f16(unsigned int a) { return f15(f15(a)); }


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

x86 assembly (clang, -O2):
<f16>:
push   %rax
call   1030 <f15@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f15@plt>

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

LLVM IR (-O2):
define i32 @f16(i32 %0) {
%2 = tail call i32 @f15(i32 %0)
%3 = tail call i32 @f15(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void HibernateIntRegister(void (*pfnHandler)(void)) {
  IntRegister(59, pfnHandler);
  IntEnable(59);
}


x86 assembly (clang, -O0):
<HibernateIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x3b,%edi
call   1040 <IntRegister@plt>
mov    $0x3b,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateIntRegister>:
push   %rax
mov    %rdi,%rsi
mov    $0x3b,%edi
call   1040 <IntRegister@plt>
mov    $0x3b,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @HibernateIntRegister(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @IntRegister(i32 59, void (...)* %4)
%6 = call i32 @IntEnable(i32 59)
ret void
}

LLVM IR (-O2):
define void @HibernateIntRegister(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @IntRegister(i32 59, void (...)* %2)
%4 = tail call i32 @IntEnable(i32 59)
ret void
}
/* Variables and functions */
int rand();
int nopStat4(void *a1, void *a2, void *a3, void *a4) { return rand(); }


x86 assembly (clang, -O0):
<nopStat4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nopStat4(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i32 (...) @rand()
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
unsigned long I2CIntNumberGet(unsigned long);
int /*<<< orphan*/ I2CMasterBaseValid(unsigned long);
int /*<<< orphan*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
void I2CIntUnregister(unsigned long ulBase) {
  unsigned long ulInt;
  DEBUG_ASSERT(I2CMasterBaseValid(ulBase));
  ulInt = I2CIntNumberGet(ulBase);
  IntDisable(ulInt);
  IntUnregister(ulInt);
}


x86 assembly (clang, -O0):
<I2CIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <I2CMasterBaseValid@plt>
mov    %eax,%edi
call   1060 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1030 <I2CIntNumberGet@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <IntDisable@plt>
mov    -0x10(%rbp),%rdi
call   1070 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CIntUnregister>:
push   %rbx
mov    %rdi,%rbx
call   1040 <I2CMasterBaseValid@plt>
mov    %eax,%edi
call   1060 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
call   1030 <I2CIntNumberGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <IntDisable@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1070 <IntUnregister@plt>

LLVM IR (-O0):
define void @I2CIntUnregister(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @I2CMasterBaseValid(i64 %4)
%6 = call i32 @DEBUG_ASSERT(i32 %5)
%7 = load i64, i64* %2
%8 = call i64 @I2CIntNumberGet(i64 %7)
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i32 @IntDisable(i64 %9)
%11 = load i64, i64* %3
%12 = call i32 @IntUnregister(i64 %11)
ret void
}

LLVM IR (-O2):
define void @I2CIntUnregister(i64 %0) {
%2 = tail call i32 @I2CMasterBaseValid(i64 %0)
%3 = tail call i32 @DEBUG_ASSERT(i32 %2)
%4 = tail call i64 @I2CIntNumberGet(i64 %0)
%5 = tail call i32 @IntDisable(i64 %4)
%6 = tail call i32 @IntUnregister(i64 %4)
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int send(int, void const *, size_t, int);
ssize_t Send(int s, const void *buf, size_t len, int flags) {
  ssize_t retval;
  assert(buf != NULL);
  retval = send(s, buf, len, flags);
  if (retval == -1)
    Sys_failure("send");
  return retval;
}


x86 assembly (clang, -O0):
<Send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <send@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    1184 <Send+0x54>
lea    0xe81(%rip),%rdi
call   1050 <Sys_failure@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Send>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %edi,%ebx
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1040 <assert@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1030 <send@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1173 <Send+0x43>
lea    0xe92(%rip),%rdi
call   1050 <Sys_failure@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"send\00"
define i32 @Send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %5
%15 = load i8*, i8** %6
%16 = load i64, i64* %7
%17 = load i32, i32* %8
%18 = call i32 @send(i32 %14, i8* %15, i64 %16, i32 %17)
store i32 %18, i32* %9
%19 = load i32, i32* %9
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %23
21: ; preds = %4
%22 = call i32 @Sys_failure(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %21, %4
%24 = load i32, i32* %9
ret i32 %24
}

LLVM IR (-O2):
@.str = [5 x i8] c"send\00"
define i32 @Send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = icmp ne i8* %1, null
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 @send(i32 %0, i8* %1, i64 %2, i32 %3)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %4
ret i32 %8
}
int env_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @env_init() {
ret i32 0
}
/* Variables and functions */
float expf(float);
float coshf(float x) {
  x = expf(x);
  return ((x + (1.0 / x)) / 2.0);
}


x86 assembly (clang, -O0):
<coshf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <expf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xec2(%rip),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xeaa(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coshf>:
push   %rax
call   1030 <expf@plt>
cvtss2sd %xmm0,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xed6(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @coshf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @expf(float %3)
store float %4, float* %2
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fdiv double 1.000000e+00, %8
%10 = fadd double %6, %9
%11 = fdiv double %10, 2.000000e+00
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @coshf(float %0) {
%2 = tail call float @expf(float %0)
%3 = fpext float %2 to double
%4 = fdiv double 1.000000e+00, %3
%5 = fadd double %4, %3
%6 = fmul double %5, 5.000000e-01
%7 = fptrunc double %6 to float
ret float %7
}
int nn_device_rewritemsg(
    __attribute__((unused)) struct nn_device_recipe *device,
    __attribute__((unused)) int from, __attribute__((unused)) int to,
    __attribute__((unused)) int flags,
    __attribute__((unused)) struct nn_msghdr *msghdr,
    __attribute__((unused)) int bytes) {
  return 1;
}


x86 assembly (clang, -O0):
<nn_device_rewritemsg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.nn_device_recipe = type opaque
%struct.nn_msghdr = type opaque
define i32 @nn_device_rewritemsg(%struct.nn_device_recipe* %0, i32 %1, i32 %2, i32 %3, %struct.nn_msghdr* %4, i32 %5) {
%7 = alloca %struct.nn_device_recipe*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.nn_msghdr*
%12 = alloca i32
store %struct.nn_device_recipe* %0, %struct.nn_device_recipe** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store %struct.nn_msghdr* %4, %struct.nn_msghdr** %11
store i32 %5, i32* %12
ret i32 1
}

LLVM IR (-O2):
%struct.nn_device_recipe = type opaque
%struct.nn_msghdr = type opaque
define i32 @nn_device_rewritemsg(%struct.nn_device_recipe* nocapture readnone %0, i32 %1, i32 %2, i32 %3, %struct.nn_msghdr* nocapture readnone %4, i32 %5) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SA1Direct(int);
int /*<<< orphan*/ STZ16(int /*<<< orphan*/, int);
void Op64M0(void) { STZ16(SA1Direct(2), 0xFFFF); }


x86 assembly (clang, -O0):
<Op64M0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <SA1Direct@plt>
mov    %eax,%edi
mov    $0xffff,%esi
call   1030 <STZ16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op64M0>:
push   %rax
mov    $0x2,%edi
call   1040 <SA1Direct@plt>
mov    %eax,%edi
mov    $0xffff,%esi
pop    %rax
jmp    1030 <STZ16@plt>

LLVM IR (-O0):
define void @Op64M0() {
%1 = call i32 @SA1Direct(i32 2)
%2 = call i32 @STZ16(i32 %1, i32 65535)
ret void
}

LLVM IR (-O2):
define void @Op64M0() {
%1 = tail call i32 @SA1Direct(i32 2)
%2 = tail call i32 @STZ16(i32 %1, i32 65535)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int lookupB64(int);
void decode2(uint8_t *src, uint8_t *dst) {
  *dst = lookupB64(src[0]) << 2;
  *dst |= (lookupB64(src[1]) & 0x30) >> 4;
}


x86 assembly (clang, -O0):
<decode2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <lookupB64@plt>
mov    %eax,%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
call   1030 <lookupB64@plt>
mov    %eax,%ecx
and    $0x30,%ecx
sar    $0x4,%ecx
mov    -0x10(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <lookupB64@plt>
shl    $0x2,%eax
mov    %eax,(%r14)
mov    0x4(%rbx),%edi
call   1030 <lookupB64@plt>
shr    $0x4,%eax
and    $0x3,%eax
or     %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @decode2(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = call i32 @lookupB64(i32 %7)
%9 = shl i32 %8, 2
%10 = load i32*, i32** %4
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = call i32 @lookupB64(i32 %13)
%15 = and i32 %14, 48
%16 = ashr i32 %15, 4
%17 = load i32*, i32** %4
%18 = load i32, i32* %17
%19 = or i32 %18, %16
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @decode2(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @lookupB64(i32 %3)
%5 = shl i32 %4, 2
store i32 %5, i32* %1
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = tail call i32 @lookupB64(i32 %7)
%9 = lshr i32 %8, 4
%10 = and i32 %9, 3
%11 = load i32, i32* %1
%12 = or i32 %10, %11
store i32 %12, i32* %1
ret void
}
double s_mult(const double *a, const double *b) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}


x86 assembly (clang, -O0):
<s_mult>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @s_mult(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @s_mult(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}