xunge/DecIR huggingface dataset:
int krait_pmic_pre_disable(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @krait_pmic_pre_disable() {
ret i32 0
}
/* Variables and functions */
int rand();
int myrand() {
  int r = 0;
  for (int i = 0; i < 2; i++)
    r = (r << 15) | (rand() & 0x7FFF);
  return r & 0xFFFFFFFF;
}


x86 assembly (clang, -O0):
<myrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    115e <myrand+0x4e>
mov    -0x4(%rbp),%eax
shl    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    $0x7fff,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <myrand+0x16>
mov    -0x4(%rbp),%eax
and    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrand>:
push   %rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ebx
shl    $0xf,%ebx
and    $0x3fff8000,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
and    $0x7fff,%eax
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @myrand() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 2
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %1
%8 = shl i32 %7, 15
%9 = call i32 (...) @rand()
%10 = and i32 %9, 32767
%11 = or i32 %8, %10
store i32 %11, i32* %1
br label %12
12: ; preds = %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
%16 = load i32, i32* %1
%17 = and i32 %16, -1
ret i32 %17
}

LLVM IR (-O2):
define i32 @myrand() {
%1 = tail call i32 (...) @rand()
%2 = shl i32 %1, 15
%3 = and i32 %2, 1073709056
%4 = tail call i32 (...) @rand()
%5 = and i32 %4, 32767
%6 = or i32 %5, %3
ret i32 %6
}
unsigned long long
nlm_crypto_form_pkt_desc0(unsigned int tls, unsigned int hash_source,
                          unsigned int hashout_l3alloc, unsigned int encrypt,
                          unsigned int ivlen, unsigned long long hashdst_addr) {
  return (((unsigned long long)(tls) << (63)) |
          ((unsigned long long)(hash_source) << (62)) |
          ((unsigned long long)(hashout_l3alloc) << (60)) |
          ((unsigned long long)(encrypt) << (59)) |
          (((unsigned long long)((ivlen - 1)) & ((1ULL << (16)) - 1)) << (41)) |
          ((unsigned long long)(hashdst_addr) << (0)));
}


x86 assembly (clang, -O0):
<nlm_crypto_form_pkt_desc0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3f,%rax
mov    -0x8(%rbp),%ecx
shl    $0x3e,%rcx
or     %rcx,%rax
mov    -0xc(%rbp),%ecx
shl    $0x3c,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%ecx
shl    $0x3b,%rcx
or     %rcx,%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
and    $0xffff,%rcx
shl    $0x29,%rcx
or     %rcx,%rax
mov    -0x20(%rbp),%rcx
shl    $0x0,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlm_crypto_form_pkt_desc0>:
shl    $0x3f,%rdi
shl    $0x3e,%rsi
or     %rdi,%rsi
shl    $0x3c,%rdx
shl    $0x3b,%rcx
or     %rdx,%rcx
or     %rsi,%rcx
add    $0xffffffff,%r8d
movzwl %r8w,%eax
shl    $0x29,%rax
or     %rcx,%rax
or     %r9,%rax
ret

LLVM IR (-O0):
define i64 @nlm_crypto_form_pkt_desc0(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i64 %5, i64* %12
%13 = load i32, i32* %7
%14 = zext i32 %13 to i64
%15 = shl i64 %14, 63
%16 = load i32, i32* %8
%17 = zext i32 %16 to i64
%18 = shl i64 %17, 62
%19 = or i64 %15, %18
%20 = load i32, i32* %9
%21 = zext i32 %20 to i64
%22 = shl i64 %21, 60
%23 = or i64 %19, %22
%24 = load i32, i32* %10
%25 = zext i32 %24 to i64
%26 = shl i64 %25, 59
%27 = or i64 %23, %26
%28 = load i32, i32* %11
%29 = sub i32 %28, 1
%30 = zext i32 %29 to i64
%31 = and i64 %30, 65535
%32 = shl i64 %31, 41
%33 = or i64 %27, %32
%34 = load i64, i64* %12
%35 = shl i64 %34, 0
%36 = or i64 %33, %35
ret i64 %36
}

LLVM IR (-O2):
define i64 @nlm_crypto_form_pkt_desc0(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = zext i32 %0 to i64
%8 = shl i64 %7, 63
%9 = zext i32 %1 to i64
%10 = shl i64 %9, 62
%11 = or i64 %10, %8
%12 = zext i32 %2 to i64
%13 = shl i64 %12, 60
%14 = or i64 %11, %13
%15 = zext i32 %3 to i64
%16 = shl i64 %15, 59
%17 = or i64 %14, %16
%18 = add i32 %4, 65535
%19 = and i32 %18, 65535
%20 = zext i32 %19 to i64
%21 = shl nuw nsw i64 %20, 41
%22 = or i64 %21, %17
%23 = or i64 %22, %5
ret i64 %23
}
int main(int argc, __attribute__((unused)) char *argv[argc + 1]) {
  static void *table[] = {&&func1_lbl, &&func2_lbl};
  goto *table[argc - 1];
func1_lbl:
  func1(2);
  return 0;
func2_lbl:
  func2(2);
  return 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2efa(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
jmp    1187 <main+0x67>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <func1@plt>
movl   $0x0,-0x4(%rbp)
jmp    117e <main+0x5e>
mov    $0x2,%edi
mov    $0x0,%al
call   1040 <func2@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x18(%rbp),%rax
jmp    *%rax

x86 assembly (clang, -O2):
<main>:
push   %rax
movslq %edi,%rax
lea    0x2ce5(%rip),%rcx
jmp    *-0x8(%rcx,%rax,8)
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <func1@plt>
jmp    1149 <main+0x29>
mov    $0x2,%edi
xor    %eax,%eax
call   1040 <func2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.table = internal global [2 x i8*] [i8* blockaddress(@main, %14), i8* blockaddress(@main, %16)]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* @main.table, i64 0, i64 %11
%13 = load i8*, i8** %12
br label %20
14: ; preds = %20
%15 = call i32 (i32, ...) bitcast (i32 (...)* @func1 to i32 (i32, ...)*)(i32 2)
store i32 0, i32* %3
br label %18
16: ; preds = %20
%17 = call i32 (i32, ...) bitcast (i32 (...)* @func2 to i32 (i32, ...)*)(i32 2)
store i32 0, i32* %3
br label %18
18: ; preds = %16, %14
%19 = load i32, i32* %3
ret i32 %19
20: ; preds = %2
%21 = phi i8* [ %13, %2 ]
indirectbr i8* %21, [label %14, label %16]
}

LLVM IR (-O2):
@main.table = internal unnamed_addr constant [2 x i8*] [i8* blockaddress(@main, %7), i8* blockaddress(@main, %9)]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* @main.table, i64 0, i64 %4
%6 = load i8*, i8** %5
indirectbr i8* %6, [label %7, label %9]
7: ; preds = %2
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @func1 to i32 (i32, ...)*)(i32 2)
br label %11
9: ; preds = %2
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @func2 to i32 (i32, ...)*)(i32 2)
br label %11
11: ; preds = %9, %7
ret i32 0
}
/* Variables and functions */
int strlen(char *);
int f(char *p) {
  int x = strlen(p);
  return x;
}


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

x86 assembly (clang, -O2):
<f>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @f(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ TCIOFLUSH;
int /*<<< orphan*/ sleep(int);
int tcflush(int, int /*<<< orphan*/);
int serialport_flush(int fd) {
  sleep(2);
  return tcflush(fd, TCIOFLUSH);
}


x86 assembly (clang, -O0):
<serialport_flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    -0x4(%rbp),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialport_flush>:
push   %rbx
mov    %edi,%ebx
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tcflush@plt>

LLVM IR (-O0):
@TCIOFLUSH = global i32 0
define i32 @serialport_flush(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @sleep(i32 2)
%4 = load i32, i32* %2
%5 = load i32, i32* @TCIOFLUSH
%6 = call i32 @tcflush(i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@TCIOFLUSH = global i32 0
define i32 @serialport_flush(i32 %0) {
%2 = tail call i32 @sleep(i32 2)
%3 = load i32, i32* @TCIOFLUSH
%4 = tail call i32 @tcflush(i32 %0, i32 %3)
ret i32 %4
}
void nop(char *lbuf, int schr) {}


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

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

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

LLVM IR (-O2):
define void @nop(i8* nocapture %0, i32 %1) {
ret void
}
void *dummy1(void *x) { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @dummy1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @dummy1(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int *custom_alloc(int);
void make_leak(void) {
  int *array2 __attribute__((unused)) = custom_alloc(sizeof(int) * 10);
  array2 = 0;
  return;
}


x86 assembly (clang, -O0):
<make_leak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x28,%edi
call   1030 <custom_alloc@plt>
mov    %rax,-0x8(%rbp)
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_leak>:
mov    $0x28,%edi
jmp    1030 <custom_alloc@plt>

LLVM IR (-O0):
define void @make_leak() {
%1 = alloca i32*
%2 = call i32* @custom_alloc(i32 40)
store i32* %2, i32** %1
store i32* null, i32** %1
ret void
}

LLVM IR (-O2):
define void @make_leak() {
%1 = tail call i32* @custom_alloc(i32 40)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int htons(int);
uint32_t wrapsum(uint32_t sum) {
  sum = ~sum & 0xFFFF;
  return (htons(sum));
}


x86 assembly (clang, -O0):
<wrapsum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    $0xffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <htons@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrapsum>:
not    %edi
movzwl %di,%edi
jmp    1030 <htons@plt>

LLVM IR (-O0):
define i32 @wrapsum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = and i32 %4, 65535
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @htons(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @wrapsum(i32 %0) {
%2 = and i32 %0, 65535
%3 = xor i32 %2, 65535
%4 = tail call i32 @htons(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int a = 6;
  printf("Hello, World!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 6, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void finalize_physics_engine(struct physics_engine *physics_engine) {}


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

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

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

LLVM IR (-O2):
%struct.physics_engine = type opaque
define void @finalize_physics_engine(%struct.physics_engine* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void menu_Mchar2(void) {
  printf("\r\n\tL => left motor\n\r");
  printf("\tR => right motor\n\r");
  printf("\tB => brake all\n\r");
  printf("\tJ => Jog Sequence (check for reliable code execution)\n\r");
  printf("\tU => up to top menu\n\r\n>");
}


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

x86 assembly (clang, -O2):
<menu_Mchar2>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"\0D\0A\09L => left motor\0A\0D\00"
@.str.1 = [20 x i8] c"\09R => right motor\0A\0D\00"
@.str.2 = [18 x i8] c"\09B => brake all\0A\0D\00"
@.str.3 = [57 x i8] c"\09J => Jog Sequence (check for reliable code execution)\0A\0D\00"
@.str.4 = [25 x i8] c"\09U => up to top menu\0A\0D\0A>\00"
define void @menu_Mchar2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0D\0A\09L => left motor\0A\0D\00"
@.str.1 = [20 x i8] c"\09R => right motor\0A\0D\00"
@.str.2 = [18 x i8] c"\09B => brake all\0A\0D\00"
@.str.3 = [57 x i8] c"\09J => Jog Sequence (check for reliable code execution)\0A\0D\00"
@.str.4 = [25 x i8] c"\09U => up to top menu\0A\0D\0A>\00"
define void @menu_Mchar2() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
ret void
}
space(x0, y0, x1, y1) {}


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

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

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

LLVM IR (-O2):
define i32 @space(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void stop_error(char *s) {
  printf("%s", s);
  printf(" Cannot proceed with MSBR execution");
  exit(0);
}


x86 assembly (clang, -O0):
<stop_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<stop_error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [36 x i8] c" Cannot proceed with MSBR execution\00"
define void @stop_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [36 x i8] c" Cannot proceed with MSBR execution\00"
define void @stop_error(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char toupper(unsigned char);
void StrToUpperCase(char *sPtr) {
  while (*sPtr != '\0') {
    *sPtr = toupper((unsigned char)*sPtr);
    ++sPtr;
  }
}


x86 assembly (clang, -O0):
<StrToUpperCase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1151 <StrToUpperCase+0x41>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <StrToUpperCase+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrToUpperCase>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <StrToUpperCase+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movzbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <StrToUpperCase+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @StrToUpperCase(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call signext i8 @toupper(i8 zeroext %10)
%12 = load i8*, i8** %2
store i8 %11, i8* %12
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @StrToUpperCase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 zeroext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void walt_mark_task_starting(struct task_struct *p) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @walt_mark_task_starting(%struct.task_struct* nocapture %0) {
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void norwegian_ISO_8859_1_close_env(struct SN_env *z) {
  SN_close_env(z);
}


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

x86 assembly (clang, -O2):
<norwegian_ISO_8859_1_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @norwegian_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @norwegian_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t apic_get_maxlvt(uint8_t *baseapic) {
  uint32_t v = *((uint32_t *)&baseapic[0x30]);
  if (v & 0xf0) {
    return (v >> 16) & 0xff;
  } else {
    return 2;
  }
}


x86 assembly (clang, -O0):
<apic_get_maxlvt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc0(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0xf0,%eax
cmp    $0x0,%eax
je     1139 <apic_get_maxlvt+0x39>
mov    -0x14(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <apic_get_maxlvt+0x40>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<apic_get_maxlvt>:
mov    0xc0(%rdi),%eax
mov    %eax,%ecx
shr    $0x10,%ecx
test   $0xf0,%al
movzbl %cl,%ecx
mov    $0x2,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @apic_get_maxlvt(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 48
%3 = load i32, i32* %2
%4 = and i32 %3, 240
%5 = icmp eq i32 %4, 0
%6 = lshr i32 %3, 16
%7 = and i32 %6, 255
%8 = select i1 %5, i32 2, i32 %7
ret i32 %8
}
int intel_msic_save_config_data(const char *name, void *data, int len) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @intel_msic_save_config_data(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @intel_msic_save_config_data(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
char utl_strdelc_check(char c, char *dels) {
  while (*dels) {
    if (c == *dels++)
      return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<utl_strdelc_check>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <utl_strdelc_check+0x47>
movsbl -0x2(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1142 <utl_strdelc_check+0x42>
movb   $0x1,-0x1(%rbp)
jmp    114b <utl_strdelc_check+0x4b>
jmp    110e <utl_strdelc_check+0xe>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utl_strdelc_check>:
movzbl (%rsi),%eax
test   %al,%al
je     1113 <utl_strdelc_check+0x13>
add    $0x1,%rsi
cmp    %dil,%al
jne    1100 <utl_strdelc_check>
mov    $0x1,%al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define signext i8 @utl_strdelc_check(i8 signext %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = icmp eq i8 %5, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = phi i8 [ 1, %7 ], [ 0, %3 ]
ret i8 %11
}
/* Variables and functions */
int /*<<< orphan*/ BuildIntTree();
int /*<<< orphan*/ LocateIntTreeCellCm();
int /*<<< orphan*/ ScanIntTree();
void ComputeForces() {
  BuildIntTree();
  LocateIntTreeCellCm();
  ScanIntTree();
}


x86 assembly (clang, -O0):
<ComputeForces>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <BuildIntTree@plt>
mov    $0x0,%al
call   1030 <LocateIntTreeCellCm@plt>
mov    $0x0,%al
call   1040 <ScanIntTree@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComputeForces>:
push   %rax
xor    %eax,%eax
call   1050 <BuildIntTree@plt>
xor    %eax,%eax
call   1030 <LocateIntTreeCellCm@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ScanIntTree@plt>

LLVM IR (-O0):
define void @ComputeForces() {
%1 = call i32 (...) @BuildIntTree()
%2 = call i32 (...) @LocateIntTreeCellCm()
%3 = call i32 (...) @ScanIntTree()
ret void
}

LLVM IR (-O2):
define void @ComputeForces() {
%1 = tail call i32 (...) @BuildIntTree()
%2 = tail call i32 (...) @LocateIntTreeCellCm()
%3 = tail call i32 (...) @ScanIntTree()
ret void
}
/* Type definitions */
struct triple {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
struct triple *do_farg(struct compile_state *, struct triple *, int);
struct triple *fretaddr(struct compile_state *state, struct triple *func) {
  return do_farg(state, func, 1);
}


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

x86 assembly (clang, -O2):
<fretaddr>:
mov    $0x1,%edx
jmp    1030 <do_farg@plt>

LLVM IR (-O0):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define %struct.triple* @fretaddr(%struct.compile_state* %0, %struct.triple* %1) {
%3 = alloca %struct.compile_state*
%4 = alloca %struct.triple*
store %struct.compile_state* %0, %struct.compile_state** %3
store %struct.triple* %1, %struct.triple** %4
%5 = load %struct.compile_state*, %struct.compile_state** %3
%6 = load %struct.triple*, %struct.triple** %4
%7 = call %struct.triple* @do_farg(%struct.compile_state* %5, %struct.triple* %6, i32 1)
ret %struct.triple* %7
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define %struct.triple* @fretaddr(%struct.compile_state* %0, %struct.triple* %1) {
%3 = tail call %struct.triple* @do_farg(%struct.compile_state* %0, %struct.triple* %1, i32 1)
ret %struct.triple* %3
}
/* Variables and functions */
int /*<<< orphan*/ t5a(int *);
int /*<<< orphan*/ t5b(int *);
void t5() {
  int a[] = {1, 2, 3};
  int *p = a;
  *p = 99;
  p = p + 1;
  *p = 98;
  p = p + 1;
  *p = 97;
  t5a(a);
  t5b(a);
}


x86 assembly (clang, -O0):
<t5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x63,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x62,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x61,(%rax)
lea    -0xc(%rbp),%rdi
call   1040 <t5a@plt>
lea    -0xc(%rbp),%rdi
call   1030 <t5b@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t5>:
push   %rbx
sub    $0x10,%rsp
movabs $0x6200000063,%rax
mov    %rax,0x4(%rsp)
movl   $0x61,0xc(%rsp)
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <t5a@plt>
mov    %rbx,%rdi
call   1030 <t5b@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.t5.a = [3 x i32] [i32 1, i32 2, i32 3]
define void @t5() {
%1 = alloca [3 x i32]
%2 = alloca i32*
%3 = bitcast [3 x i32]* %1 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = load i32*, i32** %2
store i32 99, i32* %5
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32* %7, i32** %2
%8 = load i32*, i32** %2
store i32 98, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32* %10, i32** %2
%11 = load i32*, i32** %2
store i32 97, i32* %11
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%13 = call i32 @t5a(i32* %12)
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%15 = call i32 @t5b(i32* %14)
ret void
}

LLVM IR (-O2):
define void @t5() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32 99, i32* %3
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
store i32 98, i32* %4
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
store i32 97, i32* %5
%6 = call i32 @t5a(i32* %3)
%7 = call i32 @t5b(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led1On();
void BlinkNoTimerTaskC__Leds__led1On(void) { LedsP__Leds__led1On(); }


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

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

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

LLVM IR (-O2):
define void @BlinkNoTimerTaskC__Leds__led1On() {
%1 = tail call i32 (...) @LedsP__Leds__led1On()
ret void
}
void sys_getfilenum_ex() { ; }


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

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

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

LLVM IR (-O2):
define void @sys_getfilenum_ex() {
ret void
}
void f(void) { __builtin_strdup("abc"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
define void @f() {
%1 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double time_stamps_get_millis(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  double curr_time =
      (((double)tv.tv_sec) * 1000.0f) + (((double)(tv.tv_usec)) / 1000.0f);
  return curr_time;
}


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

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

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @time_stamps_get_millis() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+03
%11 = call double @llvm.fmuladd.f64(double %6, double 1.000000e+03, double %10)
store double %11, double* %2
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @time_stamps_get_millis() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+03
%11 = tail call double @llvm.fmuladd.f64(double %6, double 1.000000e+03, double %10)
ret double %11
}
void ARGBCopy() {}


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

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

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

LLVM IR (-O2):
define void @ARGBCopy() {
ret void
}
void ARGBToYJRow_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToYJRow_Any_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void panic(const char *msg) {
  printf("%s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @panic(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
__attribute__((no)) int compute_flag(int i) {
  if (i % 10 < 4)
    return i + 1;
  return 0;
}


x86 assembly (clang, -O0):
<compute_flag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x4,%edx
jge    1129 <compute_flag+0x29>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <compute_flag+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_flag>:
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    %ecx,%edx
sub    %eax,%edx
add    $0x1,%ecx
xor    %eax,%eax
cmp    $0x4,%edx
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compute_flag(i32 %0) {
%2 = srem i32 %0, 10
%3 = icmp slt i32 %2, 4
%4 = add nsw i32 %0, 1
%5 = select i1 %3, i32 %4, i32 0
ret i32 %5
}
/* Variables and functions */
scalar_t__ mpc55xx_cache_aligned_start(void const *);
size_t mpc55xx_non_cache_aligned_size(const void *s) {
  return (uintptr_t)mpc55xx_cache_aligned_start(s) - (uintptr_t)s;
}


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

x86 assembly (clang, -O2):
<mpc55xx_non_cache_aligned_size>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mpc55xx_cache_aligned_start@plt>
sub    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mpc55xx_non_cache_aligned_size(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mpc55xx_cache_aligned_start(i8* %3)
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i64
%7 = sub i64 %4, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @mpc55xx_non_cache_aligned_size(i8* %0) {
%2 = tail call i64 @mpc55xx_cache_aligned_start(i8* %0)
%3 = ptrtoint i8* %0 to i64
%4 = sub i64 %2, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ init_definitions();
int /*<<< orphan*/ init_directives();
int /*<<< orphan*/ init_instructions();
void init_parsers(void) {
  init_definitions();
  init_directives();
  init_instructions();
}


x86 assembly (clang, -O0):
<init_parsers>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <init_definitions@plt>
mov    $0x0,%al
call   1040 <init_directives@plt>
mov    $0x0,%al
call   1050 <init_instructions@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_parsers>:
push   %rax
xor    %eax,%eax
call   1030 <init_definitions@plt>
xor    %eax,%eax
call   1040 <init_directives@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <init_instructions@plt>

LLVM IR (-O0):
define void @init_parsers() {
%1 = call i32 (...) @init_definitions()
%2 = call i32 (...) @init_directives()
%3 = call i32 (...) @init_instructions()
ret void
}

LLVM IR (-O2):
define void @init_parsers() {
%1 = tail call i32 (...) @init_definitions()
%2 = tail call i32 (...) @init_directives()
%3 = tail call i32 (...) @init_instructions()
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
pid_t vfork(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @vfork() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @vfork() {
ret i32 -1
}
float maths_interpolate(float x, float x1, float x2, float y1, float y2) {
  if (x1 == x2) {
    return y1;
  } else {
    float y = y1 + (y2 - y1) * (x - x1) / (x2 - x1);
    return y;
  }
}


x86 assembly (clang, -O0):
<maths_interpolate>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  %xmm4,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    1141 <maths_interpolate+0x41>
jp     1141 <maths_interpolate+0x41>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117f <maths_interpolate+0x7f>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
subss  -0x14(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  -0x10(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<maths_interpolate>:
ucomiss %xmm2,%xmm1
jne    110b <maths_interpolate+0xb>
jp     110b <maths_interpolate+0xb>
movaps %xmm3,%xmm0
ret
subss  %xmm3,%xmm4
subss  %xmm1,%xmm0
mulss  %xmm4,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
addss  %xmm0,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @maths_interpolate(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
%13 = load float, float* %8
%14 = load float, float* %9
%15 = fcmp oeq float %13, %14
br i1 %15, label %16, label %18
16: ; preds = %5
%17 = load float, float* %10
store float %17, float* %6
br label %33
18: ; preds = %5
%19 = load float, float* %10
%20 = load float, float* %11
%21 = load float, float* %10
%22 = fsub float %20, %21
%23 = load float, float* %7
%24 = load float, float* %8
%25 = fsub float %23, %24
%26 = fmul float %22, %25
%27 = load float, float* %9
%28 = load float, float* %8
%29 = fsub float %27, %28
%30 = fdiv float %26, %29
%31 = fadd float %19, %30
store float %31, float* %12
%32 = load float, float* %12
store float %32, float* %6
br label %33
33: ; preds = %18, %16
%34 = load float, float* %6
ret float %34
}

LLVM IR (-O2):
define float @maths_interpolate(float %0, float %1, float %2, float %3, float %4) {
%6 = fcmp oeq float %1, %2
br i1 %6, label %14, label %7
7: ; preds = %5
%8 = fsub float %4, %3
%9 = fsub float %0, %1
%10 = fmul float %9, %8
%11 = fsub float %2, %1
%12 = fdiv float %10, %11
%13 = fadd float %12, %3
br label %14
14: ; preds = %5, %7
%15 = phi float [ %13, %7 ], [ %3, %5 ]
ret float %15
}
AX0RX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (((short *)10000000)[x0]) = (p1[x1]); }


x86 assembly (clang, -O0):
<AX0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,2),%dx
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
mov    %dx,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0RX1>:
movslq %ecx,%rax
movzwl (%r9,%rax,2),%eax
movslq %edx,%rcx
mov    %ax,0x989680(%rcx,%rcx,1)
ret

LLVM IR (-O0):
define i32 @AX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %13
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i16, i16* %16, i64 %18
%20 = load i16, i16* %19
%21 = load i32, i32* %10
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %22
store i16 %20, i16* %23
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @AX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i16, i16* %5, i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %10
store i16 %9, i16* %11
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ system(char *);
void *task0(void *message) {
  system("/bin/ls");
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<task0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<task0>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/ls\00"
define i8* @task0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @pthread_exit(i32* null)
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/ls\00"
define noalias i8* @task0(i8* nocapture readnone %0) {
%2 = tail call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(void) {
  char x[32];
  fgets(x, sizeof x, stdin);
  fputs(x, stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1040 <fgets@plt>
lea    -0x30(%rbp),%rdi
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1040 <fgets@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 32, i32 %4)
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 32, i32 %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* %2, i32 %5)
ret i32 0
}