xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void foo(int argc, void *data) {
  char **args = (char **)data;
  int i;
  for (i = 0; i < argc; i++) {
    printf("%d:%s\n", i, args[i]);
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1163 <foo+0x53>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112e <foo+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <foo+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <foo+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d:%s\0A\00"
define void @foo(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
store i32 0, i32* %6
br label %9
9: ; preds = %21, %2
%10 = load i32, i32* %6
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %24
13: ; preds = %9
%14 = load i32, i32* %6
%15 = load i8**, i8*** %5
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %14, i8* %19)
br label %21
21: ; preds = %13
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %9
24: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d:%s\0A\00"
define void @foo(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %3, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ test45_N_bar__E();
void test45_Test5_test__I() {
  foo();
  test45_N_bar__E();
  test45_N_bar__E();
}


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

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

LLVM IR (-O0):
define void @test45_Test5_test__I() {
%1 = call i32 (...) @foo()
%2 = call i32 (...) @test45_N_bar__E()
%3 = call i32 (...) @test45_N_bar__E()
ret void
}

LLVM IR (-O2):
define void @test45_Test5_test__I() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @test45_N_bar__E()
%3 = tail call i32 (...) @test45_N_bar__E()
ret void
}
/* Variables and functions */
float log(float);
void atlas_vlog(int *n, float *d) {
  int i;
  for (i = 0; i < *n; i++, d++)
    *d = log(*d);
}


x86 assembly (clang, -O0):
<atlas_vlog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    1165 <atlas_vlog+0x55>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <log@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    1127 <atlas_vlog+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atlas_vlog>:
push   %r15
push   %r14
push   %rbx
cmpl   $0x0,(%rdi)
jle    114a <atlas_vlog+0x3a>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%r15,%rbx,4),%xmm0
call   1030 <log@plt>
movss  %xmm0,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    (%r14),%ebx
jl     1130 <atlas_vlog+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @atlas_vlog(i32* nocapture %0, float* nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %2, %5
%6 = phi i32 [ %10, %5 ], [ 0, %2 ]
%7 = phi float* [ %11, %5 ], [ %1, %2 ]
%8 = load float, float* %7
%9 = tail call float @log(float %8)
store float %9, float* %7
%10 = add nuw nsw i32 %6, 1
%11 = getelementptr inbounds float, float* %7, i64 1
%12 = load i32, i32* %0
%13 = icmp slt i32 %10, %12
br i1 %13, label %5, label %14
14: ; preds = %5, %2
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int a;
  int b;
  x = __VERIFIER_nondet_int();
  a = __VERIFIER_nondet_int();
  b = __VERIFIER_nondet_int();
  if (a == b) {
    while (x >= 0) {
      x = x + a - b - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1171 <main+0x61>
jmp    114e <main+0x3e>
cmpl   $0x0,-0x8(%rbp)
jl     116c <main+0x5c>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114e <main+0x3e>
jmp    1171 <main+0x61>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void PrintFactJNCompVars2(void *theEnv, const char *logicalName,
                          void *theValue) {}


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

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

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

LLVM IR (-O2):
define void @PrintFactJNCompVars2(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
void version() {
  printf(
      "%s %s\n%s\n%s\n", "icalc (interval calculator)", "0.5-beta",
      "Copyright (C) 2015 Alexander Loshkin",
      "This program is free software. It comes with ABSOLUTELY NO WARRANTY.");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xf00(%rip),%rdx
lea    0xf02(%rip),%rcx
lea    0xf20(%rip),%r8
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
lea    0xf04(%rip),%rdx
lea    0xf06(%rip),%rcx
lea    0xf24(%rip),%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s %s\0A%s\0A%s\0A\00"
@.str.1 = [28 x i8] c"icalc (interval calculator)\00"
@.str.2 = [9 x i8] c"0.5-beta\00"
@.str.3 = [37 x i8] c"Copyright (C) 2015 Alexander Loshkin\00"
@.str.4 = [69 x i8] c"This program is free software. It comes with ABSOLUTELY NO WARRANTY.\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s %s\0A%s\0A%s\0A\00"
@.str.1 = [28 x i8] c"icalc (interval calculator)\00"
@.str.2 = [9 x i8] c"0.5-beta\00"
@.str.3 = [37 x i8] c"Copyright (C) 2015 Alexander Loshkin\00"
@.str.4 = [69 x i8] c"This program is free software. It comes with ABSOLUTELY NO WARRANTY.\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f23(long j) {
  if ((j & ((1UL << (23)) - 1)) >= ((1UL << ((23) - 1)) + 2))
    abort();
}


x86 assembly (clang, -O0):
<f23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x7fffff,%rax
cmp    $0x400002,%rax
jb     1139 <f23+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f23>:
and    $0x7ffffe,%edi
cmp    $0x400002,%edi
jae    111f <f23+0xf>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f23(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 8388607
%5 = icmp uge i64 %4, 4194306
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f23(i64 %0) {
%2 = and i64 %0, 8388606
%3 = icmp ugt i64 %2, 4194305
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
main() { printf("%d", EOF); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int gAnd(int const, int const);
int gXor(int const, int const);
void halfAdder(const int a, const int b, int *sum, int *carry) {
  *sum = gXor(a, b);
  *carry = gAnd(a, b);
}


x86 assembly (clang, -O0):
<halfAdder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gXor@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <gAnd@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<halfAdder>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <gXor@plt>
mov    %eax,(%r15)
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <gAnd@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @halfAdder(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @gXor(i32 %9, i32 %10)
%12 = load i32*, i32** %7
store i32 %11, i32* %12
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @gAnd(i32 %13, i32 %14)
%16 = load i32*, i32** %8
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @halfAdder(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = tail call i32 @gXor(i32 %0, i32 %1)
store i32 %5, i32* %2
%6 = tail call i32 @gAnd(i32 %0, i32 %1)
store i32 %6, i32* %3
ret void
}
int popcount_8(unsigned int v) {
  v = ((v >> 1) & 0x55) + (v & 0x55);
  v = ((v >> 2) & 0x33) + (v & 0x33);
  v = ((v >> 4) & 0x0F) + (v & 0x0F);
  return v;
}


x86 assembly (clang, -O0):
<popcount_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
and    $0x55,%eax
mov    -0x4(%rbp),%ecx
and    $0x55,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
and    $0x33,%eax
mov    -0x4(%rbp),%ecx
and    $0x33,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
and    $0xf,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcount_8>:
mov    %edi,%eax
shr    %eax
and    $0x55,%eax
and    $0x55,%edi
add    %edi,%eax
mov    %eax,%ecx
shr    $0x2,%ecx
and    $0xfffffff3,%ecx
and    $0x33,%eax
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
and    $0x7,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @popcount_8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = and i32 %4, 85
%6 = load i32, i32* %2
%7 = and i32 %6, 85
%8 = add i32 %5, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = lshr i32 %9, 2
%11 = and i32 %10, 51
%12 = load i32, i32* %2
%13 = and i32 %12, 51
%14 = add i32 %11, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 4
%17 = and i32 %16, 15
%18 = load i32, i32* %2
%19 = and i32 %18, 15
%20 = add i32 %17, %19
store i32 %20, i32* %2
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @popcount_8(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 85
%4 = and i32 %0, 85
%5 = add nuw nsw i32 %3, %4
%6 = lshr i32 %5, 2
%7 = and i32 %6, 51
%8 = and i32 %5, 51
%9 = add nuw nsw i32 %7, %8
%10 = lshr i32 %9, 4
%11 = and i32 %9, 7
%12 = add nuw nsw i32 %10, %11
ret i32 %12
}
__attribute__((__unused__)) int isalnum(int c) {
  return ((('0' <= (c)) && ((c) <= '9')) || (('a' <= (c)) && ((c) <= 'z')) ||
          (('A' <= (c)) && ((c) <= 'Z')));
}


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x30,%eax
cmp    -0x4(%rbp),%eax
jg     1124 <isalnum+0x24>
mov    $0x1,%al
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1164 <isalnum+0x64>
mov    $0x61,%eax
cmp    -0x4(%rbp),%eax
jg     1141 <isalnum+0x41>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1164 <isalnum+0x64>
xor    %eax,%eax
mov    $0x41,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jg     115e <isalnum+0x5e>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x1a,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 48, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sle i32 97, %9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 122
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sle i32 65, %15
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 90
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 26
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_pairs(const char pairs[][3], int max) {
  for (int i = 0; i < max; i++)
    printf("%s ", pairs[i]);
}


x86 assembly (clang, -O0):
<print_pairs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <print_pairs+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
imul   $0x3,%rax,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_pairs+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_pairs>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <print_pairs+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x3,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <print_pairs+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @print_pairs([3 x i8]* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %11, %7 ]
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 %8, i64 0
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fseek(int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char readInput(char *pointer) {
  fgets(pointer, 2, stdin);
  fseek(stdin, 0, SEEK_END);
  fflush(stdin);
}


x86 assembly (clang, -O0):
<readInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1030 <fgets@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInput>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edx
mov    $0x2,%esi
call   1030 <fgets@plt>
mov    (%rbx),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdin = global i32 0
@SEEK_END = global i32 0
define signext i8 @readInput(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 2, i32 %5)
%7 = load i32, i32* @stdin
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32 %7, i32 0, i32 %8)
%10 = load i32, i32* @stdin
%11 = call i32 @fflush(i32 %10)
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
@stdin = global i32 0
@SEEK_END = global i32 0
define signext i8 @readInput(i8* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %0, i32 2, i32 %2)
%4 = load i32, i32* @stdin
%5 = load i32, i32* @SEEK_END
%6 = tail call i32 @fseek(i32 %4, i32 0, i32 %5)
%7 = load i32, i32* @stdin
%8 = tail call i32 @fflush(i32 %7)
ret i8 undef
}
/* Variables and functions */
void *getUnit(char *str) { return (NULL); }


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

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

LLVM IR (-O0):
define i8* @getUnit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @getUnit(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void oap_endwin() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @oap_endwin() {
%1 = tail call i32 (...) @endwin()
ret void
}
int test_imm_07uint8_reg(unsigned char val) {
  return ((val) & (-0x07 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_07uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xfffffff9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_07uint8_reg>:
test   $0xf9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_07uint8_reg(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, -7
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_07uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -7
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
extern double putchard(double X) {
  char a = (char)X;
  putchar(a);
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<putchard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchard>:
push   %rax
cvttsd2si %xmm0,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xorpd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@stdout = global i32 0
define double @putchard(double %0) {
%2 = alloca double
%3 = alloca i8
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i8
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = call i32 @putchar(i8 signext %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret double 0.000000e+00
}

LLVM IR (-O2):
@stdout = global i32 0
define double @putchard(double %0) {
%2 = fptosi double %0 to i8
%3 = tail call i32 @putchar(i8 signext %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ leakingmemory(int);
int /*<<< orphan*/ sleep(int);
int main() {
  for (;;) {
    sleep(2);
    leakingmemory(10);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    $0xa,%edi
call   1030 <leakingmemory@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    $0xa,%edi
call   1030 <leakingmemory@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 @sleep(i32 2)
%4 = call i32 @leakingmemory(i32 10)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 2)
%3 = tail call i32 @leakingmemory(i32 10)
br label %1
}
/* Variables and functions */
int pow(double, int);
long long binary_num(int num_of_bits) {
  long long result = pow(2.0, num_of_bits) - 1;
  return result;
}


x86 assembly (clang, -O0):
<binary_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
movsd  0xeda(%rip),%xmm0
call   1030 <pow@plt>
sub    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_num>:
push   %rax
movsd  0xee7(%rip),%xmm0
call   1030 <pow@plt>
add    $0xffffffff,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @binary_num(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @pow(double 2.000000e+00, i32 %4)
%6 = sub nsw i32 %5, 1
%7 = sext i32 %6 to i64
store i64 %7, i64* %3
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
define i64 @binary_num(i32 %0) {
%2 = tail call i32 @pow(double 2.000000e+00, i32 %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
ret i64 %4
}
indreg0adr1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (*p0) = (*((int *)11111111)); }


x86 assembly (clang, -O0):
<indreg0adr1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0xa98ac7,%eax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0adr1_set>:
mov    0xa98ac7,%eax
mov    %eax,(%r8)
ret

LLVM IR (-O0):
define i32 @indreg0adr1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 11111111 to i32*)
%15 = load i32*, i32** %12
store i32 %14, i32* %15
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @indreg0adr1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture writeonly %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 11111111 to i32*)
store i32 %7, i32* %4
ret i32 undef
}
void palm27x_pwm_init(int bl, int lcd) {}


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

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

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

LLVM IR (-O2):
define void @palm27x_pwm_init(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
struct Matrix_T {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_Matrix_T_tol(struct Matrix_T const *const, double);
void print_Matrix_T(const struct Matrix_T *const a) {
  print_Matrix_T_tol(a, 1.0e-15);
}


x86 assembly (clang, -O0):
<print_Matrix_T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xed8(%rip),%xmm0
call   1030 <print_Matrix_T_tol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_Matrix_T>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <print_Matrix_T_tol@plt>

LLVM IR (-O0):
%struct.Matrix_T = type { i32 }
define void @print_Matrix_T(%struct.Matrix_T* %0) {
%2 = alloca %struct.Matrix_T*
store %struct.Matrix_T* %0, %struct.Matrix_T** %2
%3 = load %struct.Matrix_T*, %struct.Matrix_T** %2
%4 = call i32 @print_Matrix_T_tol(%struct.Matrix_T* %3, double 1.000000e-15)
ret void
}

LLVM IR (-O2):
%struct.Matrix_T = type { i32 }
define void @print_Matrix_T(%struct.Matrix_T* %0) {
%2 = tail call i32 @print_Matrix_T_tol(%struct.Matrix_T* %0, double 1.000000e-15)
ret void
}
void sig_handler_null(int signal) { return; }


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

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

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

LLVM IR (-O2):
define void @sig_handler_null(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
scalar_t__ realloc(int **, int);
int **remem_tt_int(int **x, int i) {
  int **aux0;
  aux0 = (int **)realloc(x, i * sizeof(int *));
  aux0[0] = (int *)malloc(sizeof(int));
  if (aux0 == NULL) {
    printf("Erreur d'allocation de memoire'\n");
    exit(-1);
  }
  x = aux0;
  return x;
}


x86 assembly (clang, -O0):
<remem_tt_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x18(%rbp)
jne    119b <remem_tt_int+0x5b>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remem_tt_int>:
push   %rbx
shl    $0x3,%esi
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Erreur d'allocation de memoire'\0A\00"
define i32** @remem_tt_int(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32**
store i32** %0, i32*** %3
store i32 %1, i32* %4
%6 = load i32**, i32*** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 8
%10 = trunc i64 %9 to i32
%11 = call i64 @realloc(i32** %6, i32 %10)
%12 = inttoptr i64 %11 to i32**
store i32** %12, i32*** %5
%13 = call i64 @malloc(i32 4)
%14 = inttoptr i64 %13 to i32*
%15 = load i32**, i32*** %5
%16 = getelementptr inbounds i32*, i32** %15, i64 0
store i32* %14, i32** %16
%17 = load i32**, i32*** %5
%18 = icmp eq i32** %17, null
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @exit(i32 -1)
unreachable
22: ; preds = %2
%23 = load i32**, i32*** %5
store i32** %23, i32*** %3
%24 = load i32**, i32*** %3
ret i32** %24
}

LLVM IR (-O2):
define i32** @remem_tt_int(i32** %0, i32 %1) {
%3 = shl i32 %1, 3
%4 = tail call i64 @realloc(i32** %0, i32 %3)
%5 = inttoptr i64 %4 to i32**
%6 = tail call i64 @malloc(i32 4)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %5
ret i32** %5
}
void xcsv_setup_internal_style(const char *style_buf) {}


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

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

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

LLVM IR (-O2):
define void @xcsv_setup_internal_style(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int run_command(char *, char **);
int start_openssh_server(char **container_id_out) {
  return run_command("docker run --detach -P libssh2/openssh_server",
                     container_id_out);
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"docker run --detach -P libssh2/openssh_server\00"
define i32 @start_openssh_server(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @run_command(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8** %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [46 x i8] c"docker run --detach -P libssh2/openssh_server\00"
define i32 @start_openssh_server(i8** %0) {
%2 = tail call i32 @run_command(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8** %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ repl_char(int, int /*<<< orphan*/);
void escape_buf(int buf, char *src) {
  while (*src)
    repl_char(buf, *src++);
}


x86 assembly (clang, -O0):
<escape_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <escape_buf+0x3b>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <repl_char@plt>
jmp    111f <escape_buf+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<escape_buf>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <escape_buf+0x35>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <repl_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <escape_buf+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @escape_buf(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %6 to i32
%10 = tail call i32 @repl_char(i32 %0, i32 %9)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Type definitions */
struct user_regs_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exec_by_all_variants(int, int *);
void sys_getuid(int variant_count, int *child, struct user_regs_struct *regs) {
  exec_by_all_variants(variant_count, child);
}


x86 assembly (clang, -O0):
<sys_getuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <exec_by_all_variants@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_getuid>:
jmp    1030 <exec_by_all_variants@plt>

LLVM IR (-O0):
%struct.user_regs_struct = type { i32 }
define void @sys_getuid(i32 %0, i32* %1, %struct.user_regs_struct* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.user_regs_struct*
store i32 %0, i32* %4
store i32* %1, i32** %5
store %struct.user_regs_struct* %2, %struct.user_regs_struct** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = call i32 @exec_by_all_variants(i32 %7, i32* %8)
ret void
}

LLVM IR (-O2):
%struct.user_regs_struct = type { i32 }
define void @sys_getuid(i32 %0, i32* %1, %struct.user_regs_struct* nocapture readnone %2) {
%4 = tail call i32 @exec_by_all_variants(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int wdog_extend_kick(int, unsigned int, unsigned int *);
int wdog_pmon_extend_kick(int id, int timeout, int *ack) {
  return wdog_extend_kick(id, (unsigned int)timeout, (unsigned int *)ack);
}


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

x86 assembly (clang, -O2):
<wdog_pmon_extend_kick>:
jmp    1030 <wdog_extend_kick@plt>

LLVM IR (-O0):
define i32 @wdog_pmon_extend_kick(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 = load i32*, i32** %6
%10 = call i32 @wdog_extend_kick(i32 %7, i32 %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @wdog_pmon_extend_kick(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @wdog_extend_kick(i32 %0, i32 %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int quickPartition(int *, int, int);
void quickSort(int a[], int p, int r) {
  int q;
  if (p < r) {
    q = quickPartition(a, p, r);
    quickSort(a, p, q - 1);
    quickSort(a, q + 1, r);
  }
}


x86 assembly (clang, -O0):
<quickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quickSort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <quickPartition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <quickSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <quickSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quickSort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <quickPartition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <quickSort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quickSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quickSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @quickPartition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quickSort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint32_t log10Pow5(const int32_t e) {
  assert(e >= 0);
  assert(e <= 2620);
  return (((uint32_t)e) * 732923) >> 20;
}


x86 assembly (clang, -O0):
<log10Pow5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0xa3c,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
imul   $0xb2efb,-0x4(%rbp),%eax
sar    $0x14,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10Pow5>:
push   %rbx
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0xa3d,%ebx
setl   %dil
call   1030 <assert@plt>
imul   $0xb2efb,%ebx,%eax
sar    $0x14,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @log10Pow5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 2620
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, 732923
%13 = ashr i32 %12, 20
ret i32 %13
}

LLVM IR (-O2):
define i32 @log10Pow5(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @assert(i32 %3)
%5 = icmp slt i32 %0, 2621
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = mul nsw i32 %0, 732923
%9 = ashr i32 %8, 20
ret i32 %9
}
/* Variables and functions */
char *getenv(char *);
const char *get_socket_path(void) {
  const char *socket = getenv("ENVOY_SOCKET");
  return socket ? socket : "@/vodik/envoy";
}


x86 assembly (clang, -O0):
<get_socket_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <get_socket_path+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <get_socket_path+0x40>
lea    0xec6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <get_socket_path+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_socket_path>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xee6(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"ENVOY_SOCKET\00"
@.str.1 = [14 x i8] c"@/vodik/envoy\00"
define i8* @get_socket_path() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %1
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %5
%9 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), %7 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"ENVOY_SOCKET\00"
@.str.1 = [14 x i8] c"@/vodik/envoy\00"
define i8* @get_socket_path() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
void __zero__(double *dp, int len) {
  memset(((char *)dp), '\0', (len * sizeof(double)));
}


x86 assembly (clang, -O0):
<__zero__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__zero__>:
lea    0x0(,%rsi,8),%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @__zero__(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = bitcast double* %5 to i8*
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 8
%10 = trunc i64 %9 to i32
%11 = call i32 @memset(i8* %6, i8 signext 0, i32 %10)
ret void
}

LLVM IR (-O2):
define void @__zero__(double* %0, i32 %1) {
%3 = bitcast double* %0 to i8*
%4 = shl i32 %1, 3
%5 = tail call i32 @memset(i8* %3, i8 signext 0, i32 %4)
ret void
}