xunge/DecIR huggingface dataset:
float umath_float_sqrt(float a) {
  int i;
  float x;
  x = a;
  for (i = 1; i <= 10; i++)
    x = (x + a / x) / 2;
  return x;
}


x86 assembly (clang, -O0):
<umath_float_sqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1156 <umath_float_sqrt+0x56>
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
divss  -0xc(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  0xec1(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111a <umath_float_sqrt+0x1a>
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<umath_float_sqrt>:
movaps %xmm0,%xmm2
divss  %xmm0,%xmm2
addss  %xmm0,%xmm2
movss  0xeed(%rip),%xmm1
mulss  %xmm1,%xmm2
movaps %xmm0,%xmm3
divss  %xmm2,%xmm3
addss  %xmm2,%xmm3
mulss  %xmm1,%xmm3
movaps %xmm0,%xmm2
divss  %xmm3,%xmm2
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
movaps %xmm0,%xmm3
divss  %xmm2,%xmm3
addss  %xmm2,%xmm3
mulss  %xmm1,%xmm3
movaps %xmm0,%xmm2
divss  %xmm3,%xmm2
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
movaps %xmm0,%xmm3
divss  %xmm2,%xmm3
addss  %xmm2,%xmm3
mulss  %xmm1,%xmm3
movaps %xmm0,%xmm2
divss  %xmm3,%xmm2
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
movaps %xmm0,%xmm3
divss  %xmm2,%xmm3
addss  %xmm2,%xmm3
mulss  %xmm1,%xmm3
movaps %xmm0,%xmm2
divss  %xmm3,%xmm2
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
divss  %xmm2,%xmm0
addss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @umath_float_sqrt(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
store float %5, float* %4
store i32 1, i32* %3
br label %6
6: ; preds = %16, %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 10
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load float, float* %4
%11 = load float, float* %2
%12 = load float, float* %4
%13 = fdiv float %11, %12
%14 = fadd float %10, %13
%15 = fdiv float %14, 2.000000e+00
store float %15, float* %4
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = load float, float* %4
ret float %20
}

LLVM IR (-O2):
define float @umath_float_sqrt(float %0) {
%2 = fdiv float %0, %0
%3 = fadd float %2, %0
%4 = fmul float %3, 5.000000e-01
%5 = fdiv float %0, %4
%6 = fadd float %4, %5
%7 = fmul float %6, 5.000000e-01
%8 = fdiv float %0, %7
%9 = fadd float %7, %8
%10 = fmul float %9, 5.000000e-01
%11 = fdiv float %0, %10
%12 = fadd float %10, %11
%13 = fmul float %12, 5.000000e-01
%14 = fdiv float %0, %13
%15 = fadd float %13, %14
%16 = fmul float %15, 5.000000e-01
%17 = fdiv float %0, %16
%18 = fadd float %16, %17
%19 = fmul float %18, 5.000000e-01
%20 = fdiv float %0, %19
%21 = fadd float %19, %20
%22 = fmul float %21, 5.000000e-01
%23 = fdiv float %0, %22
%24 = fadd float %22, %23
%25 = fmul float %24, 5.000000e-01
%26 = fdiv float %0, %25
%27 = fadd float %25, %26
%28 = fmul float %27, 5.000000e-01
%29 = fdiv float %0, %28
%30 = fadd float %28, %29
%31 = fmul float %30, 5.000000e-01
ret float %31
}
int okn_tsm_rot(struct okn_tsm *t, struct okn_vec3f *v) { return 1; }


x86 assembly (clang, -O0):
<okn_tsm_rot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.okn_tsm = type opaque
%struct.okn_vec3f = type opaque
define i32 @okn_tsm_rot(%struct.okn_tsm* %0, %struct.okn_vec3f* %1) {
%3 = alloca %struct.okn_tsm*
%4 = alloca %struct.okn_vec3f*
store %struct.okn_tsm* %0, %struct.okn_tsm** %3
store %struct.okn_vec3f* %1, %struct.okn_vec3f** %4
ret i32 1
}

LLVM IR (-O2):
%struct.okn_tsm = type opaque
%struct.okn_vec3f = type opaque
define i32 @okn_tsm_rot(%struct.okn_tsm* nocapture readnone %0, %struct.okn_vec3f* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ nombre;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ saludar(char *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  char nombre[30];
  printf("Introduzca su nombre completo: ");
  fgets(nombre, sizeof(nombre), stdin);
  saludar(nombre);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
mov    $0x1e,%esi
call   1040 <fgets@plt>
lea    -0x30(%rbp),%rdi
call   1050 <saludar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1050 <saludar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Introduzca su nombre completo: \00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [30 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 30, i32 %9)
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%12 = call i32 @saludar(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Introduzca su nombre completo: \00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %4, i32 30, i32 %6)
%8 = call i32 @saludar(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int t(int);
main(void) {
  int a;
  scanf("%d", &a);
  printf("%d", t(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <t@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1030 <t@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @t(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g(int, int);
int main() { g(2, 3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <g@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <g@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @g(i32 2, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g(i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("hello world!!!!!!!!"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"hello world!!!!!!!!\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"hello world!!!!!!!!\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void limparTela() { system("clear"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @limparTela() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
int Func(struct foo *F) { return 1; }


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

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

LLVM IR (-O0):
%struct.foo = type opaque
define i32 @Func(%struct.foo* %0) {
%2 = alloca %struct.foo*
store %struct.foo* %0, %struct.foo** %2
ret i32 1
}

LLVM IR (-O2):
%struct.foo = type opaque
define i32 @Func(%struct.foo* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int close_stdout(void) {
  if (fclose(stdout) == EOF) {
    return -1;
  }
  fputs("stdout successfully closed.\n", stderr);
  return 0;
}


x86 assembly (clang, -O0):
<close_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
jne    1152 <close_stdout+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <close_stdout+0x4e>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
lea    0xe9e(%rip),%rdi
call   1040 <fputs@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_stdout>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    %rax,%rcx
mov    0x2eaf(%rip),%rdx
mov    $0xffffffff,%eax
cmp    (%rdx),%rcx
je     115a <close_stdout+0x3a>
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
lea    0xead(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@EOF = global i64 0
@.str = [29 x i8] c"stdout successfully closed.\0A\00"
@stderr = global i32 0
define i32 @close_stdout() {
%1 = alloca i32
%2 = load i32, i32* @stdout
%3 = call i64 @fclose(i32 %2)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %10
7: ; preds = %0
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 0, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@stdout = global i32 0
@EOF = global i64 0
@.str = [29 x i8] c"stdout successfully closed.\0A\00"
@stderr = global i32 0
define i32 @close_stdout() {
%1 = load i32, i32* @stdout
%2 = tail call i64 @fclose(i32 %1)
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %0, %5
%9 = phi i32 [ 0, %5 ], [ -1, %0 ]
ret i32 %9
}
int isWhiteSpace(char c) {
  switch (c) {
  case '\r':
  case '\n':
  case '\t':
  case '\v':
  case '\f':
  case ' ':
  case '\0':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1143 <isWhiteSpace+0x43>
jmp    111e <isWhiteSpace+0x1e>
mov    -0xc(%rbp),%eax
add    $0xfffffff7,%eax
sub    $0x5,%eax
jb     1143 <isWhiteSpace+0x43>
jmp    1132 <isWhiteSpace+0x32>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    114f <isWhiteSpace+0x4f>
jmp    1143 <isWhiteSpace+0x43>
movl   $0x1,-0x4(%rbp)
jmp    1156 <isWhiteSpace+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isWhiteSpace(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 13, label %6
i32 10, label %6
i32 9, label %6
i32 11, label %6
i32 12, label %6
i32 32, label %6
i32 0, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isWhiteSpace(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 13, label %4
i32 10, label %4
i32 9, label %4
i32 11, label %4
i32 12, label %4
i32 32, label %4
i32 0, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ I_Error(char *, char *);
int R_CheckTextureNumForName(char *);
int R_TextureNumForName(char *name) {
  int i;
  i = R_CheckTextureNumForName(name);
  if (i == -1) {
    I_Error("R_TextureNumForName: %s not found", name);
  }
  return i;
}


x86 assembly (clang, -O0):
<R_TextureNumForName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <R_CheckTextureNumForName@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1152 <R_TextureNumForName+0x32>
mov    -0x8(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <I_Error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_TextureNumForName>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <R_CheckTextureNumForName@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    1141 <R_TextureNumForName+0x21>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <I_Error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"R_TextureNumForName: %s not found\00"
define i32 @R_TextureNumForName(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @R_CheckTextureNumForName(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @I_Error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [34 x i8] c"R_TextureNumForName: %s not found\00"
define i32 @R_TextureNumForName(i8* %0) {
%2 = tail call i32 @R_CheckTextureNumForName(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @I_Error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t getxattr(const char *__path, const char *__name, void *__value,
                 size_t __size) {
  __set_errno(ENOSYS);
  return -1;
}


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

x86 assembly (clang, -O2):
<getxattr>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @getxattr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @__set_errno(i32 %9)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @getxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
void tree_to_list(struct node *root) {}


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

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

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

LLVM IR (-O2):
%struct.node = type opaque
define void @tree_to_list(%struct.node* nocapture %0) {
ret void
}
void DIGI_Enable() { (*((volatile unsigned long *)0xFFFFF010)) = (1 << 5); }


x86 assembly (clang, -O0):
<DIGI_Enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffff010,%eax
movq   $0x20,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DIGI_Enable>:
mov    $0xfffff010,%eax
movq   $0x20,(%rax)
ret

LLVM IR (-O0):
define void @DIGI_Enable() {
store volatile i64 32, i64* inttoptr (i64 4294963216 to i64*)
ret void
}

LLVM IR (-O2):
define void @DIGI_Enable() {
store volatile i64 32, i64* inttoptr (i64 4294963216 to i64*)
ret void
}
int add(int a, int b) { return (a + b); }


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int test_imm_25int64_lowword_reg(long long val) {
  return ((val) & (0x25 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_25int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x25,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_25int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 37
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_25int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 37
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ fun(int);
int /*<<< orphan*/ printf(char *, int, int, long);
void main() {
  int i;
  for (i = 1; i <= 10000; i++) {
    if (fun(i))
      printf("%d*%d=%ld\n", i, i, 1L * i * i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x2710,-0x4(%rbp)
jg     1183 <main+0x63>
mov    -0x4(%rbp),%edi
call   1030 <fun@plt>
cmp    $0x0,%rax
je     1170 <main+0x50>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
movslq -0x4(%rbp),%rcx
shl    $0x0,%rcx
movslq -0x4(%rbp),%rax
imul   %rax,%rcx
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
jmp    1175 <main+0x55>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xed0(%rip),%r14
jmp    114d <main+0x2d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    $0x2711,%rbx
je     116e <main+0x4e>
mov    %ebx,%edi
call   1030 <fun@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    %rbx,%rcx
imul   %rbx,%rcx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1040 <printf@plt>
jmp    1140 <main+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"%d*%d=%ld\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %9
%2 = phi i64 [ 1, %0 ], [ %10, %9 ]
%3 = trunc i64 %2 to i32
%4 = tail call i64 @fun(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = mul nuw nsw i64 %2, %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %3, i64 %7)
br label %9
9: ; preds = %1, %6
%10 = add nuw nsw i64 %2, 1
%11 = icmp eq i64 %10, 10001
br i1 %11, label %12, label %1
12: ; preds = %9
ret void
}
double nextT(double t, double p, double thisA, double nextA) {
  return t - (p * (thisA - nextA) * (thisA - nextA));
}


x86 assembly (clang, -O0):
<nextT>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextT>:
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @nextT(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = fsub double %11, %12
%14 = fmul double %10, %13
%15 = load double, double* %7
%16 = load double, double* %8
%17 = fsub double %15, %16
%18 = fneg double %14
%19 = call double @llvm.fmuladd.f64(double %18, double %17, double %9)
ret double %19
}

LLVM IR (-O2):
define double @nextT(double %0, double %1, double %2, double %3) {
%5 = fsub double %2, %3
%6 = fneg double %5
%7 = fmul double %6, %1
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double %0)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void FlashIntUnregister(void) {
  IntDisable(45);
  IntUnregister(45);
}


x86 assembly (clang, -O0):
<FlashIntUnregister>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
call   1030 <IntDisable@plt>
mov    $0x2d,%edi
call   1040 <IntUnregister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashIntUnregister>:
push   %rax
mov    $0x2d,%edi
call   1030 <IntDisable@plt>
mov    $0x2d,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @FlashIntUnregister() {
%1 = call i32 @IntDisable(i32 45)
%2 = call i32 @IntUnregister(i32 45)
ret void
}

LLVM IR (-O2):
define void @FlashIntUnregister() {
%1 = tail call i32 @IntDisable(i32 45)
%2 = tail call i32 @IntUnregister(i32 45)
ret void
}
const char *lcc_version_extra(void) { return (""); }


x86 assembly (clang, -O0):
<lcc_version_extra>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcc_version_extra>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @lcc_version_extra() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @lcc_version_extra() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
void FlashIntEnable(unsigned long ulIntFlags) {
  (*((volatile unsigned long *)(0x400FD000 + 0x00000010))) |= ulIntFlags;
}


x86 assembly (clang, -O0):
<FlashIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x400fd010,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fd010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashIntEnable>:
or     %rdi,0x400fd010
40
ret

LLVM IR (-O0):
define void @FlashIntEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074778128 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1074778128 to i64*)
ret void
}

LLVM IR (-O2):
define void @FlashIntEnable(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074778128 to i64*)
%3 = or i64 %2, %0
store volatile i64 %3, i64* inttoptr (i64 1074778128 to i64*)
ret void
}
int dymmy_f_1_1(int n) { return n * 2; }


x86 assembly (clang, -O0):
<dymmy_f_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dymmy_f_1_1>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @dymmy_f_1_1(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ cnd_t;

/* Variables and functions */
int cond_init(int /*<<< orphan*/ *);
int cnd_init(cnd_t *cond) { return cond_init(cond); }


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

x86 assembly (clang, -O2):
<cnd_init>:
jmp    1030 <cond_init@plt>

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

LLVM IR (-O2):
define i32 @cnd_init(i32* %0) {
%2 = tail call i32 @cond_init(i32* %0)
ret i32 %2
}
unsigned int cpumask_next(int n, const struct cpumask *srcp) { return n + 1; }


x86 assembly (clang, -O0):
<cpumask_next>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpumask_next>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
%struct.cpumask = type opaque
define i32 @cpumask_next(i32 %0, %struct.cpumask* %1) {
%3 = alloca i32
%4 = alloca %struct.cpumask*
store i32 %0, i32* %3
store %struct.cpumask* %1, %struct.cpumask** %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
%struct.cpumask = type opaque
define i32 @cpumask_next(i32 %0, %struct.cpumask* nocapture readnone %1) {
%3 = add nsw i32 %0, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ snow_4();
int main() {
  snow_4();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @snow_4()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @snow_4()
ret i32 0
}
/* Variables and functions */
int STC3115_WriteByte(int, int);
int STC3115_Powerdown(void) {
  int res;
  STC3115_WriteByte(0x01, 0x01);
  res = STC3115_WriteByte(0x00, 0);
  if (res != 0)
    return (res);
  return (0);
}


x86 assembly (clang, -O0):
<STC3115_Powerdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <STC3115_WriteByte@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <STC3115_WriteByte@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1145 <STC3115_Powerdown+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <STC3115_Powerdown+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STC3115_Powerdown>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <STC3115_WriteByte@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <STC3115_WriteByte@plt>

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

LLVM IR (-O2):
define i32 @STC3115_Powerdown() {
%1 = tail call i32 @STC3115_WriteByte(i32 1, i32 1)
%2 = tail call i32 @STC3115_WriteByte(i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
char toupper(char);
void strtoupper(char *s, size_t l) {
  size_t i;
  for (i = 0; i < l; i++)
    s[i] = toupper(s[i]);
}


x86 assembly (clang, -O0):
<strtoupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1165 <strtoupper+0x55>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <strtoupper+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoupper>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1147 <strtoupper+0x37>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <strtoupper+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @strtoupper(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @toupper(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char ***);
scalar_t__ malloc(int);
int main(int argc, char *argv[]) {
  char ***matriz;
  int i, j, numero_times = 3;
  matriz = (char ***)malloc(numero_times * sizeof(char *));
  free(matriz);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x24(%rbp)
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x18,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8***
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %9
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = mul i64 %11, 8
%13 = trunc i64 %12 to i32
%14 = call i64 @malloc(i32 %13)
%15 = inttoptr i64 %14 to i8***
store i8*** %15, i8**** %6
%16 = load i8***, i8**** %6
%17 = call i32 @free(i8*** %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 24)
%4 = inttoptr i64 %3 to i8***
%5 = tail call i32 @free(i8*** %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ allocate_heap(long);
int /*<<< orphan*/ allocate_nn_arrays(long);
void mst2_package_init(long n) {
  allocate_heap(n);
  allocate_nn_arrays(n);
}


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

x86 assembly (clang, -O2):
<mst2_package_init>:
push   %rbx
mov    %rdi,%rbx
call   1030 <allocate_heap@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <allocate_nn_arrays@plt>

LLVM IR (-O0):
define void @mst2_package_init(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @allocate_heap(i64 %3)
%5 = load i64, i64* %2
%6 = call i32 @allocate_nn_arrays(i64 %5)
ret void
}

LLVM IR (-O2):
define void @mst2_package_init(i64 %0) {
%2 = tail call i32 @allocate_heap(i64 %0)
%3 = tail call i32 @allocate_nn_arrays(i64 %0)
ret void
}
int test4(int a, int b, int c) {
  int x = a;
  int y = b;
  x++;
  return (x + y - c);
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
lea    (%rdi,%rsi,1),%eax
sub    %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test4(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
store i32 %9, i32* %7
%10 = load i32, i32* %5
store i32 %10, i32* %8
%11 = load i32, i32* %7
%12 = add nsw i32 %11, 1
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %6
%17 = sub nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @test4(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %0, 1
%5 = add nsw i32 %4, %1
%6 = sub i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int getpid();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep(int);
int main(void) {
  printf("pid = %d\n", getpid());
  puts("This is a shared library test...");
  for (;;) {
    foo();
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1050 <printf@plt>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1060 <foo@plt>
mov    $0x1,%edi
call   1070 <sleep@plt>
jmp    1180 <main+0x30>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1060 <foo@plt>
mov    $0x1,%edi
call   1070 <sleep@plt>
jmp    1180 <main+0x30>

LLVM IR (-O0):
@.str = [10 x i8] c"pid = %d\0A\00"
@.str.1 = [33 x i8] c"This is a shared library test...\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %5, %0
%6 = call i32 (...) @foo()
%7 = call i32 @sleep(i32 1)
br label %5
}

LLVM IR (-O2):
@.str = [10 x i8] c"pid = %d\0A\00"
@.str.1 = [33 x i8] c"This is a shared library test...\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
%5 = tail call i32 (...) @foo()
%6 = tail call i32 @sleep(i32 1)
br label %4
}
int supplied_checksum(const char *expected) {
  return ((expected[0] - '0') * 100) + ((expected[1] - '0') * 10) +
         (expected[2] - '0');
}


x86 assembly (clang, -O0):
<supplied_checksum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0x64,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<supplied_checksum>:
movsbl (%rdi),%eax
imul   $0x64,%eax,%eax
movsbl 0x1(%rdi),%ecx
lea    (%rcx,%rcx,4),%ecx
movsbl 0x2(%rdi),%edx
lea    (%rax,%rcx,2),%eax
add    %edx,%eax
add    $0xffffeb30,%eax
ret

LLVM IR (-O0):
define i32 @supplied_checksum(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 48
%8 = mul nsw i32 %7, 100
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 48
%14 = mul nsw i32 %13, 10
%15 = add nsw i32 %8, %14
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = sub nsw i32 %19, 48
%21 = add nsw i32 %15, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @supplied_checksum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = mul nsw i32 %3, 100
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = mul nsw i32 %7, 10
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = add nsw i32 %4, -5328
%13 = add nsw i32 %12, %8
%14 = add nsw i32 %13, %11
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ UCollator;

/* Variables and functions */
int /*<<< orphan*/ ucol_close(int /*<<< orphan*/ *);
void icuCollationDel(void *pCtx) {
  UCollator *p = (UCollator *)pCtx;
  ucol_close(p);
}


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

x86 assembly (clang, -O2):
<icuCollationDel>:
jmp    1030 <ucol_close@plt>

LLVM IR (-O0):
define void @icuCollationDel(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @ucol_close(i32* %6)
ret void
}

LLVM IR (-O2):
define void @icuCollationDel(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @ucol_close(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_fsopen;
int syscall(int /*<<< orphan*/, char const *, unsigned int);
int fsopen(const char *fsname, unsigned int flags) {
  return syscall(__NR_fsopen, fsname, flags);
}


x86 assembly (clang, -O0):
<fsopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsopen>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_fsopen = global i32 0
define i32 @fsopen(i8* %0, i32 %1) {
%3 = load i32, i32* @__NR_fsopen
%4 = tail call i32 @syscall(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int swap16(int);
uint16_t tole16(uint16_t x) {
  return (*(uint16_t *)"\0\1" == 1) ? swap16(x) : x;
}


x86 assembly (clang, -O0):
<tole16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,0xede(%rip)
jne    1138 <tole16+0x28>
mov    -0x4(%rbp),%edi
call   1030 <swap16@plt>
mov    %eax,-0x8(%rbp)
jmp    113e <tole16+0x2e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"\00\01\00"
define i32 @tole16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* bitcast ([3 x i8]* @.str to i32*)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @swap16(i32 %6)
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @tole16(i32 returned %0) {
ret i32 %0
}
__attribute__((always_)) void slow_down_io(void) {
  __asm__ __volatile__("outb %%al,$0x80;" : :);
}


x86 assembly (clang, -O0):
<slow_down_io>:
push   %rbp
mov    %rsp,%rbp
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<slow_down_io>:
out    %al,$0x80
ret

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

LLVM IR (-O2):
define void @slow_down_io() {
tail call void asm sideeffect "outb %al,$$0x80;", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  struct {
    int dia, mes, ano;
  } x;
  struct dma {
    int dia, mes, ano;
  };
  struct dma y;
  x.dia = 31;
  x.mes = 12;
  x.ano = 2013;
  struct dma *p;
  p = &y;
  p->dia = 31;
  p->mes = 12;
  p->ano = 2013;
  printf("Dia:%d, Mes:%d, Ano:%d\n", y.dia, y.mes, y.ano);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x1f,-0x10(%rbp)
movl   $0xc,-0xc(%rbp)
movl   $0x7dd,-0x8(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x1f,(%rax)
mov    -0x28(%rbp),%rax
movl   $0xc,0x4(%rax)
mov    -0x28(%rbp),%rax
movl   $0x7dd,0x8(%rax)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1f,%esi
mov    $0xc,%edx
mov    $0x7dd,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.anon = type { i32, i32, i32 }
%struct.dma = type { i32, i32, i32 }
@.str = [24 x i8] c"Dia:%d, Mes:%d, Ano:%d\0A\00"
define i32 @main() {
%1 = alloca %struct.anon
%2 = alloca %struct.dma
%3 = alloca %struct.dma*
%4 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
store i32 31, i32* %4
%5 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 1
store i32 12, i32* %5
%6 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 2
store i32 2013, i32* %6
store %struct.dma* %2, %struct.dma** %3
%7 = load %struct.dma*, %struct.dma** %3
%8 = getelementptr inbounds %struct.dma, %struct.dma* %7, i32 0, i32 0
store i32 31, i32* %8
%9 = load %struct.dma*, %struct.dma** %3
%10 = getelementptr inbounds %struct.dma, %struct.dma* %9, i32 0, i32 1
store i32 12, i32* %10
%11 = load %struct.dma*, %struct.dma** %3
%12 = getelementptr inbounds %struct.dma, %struct.dma* %11, i32 0, i32 2
store i32 2013, i32* %12
%13 = getelementptr inbounds %struct.dma, %struct.dma* %2, i32 0, i32 0
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.dma, %struct.dma* %2, i32 0, i32 1
%16 = load i32, i32* %15
%17 = getelementptr inbounds %struct.dma, %struct.dma* %2, i32 0, i32 2
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %16, i32 %18)
ret i32 0
}

LLVM IR (-O2):
%struct.dma = type { i32, i32, i32 }
@.str = [24 x i8] c"Dia:%d, Mes:%d, Ano:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 31, i32 12, i32 2013)
ret i32 0
}
/* Variables and functions */
long long l_dim(long long *, long long *);
long long intr_wrap_166(long long p1, long long p2) { return l_dim(&p1, &p2); }


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

x86 assembly (clang, -O2):
<intr_wrap_166>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <l_dim@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @intr_wrap_166(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @l_dim(i64* %3, i64* %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @intr_wrap_166(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @l_dim(i64* %3, i64* %4)
ret i64 %5
}