xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __builtin_block_prob(int);
int /*<<< orphan*/ g();
f(void *p) {
  if (p == 0) {
    __builtin_block_prob(9970);
    g();
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1148 <f+0x28>
mov    $0x26f2,%edi
call   1040 <__builtin_block_prob@plt>
mov    $0x0,%al
call   1030 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %rdi,%rdi
je     1126 <f+0x6>
ret
push   %rax
mov    $0x26f2,%edi
call   1040 <__builtin_block_prob@plt>
xor    %eax,%eax
call   1030 <g@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @f(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @__builtin_block_prob(i32 9970)
%8 = call i32 (...) @g()
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @f(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @__builtin_block_prob(i32 9970)
%5 = tail call i32 (...) @g()
br label %6
6: ; preds = %3, %1
ret i32 undef
}
void v_dblrev(double *vec, int n) {
  double t;
  while (--n > 0) {
    t = vec[n];
    vec[n--] = vec[0];
    *vec++ = t;
  }
}


x86 assembly (clang, -O0):
<v_dblrev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jle    116b <v_dblrev+0x6b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0xffffffff,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  %xmm0,(%rax)
jmp    110b <v_dblrev+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_dblrev>:
cmp    $0x2,%esi
jl     1130 <v_dblrev+0x30>
lea    -0x1(%rsi),%eax
lea    (%rdi,%rax,8),%rax
add    $0x2,%esi
nop
movsd  (%rax),%xmm0
movsd  (%rdi),%xmm1
movsd  %xmm1,(%rax)
movsd  %xmm0,(%rdi)
add    $0x8,%rdi
add    $0xfffffffffffffff8,%rax
add    $0xfffffffe,%esi
cmp    $0x3,%esi
ja     1110 <v_dblrev+0x10>
ret

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

LLVM IR (-O2):
define void @v_dblrev(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %15
4: ; preds = %2, %4
%5 = phi double* [ %13, %4 ], [ %0, %2 ]
%6 = phi i32 [ %12, %4 ], [ %1, %2 ]
%7 = add nsw i32 %6, -1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds double, double* %5, i64 %8
%10 = load double, double* %9
%11 = load double, double* %5
%12 = add nsw i32 %6, -2
store double %11, double* %9
%13 = getelementptr inbounds double, double* %5, i64 1
store double %10, double* %5
%14 = icmp ugt i32 %6, 3
br i1 %14, label %4, label %15
15: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
void setRandomSeed() { srand(0); }


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

x86 assembly (clang, -O2):
<setRandomSeed>:
xor    %edi,%edi
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @setRandomSeed() {
%1 = tail call i32 @srand(i32 0)
ret void
}
void abase() {
  asm volatile("movq %%r15, %%rbx\n\t"
               "movq $0x0123456789abcdef, %%rax\n\t"
               "addq %%rax, %%rbx\n\t"
               "movq (%%rbx), %%rbx\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<abase>:
push   %rbp
mov    %rsp,%rbp
mov    %r15,%rbx
movabs $0x123456789abcdef,%rax
45 23 01
add    %rax,%rbx
mov    (%rbx),%rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<abase>:
mov    %r15,%rbx
movabs $0x123456789abcdef,%rax
45 23 01
add    %rax,%rbx
mov    (%rbx),%rbx
ret

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

LLVM IR (-O2):
define void @abase() {
tail call void asm sideeffect "movq %r15, %rbx\0A\09movq $$0x0123456789abcdef, %rax\0A\09addq %rax, %rbx\0A\09movq (%rbx), %rbx\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int ui_loop(int, char **, char *);
int main(int argc, char **argv) { return ui_loop(argc, argv, "texobj"); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xecc(%rip),%rdx
call   1030 <ui_loop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdx
jmp    1030 <ui_loop@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"texobj\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ui_loop(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
void pattern_top_center(float *p) {
  float up_res = 8.0;
  p[0] = 32.0 * up_res * 5 - 0.5;
  p[1] = 32.0 * up_res * 1 - 0.5;
  return;
}


x86 assembly (clang, -O0):
<pattern_top_center>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  0xf08(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pattern_top_center>:
movabs $0x437f8000449ff000,%rax
80 7f 43
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @pattern_top_center(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
store float 8.000000e+00, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fmul double 3.200000e+01, %5
%7 = call double @llvm.fmuladd.f64(double %6, double 5.000000e+00, double -5.000000e-01)
%8 = fptrunc double %7 to float
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 0
store float %8, float* %10
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = fmul double 3.200000e+01, %12
%14 = call double @llvm.fmuladd.f64(double %13, double 1.000000e+00, double -5.000000e-01)
%15 = fptrunc double %14 to float
%16 = load float*, float** %2
%17 = getelementptr inbounds float, float* %16, i64 1
store float %15, float* %17
ret void
}

LLVM IR (-O2):
define void @pattern_top_center(float* nocapture writeonly %0) {
store float 1.279500e+03, float* %0
%2 = getelementptr inbounds float, float* %0, i64 1
store float 2.555000e+02, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ remove(char *);
char *wPopString();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasKill() {
  char *name = wPopString();
  remove(name);
  free(name);
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasKill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <wPopString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <remove@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1060 <wPushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasKill>:
push   %rbx
xor    %eax,%eax
call   1050 <wPopString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <remove@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %edi,%edi
pop    %rbx
jmp    1060 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasKill() {
%1 = alloca i8*
%2 = call i8* (...) @wPopString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @remove(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @free(i8* %5)
%7 = call i32 @wPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBasKill() {
%1 = tail call i8* (...) @wPopString()
%2 = tail call i32 @remove(i8* %1)
%3 = tail call i32 @free(i8* %1)
%4 = tail call i32 @wPushNumber(i32 0)
ret void
}
/* Type definitions */
struct tc_mat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tc_mat *);
int /*<<< orphan*/ tc_mat_clear(struct tc_mat *);
void tc_mat_dtr(struct tc_mat *A) {
  if (!A)
    return;
  tc_mat_clear(A);
  free(A);
}


x86 assembly (clang, -O0):
<tc_mat_dtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <tc_mat_dtr+0x1c>
jmp    114e <tc_mat_dtr+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <tc_mat_clear@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tc_mat_dtr>:
test   %rdi,%rdi
je     1137 <tc_mat_dtr+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <tc_mat_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.tc_mat = type { i32 }
define void @tc_mat_dtr(%struct.tc_mat* %0) {
%2 = alloca %struct.tc_mat*
store %struct.tc_mat* %0, %struct.tc_mat** %2
%3 = load %struct.tc_mat*, %struct.tc_mat** %2
%4 = icmp ne %struct.tc_mat* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.tc_mat*, %struct.tc_mat** %2
%8 = call i32 @tc_mat_clear(%struct.tc_mat* %7)
%9 = load %struct.tc_mat*, %struct.tc_mat** %2
%10 = call i32 @free(%struct.tc_mat* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.tc_mat = type { i32 }
define void @tc_mat_dtr(%struct.tc_mat* %0) {
%2 = icmp eq %struct.tc_mat* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @tc_mat_clear(%struct.tc_mat* %0)
%5 = tail call i32 @free(%struct.tc_mat* %0)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void _noecho(void) { system("stty -echo -icanon"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"stty -echo -icanon\00"
define void @_noecho() {
%1 = call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"stty -echo -icanon\00"
define void @_noecho() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
int _deq(unsigned int bh, unsigned int bl, unsigned int ch, unsigned int cl) {
  if (bl != cl)
    return 0;
  if (bh == ch)
    return 1;
  if (bh != 0 && bh != 0x80000000)
    return 0;
  if (ch != 0 && ch != 0x80000000)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<_deq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1128 <_deq+0x28>
movl   $0x0,-0x4(%rbp)
jmp    118d <_deq+0x8d>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1140 <_deq+0x40>
movl   $0x1,-0x4(%rbp)
jmp    118d <_deq+0x8d>
cmpl   $0x0,-0x8(%rbp)
je     1163 <_deq+0x63>
cmpl   $0x80000000,-0x8(%rbp)
je     1163 <_deq+0x63>
movl   $0x0,-0x4(%rbp)
jmp    118d <_deq+0x8d>
cmpl   $0x0,-0x10(%rbp)
je     1186 <_deq+0x86>
cmpl   $0x80000000,-0x10(%rbp)
je     1186 <_deq+0x86>
movl   $0x0,-0x4(%rbp)
jmp    118d <_deq+0x8d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_deq>:
xor    %eax,%eax
cmp    %ecx,%esi
jne    111c <_deq+0x1c>
mov    $0x1,%eax
cmp    %edx,%edi
je     111c <_deq+0x1c>
mov    $0x0,%eax
test   $0x7fffffff,%edi
je     111d <_deq+0x1d>
ret
xor    %eax,%eax
test   $0x7fffffff,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @_deq(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %7
%11 = load i32, i32* %9
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %4
store i32 0, i32* %5
br label %34
14: ; preds = %4
%15 = load i32, i32* %6
%16 = load i32, i32* %8
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 1, i32* %5
br label %34
19: ; preds = %14
%20 = load i32, i32* %6
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, -2147483648
br i1 %24, label %25, label %26
25: ; preds = %22
store i32 0, i32* %5
br label %34
26: ; preds = %22, %19
%27 = load i32, i32* %8
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = load i32, i32* %8
%31 = icmp ne i32 %30, -2147483648
br i1 %31, label %32, label %33
32: ; preds = %29
store i32 0, i32* %5
br label %34
33: ; preds = %29, %26
store i32 1, i32* %5
br label %34
34: ; preds = %33, %32, %25, %18, %13
%35 = load i32, i32* %5
ret i32 %35
}

LLVM IR (-O2):
define i32 @_deq(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %1, %3
br i1 %5, label %6, label %15
6: ; preds = %4
%7 = icmp eq i32 %0, %2
br i1 %7, label %15, label %8
8: ; preds = %6
%9 = and i32 %0, 2147483647
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = and i32 %2, 2147483647
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %11, %8, %6, %4
%16 = phi i32 [ 0, %4 ], [ 1, %6 ], [ 0, %8 ], [ %14, %11 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ suggest(char const *);
void requires(const char *prog, const char *arg) {
  fprintf(stderr, "%s: option \"-%s\" requires an argument\n", prog, arg);
  suggest(prog);
}


x86 assembly (clang, -O0):
<requires>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <suggest@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<requires>:
push   %rbx
mov    %rsi,%rcx
mov    %rdi,%rbx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <suggest@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"%s: option \22-%s\22 requires an argument\0A\00"
define void @requires(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @suggest(i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"%s: option \22-%s\22 requires an argument\0A\00"
define void @requires(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @suggest(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void cfg_indent(FILE *fp, int indent) {
  while (indent--)
    fprintf(fp, "  ");
}


x86 assembly (clang, -O0):
<cfg_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1148 <cfg_indent+0x38>
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
jmp    111f <cfg_indent+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_indent>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     114a <cfg_indent+0x3a>
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xedb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %r14,%rcx
call   1030 <fwrite@plt>
add    $0xffffffff,%ebx
jne    1130 <cfg_indent+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c" \00"
define void @cfg_indent(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32*, i32** %3
%11 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @cfg_indent(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 2, i64 1, i32* %0)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void die(void) { exit(2); }


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    $0x2,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @die() {
%1 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @die() {
%1 = tail call i32 @exit(i32 2)
unreachable
}
float CubicAmplifier(float input) {
  float output, temp;
  if (input < 0.0) {
    temp = input + 1.0f;
    output = (temp * temp * temp) - 1.0f;
  } else {
    temp = input - 1.0f;
    output = (temp * temp * temp) + 1.0f;
  }
  return output;
}


x86 assembly (clang, -O0):
<CubicAmplifier>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    115a <CubicAmplifier+0x5a>
movss  0xed9(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeb8(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1194 <CubicAmplifier+0x94>
movss  -0x4(%rbp),%xmm0
movss  0xe99(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe75(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CubicAmplifier>:
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1127 <CubicAmplifier+0x27>
addss  0xef4(%rip),%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
addss  0xedd(%rip),%xmm1
movaps %xmm1,%xmm0
ret
addss  0xed1(%rip),%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
addss  0xec2(%rip),%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @CubicAmplifier(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fcmp olt double %6, 0.000000e+00
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load float, float* %2
%10 = fadd float %9, 1.000000e+00
store float %10, float* %4
%11 = load float, float* %4
%12 = load float, float* %4
%13 = fmul float %11, %12
%14 = load float, float* %4
%15 = call float @llvm.fmuladd.f32(float %13, float %14, float -1.000000e+00)
store float %15, float* %3
br label %24
16: ; preds = %1
%17 = load float, float* %2
%18 = fsub float %17, 1.000000e+00
store float %18, float* %4
%19 = load float, float* %4
%20 = load float, float* %4
%21 = fmul float %19, %20
%22 = load float, float* %4
%23 = call float @llvm.fmuladd.f32(float %21, float %22, float 1.000000e+00)
store float %23, float* %3
br label %24
24: ; preds = %16, %8
%25 = load float, float* %3
ret float %25
}

LLVM IR (-O2):
define float @CubicAmplifier(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fadd float %0, 1.000000e+00
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %5, float %4, float -1.000000e+00)
br label %11
7: ; preds = %1
%8 = fadd float %0, -1.000000e+00
%9 = fmul float %8, %8
%10 = tail call float @llvm.fmuladd.f32(float %9, float %8, float 1.000000e+00)
br label %11
11: ; preds = %7, %3
%12 = phi float [ %6, %3 ], [ %10, %7 ]
ret float %12
}
int fn(void) {
  static int x = 20;
  return x++;
}


x86 assembly (clang, -O0):
<fn>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0b(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn>:
mov    0x2f1a(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f11(%rip)
ret

LLVM IR (-O0):
@fn.x = internal global i32 20
define i32 @fn() {
%1 = load i32, i32* @fn.x
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fn.x
ret i32 %1
}

LLVM IR (-O2):
@fn.x = internal unnamed_addr global i32 20
define i32 @fn() {
%1 = load i32, i32* @fn.x
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fn.x
ret i32 %1
}
int color_offset_f1(int x, int y) {
  return ((y << 10) - (((x << 10) * 547) / 503) + (31 << 10)) >> 10;
}


x86 assembly (clang, -O0):
<color_offset_f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
imul   $0x223,%eax,%eax
mov    $0x1f7,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
add    $0x7c00,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f1>:
shl    $0xa,%esi
imul   $0x88c00,%edi,%eax
cltq
imul   $0x7db5b19f,%rax,%rcx
shr    $0x20,%rcx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x8,%ecx
add    %eax,%ecx
lea    (%rsi,%rcx,1),%eax
add    $0x7c00,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 10
%7 = load i32, i32* %3
%8 = shl i32 %7, 10
%9 = mul nsw i32 %8, 547
%10 = sdiv i32 %9, 503
%11 = sub nsw i32 %6, %10
%12 = add nsw i32 %11, 31744
%13 = ashr i32 %12, 10
ret i32 %13
}

LLVM IR (-O2):
define i32 @color_offset_f1(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = mul i32 %0, 560128
%5 = sdiv i32 %4, -503
%6 = add i32 %3, 31744
%7 = add i32 %6, %5
%8 = ashr i32 %7, 10
ret i32 %8
}
/* Variables and functions */
unsigned int __libnet_timer_func();
void safe_sleep(int seconds) {
  unsigned x = __libnet_timer_func();
  int y = 0;
  while (y < seconds * 1000)
    y = (unsigned)(__libnet_timer_func() - x);
}


x86 assembly (clang, -O0):
<safe_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__libnet_timer_func@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   $0x3e8,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jge    1150 <safe_sleep+0x40>
mov    $0x0,%al
call   1030 <__libnet_timer_func@plt>
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112c <safe_sleep+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_sleep>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <__libnet_timer_func@plt>
test   %ebp,%ebp
jle    113d <safe_sleep+0x2d>
mov    %eax,%ebx
imul   $0x3e8,%ebp,%ebp
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__libnet_timer_func@plt>
sub    %ebx,%eax
cmp    %ebp,%eax
jl     1130 <safe_sleep+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @safe_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @__libnet_timer_func()
store i32 %5, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %11, %1
%7 = load i32, i32* %4
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, 1000
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %15
11: ; preds = %6
%12 = call i32 (...) @__libnet_timer_func()
%13 = load i32, i32* %3
%14 = sub i32 %12, %13
store i32 %14, i32* %4
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @safe_sleep(i32 %0) {
%2 = tail call i32 (...) @__libnet_timer_func()
%3 = mul nsw i32 %0, 1000
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %1, %5
%6 = tail call i32 (...) @__libnet_timer_func()
%7 = sub i32 %6, %2
%8 = icmp slt i32 %7, %3
br i1 %8, label %5, label %9
9: ; preds = %5, %1
ret void
}
int getpid() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @getpid() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ vga_putc(unsigned int);
int vprintf_help(unsigned c, void **ptr) {
  (void)ptr;
  vga_putc(c);
  return 0;
}


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

x86 assembly (clang, -O2):
<vprintf_help>:
push   %rax
call   1030 <vga_putc@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @vprintf_help(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @vga_putc(i32 %0)
ret i32 0
}
unsigned char ensix(unsigned char x) { return x & 0x0000003f; }


x86 assembly (clang, -O0):
<ensix>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x3f,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ensix>:
mov    %edi,%eax
and    $0x3f,%al
ret

LLVM IR (-O0):
define zeroext i8 @ensix(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 63
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @ensix(i8 zeroext %0) {
%2 = and i8 %0, 63
ret i8 %2
}
void audio_monitoring_force_display(int x) {}


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

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

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

LLVM IR (-O2):
define void @audio_monitoring_force_display(i32 %0) {
ret void
}
void g_source_get_can_recurse() {}


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

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

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

LLVM IR (-O2):
define void @g_source_get_can_recurse() {
ret void
}
/* Variables and functions */
int PAPI_set_debug(int);
void papif_set_debug__(int *debug, int *check) {
  *check = PAPI_set_debug(*debug);
}


x86 assembly (clang, -O0):
<papif_set_debug__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <PAPI_set_debug@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_set_debug__>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_set_debug@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_set_debug__(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_set_debug(i32 %3)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
int main(void) {
  printf("The length of the string \"123456\": %d\n", strlen("123456"));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"The length of the string \22123456\22: %d\0A\00"
@.str.1 = [7 x i8] c"123456\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"The length of the string \22123456\22: %d\0A\00"
@.str.1 = [7 x i8] c"123456\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t msb64(uint64_t x) { return (uint32_t)(x >> 32); }


x86 assembly (clang, -O0):
<msb64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @msb64(i32 %0) {
ret i32 poison
}
int do_610() { return 610; }


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

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

LLVM IR (-O0):
define i32 @do_610() {
ret i32 610
}

LLVM IR (-O2):
define i32 @do_610() {
ret i32 610
}
void dec_rt_prio_smp(struct rt_rq *rt_rq, int prio, int prev_prio) {}


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

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

LLVM IR (-O0):
%struct.rt_rq = type opaque
define void @dec_rt_prio_smp(%struct.rt_rq* %0, i32 %1, i32 %2) {
%4 = alloca %struct.rt_rq*
%5 = alloca i32
%6 = alloca i32
store %struct.rt_rq* %0, %struct.rt_rq** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.rt_rq = type opaque
define void @dec_rt_prio_smp(%struct.rt_rq* nocapture %0, i32 %1, i32 %2) {
ret void
}
int compare_int(void *a, void *b) {
  int *x = a;
  int *y = b;
  return *x - *y;
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
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),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @compare_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int mul(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int a, b, c;
  a = -233;
  b = -3333;
  c = mul(a, b);
  printf("%i * %i = %i\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffff17,-0x8(%rbp)
movl   $0xfffff2fb,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <mul@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"%i * %i = %i\0A\00"
define i32 @main() {
%1 = tail call i32 @mul(i32 -233, i32 -3333)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 -233, i32 -3333, i32 %1)
ret i32 0
}
/* Variables and functions */
int printf(char *);
int display(void) { return printf("a teraz ala ma maksa\n"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"a teraz ala ma maksa\0A\00"
define i32 @display() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [22 x i8] c"a teraz ala ma maksa\0A\00"
define i32 @display() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRD4_set(void) { return U_WMRCORENONE_set("U_WMRD4"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRD4\00"
define i8* @U_WMRD4_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD4\00"
define i8* @U_WMRD4_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ getNumbers(double *, double *);
double resta(double a, double b) {
  getNumbers(&a, &b);
  return (a - b);
}


x86 assembly (clang, -O0):
<resta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <getNumbers@plt>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resta>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <getNumbers@plt>
movsd  0x10(%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @resta(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 @getNumbers(double* %3, double* %4)
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fsub double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @resta(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 @getNumbers(double* %3, double* %4)
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fsub double %6, %7
ret double %8
}
void foo() { return; }


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int unlz77wii_raw20(unsigned char *in, int insz, unsigned char *outdata,
                    int decomp_size) {
  printf("\nError: unlz77wii_raw20 is not implemented\n");
  return (-1);
}


x86 assembly (clang, -O0):
<unlz77wii_raw20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [44 x i8] c"\0AError: unlz77wii_raw20 is not implemented\0A\00"
define i32 @unlz77wii_raw20(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@str = [43 x i8] c"\0AError: unlz77wii_raw20 is not implemented\00"
define i32 @unlz77wii_raw20(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int ENOSYS;
int gk20a_do_unidle(void) { return -ENOSYS; }


x86 assembly (clang, -O0):
<gk20a_do_unidle>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2edb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gk20a_do_unidle>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @gk20a_do_unidle() {
%1 = load i32, i32* @ENOSYS
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @gk20a_do_unidle() {
%1 = load i32, i32* @ENOSYS
%2 = sub nsw i32 0, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ wrint(int);
int /*<<< orphan*/ writec(char);
int /*<<< orphan*/ writel(char *);
void wrhit(int i) {
  writel("Blot hit on ");
  wrint(i);
  writec('.');
  writec('\n');
}


x86 assembly (clang, -O0):
<wrhit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <writel@plt>
mov    -0x4(%rbp),%edi
call   1040 <wrint@plt>
mov    $0x2e,%edi
call   1030 <writec@plt>
mov    $0xa,%edi
call   1030 <writec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrhit>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1050 <writel@plt>
mov    %ebx,%edi
call   1040 <wrint@plt>
mov    $0x2e,%edi
call   1030 <writec@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <writec@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Blot hit on \00"
define void @wrhit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @writel(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @wrint(i32 %4)
%6 = call i32 @writec(i8 signext 46)
%7 = call i32 @writec(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Blot hit on \00"
define void @wrhit(i32 %0) {
%2 = tail call i32 @writel(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @wrint(i32 %0)
%4 = tail call i32 @writec(i8 signext 46)
%5 = tail call i32 @writec(i8 signext 10)
ret void
}
int put(object, where, pval)
int object, where, pval;
{
  move(object, where);
  return (-1 - pval);
}


x86 assembly (clang, -O0):
<put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <move@plt>
mov    $0xffffffff,%eax
sub    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put>:
push   %rbx
mov    %edx,%ebx
xor    %eax,%eax
call   1030 <move@plt>
not    %ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @put(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%5 = xor i32 %2, -1
ret i32 %5
}
/* Variables and functions */
scalar_t__ declare_arrayNnomemset(int, int, int, int);
int **declare_int_nomemset(int first, int second) {
  return (int **)declare_arrayNnomemset(2, sizeof(int), first, second);
}


x86 assembly (clang, -O0):
<declare_int_nomemset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    $0x2,%edi
mov    $0x4,%esi
call   1030 <declare_arrayNnomemset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<declare_int_nomemset>:
mov    %esi,%ecx
mov    %edi,%edx
mov    $0x2,%edi
mov    $0x4,%esi
jmp    1030 <declare_arrayNnomemset@plt>

LLVM IR (-O0):
define i32** @declare_int_nomemset(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i64 @declare_arrayNnomemset(i32 2, i32 4, i32 %5, i32 %6)
%8 = inttoptr i64 %7 to i32**
ret i32** %8
}

LLVM IR (-O2):
define i32** @declare_int_nomemset(i32 %0, i32 %1) {
%3 = tail call i64 @declare_arrayNnomemset(i32 2, i32 4, i32 %0, i32 %1)
%4 = inttoptr i64 %3 to i32**
ret i32** %4
}
/* Variables and functions */
int /*<<< orphan*/ wait(int *);
void clean_up_child_process(int signal_number) {
  int status;
  wait(&status);
}


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

x86 assembly (clang, -O2):
<clean_up_child_process>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <wait@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clean_up_child_process(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @wait(i32* %2)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *session_invalid_start() {
  char *session = "0000000000000000";
  char *ret = (char *)malloc(sizeof(char) * 17);
  strncpy(ret, session, 17);
  return ret;
}


x86 assembly (clang, -O0):
<session_invalid_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x11,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x11,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"0000000000000000\00"
define i8* @session_invalid_start() {
%1 = tail call i64 @malloc(i32 17)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 17)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void helpMsg(char *progName) {
  printf("Pouzitie: %s [-g multicast group address:port] [-h host:port]\n\nPri "
         "pouziti IPv6 adresy je nutne pouzitie formatu '[IPv6Adresa]'\n\n",
         progName);
}


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

x86 assembly (clang, -O2):
<helpMsg>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [130 x i8] c"Pouzitie: %s [-g multicast group address:port] [-h host:port]\0A\0APri pouziti IPv6 adresy je nutne pouzitie formatu '[IPv6Adresa]'\0A\0A\00"
define void @helpMsg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [130 x i8] c"Pouzitie: %s [-g multicast group address:port] [-h host:port]\0A\0APri pouziti IPv6 adresy je nutne pouzitie formatu '[IPv6Adresa]'\0A\0A\00"
define void @helpMsg(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}