xunge/DecIR huggingface dataset:
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int r;
  printf("computing fact(5)\n");
  r = fact(5);
  printf("fact(5) = %d\n", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <fact@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1050 <fact@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [14 x i8] c"fact(5) = %d\0A\00"
@str = [18 x i8] c"computing fact(5)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @fact(i32 5)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
unsigned epx_generic_input_fmts(void) { return (1 << 0); }


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

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

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

LLVM IR (-O2):
define i32 @epx_generic_input_fmts() {
ret i32 1
}
int msm_gpio_install_direct_irq(unsigned gpio, unsigned irq,
                                unsigned int input_polarity) {
  return -38;
}


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

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

LLVM IR (-O0):
define i32 @msm_gpio_install_direct_irq(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
ret i32 -38
}

LLVM IR (-O2):
define i32 @msm_gpio_install_direct_irq(i32 %0, i32 %1, i32 %2) {
ret i32 -38
}
/* Type definitions */
typedef int uint32_t;
struct cl_rhash_table {
  int dummy;
};

/* Variables and functions */
int cl_rhash_table_size(struct cl_rhash_table const *);
uint32_t cl_rhash_table_slot(const struct cl_rhash_table *tbl, uint32_t hcode,
                             uint32_t pr) {
  uint32_t mask = cl_rhash_table_size(tbl) - 1;
  return (hcode + pr) & mask;
}


x86 assembly (clang, -O0):
<cl_rhash_table_slot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cl_rhash_table_size@plt>
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
and    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cl_rhash_table = type { i32 }
define i32 @cl_rhash_table_slot(%struct.cl_rhash_table* %0, i32 %1, i32 %2) {
%4 = alloca %struct.cl_rhash_table*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.cl_rhash_table* %0, %struct.cl_rhash_table** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load %struct.cl_rhash_table*, %struct.cl_rhash_table** %4
%9 = call i32 @cl_rhash_table_size(%struct.cl_rhash_table* %8)
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %7
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %7
%15 = and i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
%struct.cl_rhash_table = type { i32 }
define i32 @cl_rhash_table_slot(%struct.cl_rhash_table* %0, i32 %1, i32 %2) {
%4 = tail call i32 @cl_rhash_table_size(%struct.cl_rhash_table* %0)
%5 = add nsw i32 %4, -1
%6 = add nsw i32 %2, %1
%7 = and i32 %5, %6
ret i32 %7
}
int vde_chain_nm5_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm5_free(i8* nocapture readnone %0) {
ret i32 0
}
long long r18(void *x) { return *(long long *)(x + 32750); }


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

x86 assembly (clang, -O2):
<r18>:
mov    0x7fee(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @r18(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32750
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @r18(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32750
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}
int calcul_offset(void *elmt, void *pos, int max) {
  char *deb;
  int off;
  deb = (char *)elmt;
  for (off = 0; off < max; off++)
    if ((char *)deb++ == (char *)pos)
      return (off);
  return (-1);
}


x86 assembly (clang, -O0):
<calcul_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1161 <calcul_offset+0x61>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
cmp    -0x18(%rbp),%rax
jne    114e <calcul_offset+0x4e>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <calcul_offset+0x68>
jmp    1153 <calcul_offset+0x53>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    111e <calcul_offset+0x1e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcul_offset>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    1122 <calcul_offset+0x22>
mov    %edx,%r8d
xor    %ecx,%ecx
xchg   %ax,%ax
lea    (%rdi,%rcx,1),%rdx
cmp    %rsi,%rdx
je     1123 <calcul_offset+0x23>
add    $0x1,%rcx
cmp    %ecx,%r8d
jne    1110 <calcul_offset+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @calcul_offset(i8* readnone %0, i8* readnone %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %13
5: ; preds = %3, %9
%6 = phi i32 [ %11, %9 ], [ 0, %3 ]
%7 = phi i8* [ %10, %9 ], [ %0, %3 ]
%8 = icmp eq i8* %7, %1
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, %2
br i1 %12, label %13, label %5
13: ; preds = %5, %9, %3
%14 = phi i32 [ -1, %3 ], [ -1, %9 ], [ %6, %5 ]
ret i32 %14
}
void zero0(float *a, int n) {
  int i;
  for (i = 0; i < n; i++)
    a[i] = 0.0;
}


x86 assembly (clang, -O0):
<zero0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <zero0+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <zero0+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero0>:
test   %esi,%esi
jle    1126 <zero0+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @zero0(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load float*, float** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
store float 0.000000e+00, float* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @zero0(float* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast float* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
unsigned long GetMouseMove280();
unsigned long getmousemove() { return GetMouseMove280(); }


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

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

LLVM IR (-O0):
define i64 @getmousemove() {
%1 = call i64 (...) @GetMouseMove280()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getmousemove() {
%1 = tail call i64 (...) @GetMouseMove280()
ret i64 %1
}
int diag_l0_sileng_getflags(struct diag_l0_device *dl0d
                            __attribute__((unused))) {
  return (0x01 | 0x02 | 0x08 | 0x10);
}


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

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

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

LLVM IR (-O2):
%struct.diag_l0_device = type opaque
define i32 @diag_l0_sileng_getflags(%struct.diag_l0_device* nocapture readnone %0) {
ret i32 27
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Usage: ./blink <led> <repo>\nExample: ./ledctl 0 /path/to/my_repo\n");
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"Usage: ./blink <led> <repo>\0AExample: ./ledctl 0 /path/to/my_repo\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [65 x i8] c"Usage: ./blink <led> <repo>\0AExample: ./ledctl 0 /path/to/my_repo\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
ret void
}
void exit_tl(void) { return; }


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

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

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

LLVM IR (-O2):
define void @exit_tl() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
double sqrt(double);
int main(int argc, const char *argv[]) {
  double numero = 2.0;
  double resultado = sqrt(numero);
  printf("La raiz cuadrada de %f es: %f\n", numero, resultado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"La raiz cuadrada de %f es: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 2.000000e+00, double* %6
%8 = load double, double* %6
%9 = call double @sqrt(double %8)
store double %9, double* %7
%10 = load double, double* %6
%11 = load double, double* %7
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %10, double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"La raiz cuadrada de %f es: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double 2.000000e+00, double 0x3FF6A09E667F3BCD)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void netcdf_DatatypeInitTS() { printf("NetCDF output not supported\n"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"NetCDF output not supported\0A\00"
define void @netcdf_DatatypeInitTS() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"NetCDF output not supported\00"
define void @netcdf_DatatypeInitTS() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main() {
  fprintf(stdout, "STDOU:hello world!!\n");
  fprintf(stderr, "ERROR:hello world!!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [21 x i8] c"STDOU:hello world!!\0A\00"
@stderr = global i32 0
@.str.1 = [21 x i8] c"ERROR:hello world!!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [21 x i8] c"STDOU:hello world!!\0A\00"
@stderr = global i32 0
@.str.1 = [21 x i8] c"ERROR:hello world!!\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int main(void) {
  char *frase_1 = "Hola ";
  char *frase_2 = "mundo";
  printf("%s%s\n", frase_1, frase_2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef4(%rip),%rdi
lea    0xee1(%rip),%rsi
lea    0xee0(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hola \00"
@.str.1 = [6 x i8] c"mundo\00"
@.str.2 = [6 x i8] c"%s%s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ napms(int);
void win_retard(int ms) { napms(ms); }


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

x86 assembly (clang, -O2):
<win_retard>:
jmp    1030 <napms@plt>

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

LLVM IR (-O2):
define void @win_retard(i32 %0) {
%2 = tail call i32 @napms(i32 %0)
ret void
}
/* Variables and functions */
int bit_count(void *);
int bit_size(void *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *, int, int);
int /*<<< orphan*/ stdout;
void bit_object_show(void *B) {
  fprintf(stdout,
          "\t__bit__ -> {\n"
          "\t  object=>0x%p,\n"
          "\t  size=>%d,\n"
          "\t  count=>%d,\n"
          "\t}\n",
          B, bit_size(B), bit_count(B));
}


x86 assembly (clang, -O0):
<bit_object_show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bit_size@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <bit_count@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    %eax,%r8d
lea    0xe87(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_object_show>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ea2(%rip),%rax
mov    (%rax),%r14d
call   1030 <bit_size@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <bit_count@plt>
lea    0xea9(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
mov    %ebp,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [62 x i8] c"\09__bit__ -> {\0A\09 object=>0x%p,\0A\09 size=>%d,\0A\09 count=>%d,\0A\09}\0A\00"
define void @bit_object_show(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @bit_size(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @bit_count(i8* %7)
%9 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [62 x i8] c"\09__bit__ -> {\0A\09 object=>0x%p,\0A\09 size=>%d,\0A\09 count=>%d,\0A\09}\0A\00"
define void @bit_object_show(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @bit_size(i8* %0)
%4 = tail call i32 @bit_count(i8* %0)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i32 %4)
ret void
}
void fc288(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
a:
  goto a;
}


x86 assembly (clang, -O0):
<fc288>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc288+0x7>

x86 assembly (clang, -O2):
<fc288>:
jmp    1100 <fc288>

LLVM IR (-O0):
define void @fc288(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %1
br label %21
}

LLVM IR (-O2):
define void @fc288(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int f(int /*<<< orphan*/);
int main(int argc, char **argv) { return f(0); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @f(i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
int main() {
  int i, j;
  foo(i, j);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @foo(i32 %3, i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 undef, i32 undef)
ret i32 0
}
int is_space(int c) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @is_space(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mtrace();
int /*<<< orphan*/ muntrace();
int main(int argc, const char **argv) {
  mtrace();
  muntrace();
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @mtrace()
%4 = tail call i32 (...) @muntrace()
ret i32 0
}
int read_history(filename) const char *filename;
{ return (read_history_range(filename, 0, -1)); }


x86 assembly (clang, -O0):
<read_history>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <read_history_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_history>:
xor    %esi,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
jmp    1030 <read_history_range@plt>

LLVM IR (-O0):
define i32 @read_history(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @read_history_range to i32 (i8*, i32, i32, ...)*)(i8* %3, i32 0, i32 -1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @read_history(i8* %0) {
%2 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @read_history_range to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 0, i32 -1)
ret i32 %2
}
/* Variables and functions */
scalar_t__ malloc(int);
int *malloc_wrapper_1() {
  int *x;
  x = (int *)malloc(sizeof(int));
  return x;
}


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

x86 assembly (clang, -O2):
<malloc_wrapper_1>:
mov    $0x4,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @malloc_wrapper_1() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
ret i32* %4
}

LLVM IR (-O2):
define i32* @malloc_wrapper_1() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
void *xnmalloc_inline(size_t, int);
void *xmalloc(size_t n) { return xnmalloc_inline(n, 1); }


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

x86 assembly (clang, -O2):
<xmalloc>:
mov    $0x1,%esi
jmp    1030 <xnmalloc_inline@plt>

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

LLVM IR (-O2):
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @xnmalloc_inline(i64 %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int run_server();
int main(int argc, char *argv[]) { return run_server(); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run_server()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, char *);
scalar_t__ pit_arg_is_option(char **);
char *pit_arg_string(char **arg, char *required) {
  if (required && (!*arg || pit_arg_is_option(arg))) {
    die("missing %s", required);
  }
  return *arg;
}


x86 assembly (clang, -O0):
<pit_arg_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116c <pit_arg_string+0x4c>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     115c <pit_arg_string+0x3c>
mov    -0x8(%rbp),%rdi
call   1030 <pit_arg_is_option@plt>
cmp    $0x0,%rax
je     116c <pit_arg_string+0x4c>
mov    -0x10(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1040 <die@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pit_arg_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rsi,%rsi
je     1151 <pit_arg_string+0x31>
mov    %rsi,%r14
cmpq   $0x0,(%rbx)
je     1142 <pit_arg_string+0x22>
mov    %rbx,%rdi
call   1030 <pit_arg_is_option@plt>
test   %rax,%rax
je     1151 <pit_arg_string+0x31>
lea    0xeb7(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    (%rbx),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"missing %s\00"
define i8* @pit_arg_string(i8** %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = load i8*, i8** %0
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i64 @pit_arg_is_option(i8** %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7, %4
%11 = tail call i32 @die(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %12
12: ; preds = %10, %7, %2
%13 = load i8*, i8** %0
ret i8* %13
}
char *GJfnonnull(char *string) {
  while (*string != '\0') {
    ++string;
  }
  return ++string;
}


x86 assembly (clang, -O0):
<GJfnonnull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1129 <GJfnonnull+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <GJfnonnull+0x8>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GJfnonnull>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1110 <GJfnonnull+0x10>
ret

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

LLVM IR (-O2):
define i8* @GJfnonnull(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %6
}
int os_program_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @os_program_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @os_program_init() {
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int bitcount_3(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int number_bits;
  number_bits = bitcount_3(00000000000000);
  printf("Numero de bits %d \n", number_bits);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <bitcount_3@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"Numero de bits %d \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @bitcount_3(i32 0)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@.str = [20 x i8] c"Numero de bits %d \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @bitcount_3(i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int rand();
int getRandomValue(int min, int max) {
  if (min == max)
    return min;
  else
    return (min + (rand() % (max - min)));
}


x86 assembly (clang, -O0):
<getRandomValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1135 <getRandomValue+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <getRandomValue+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandomValue>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%eax
mov    %esi,%ebp
sub    %edi,%ebp
je     112b <getRandomValue+0x1b>
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebp
mov    %edx,%eax
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @getRandomValue(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, %0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 (...) @rand()
%6 = sub nsw i32 %1, %0
%7 = srem i32 %5, %6
%8 = add nsw i32 %7, %0
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ %1, %2 ]
ret i32 %10
}
int test_imm_03uint16_mem(unsigned short *val) {
  return ((*val) & (0x03 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_03uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_03uint16_mem>:
testb  $0x3,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_03uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 3
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rdReg(int, int /*<<< orphan*/ *);
uint32_t ons_get_device_id() {
  uint32_t val;
  rdReg(0x4b000004, &val);
  return val;
}


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

x86 assembly (clang, -O2):
<ons_get_device_id>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4b000004,%edi
call   1030 <rdReg@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ons_get_device_id() {
%1 = alloca i32
%2 = call i32 @rdReg(i32 1258291204, i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @ons_get_device_id() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @rdReg(i32 1258291204, i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
scalar_t__ getfname(char *, char *, int);
int /*<<< orphan*/ showfile(char *);
int /*<<< orphan*/ strcpy(char *, char *);
void subfunc2(void) {
  char fname[256];
  strcpy(fname, "..\\demos\\tui.c");
  if (getfname("File to browse:", fname, 50))
    showfile(fname);
}


x86 assembly (clang, -O0):
<subfunc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x100(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x32,%edx
call   1050 <getfname@plt>
cmp    $0x0,%rax
je     117c <subfunc2+0x4c>
lea    -0x100(%rbp),%rdi
call   1030 <showfile@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subfunc2>:
push   %rbx
sub    $0x100,%rsp
lea    0xec1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
mov    $0x32,%edx
call   1050 <getfname@plt>
test   %rax,%rax
je     116b <subfunc2+0x3b>
mov    %rsp,%rdi
call   1030 <showfile@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"..\\demos\\tui.c\00"
@.str.1 = [16 x i8] c"File to browse:\00"
define void @subfunc2() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i64 @getfname(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 50)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%9 = call i32 @showfile(i8* %8)
br label %10
10: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"..\\demos\\tui.c\00"
@.str.1 = [16 x i8] c"File to browse:\00"
define void @subfunc2() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i64 @getfname(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 50)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @showfile(i8* %2)
br label %8
8: ; preds = %6, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char const *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
FILE *fopenaa(char *path, char *add0, char *name, const char *mode) {
  char wholename[200];
  strcpy(wholename, path);
  strcat(wholename, add0);
  strcat(wholename, name);
  FILE *pointer;
  pointer = fopen(wholename, mode);
  return pointer;
}


x86 assembly (clang, -O0):
<fopenaa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0xf0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopenaa>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fopen@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @fopenaa(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [200 x i8]
%10 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%12 = load i8*, i8** %5
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%15 = load i8*, i8** %6
%16 = call i32 @strcat(i8* %14, i8* %15)
%17 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%18 = load i8*, i8** %7
%19 = call i32 @strcat(i8* %17, i8* %18)
%20 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%21 = load i8*, i8** %8
%22 = call i32* @fopen(i8* %20, i8* %21)
store i32* %22, i32** %10
%23 = load i32*, i32** %10
ret i32* %23
}

LLVM IR (-O2):
define noalias i32* @fopenaa(i8* %0, i8* %1, i8* %2, i8* nocapture %3) {
%5 = alloca [200 x i8]
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* %0)
%8 = call i32 @strcat(i8* %6, i8* %1)
%9 = call i32 @strcat(i8* %6, i8* %2)
%10 = call i32* @fopen(i8* %6, i8* %3)
ret i32* %10
}
int digittoint(c)
int c;
{ return (__sbmaskrune(c, 0xFF)); }


x86 assembly (clang, -O0):
<digittoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <__sbmaskrune@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digittoint>:
mov    $0xff,%esi
xor    %eax,%eax
jmp    1030 <__sbmaskrune@plt>

LLVM IR (-O0):
define i32 @digittoint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @__sbmaskrune to i32 (i32, i32, ...)*)(i32 %3, i32 255)
ret i32 %4
}

LLVM IR (-O2):
define i32 @digittoint(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @__sbmaskrune to i32 (i32, i32, ...)*)(i32 %0, i32 255)
ret i32 %2
}
int main(void) {
  int x = 0;
  int *p = &x;
  5 % *p;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, long);
void fvec_cpy(float *vdest, const float *vsource, long n) {
  memcpy(vdest, vsource, n * sizeof(*vdest));
}


x86 assembly (clang, -O0):
<fvec_cpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
shl    $0x2,%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fvec_cpy>:
shl    $0x2,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @fvec_cpy(float* %0, float* %1, i64 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i64
store float* %0, float** %4
store float* %1, float** %5
store i64 %2, i64* %6
%7 = load float*, float** %4
%8 = load float*, float** %5
%9 = load i64, i64* %6
%10 = mul i64 %9, 4
%11 = call i32 @memcpy(float* %7, float* %8, i64 %10)
ret void
}

LLVM IR (-O2):
define void @fvec_cpy(float* %0, float* %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i32 @memcpy(float* %0, float* %1, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void help() {
  printf("command [OPTIONS] /device\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"command [OPTIONS] /device\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"command [OPTIONS] /device\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ cosqi(int, double *);
void sinqi(int n, double wsave[]) { cosqi(n, wsave); }


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

x86 assembly (clang, -O2):
<sinqi>:
jmp    1030 <cosqi@plt>

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

LLVM IR (-O2):
define void @sinqi(i32 %0, double* %1) {
%3 = tail call i32 @cosqi(i32 %0, double* %1)
ret void
}
int test_imm_88int32_mem(int *val) {
  return ((*val) & (0x88 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_88int32_mem>:
testb  $0x88,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_88int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 136
%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_88int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 136
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}