xunge/DecIR huggingface dataset:
/* Variables and functions */
float pow(double, double);
double ajCvtGaussToProb(float mean, float sd, float score) {
  return pow(2.718281828459,
             (double)(-0.5 * ((score - mean) / sd) * ((score - mean) / sd))) /
         (sd * (float)2.0 * 3.141592653589);
}


x86 assembly (clang, -O0):
<ajCvtGaussToProb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xece(%rip),%xmm1
mulsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xea3(%rip),%xmm0
call   1030 <pow@plt>
cvtss2sd %xmm0,%xmm0
movss  0xea2(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe79(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ajCvtGaussToProb>:
push   %rax
movss  %xmm1,0x4(%rsp)
subss  %xmm0,%xmm2
divss  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
call   1030 <pow@plt>
cvtss2sd %xmm0,%xmm0
movss  0x4(%rsp),%xmm1
addss  %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xeb3(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ajCvtGaussToProb(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* %6
%8 = load float, float* %4
%9 = fsub float %7, %8
%10 = load float, float* %5
%11 = fdiv float %9, %10
%12 = fpext float %11 to double
%13 = fmul double -5.000000e-01, %12
%14 = load float, float* %6
%15 = load float, float* %4
%16 = fsub float %14, %15
%17 = load float, float* %5
%18 = fdiv float %16, %17
%19 = fpext float %18 to double
%20 = fmul double %13, %19
%21 = call float @pow(double 0x4005BF0A8B145703, double %20)
%22 = fpext float %21 to double
%23 = load float, float* %5
%24 = fmul float %23, 2.000000e+00
%25 = fpext float %24 to double
%26 = fmul double %25, 0x400921FB5444261E
%27 = fdiv double %22, %26
ret double %27
}

LLVM IR (-O2):
define double @ajCvtGaussToProb(float %0, float %1, float %2) {
%4 = fsub float %2, %0
%5 = fdiv float %4, %1
%6 = fpext float %5 to double
%7 = fmul double %6, -5.000000e-01
%8 = fmul double %7, %6
%9 = tail call float @pow(double 0x4005BF0A8B145703, double %8)
%10 = fpext float %9 to double
%11 = fmul float %1, 2.000000e+00
%12 = fpext float %11 to double
%13 = fmul double %12, 0x400921FB5444261E
%14 = fdiv double %10, %13
ret double %14
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(struct node *);
int /*<<< orphan*/ stderr;
int free_node(struct node *node) {
  if (node == NULL) {
    fprintf(stderr, "Illegal free attempt : node is NULL\n");
    return 0;
  }
  free(node);
  node = NULL;
  return 1;
}


x86 assembly (clang, -O0):
<free_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1158 <free_node+0x38>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1170 <free_node+0x50>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x10(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_node>:
push   %rax
test   %rdi,%rdi
je     1132 <free_node+0x12>
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
lea    0xebe(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
@stderr = global i32 0
@.str = [37 x i8] c"Illegal free attempt : node is NULL\0A\00"
define i32 @free_node(%struct.node* %0) {
%2 = alloca i32
%3 = alloca %struct.node*
store %struct.node* %0, %struct.node** %3
%4 = load %struct.node*, %struct.node** %3
%5 = icmp eq %struct.node* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %12
9: ; preds = %1
%10 = load %struct.node*, %struct.node** %3
%11 = call i32 @free(%struct.node* %10)
store %struct.node* null, %struct.node** %3
store i32 1, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.node = type { i32 }
@stderr = global i32 0
@.str = [37 x i8] c"Illegal free attempt : node is NULL\0A\00"
define i32 @free_node(%struct.node* %0) {
%2 = icmp eq %struct.node* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 @free(%struct.node* %0)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ 0, %3 ], [ 1, %6 ]
ret i32 %9
}
extern __attribute__((gnu_)) int carmen_trunc(double X) { return (int)(X); }


x86 assembly (clang, -O0):
<carmen_trunc>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<carmen_trunc>:
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @carmen_trunc(double %0) {
%2 = fptosi double %0 to i32
ret i32 %2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int _test_qsort_str_comparer(const void *a, const void *b) {
  const char **ia = (const char **)a;
  const char **ib = (const char **)b;
  return strcmp(*ia, *ib);
}


x86 assembly (clang, -O0):
<_test_qsort_str_comparer>:
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    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_qsort_str_comparer>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @_test_qsort_str_comparer(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @_test_qsort_str_comparer(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
float add(float f, float s) {
  float t;
  t = f + s;
  if (t > 9999999 || t < -9999999) {
    printf("ERROR 5");
    printf("\n");
    exit(0);
  } else {
    return t;
  }
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xeb2(%rip),%xmm1
ucomiss %xmm1,%xmm0
ja     1169 <add+0x49>
movss  0xea5(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1188 <add+0x68>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
push   %rax
addss  %xmm1,%xmm0
ucomiss 0xec4(%rip),%xmm0
ja     114d <add+0x1d>
movss  0xebe(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     114d <add+0x1d>
pop    %rax
ret
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"ERROR 5\00"
@.str.1 = [2 x i8] c"\0A\00"
define float @add(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fadd float %6, %7
store float %8, float* %5
%9 = load float, float* %5
%10 = fcmp ogt float %9, 0x416312CFE0000000
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load float, float* %5
%13 = fcmp olt float %12, 0xC16312CFE0000000
br i1 %13, label %14, label %18
14: ; preds = %11, %2
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @exit(i32 0)
unreachable
18: ; preds = %11
%19 = load float, float* %5
ret float %19
}

LLVM IR (-O2):
@.str = [8 x i8] c"ERROR 5\00"
define float @add(float %0, float %1) {
%3 = fadd float %0, %1
%4 = fcmp ogt float %3, 0x416312CFE0000000
%5 = fcmp olt float %3, 0xC16312CFE0000000
%6 = or i1 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @exit(i32 0)
unreachable
11: ; preds = %2
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ recSUBU();
void recSUB() { recSUBU(); }


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

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

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

LLVM IR (-O2):
define void @recSUB() {
%1 = tail call i32 (...) @recSUBU()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ toOctal(char *);
int main() {
  char bin[1000];
  int i = 0, N;
  scanf("%s", bin);
  toOctal(bin);
  printf("%s", bin);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x3f4(%rbp)
lea    -0x3f0(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x3f0(%rbp),%rdi
call   1050 <toOctal@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
lea    0xebf(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1050 <toOctal@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @toOctal(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int sys_deluser(char *user_name) {
  char cmd[80];
  sprintf(cmd, "userdel %s", user_name);
  system(cmd);
  sprintf(cmd, "pdbedit -x -u %s", user_name);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<sys_deluser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1030 <system@plt>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb3(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_deluser>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbx
lea    0xecf(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
lea    0xebd(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"userdel %s\00"
@.str.1 = [17 x i8] c"pdbedit -x -u %s\00"
define i32 @sys_deluser(i8* %0) {
%2 = alloca i8*
%3 = alloca [80 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%10 = load i8*, i8** %2
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%13 = call i32 @system(i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"userdel %s\00"
@.str.1 = [17 x i8] c"pdbedit -x -u %s\00"
define i32 @sys_deluser(i8* %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = call i32 @system(i8* %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ DIST_POINT_NAME;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ DIST_POINT_NAME_it;
DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a,
                                     const unsigned char **in, long len) {
  return (DIST_POINT_NAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                          &DIST_POINT_NAME_it);
}


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

x86 assembly (clang, -O2):
<d2i_DIST_POINT_NAME>:
mov    0x2ed9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@DIST_POINT_NAME_it = global i32 0
define i32* @d2i_DIST_POINT_NAME(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @DIST_POINT_NAME_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@DIST_POINT_NAME_it = global i32 0
define i32* @d2i_DIST_POINT_NAME(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @DIST_POINT_NAME_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
int EXIT_SUCCESS;
double FLT_MAX;
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("max float value =%f", FLT_MAX);
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
movsd  (%rax),%xmm0
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"max float value =%f\00"
@FLT_MAX = global double 0.000000e+00
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load double, double* @FLT_MAX
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), double %2)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@.str = [20 x i8] c"max float value =%f\00"
@FLT_MAX = global double 0.000000e+00
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load double, double* @FLT_MAX
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), double %1)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_setup();
void x_interface_setup(void) { print_setup(); }


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

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

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

LLVM IR (-O2):
define void @x_interface_setup() {
%1 = tail call i32 (...) @print_setup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_ConnectionManager_GetProtocolInfo(void *, char *, char *);
int /*<<< orphan*/ printf(char *);
void UpnpConnectionManager_GetProtocolInfo(void *upnptoken) {
  printf("UPnP Invoke: UpnpConnectionManager_GetProtocolInfo();\r\n");
  UpnpResponse_ConnectionManager_GetProtocolInfo(upnptoken, "http-get:*:*:*",
                                                 "");
}


x86 assembly (clang, -O0):
<UpnpConnectionManager_GetProtocolInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef5(%rip),%rsi
lea    0xeed(%rip),%rdx
call   1040 <UpnpResponse_ConnectionManager_GetProtocolInfo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpConnectionManager_GetProtocolInfo>:
push   %rbx
mov    %rdi,%rbx
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rsi
lea    0xf07(%rip),%rdx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UpnpResponse_ConnectionManager_GetProtocolInfo@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"UPnP Invoke: UpnpConnectionManager_GetProtocolInfo();\0D\0A\00"
@.str.1 = [15 x i8] c"http-get:*:*:*\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpConnectionManager_GetProtocolInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_ConnectionManager_GetProtocolInfo(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"http-get:*:*:*\00"
@.str.2 = [1 x i8] zeroinitializer
@str = [55 x i8] c"UPnP Invoke: UpnpConnectionManager_GetProtocolInfo();\0D\00"
define void @UpnpConnectionManager_GetProtocolInfo(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_ConnectionManager_GetProtocolInfo(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint32_t __attribute__((always_)) mc_v32_of_p16(uint16_t *p16) {
  uint32_t v32 = p16[1];
  v32 <<= 16;
  v32 |= p16[0];
  return v32;
}


x86 assembly (clang, -O0):
<mc_v32_of_p16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_v32_of_p16>:
mov    0x4(%rdi),%eax
shl    $0x10,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @mc_v32_of_p16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = shl i32 %7, 16
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = load i32, i32* %3
%13 = or i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @mc_v32_of_p16(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = shl i32 %3, 16
%5 = load i32, i32* %0
%6 = or i32 %4, %5
ret i32 %6
}
int ascending(const void *p1, const void *p2) {
  return *(int *)p1 - *(int *)p2;
}


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

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

LLVM IR (-O0):
define i32 @ascending(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @ascending(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
size_t string_array_length(char **strings) {
  size_t n = 0;
  while (strings[n]) {
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<string_array_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1134 <string_array_length+0x34>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <string_array_length+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_array_length>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <string_array_length+0x10>
ret

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

LLVM IR (-O2):
define i64 @string_array_length(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ spawn(int);
int main() {
  pid_t child_pid;
  child_pid = spawn(1);
  if (child_pid != 0) {
    spawn(2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <spawn@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1142 <main+0x32>
mov    $0x2,%edi
call   1030 <spawn@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <spawn@plt>
test   %rax,%rax
je     112a <main+0x1a>
mov    $0x2,%edi
call   1030 <spawn@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @spawn(i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i64 @spawn(i32 2)
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int /*<<< orphan*/, int, int, int);
int owl_proper_eye(int, int);
int autohelperowl_attackpat225(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(0, -2, move, transformation);
  return owl_proper_eye(move, A);
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat225>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0xfffffffe,%esi
call   1040 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1030 <owl_proper_eye@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat225>:
push   %rbx
mov    %edx,%ebx
mov    %esi,%ecx
xor    %edi,%edi
mov    $0xfffffffe,%esi
call   1040 <offset@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <owl_proper_eye@plt>

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat225(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 -2, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %8
%19 = load i32, i32* %11
%20 = call i32 @owl_proper_eye(i32 %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat225(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 -2, i32 %2, i32 %1)
%7 = tail call i32 @owl_proper_eye(i32 %2, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void TIM2_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @TIM2_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @TIM2_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void kfree(void *objp) { free(objp); }


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

x86 assembly (clang, -O2):
<kfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @kfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
char *strcpy(char *dest, const char *src) {
  int i;
  char tmp;
  for (i = 0;; i++) {
    tmp = src[i];
    dest[i] = tmp;
    if (src[i] == 0)
      break;
  }
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1149 <strcpy+0x49>
jmp    115c <strcpy+0x5c>
jmp    114e <strcpy+0x4e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpy+0x13>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %10, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
%10 = add nuw i64 %4, 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
uint32_t stoi_hash(const char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<stoi_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <stoi_hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <stoi_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stoi_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <stoi_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <stoi_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @stoi_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
char *HsStrcpy(char *x, char *y) {
  char *a;
  return a;
}


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

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

LLVM IR (-O0):
define i8* @HsStrcpy(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** %5
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @HsStrcpy(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* undef
}
/* Variables and functions */
int rand();
int my_rand(void) { return rand(); }


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

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

LLVM IR (-O0):
define i32 @my_rand() {
%1 = call i32 (...) @rand()
ret i32 %1
}

LLVM IR (-O2):
define i32 @my_rand() {
%1 = tail call i32 (...) @rand()
ret i32 %1
}
void EPIDividerSet(unsigned long ulBase, unsigned long ulDivider) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000004))) = ulDivider;
}


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

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

LLVM IR (-O0):
define void @EPIDividerSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 4
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EPIDividerSet(i64 %0, i64 %1) {
%3 = add i64 %0, 4
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void *realloc(void *, unsigned int);
void *SafeRealloc(void *ptr, unsigned int size, char *file, int line) {
  void *rptr = realloc(ptr, size);
  if (!rptr)
    printf("Warning Realloc() returning NULL (%s:%3d)\n", file, line);
  return (rptr);
}


x86 assembly (clang, -O0):
<SafeRealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1164 <SafeRealloc+0x44>
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SafeRealloc>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%rbx
call   1040 <realloc@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    1149 <SafeRealloc+0x29>
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <printf@plt>
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [43 x i8] c"Warning Realloc() returning NULL (%s:%3d)\0A\00"
define i8* @SafeRealloc(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i8* @realloc(i8* %0, i32 %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
br label %9
9: ; preds = %7, %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
scalar_t__ xmalloc(int);
char *copy_alloced(char *s) {
  char *t = (char *)xmalloc(sizeof(char) * strlen(s));
  strcpy(t, s);
  return t;
}


x86 assembly (clang, -O0):
<copy_alloced>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_alloced>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @copy_alloced(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = mul i64 1, %6
%8 = trunc i64 %7 to i32
%9 = call i64 @xmalloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @copy_alloced(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i64 @xmalloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
void INT_Excep_AD_ADI0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_AD_ADI0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, unsigned int, char const *);
void nonzero_value_to_str(char *buf, size_t size, unsigned int value,
                          const char *unit) {
  if (value)
    snprintf(buf, size, "%u %s", value, unit);
  else
    buf[0] = '\0';
}


x86 assembly (clang, -O0):
<nonzero_value_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1151 <nonzero_value_to_str+0x41>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
lea    0xeb9(%rip),%rdx
call   1030 <snprintf@plt>
jmp    1158 <nonzero_value_to_str+0x48>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonzero_value_to_str>:
test   %edx,%edx
je     1125 <nonzero_value_to_str+0x15>
mov    %rcx,%r8
mov    %edx,%ecx
lea    0xee0(%rip),%rdx
jmp    1030 <snprintf@plt>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%u %s\00"
define void @nonzero_value_to_str(i8* %0, i64 %1, i32 %2, i8* %3) {
%5 = icmp eq i32 %2, 0
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %3)
br label %9
8: ; preds = %4
store i8 0, i8* %0
br label %9
9: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int ustreq(const char *p_a, const char *p_b) {
  if (p_a == NULL || p_b == NULL)
    return 0;
  return !strcmp(p_a, p_b);
}


x86 assembly (clang, -O0):
<ustreq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <ustreq+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <ustreq+0x32>
movl   $0x0,-0x4(%rbp)
jmp    115f <ustreq+0x4f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ustreq>:
xor    %eax,%eax
test   %rdi,%rdi
je     112f <ustreq+0x1f>
test   %rsi,%rsi
je     112f <ustreq+0x1f>
push   %rax
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @ustreq(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 eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 0, i32* %3
br label %19
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = call i32 @strcmp(i8* %13, i8* %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
store i32 %18, i32* %3
br label %19
19: ; preds = %12, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @ustreq(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_clear_palette(int /*<<< orphan*/);
void g2_clear_palette_(float *dev) { g2_clear_palette(dtoi(*dev)); }


x86 assembly (clang, -O0):
<g2_clear_palette_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
call   1040 <g2_clear_palette@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_clear_palette_>:
push   %rax
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <g2_clear_palette@plt>

LLVM IR (-O0):
define void @g2_clear_palette_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = call i32 @dtoi(float %4)
%6 = call i32 @g2_clear_palette(i32 %5)
ret void
}

LLVM IR (-O2):
define void @g2_clear_palette_(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i32 @dtoi(float %2)
%4 = tail call i32 @g2_clear_palette(i32 %3)
ret void
}
int getIGIForDiff(int value_IGI) {
  if (value_IGI < 0x30) {
    if ((0x30 - value_IGI) < 8)
      return 0x30;
    else
      return value_IGI + 8;
  } else {
    return value_IGI;
  }
}


x86 assembly (clang, -O0):
<getIGIForDiff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jge    113c <getIGIForDiff+0x3c>
mov    $0x30,%eax
sub    -0x8(%rbp),%eax
cmp    $0x8,%eax
jge    112e <getIGIForDiff+0x2e>
movl   $0x30,-0x4(%rbp)
jmp    1142 <getIGIForDiff+0x42>
mov    -0x8(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    1142 <getIGIForDiff+0x42>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getIGIForDiff>:
lea    0x8(%rdi),%ecx
cmp    $0x29,%edi
mov    $0x30,%eax
cmovl  %ecx,%eax
cmp    $0x30,%edi
cmovge %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @getIGIForDiff(i32 %0) {
%2 = icmp slt i32 %0, 48
%3 = icmp sgt i32 %0, 40
%4 = add nsw i32 %0, 8
%5 = select i1 %3, i32 48, i32 %4
%6 = select i1 %2, i32 %5, i32 %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ argb();
void rop_2bb() {
  argb();
  argb();
}


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

x86 assembly (clang, -O2):
<rop_2bb>:
push   %rax
xor    %eax,%eax
call   1030 <argb@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <argb@plt>

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

LLVM IR (-O2):
define void @rop_2bb() {
%1 = tail call i32 (...) @argb()
%2 = tail call i32 (...) @argb()
ret void
}
float Sq(float x) { return x * x; }


x86 assembly (clang, -O0):
<Sq>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sq>:
mulss  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define float @Sq(float %0) {
%2 = fmul float %0, %0
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ ROR_();
int /*<<< orphan*/ c64_memZeroX();
void ROR_zpx(void) {
  c64_memZeroX();
  ROR_();
}


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

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

LLVM IR (-O0):
define void @ROR_zpx() {
%1 = call i32 (...) @c64_memZeroX()
%2 = call i32 (...) @ROR_()
ret void
}

LLVM IR (-O2):
define void @ROR_zpx() {
%1 = tail call i32 (...) @c64_memZeroX()
%2 = tail call i32 (...) @ROR_()
ret void
}
float f9(float arg) { return arg; }


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

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

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

LLVM IR (-O2):
define float @f9(float returned %0) {
ret float %0
}