xunge/DecIR huggingface dataset:
/* Variables and functions */
int EXIT_SUCCESS;
scalar_t__ getpid();
scalar_t__ getppid();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
int main() {
  printf("\n\nThe process id is %d\n", (int)getpid());
  printf("The parent process id is %d\n", (int)getppid());
  sleep(30);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getppid@plt>
mov    %eax,%esi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1e,%edi
call   1060 <sleep@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1e,%edi
call   1060 <sleep@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\0A\0AThe process id is %d\0A\00"
@.str.1 = [29 x i8] c"The parent process id is %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @getpid()
%3 = trunc i64 %2 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i64 (...) @getppid()
%6 = trunc i64 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @sleep(i32 30)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0A\0AThe process id is %d\0A\00"
@.str.1 = [29 x i8] c"The parent process id is %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i64 (...) @getppid()
%5 = trunc i64 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @sleep(i32 30)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int gstrcasecmp(const char *a, const char *b) {
  if (!a && !b)
    return 0;
  if (!a || !b)
    return -1;
  return strcasecmp(a, b);
}


x86 assembly (clang, -O0):
<gstrcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1142 <gstrcasecmp+0x32>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <gstrcasecmp+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1174 <gstrcasecmp+0x64>
cmpq   $0x0,-0x10(%rbp)
je     1158 <gstrcasecmp+0x48>
cmpq   $0x0,-0x18(%rbp)
jne    1164 <gstrcasecmp+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <gstrcasecmp+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gstrcasecmp>:
xor    %eax,%eax
mov    %rdi,%rcx
or     %rsi,%rcx
je     112e <gstrcasecmp+0x1e>
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     112e <gstrcasecmp+0x1e>
test   %rsi,%rsi
je     112e <gstrcasecmp+0x1e>
jmp    1030 <strcasecmp@plt>
ret

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

LLVM IR (-O2):
define i32 @gstrcasecmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = and i1 %3, %4
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @strcasecmp(i8* %0, i8* %1)
br label %10
10: ; preds = %6, %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ], [ -1, %6 ]
ret i32 %11
}
/* Variables and functions */
double const exp(double const);
void mexp_decay_value(const double r, const double *p, double *f) {
  *f = p[0] * exp(-p[1] * (r - p[2]));
}


x86 assembly (clang, -O0):
<mexp_decay_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mexp_decay_value>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movsd  0x8(%rdi),%xmm1
xorpd  0xedb(%rip),%xmm1
movsd  (%rdi),%xmm2
movsd  %xmm2,0x8(%rsp)
subsd  0x10(%rdi),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @mexp_decay_value(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = fneg double %12
%14 = load double, double* %4
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 2
%17 = load double, double* %16
%18 = fsub double %14, %17
%19 = fmul double %13, %18
%20 = call double @exp(double %19)
%21 = fmul double %9, %20
%22 = load double*, double** %6
store double %21, double* %22
ret void
}

LLVM IR (-O2):
define void @mexp_decay_value(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fneg double %6
%8 = getelementptr inbounds double, double* %1, i64 2
%9 = load double, double* %8
%10 = fsub double %0, %9
%11 = fmul double %10, %7
%12 = tail call double @exp(double %11)
%13 = fmul double %4, %12
store double %13, double* %2
ret void
}
int f(int x) {
  int a[] = {1, 2, 3, 4, 5};
  return a[x];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeed(%rip),%eax
mov    %eax,-0x10(%rbp)
movslq -0x4(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@__const.f.a = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca [5 x i32]
store i32 %0, i32* %2
%4 = bitcast [5 x i32]* %3 to i8*
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %6
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
@__const.f.a = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @f(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [5 x i32], [5 x i32]* @__const.f.a, i64 0, i64 %2
%4 = load i32, i32* %3
ret i32 %4
}
void wpas_p2p_interface_unavailable(struct wpa_supplicant *wpa_s) {}


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

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

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

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

/* Variables and functions */
int _modify_srq(struct ibv_srq *, struct ibv_srq_attr *, int);
int /*<<< orphan*/ dmtcp_plugin_disable_ckpt();
int /*<<< orphan*/ dmtcp_plugin_enable_ckpt();
int ibv_modify_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr,
                   int srq_attr_mask) {
  dmtcp_plugin_disable_ckpt();
  int rslt = _modify_srq(srq, srq_attr, srq_attr_mask);
  dmtcp_plugin_enable_ckpt();
  return rslt;
}


x86 assembly (clang, -O0):
<ibv_modify_srq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <_modify_srq@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibv_modify_srq>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %eax,%eax
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <_modify_srq@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.ibv_srq = type { i32 }
%struct.ibv_srq_attr = type { i32 }
define i32 @ibv_modify_srq(%struct.ibv_srq* %0, %struct.ibv_srq_attr* %1, i32 %2) {
%4 = alloca %struct.ibv_srq*
%5 = alloca %struct.ibv_srq_attr*
%6 = alloca i32
%7 = alloca i32
store %struct.ibv_srq* %0, %struct.ibv_srq** %4
store %struct.ibv_srq_attr* %1, %struct.ibv_srq_attr** %5
store i32 %2, i32* %6
%8 = call i32 (...) @dmtcp_plugin_disable_ckpt()
%9 = load %struct.ibv_srq*, %struct.ibv_srq** %4
%10 = load %struct.ibv_srq_attr*, %struct.ibv_srq_attr** %5
%11 = load i32, i32* %6
%12 = call i32 @_modify_srq(%struct.ibv_srq* %9, %struct.ibv_srq_attr* %10, i32 %11)
store i32 %12, i32* %7
%13 = call i32 (...) @dmtcp_plugin_enable_ckpt()
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
%struct.ibv_srq = type { i32 }
%struct.ibv_srq_attr = type { i32 }
define i32 @ibv_modify_srq(%struct.ibv_srq* %0, %struct.ibv_srq_attr* %1, i32 %2) {
%4 = tail call i32 (...) @dmtcp_plugin_disable_ckpt()
%5 = tail call i32 @_modify_srq(%struct.ibv_srq* %0, %struct.ibv_srq_attr* %1, i32 %2)
%6 = tail call i32 (...) @dmtcp_plugin_enable_ckpt()
ret i32 %5
}
/* Variables and functions */
#define KEY_DOWN 131
#define KEY_LEFT 130
#define KEY_RIGHT 129
#define KEY_UP 128
int movimentacao(int kin, int a, int b) {
  switch (kin) {
  case KEY_RIGHT:
    a = a + 1;
    break;
  case KEY_LEFT:
    a = a - 1;
    break;
  case KEY_UP:
    b = b - 1;
    break;
  case KEY_DOWN:
    b = b + 1;
    break;
  }
  return a;
}


x86 assembly (clang, -O0):
<movimentacao>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     1169 <movimentacao+0x69>
mov    -0x18(%rbp),%rax
lea    0xed3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1169 <movimentacao+0x69>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1169 <movimentacao+0x69>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1169 <movimentacao+0x69>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<movimentacao>:
mov    %esi,%eax
cmp    $0x82,%edi
je     1116 <movimentacao+0x16>
cmp    $0x81,%edi
jne    1119 <movimentacao+0x19>
add    $0x1,%eax
ret
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @movimentacao(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
switch i32 %7, label %20 [
i32 129, label %8
i32 130, label %11
i32 128, label %14
i32 131, label %17
]
8: ; preds = %3
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
store i32 %10, i32* %5
br label %20
11: ; preds = %3
%12 = load i32, i32* %5
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %5
br label %20
14: ; preds = %3
%15 = load i32, i32* %6
%16 = sub nsw i32 %15, 1
store i32 %16, i32* %6
br label %20
17: ; preds = %3
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %20
20: ; preds = %3, %17, %14, %11, %8
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @movimentacao(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %8 [
i32 129, label %4
i32 130, label %6
]
4: ; preds = %3
%5 = add nsw i32 %1, 1
br label %8
6: ; preds = %3
%7 = add nsw i32 %1, -1
br label %8
8: ; preds = %3, %6, %4
%9 = phi i32 [ %7, %6 ], [ %5, %4 ], [ %1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ nop();
void condition_always_true_with_else_bad() {
  if (1) {
    nop();
  } else {
    nop();
  }
}


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

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

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

LLVM IR (-O2):
define void @condition_always_true_with_else_bad() {
%1 = tail call i32 (...) @nop()
ret void
}
int is_a_tiff(file_name)
char *file_name;
{}


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

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

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

LLVM IR (-O2):
define i32 @is_a_tiff(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void fst(char ca[]) { printf("First element is %d\n", ca[10]); }


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

x86 assembly (clang, -O2):
<fst>:
movsbl 0xa(%rdi),%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"First element is %d\0A\00"
define void @fst(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 10
%5 = load i8, i8* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"First element is %d\0A\00"
define void @fst(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 10
%3 = load i8, i8* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ errno;
int execvp(const char *file, char *const argv[]) {
  (void)file;
  (void)argv;
  errno = EACCES;
  return -1;
}


x86 assembly (clang, -O0):
<execvp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execvp>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@EACCES = global i32 0
@errno = global i32 0
define i32 @execvp(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EACCES
store i32 %3, i32* @errno
ret i32 -1
}
main() {
  int d = 0;
  int x = 0x5;
  int o = 05;
  int b = 0b10101;
  switch (f()) {
  case 0 ... 5:
    return d + x + o + b;
  }
  return 99;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
movl   $0x15,-0x14(%rbp)
xor    %eax,%eax
call   1030 <f@plt>
sub    $0x5,%eax
ja     1164 <main+0x54>
jmp    1150 <main+0x40>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <main+0x5b>
movl   $0x63,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
cmp    $0x6,%eax
mov    $0x1f,%ecx
mov    $0x63,%eax
cmovb  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp ult i32 %1, 6
%3 = select i1 %2, i32 31, i32 99
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Atm128CounterC__1__Counter__overflow();
void Atm128CounterC__1__Timer__overflow(void) {
  Atm128CounterC__1__Counter__overflow();
}


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

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

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

LLVM IR (-O2):
define void @Atm128CounterC__1__Timer__overflow() {
%1 = tail call i32 (...) @Atm128CounterC__1__Counter__overflow()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
long random();
int main() {
  long int hat;
  hat = random();
  printf("%d is a random number", hat);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"%d is a random number\00"
define i32 @main() {
%1 = tail call i64 (...) @random()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void or_m32_imm32(void *_m32, unsigned long imm32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0x81);
  put8(0x0D);
  put32((unsigned long)(m32));
  put32(imm32);
}


x86 assembly (clang, -O0):
<or_m32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    $0xd,%edi
call   1030 <put8@plt>
mov    -0x18(%rbp),%rdi
call   1040 <put32@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_m32_imm32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x81,%edi
call   1030 <put8@plt>
mov    $0xd,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
call   1040 <put32@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @or_m32_imm32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = call i32 @put8(i32 129)
%9 = call i32 @put8(i32 13)
%10 = load i64*, i64** %5
%11 = ptrtoint i64* %10 to i64
%12 = call i32 @put32(i64 %11)
%13 = load i64, i64* %4
%14 = call i32 @put32(i64 %13)
ret void
}

LLVM IR (-O2):
define void @or_m32_imm32(i8* %0, i64 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = tail call i32 @put8(i32 13)
%5 = ptrtoint i8* %0 to i64
%6 = tail call i32 @put32(i64 %5)
%7 = tail call i32 @put32(i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glPointParameterfvEXT_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glPointParameterivNV_size(GLenum e) {
  return __glPointParameterfvEXT_size(e);
}


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

x86 assembly (clang, -O2):
<__glPointParameterivNV_size>:
jmp    1030 <__glPointParameterfvEXT_size@plt>

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

LLVM IR (-O2):
define hidden i32 @__glPointParameterivNV_size(i32 %0) {
%2 = tail call i32 @__glPointParameterfvEXT_size(i32 %0)
ret i32 %2
}
const char *Q_strrstr(const char *s, const char *substr) {
  const char *p;
  s = p = strstr(s, substr);
  while (s != ((void *)0)) {
    p = s;
    s = strstr(s + 1, substr);
  }
  return p;
}


x86 assembly (clang, -O0):
<Q_strrstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1162 <Q_strrstr+0x52>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x8(%rbp)
jmp    1135 <Q_strrstr+0x25>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_strrstr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <strstr@plt>
test   %rax,%rax
je     1146 <Q_strrstr+0x36>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rax,%rbx
lea    0x1(%rax),%rdi
mov    %r14,%rsi
call   1030 <strstr@plt>
test   %rax,%rax
jne    1130 <Q_strrstr+0x20>
jmp    1148 <Q_strrstr+0x38>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @Q_strrstr(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %8, %5 ], [ %3, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = phi i8* [ null, %2 ], [ %6, %5 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ log_func(int, char *);
void save_historical_result_to_redis() {
  log_func(2, "Saving historical results to redis.");
}


x86 assembly (clang, -O0):
<save_historical_result_to_redis>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
call   1030 <log_func@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_historical_result_to_redis>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
jmp    1030 <log_func@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Saving historical results to redis.\00"
define void @save_historical_result_to_redis() {
%1 = call i32 @log_func(i32 2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Saving historical results to redis.\00"
define void @save_historical_result_to_redis() {
%1 = tail call i32 @log_func(i32 2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double sqrt(double);
double cplxmod(double a, double b) { return sqrt((a * a) + (b * b)); }


x86 assembly (clang, -O0):
<cplxmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cplxmod>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <cplxmod+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @cplxmod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
%11 = call double @sqrt(double %10)
ret double %11
}

LLVM IR (-O2):
define double @cplxmod(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = tail call double @sqrt(double %4)
ret double %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ dbg_set_chain(int);
int /*<<< orphan*/ get_block_data_from_vpi(int, int *);
int /*<<< orphan*/ get_response_from_vpi();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ send_address_to_vpi(int);
int /*<<< orphan*/ send_command_to_vpi(int);
int /*<<< orphan*/ send_data_to_vpi(int);
int dbg_cpu0_read(uint32_t adr, uint32_t *data, uint32_t length) {
  if (0)
    printf("dbg_cpu0_read: adr 0x%.8x\n", adr);
  dbg_set_chain(1);
  send_command_to_vpi(0x6);
  send_address_to_vpi(adr);
  send_data_to_vpi(length);
  get_block_data_from_vpi(length, data);
  get_response_from_vpi();
  return 0;
}


x86 assembly (clang, -O0):
<dbg_cpu0_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x1,%edi
call   1050 <dbg_set_chain@plt>
mov    $0x6,%edi
call   1030 <send_command_to_vpi@plt>
mov    -0x4(%rbp),%edi
call   1040 <send_address_to_vpi@plt>
mov    -0x14(%rbp),%edi
call   1070 <send_data_to_vpi@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <get_block_data_from_vpi@plt>
mov    $0x0,%al
call   1060 <get_response_from_vpi@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_cpu0_read>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%ebp
mov    $0x1,%edi
call   1050 <dbg_set_chain@plt>
mov    $0x6,%edi
call   1030 <send_command_to_vpi@plt>
mov    %ebp,%edi
call   1040 <send_address_to_vpi@plt>
mov    %ebx,%edi
call   1070 <send_data_to_vpi@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1080 <get_block_data_from_vpi@plt>
xor    %eax,%eax
call   1060 <get_response_from_vpi@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dbg_cpu0_read(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = call i32 @dbg_set_chain(i32 1)
%8 = call i32 @send_command_to_vpi(i32 6)
%9 = load i32, i32* %4
%10 = call i32 @send_address_to_vpi(i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @send_data_to_vpi(i32 %11)
%13 = load i32, i32* %6
%14 = load i32*, i32** %5
%15 = call i32 @get_block_data_from_vpi(i32 %13, i32* %14)
%16 = call i32 (...) @get_response_from_vpi()
ret i32 0
}

LLVM IR (-O2):
define i32 @dbg_cpu0_read(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @dbg_set_chain(i32 1)
%5 = tail call i32 @send_command_to_vpi(i32 6)
%6 = tail call i32 @send_address_to_vpi(i32 %0)
%7 = tail call i32 @send_data_to_vpi(i32 %2)
%8 = tail call i32 @get_block_data_from_vpi(i32 %2, i32* %1)
%9 = tail call i32 (...) @get_response_from_vpi()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void UARTLoopbackEnable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) |= 0x00000080;
}


x86 assembly (clang, -O0):
<UARTLoopbackEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
or     $0x80,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTLoopbackEnable>:
movslq %edi,%rax
orl    $0x80,0x30(%rax)
ret

LLVM IR (-O0):
define void @UARTLoopbackEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 48
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 128
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @UARTLoopbackEnable(i32 %0) {
%2 = add nsw i32 %0, 48
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 128
store volatile i32 %6, i32* %4
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
void set_XKeyPressedEvent_serial(void *_p, unsigned long _v) {
  ((XKeyPressedEvent *)_p)->serial = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XKeyPressedEvent_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XKeyPressedEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void bar3(a) {}


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

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

LLVM IR (-O0):
define void @bar3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @bar3(i32 %0) {
ret void
}
/* Variables and functions */
int rt_mynode();
int rt_par_init(int *argc, char ***argv) {
  int a = 0;
  a = rt_mynode();
  return a;
}


x86 assembly (clang, -O0):
<rt_par_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <rt_mynode@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @rt_par_init(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = tail call i32 (...) @rt_mynode()
ret i32 %3
}
/* Variables and functions */
int ita3e_btree_test();
int main(int argc, char **argv) { return ita3e_btree_test(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <ita3e_btree_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 = call i32 (...) @ita3e_btree_test()
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ita3e_btree_test()
ret i32 %3
}
/* Variables and functions */
char *fi_ltrim(char *, char const *);
char *fi_rtrim(char *, char const *);
char *fi_trim(char *str, const char *impurities) {
  str = fi_rtrim(str, impurities);
  str = fi_ltrim(str, impurities);
  return str;
}


x86 assembly (clang, -O0):
<fi_trim>:
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   1040 <fi_rtrim@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fi_ltrim@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fi_trim>:
push   %rbx
mov    %rsi,%rbx
call   1040 <fi_rtrim@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fi_ltrim@plt>

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

LLVM IR (-O2):
define i8* @fi_trim(i8* %0, i8* %1) {
%3 = tail call i8* @fi_rtrim(i8* %0, i8* %1)
%4 = tail call i8* @fi_ltrim(i8* %3, i8* %1)
ret i8* %4
}
void f(short c) {
#pragma acc parallel if (c)
  ;
#pragma acc kernels if (c)
  ;
#pragma acc data if (c)
  ;
#pragma acc update device(c) if (c)
}


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

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

LLVM IR (-O0):
define void @f(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
ret void
}

LLVM IR (-O2):
define void @f(i16 signext %0) {
ret void
}
int countNumSubsquare(int subsquareSide, int squareSide) {
  if (subsquareSide > squareSide)
    return 0;
  return (squareSide - subsquareSide + 1) * (squareSide - subsquareSide + 1);
}


x86 assembly (clang, -O0):
<countNumSubsquare>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1122 <countNumSubsquare+0x22>
movl   $0x0,-0x4(%rbp)
jmp    113a <countNumSubsquare+0x3a>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
add    $0x1,%eax
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countNumSubsquare>:
mov    %esi,%ecx
sub    %edi,%ecx
add    $0x1,%ecx
imul   %ecx,%ecx
xor    %eax,%eax
cmp    %edi,%esi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @countNumSubsquare(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = sub nsw i32 %1, %0
%5 = add nsw i32 %4, 1
%6 = mul nsw i32 %5, %5
%7 = select i1 %3, i32 0, i32 %6
ret i32 %7
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ UpdateRttStats(int);
int atol(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  uint16_t v;
  if (argc < 2)
    return 1;
  v = atol(argv[1]);
  printf("Inserting %d into file\n", v);
  UpdateRttStats(v);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    115c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    118a <main+0x5a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1040 <UpdateRttStats@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     115e <main+0x2e>
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atol@plt>
mov    %eax,%ebx
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <UpdateRttStats@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Inserting %d into file\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %19
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atol(i8* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %6
%18 = call i32 @UpdateRttStats(i32 %17)
store i32 0, i32* %3
br label %19
19: ; preds = %10, %9
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [24 x i8] c"Inserting %d into file\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atol(i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @UpdateRttStats(i32 %7)
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %11
}
int isspace(int ch) {
  return (ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n');
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <isspace+0x3e>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <isspace+0x3e>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <isspace+0x3e>
cmpl   $0xa,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002200,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xa,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %14, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br i1 %7, label %14, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 13
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 10
br label %14
14: ; preds = %11, %8, %5, %1
%15 = phi i1 [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void foo596() {}


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

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

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

LLVM IR (-O2):
define void @foo596() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ExtSelect(char *, char *, int /*<<< orphan*/);
void ExttNSTypeSelect(void) {
  ExtSelect("tNSType",
            "tNSType.uNSType,tNSType.cLabel,tNSType.uOwner,tNSType.uCreatedBy,"
            "tNSType.uCreatedDate,tNSType.uModBy,tNSType.uModDate",
            0);
}


x86 assembly (clang, -O0):
<ExttNSTypeSelect>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %edx,%edx
call   1030 <ExtSelect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExttNSTypeSelect>:
lea    0xee9(%rip),%rdi
lea    0xeea(%rip),%rsi
xor    %edx,%edx
jmp    1030 <ExtSelect@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"tNSType\00"
@.str.1 = [118 x i8] c"tNSType.uNSType,tNSType.cLabel,tNSType.uOwner,tNSType.uCreatedBy,tNSType.uCreatedDate,tNSType.uModBy,tNSType.uModDate\00"
define void @ExttNSTypeSelect() {
%1 = call i32 @ExtSelect(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"tNSType\00"
@.str.1 = [118 x i8] c"tNSType.uNSType,tNSType.cLabel,tNSType.uOwner,tNSType.uCreatedBy,tNSType.uCreatedDate,tNSType.uModBy,tNSType.uModDate\00"
define void @ExttNSTypeSelect() {
%1 = tail call i32 @ExtSelect(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int b_black() { return fputs("[40m", stdout); }


x86 assembly (clang, -O0):
<b_black>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_black>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[40m\00"
@stdout = global i32 0
define i32 @b_black() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[40m\00"
@stdout = global i32 0
define i32 @b_black() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void random_init(void) { srand(time(0)); }


x86 assembly (clang, -O0):
<random_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_init>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @random_init() {
%1 = call i32 @time(i32 0)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @random_init() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
unsigned int vcmpges4(unsigned int, unsigned int);
unsigned int vmaxs4(unsigned int a, unsigned int b) {
  unsigned int r, s;
  s = vcmpges4(a, b);
  r = a & s;
  s = b & ~s;
  r = r | s;
  return r;
}


x86 assembly (clang, -O0):
<vmaxs4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <vcmpges4@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmaxs4>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <vcmpges4@plt>
xor    %ebx,%ebp
and    %ebp,%eax
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @vmaxs4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @vcmpges4(i32 %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %3
%11 = load i32, i32* %6
%12 = and i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = xor i32 %14, -1
%16 = and i32 %13, %15
store i32 %16, i32* %6
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = or i32 %17, %18
store i32 %19, i32* %5
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @vmaxs4(i32 %0, i32 %1) {
%3 = tail call i32 @vcmpges4(i32 %0, i32 %1)
%4 = and i32 %3, %0
%5 = xor i32 %3, -1
%6 = and i32 %5, %1
%7 = or i32 %4, %6
ret i32 %7
}
void g_spawn_async_with_pipes() {}


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

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

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

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