xunge/DecIR huggingface dataset:
void f(__int128 x) {
  unsigned __int128 y;
  unsigned __int128 z;
  if (x < -7)
    return;
  if (x > 2)
    return;
  y = x;
  z = y * y;
  if (z == 666)
    impossible();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0xfffffffffffffff8,%rax
sub    %rdx,%rax
mov    $0xffffffffffffffff,%rax
sbb    %rcx,%rax
jl     115c <f+0x4c>
jmp    1157 <f+0x47>
jmp    11e7 <f+0xd7>
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
sub    $0x3,%rcx
sbb    $0x0,%rax
jl     117c <f+0x6c>
jmp    1177 <f+0x67>
jmp    11e7 <f+0xd7>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
mov    %rcx,%rax
imul   %rdx,%rax
mov    %rax,-0x48(%rbp)
mov    %rcx,%rax
mul    %rcx
mov    %rax,%rcx
mov    %rdx,%rax
mov    -0x48(%rbp),%rdx
add    %rdx,%rax
add    %rdx,%rax
mov    %rcx,-0x40(%rbp)
mov    %rax,-0x38(%rbp)
movaps -0x40(%rbp),%xmm0
movaps 0xe38(%rip),%xmm1
pcmpeqb %xmm1,%xmm0
pmovmskb %xmm0,%eax
sub    $0xffff,%eax
jne    11e7 <f+0xd7>
jmp    11e0 <f+0xd0>
mov    $0x0,%al
call   1030 <impossible@plt>
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %3 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %3
store i128 %10, i128* %4
%11 = load i128, i128* %4
%12 = icmp slt i128 %11, -7
br i1 %12, label %13, label %14
13: ; preds = %2
br label %27
14: ; preds = %2
%15 = load i128, i128* %4
%16 = icmp sgt i128 %15, 2
br i1 %16, label %17, label %18
17: ; preds = %14
br label %27
18: ; preds = %14
%19 = load i128, i128* %4
store i128 %19, i128* %5
%20 = load i128, i128* %5
%21 = load i128, i128* %5
%22 = mul i128 %20, %21
store i128 %22, i128* %6
%23 = load i128, i128* %6
%24 = icmp eq i128 %23, 666
br i1 %24, label %25, label %27
25: ; preds = %18
%26 = call i32 (...) @impossible()
br label %27
27: ; preds = %13, %17, %25, %18
ret void
}

LLVM IR (-O2):
define void @f(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_msg() {
  printf("Welcome to the Daily Report System! :-)\n");
  printf("Please Log in.\n");
}


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

x86 assembly (clang, -O2):
<print_sys_msg>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Welcome to the Daily Report System! :-)\0A\00"
@.str.1 = [16 x i8] c"Please Log in.\0A\00"
define void @print_sys_msg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"Welcome to the Daily Report System! :-)\00"
@str.2 = [15 x i8] c"Please Log in.\00"
define void @print_sys_msg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ call(char *);
ult() { call("ccult"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"ccult\00"
define i32 @ult() {
%1 = tail call i32 @call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ extendMatching(int /*<<< orphan*/, unsigned long long,
                                  unsigned long long, int /*<<< orphan*/);
void constructMatchings() { extendMatching(0, 0ULL, 0ULL, 0); }


x86 assembly (clang, -O0):
<constructMatchings>:
push   %rbp
mov    %rsp,%rbp
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%edx
mov    %ecx,%edi
mov    %rdx,%rsi
call   1030 <extendMatching@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<constructMatchings>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <extendMatching@plt>

LLVM IR (-O0):
define void @constructMatchings() {
%1 = call i32 @extendMatching(i32 0, i64 0, i64 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @constructMatchings() {
%1 = tail call i32 @extendMatching(i32 0, i64 0, i64 0, i32 0)
ret void
}
int test(unsigned long b) {
  int a;
  asm volatile("nop " : "=a"(a) : "0"(b));
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @test(i64 %0) {
%2 = tail call i64 asm sideeffect "nop ", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i64 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ const uint32_t;

/* Variables and functions */
uint32_t get_u8(const uint8_t *tab) { return *tab; }


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

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

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

LLVM IR (-O2):
define i32 @get_u8(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
void gdk_get_display() {}


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

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

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

LLVM IR (-O2):
define void @gdk_get_display() {
ret void
}
void gdk_grab_status_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_grab_status_get_type() {
ret void
}
int d(void) {
  static int x;
  return 0;
}


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

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

LLVM IR (-O0):
@d.x = internal global i32 0
define i32 @d() {
ret i32 0
}

LLVM IR (-O2):
define i32 @d() {
ret i32 0
}
int search(int arr[], int x, int n) {
  for (int i = 0; i < n; i++)
    if (arr[i] == x)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1153 <search+0x53>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    1140 <search+0x40>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <search+0x5a>
jmp    1145 <search+0x45>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <search+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111e <search+0x1e>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %esi,(%rdi,%rcx,4)
je     111f <search+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <search+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @search(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %1
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void incBy1(int var) {
  var++;
  printf("\nincBy1(): num is %d\n", var);
}


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

x86 assembly (clang, -O2):
<incBy1>:
lea    0x1(%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"\0AincBy1(): num is %d\0A\00"
define void @incBy1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0AincBy1(): num is %d\0A\00"
define void @incBy1(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
void GLS_EndScene(void) {}


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

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

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

LLVM IR (-O2):
define void @GLS_EndScene() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_duration(char *);
void inqSpeakDur() { send_duration("Speak.dur"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"Speak.dur\00"
define void @inqSpeakDur() {
%1 = call i32 @send_duration(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Speak.dur\00"
define void @inqSpeakDur() {
%1 = tail call i32 @send_duration(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bcache_setreadonly(int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fb_flock(int, int);
void bcache_unlock(int fd) {
  fb_flock(fd, 8);
  bcache_setreadonly(1);
  close(fd);
}


x86 assembly (clang, -O0):
<bcache_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1040 <fb_flock@plt>
mov    $0x1,%edi
call   1050 <bcache_setreadonly@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcache_unlock>:
push   %rbx
mov    %edi,%ebx
mov    $0x8,%esi
call   1040 <fb_flock@plt>
mov    $0x1,%edi
call   1050 <bcache_setreadonly@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @bcache_unlock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @fb_flock(i32 %3, i32 8)
%5 = call i32 @bcache_setreadonly(i32 1)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
ret void
}

LLVM IR (-O2):
define void @bcache_unlock(i32 %0) {
%2 = tail call i32 @fb_flock(i32 %0, i32 8)
%3 = tail call i32 @bcache_setreadonly(i32 1)
%4 = tail call i32 @close(i32 %0)
ret void
}
unsigned int bcm2835_version(void) { return 10062; }


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

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

LLVM IR (-O0):
define i32 @bcm2835_version() {
ret i32 10062
}

LLVM IR (-O2):
define i32 @bcm2835_version() {
ret i32 10062
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
int /*<<< orphan*/ expression();
char getname();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ snprintf(char *, int, char *, char);
void assignment(void) {
  char outputstr[64];
  char name = getname();
  match('=');
  expression();
  snprintf(outputstr, 64, "LEA %c(PC),A0", name);
  emitln(outputstr);
  emitln("MOVE D0,(A0)");
}


x86 assembly (clang, -O0):
<assignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    $0x0,%al
call   1050 <getname@plt>
mov    %al,-0x41(%rbp)
mov    $0x3d,%edi
call   1070 <match@plt>
mov    $0x0,%al
call   1060 <expression@plt>
lea    -0x40(%rbp),%rdi
mov    $0x40,%esi
lea    0xe7d(%rip),%rdx
movsbl -0x41(%rbp),%ecx
call   1040 <snprintf@plt>
lea    -0x40(%rbp),%rdi
call   1030 <emitln@plt>
lea    0xe72(%rip),%rdi
call   1030 <emitln@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assignment>:
push   %rbx
sub    $0x40,%rsp
xor    %eax,%eax
call   1050 <getname@plt>
mov    %eax,%ebx
mov    $0x3d,%edi
call   1070 <match@plt>
xor    %eax,%eax
call   1060 <expression@plt>
movsbl %bl,%ecx
lea    0xe87(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <emitln@plt>
lea    0xe76(%rip),%rdi
call   1030 <emitln@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"LEA %c(PC),A0\00"
@.str.1 = [13 x i8] c"MOVE D0,(A0)\00"
define void @assignment() {
%1 = alloca [64 x i8]
%2 = alloca i8
%3 = call signext i8 (...) @getname()
store i8 %3, i8* %2
%4 = call i32 @match(i8 signext 61)
%5 = call i32 (...) @expression()
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%7 = load i8, i8* %2
%8 = call i32 @snprintf(i8* %6, i32 64, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%10 = call i32 @emitln(i8* %9)
%11 = call i32 @emitln(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"LEA %c(PC),A0\00"
@.str.1 = [13 x i8] c"MOVE D0,(A0)\00"
define void @assignment() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = tail call signext i8 (...) @getname()
%4 = tail call i32 @match(i8 signext 61)
%5 = tail call i32 (...) @expression()
%6 = call i32 @snprintf(i8* %2, i32 64, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %3)
%7 = call i32 @emitln(i8* %2)
%8 = call i32 @emitln(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ print_array(int *, int);
int *quicksort(int *, int);
int main() {
  int *a = malloc(16);
  a[0] = 4;
  a[2] = 2;
  a[1] = 3;
  a[3] = 1;
  print_array(a, 4);
  int *b = quicksort(a, 1);
  free(b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x10,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x2,0x8(%rax)
mov    -0x10(%rbp),%rax
movl   $0x3,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,0xc(%rax)
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1040 <print_array@plt>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1050 <quicksort@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x10,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
movaps 0xeab(%rip),%xmm0
movups %xmm0,(%rax)
mov    %rax,%rdi
mov    $0x4,%esi
call   1040 <print_array@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1050 <quicksort@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @malloc(i32 16)
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 4, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 2, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32 3, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 3
store i32 1, i32* %12
%13 = load i32*, i32** %2
%14 = call i32 @print_array(i32* %13, i32 4)
%15 = load i32*, i32** %2
%16 = call i32* @quicksort(i32* %15, i32 1)
store i32* %16, i32** %3
%17 = load i32*, i32** %3
%18 = call i32 @free(i32* %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 16)
%2 = bitcast i32* %1 to <4 x i32>*
store <4 x i32> <i32 4, i32 3, i32 2, i32 1>, <4 x i32>* %2
%3 = tail call i32 @print_array(i32* %1, i32 4)
%4 = tail call i32* @quicksort(i32* %1, i32 1)
%5 = tail call i32 @free(i32* %4)
ret i32 0
}
/* Variables and functions */
double ceil(double);
double floor(double);
double round(double dVal) {
  double dF = floor(dVal);
  double dC = ceil(dVal);
  if (dVal - dF < dC - dVal)
    return dF;
  else
    return dC;
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1178 <round+0x58>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1182 <round+0x62>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
sub    $0x28,%rsp
movaps %xmm0,(%rsp)
call   1040 <floor@plt>
movaps %xmm0,0x10(%rsp)
movapd (%rsp),%xmm0
call   1030 <ceil@plt>
movapd %xmm0,%xmm1
movapd (%rsp),%xmm2
subsd  %xmm2,%xmm1
movapd 0x10(%rsp),%xmm3
subsd  %xmm3,%xmm2
cmpltsd %xmm1,%xmm2
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
movapd %xmm2,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @round(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
%6 = load double, double* %3
%7 = call double @llvm.floor.f64(double %6)
store double %7, double* %4
%8 = load double, double* %3
%9 = call double @llvm.ceil.f64(double %8)
store double %9, double* %5
%10 = load double, double* %3
%11 = load double, double* %4
%12 = fsub double %10, %11
%13 = load double, double* %5
%14 = load double, double* %3
%15 = fsub double %13, %14
%16 = fcmp olt double %12, %15
br i1 %16, label %17, label %19
17: ; preds = %1
%18 = load double, double* %4
store double %18, double* %2
br label %21
19: ; preds = %1
%20 = load double, double* %5
store double %20, double* %2
br label %21
21: ; preds = %19, %17
%22 = load double, double* %2
ret double %22
}

LLVM IR (-O2):
define double @round(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
%3 = tail call double @llvm.ceil.f64(double %0)
%4 = fsub double %0, %2
%5 = fsub double %3, %0
%6 = fcmp olt double %4, %5
%7 = select i1 %6, double %2, double %3
ret double %7
}
/* Variables and functions */
scalar_t__ gethostname(char *, unsigned int);
unsigned pixie_get_host_name(char *name, unsigned name_size) {
  if (gethostname(name, name_size) == 0) {
    name[name_size - 1] = '\0';
    return name_size;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<pixie_get_host_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <gethostname@plt>
cmp    $0x0,%rax
jne    1150 <pixie_get_host_name+0x40>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <pixie_get_host_name+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixie_get_host_name>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
call   1030 <gethostname@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1132 <pixie_get_host_name+0x22>
lea    -0x1(%rbx),%eax
movb   $0x0,(%r14,%rax,1)
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @pixie_get_host_name(i8* %0, i32 %1) {
%3 = tail call i64 @gethostname(i8* %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = add i32 %1, -1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %8
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ %1, %5 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ microSleep(int);
void microDelay(int us) { microSleep(us); }


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

x86 assembly (clang, -O2):
<microDelay>:
jmp    1030 <microSleep@plt>

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

LLVM IR (-O2):
define void @microDelay(i32 %0) {
%2 = tail call i32 @microSleep(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EVP_cleanup();
void cleanup_openssl() { EVP_cleanup(); }


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

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

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

LLVM IR (-O2):
define void @cleanup_openssl() {
%1 = tail call i32 (...) @EVP_cleanup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("and that piece of art is useful\" - Dora Korpar, 2015-10-19\n");
  return (1);
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"and that piece of art is useful\22 - Dora Korpar, 2015-10-19\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [59 x i8] c"and that piece of art is useful\22 - Dora Korpar, 2015-10-19\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void *dumb(void) {
  void *g;
  return g;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @dumb() {
ret i8* undef
}
/* Variables and functions */
int strlen(char *);
int len(char *s) { return strlen(s); }


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

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

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

LLVM IR (-O2):
define i32 @len(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
void nseel_asm_sub_op_fast_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_sub_op_fast_end() {
ret void
}
void gtk_widget_style_get_valist() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_style_get_valist() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *a() {
  char *ret = (char *)malloc(strlen("Hello") + 1);
  strcpy(ret, "Hello");
  return ret;
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea1(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rbx
mov    $0x6,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define i8* @a() {
%1 = alloca i8*
%2 = call i64 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = add nsw i64 %2, 1
%4 = call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i8* @a() {
%1 = tail call i64 @malloc(i64 6)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
int xoinit(short m) { return m; }


x86 assembly (clang, -O0):
<xoinit>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xoinit(i16 signext %0) {
%2 = sext i16 %0 to i32
ret i32 %2
}
/* Variables and functions */
int addEm(unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  unsigned int a = 2;
  unsigned int b = 7;
  printf("\n%d\n", addEm(a, b));
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%d\0A\00"
define i32 @main() {
%1 = tail call i32 @addEm(i32 2, i32 7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ __ucmpdi2(long long, long long);
int _COM_CMPGE64u(long long a, long long b) { return __ucmpdi2(a, b) != 0; }


x86 assembly (clang, -O0):
<_COM_CMPGE64u>:
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 <__ucmpdi2@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_COM_CMPGE64u>:
push   %rax
call   1030 <__ucmpdi2@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_COM_CMPGE64u(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i64 @__ucmpdi2(i64 %5, i64 %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_COM_CMPGE64u(i64 %0, i64 %1) {
%3 = tail call i64 @__ucmpdi2(i64 %0, i64 %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ vt100_EscSeq0(unsigned char *, long long);
void vt100_DECTCEMl(void) {
  vt100_EscSeq0((unsigned char *)"\?25l", (long long)5);
}


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

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rdi
mov    $0x5,%esi
jmp    1030 <vt100_EscSeq0@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"?25l\00"
define void @vt100_DECTCEMl() {
%1 = tail call i32 @vt100_EscSeq0(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadWord(int, unsigned short *);
int /*<<< orphan*/ VIM_SIF_I2cWriteWord(int, int);
unsigned char CheckId_MT9V111(void) {
  unsigned short temp;
  VIM_SIF_I2cWriteWord(0x01, 4);
  VIM_SIF_I2cReadWord(0xff, &temp);
  if (temp == 0x823a)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CheckId_MT9V111>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <VIM_SIF_I2cWriteWord@plt>
mov    $0xff,%edi
lea    -0x4(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadWord@plt>
movzwl -0x4(%rbp),%eax
cmp    $0x823a,%eax
jne    115d <CheckId_MT9V111+0x3d>
movb   $0x1,-0x1(%rbp)
jmp    1161 <CheckId_MT9V111+0x41>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckId_MT9V111>:
push   %rax
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <VIM_SIF_I2cWriteWord@plt>
lea    0x6(%rsp),%rsi
mov    $0xff,%edi
call   1030 <VIM_SIF_I2cReadWord@plt>
movzwl 0x6(%rsp),%eax
cmp    $0x823a,%eax
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @CheckId_MT9V111() {
%1 = alloca i8
%2 = alloca i16
%3 = call i32 @VIM_SIF_I2cWriteWord(i32 1, i32 4)
%4 = call i32 @VIM_SIF_I2cReadWord(i32 255, i16* %2)
%5 = load i16, i16* %2
%6 = zext i16 %5 to i32
%7 = icmp eq i32 %6, 33338
br i1 %7, label %8, label %9
8: ; preds = %0
store i8 1, i8* %1
br label %10
9: ; preds = %0
store i8 0, i8* %1
br label %10
10: ; preds = %9, %8
%11 = load i8, i8* %1
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @CheckId_MT9V111() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
%3 = tail call i32 @VIM_SIF_I2cWriteWord(i32 1, i32 4)
%4 = call i32 @VIM_SIF_I2cReadWord(i32 255, i16* %1)
%5 = load i16, i16* %1
%6 = icmp eq i16 %5, -32198
%7 = zext i1 %6 to i8
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ touchmanager_detach_all();
void view_calibrate_detach() { touchmanager_detach_all(); }


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

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

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

LLVM IR (-O2):
define void @view_calibrate_detach() {
%1 = tail call i32 (...) @touchmanager_detach_all()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_10_recursive(double *, int);
void helper_double_10(double *buf) { helper_double_10_recursive(buf, 10); }


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

x86 assembly (clang, -O2):
<helper_double_10>:
mov    $0xa,%esi
jmp    1030 <helper_double_10_recursive@plt>

LLVM IR (-O0):
define void @helper_double_10(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @helper_double_10_recursive(double* %3, i32 10)
ret void
}

LLVM IR (-O2):
define void @helper_double_10(double* %0) {
%2 = tail call i32 @helper_double_10_recursive(double* %0, i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void error(const char *msg) {
  perror(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int M_PI;
double fmod(double const, double const);
double reb_tools_mod2pi(double f) {
  const double pi2 = 2. * M_PI;
  return fmod(pi2 + fmod(f, pi2), pi2);
}


x86 assembly (clang, -O0):
<reb_tools_mod2pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ec4(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0xed0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fmod@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fmod@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reb_tools_mod2pi>:
push   %rax
mov    0x2ed0(%rip),%rax
cvtsi2sdl (%rax),%xmm1
addsd  %xmm1,%xmm1
movsd  %xmm1,(%rsp)
call   1030 <fmod@plt>
movsd  (%rsp),%xmm1
addsd  %xmm1,%xmm0
pop    %rax
jmp    1030 <fmod@plt>

LLVM IR (-O0):
@M_PI = global i32 0
define double @reb_tools_mod2pi(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load i32, i32* @M_PI
%5 = sitofp i32 %4 to double
%6 = fmul double 2.000000e+00, %5
store double %6, double* %3
%7 = load double, double* %3
%8 = load double, double* %2
%9 = load double, double* %3
%10 = call double @fmod(double %8, double %9)
%11 = fadd double %7, %10
%12 = load double, double* %3
%13 = call double @fmod(double %11, double %12)
ret double %13
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @reb_tools_mod2pi(double %0) {
%2 = load i32, i32* @M_PI
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 2.000000e+00
%5 = tail call double @fmod(double %0, double %4)
%6 = fadd double %5, %4
%7 = tail call double @fmod(double %6, double %4)
ret double %7
}
void setGoodSuffixTable(char *str, int size, int bad_suffix_table[]) {}


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

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

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

LLVM IR (-O2):
define void @setGoodSuffixTable(i8* nocapture %0, i32 %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
void drawRoundedRect(float, float, double, double, float);
void drawCircle(float x, float y, float radius) {
  return drawRoundedRect(x - radius, y - radius, 2.0 * radius, 2.0 * radius,
                         radius);
}


x86 assembly (clang, -O0):
<drawCircle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0xeb4(%rip),%xmm2
mulsd  %xmm3,%xmm2
movss  -0xc(%rbp),%xmm3
cvtss2sd %xmm3,%xmm4
movsd  0xe9f(%rip),%xmm3
mulsd  %xmm4,%xmm3
movss  -0xc(%rbp),%xmm4
call   1030 <drawRoundedRect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawCircle>:
movaps %xmm2,%xmm4
subss  %xmm2,%xmm0
subss  %xmm2,%xmm1
cvtss2sd %xmm2,%xmm2
addsd  %xmm2,%xmm2
movapd %xmm2,%xmm3
jmp    1030 <drawRoundedRect@plt>

LLVM IR (-O0):
define void @drawCircle(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = fsub float %7, %8
%10 = load float, float* %5
%11 = load float, float* %6
%12 = fsub float %10, %11
%13 = load float, float* %6
%14 = fpext float %13 to double
%15 = fmul double 2.000000e+00, %14
%16 = load float, float* %6
%17 = fpext float %16 to double
%18 = fmul double 2.000000e+00, %17
%19 = load float, float* %6
ret void
}

LLVM IR (-O2):
define void @drawCircle(float %0, float %1, float %2) {
%4 = fsub float %0, %2
%5 = fsub float %1, %2
%6 = fpext float %2 to double
%7 = fmul double %6, 2.000000e+00
tail call void @drawRoundedRect(float %4, float %5, double %7, double %7, float %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer) {
  ;
  ;
  return ((ui32Timer == 0x000000FF)
              ? (*((volatile unsigned long *)(ui32Base + 0x00000048)))
              : (*((volatile unsigned long *)(ui32Base + 0x0000004C))));
}


x86 assembly (clang, -O0):
<TimerValueGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jne    112b <TimerValueGet+0x2b>
mov    -0x4(%rbp),%eax
add    $0x48,%eax
cltq
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
jmp    113a <TimerValueGet+0x3a>
mov    -0x4(%rbp),%eax
add    $0x4c,%eax
cltq
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerValueGet>:
xor    %eax,%eax
cmp    $0xff,%esi
setne  %al
lea    0x48(,%rax,4),%eax
movslq %edi,%rcx
mov    (%rax,%rcx,1),%rax
ret

LLVM IR (-O0):
define i32 @TimerValueGet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 255
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 72
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
br label %19
13: ; preds = %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 76
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
br label %19
19: ; preds = %13, %7
%20 = phi i64 [ %12, %7 ], [ %18, %13 ]
%21 = trunc i64 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @TimerValueGet(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 255
%4 = select i1 %3, i32 72, i32 76
%5 = add nsw i32 %4, %0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = trunc i64 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *open_explicit_file(char *);
FILE *open_output_file(char *in_name, char *prompt, char *file_extension,
                       char *out_name) {
  char temp[256 + 1];
  char path[256 + 1];
  char local_prompt[1024];
  FILE *file_handle;
  if (out_name[0] != '\0') {
    file_handle = open_explicit_file(out_name);
    return file_handle;
  }
}


x86 assembly (clang, -O0):
<open_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x650,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1156 <open_output_file+0x46>
mov    -0x28(%rbp),%rdi
call   1030 <open_explicit_file@plt>
mov    %rax,-0x648(%rbp)
mov    -0x648(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x650,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_output_file>:
cmpb   $0x0,(%rcx)
je     111d <open_output_file+0xd>
mov    %rcx,%rdi
jmp    1030 <open_explicit_file@plt>
ret

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

LLVM IR (-O2):
define i32* @open_output_file(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32* @open_explicit_file(i8* %3)
br label %9
9: ; preds = %4, %7
%10 = phi i32* [ %8, %7 ], [ undef, %4 ]
ret i32* %10
}
/* Variables and functions */
int INT_MIN;
int test6(int x) {
  int y = INT_MIN;
  return x - y;
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @test6(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @INT_MIN
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @test6(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = sub nsw i32 %0, %2
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_with_double_doubles(int max, double eps, int *nit) {
  int fail = _ada_use_c2phc(273, &max, nit, &eps);
  return fail;
}


x86 assembly (clang, -O0):
<solve_with_double_doubles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    $0x111,%edi
lea    -0x4(%rbp),%rsi
lea    -0x10(%rbp),%rcx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_with_double_doubles>:
sub    $0x18,%rsp
mov    %rsi,%rdx
mov    %edi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x111,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @solve_with_double_doubles(i32 %0, double %1, i32* %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store double %1, double* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %6
%9 = call i32 @_ada_use_c2phc(i32 273, i32* %4, i32* %8, double* %5)
store i32 %9, i32* %7
%10 = load i32, i32* %7
ret i32 %10
}

LLVM IR (-O2):
define i32 @solve_with_double_doubles(i32 %0, double %1, i32* %2) {
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %4
store double %1, double* %5
%6 = call i32 @_ada_use_c2phc(i32 273, i32* %4, i32* %2, double* %5)
ret i32 %6
}