xunge/DecIR huggingface dataset:
/* Type definitions */
struct jx_parser {
  int dummy;
};
struct jx {
  int dummy;
};

/* Variables and functions */
struct jx *jx_parse_finish(struct jx_parser *);
struct jx_parser *jx_parser_create(int /*<<< orphan*/);
int /*<<< orphan*/ jx_parser_read_string(struct jx_parser *, char const *);
struct jx *jx_parse_string(const char *str) {
  struct jx_parser *p = jx_parser_create(0);
  jx_parser_read_string(p, str);
  return jx_parse_finish(p);
}


x86 assembly (clang, -O0):
<jx_parse_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <jx_parser_create@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <jx_parser_read_string@plt>
mov    -0x10(%rbp),%rdi
call   1040 <jx_parse_finish@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jx_parse_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1030 <jx_parser_create@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <jx_parser_read_string@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <jx_parse_finish@plt>

LLVM IR (-O0):
%struct.jx = type { i32 }
%struct.jx_parser = type { i32 }
define %struct.jx* @jx_parse_string(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.jx_parser*
store i8* %0, i8** %2
%4 = call %struct.jx_parser* @jx_parser_create(i32 0)
store %struct.jx_parser* %4, %struct.jx_parser** %3
%5 = load %struct.jx_parser*, %struct.jx_parser** %3
%6 = load i8*, i8** %2
%7 = call i32 @jx_parser_read_string(%struct.jx_parser* %5, i8* %6)
%8 = load %struct.jx_parser*, %struct.jx_parser** %3
%9 = call %struct.jx* @jx_parse_finish(%struct.jx_parser* %8)
ret %struct.jx* %9
}

LLVM IR (-O2):
%struct.jx = type { i32 }
%struct.jx_parser = type { i32 }
define %struct.jx* @jx_parse_string(i8* %0) {
%2 = tail call %struct.jx_parser* @jx_parser_create(i32 0)
%3 = tail call i32 @jx_parser_read_string(%struct.jx_parser* %2, i8* %0)
%4 = tail call %struct.jx* @jx_parse_finish(%struct.jx_parser* %2)
ret %struct.jx* %4
}
double bot_vector_dist_squared_2d(const double v1[2], const double v2[2]) {
  return (v1[0] - v2[0]) * (v1[0] - v2[0]) + (v1[1] - v2[1]) * (v1[1] - v2[1]);
}


x86 assembly (clang, -O0):
<bot_vector_dist_squared_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_vector_dist_squared_2d>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
subsd  (%rsi),%xmm0
subsd  0x8(%rsi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bot_vector_dist_squared_2d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 0
%17 = load double, double* %16
%18 = fsub double %14, %17
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 1
%24 = load double, double* %23
%25 = fsub double %21, %24
%26 = load double*, double** %3
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double, double* %27
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i64 1
%31 = load double, double* %30
%32 = fsub double %28, %31
%33 = fmul double %25, %32
%34 = call double @llvm.fmuladd.f64(double %11, double %18, double %33)
ret double %34
}

LLVM IR (-O2):
define double @bot_vector_dist_squared_2d(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fsub double %3, %4
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fsub double %7, %9
%11 = fmul double %10, %10
%12 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %11)
ret double %12
}
int do_179() { return 179; }


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

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

LLVM IR (-O0):
define i32 @do_179() {
ret i32 179
}

LLVM IR (-O2):
define i32 @do_179() {
ret i32 179
}
/* Variables and functions */
int /*<<< orphan*/ nVariable(char *, int);
void Variable(char *name) { nVariable(name, 1); }


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

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

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

LLVM IR (-O2):
define void @Variable(i8* %0) {
%2 = tail call i32 @nVariable(i8* %0, i32 1)
ret void
}
int ptr_cmp(void *a, void *b) {
  if (a < b)
    return -1;
  else if (a > b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ptr_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1126 <ptr_cmp+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    114c <ptr_cmp+0x4c>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1140 <ptr_cmp+0x40>
movl   $0x1,-0x4(%rbp)
jmp    114c <ptr_cmp+0x4c>
jmp    1145 <ptr_cmp+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_cmp>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ptr_cmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = icmp ugt i8* %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
int __attribute__((no)) foo(void) { return -30; }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 -30
}
void vbe_biosfn_set_get_dac_palette_format(AX) {}


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

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

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

LLVM IR (-O2):
define void @vbe_biosfn_set_get_dac_palette_format(i32 %0) {
ret void
}
/* Variables and functions */
unsigned char tolower(unsigned char);
char *strtolower(char *s) {
  unsigned char *p = (unsigned char *)s;
  while (*p) {
    *p = tolower((unsigned char)*p);
    p++;
  }
  return s;
}


x86 assembly (clang, -O0):
<strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <strtolower+0x46>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strtolower+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <strtolower+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strtolower+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strtolower(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call zeroext i8 @tolower(i8 zeroext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x9b() {
  Assert_real((isodigit(155) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              780, ("isodigit should be 0 for 0x9b"));
}


x86 assembly (clang, -O0):
<t_isodigit_0x9b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9b,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x30c,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0x9b>:
push   %rax
mov    $0x9b,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x30c,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x9b\00"
define void @t_isodigit_0x9b() {
%1 = call i64 @isodigit(i32 155)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 780, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x9b\00"
define void @t_isodigit_0x9b() {
%1 = tail call i64 @isodigit(i32 155)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 780, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void mbed_trace_suffix_function_set(char *(*suffix_f)(void)) {}


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

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

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

LLVM IR (-O2):
define void @mbed_trace_suffix_function_set(i8* ()* nocapture %0) {
ret void
}
/* Variables and functions */
char *malloc(int);
char *itob(int integer) {
  int size = 4;
  char *result = malloc(size);
  char *aux = (char *)&integer;
  for (int i = size - 1; i >= 0; i--) {
    result[size - 1 - i] = aux[i];
  }
  return result;
}


x86 assembly (clang, -O0):
<itob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     1175 <itob+0x65>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    113f <itob+0x2f>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itob>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1030 <malloc@plt>
bswap  %ebx
mov    %ebx,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @itob(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = lshr i32 %0, 8
%4 = trunc i32 %3 to i8
%5 = lshr i32 %0, 16
%6 = trunc i32 %5 to i8
%7 = lshr i32 %0, 24
%8 = trunc i32 %7 to i8
%9 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
store i8 %8, i8* %9
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %6, i8* %10
%11 = getelementptr inbounds i8, i8* %9, i64 2
store i8 %4, i8* %11
%12 = getelementptr inbounds i8, i8* %9, i64 3
store i8 %2, i8* %12
ret i8* %9
}
int equal(char *a, const char *b) { return a == b; }


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @equal(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int main(int argc, const char *argv[]) {
  int a[10][10];
  double b = a[0][9];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdl -0x17c(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a8(%rbp)
ff
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x [10 x i32]]
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %6, i64 0, i64 0
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 9
%10 = load i32, i32* %9
%11 = sitofp i32 %10 to double
store double %11, double* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
__attribute__((no)) float floorf(float a) { return a; }


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

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

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

LLVM IR (-O2):
define float @floorf(float returned %0) {
ret float %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void ispisi(int niz[], int br) {
  int i;
  printf("%d\n", br);
  for (i = 0; i < 3; i++)
    printf("%d, ", niz[i]);
}


x86 assembly (clang, -O0):
<ispisi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    1164 <ispisi+0x54>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1135 <ispisi+0x25>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispisi>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
lea    0xed8(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x4(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%esi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"%d, \00"
define void @ispisi(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = load i32, i32* %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dvariancepn(int, int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dvariancepn(N, 1, x, stride);
  printf("sample variance: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
mov    $0x1,%esi
call   1050 <stdlib_strided_dvariancepn@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1040 <stdlib_strided_dvariancepn@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [22 x i8] c"sample variance: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dvariancepn(i32 %6, i32 1, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [22 x i8] c"sample variance: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dvariancepn(i32 4, i32 1, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int echo = 1;
  printf("Muestra el valor de la variable echo : %d", echo);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"Muestra el valor de la variable echo : %d\00"
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 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"Muestra el valor de la variable echo : %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
unsigned int TRAILING_ONES(unsigned int x) {
  return (~x) ? __builtin_ctz(~x) : 32;
}


x86 assembly (clang, -O0):
<TRAILING_ONES>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     1127 <TRAILING_ONES+0x27>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
bsf    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <TRAILING_ONES+0x34>
mov    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <TRAILING_ONES+0x34>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TRAILING_ONES>:
mov    %edi,%eax
not    %eax
bsf    %eax,%ecx
cmp    $0xffffffff,%edi
mov    $0x20,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @TRAILING_ONES(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = xor i32 %7, -1
%9 = call i32 @llvm.cttz.i32(i32 %8, i1 true)
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %6
%12 = phi i32 [ %9, %6 ], [ 32, %10 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @TRAILING_ONES(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = xor i32 %0, -1
%4 = tail call i32 @llvm.cttz.i32(i32 %3, i1 true)
%5 = select i1 %2, i32 32, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ calloc(size_t, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
float *new_vector_float(size_t size) {
  float *pRet = (float *)calloc(size, sizeof(float));
  if (!pRet) {
    perror("Out of memory when initializing float vector\n");
    exit(EXIT_FAILURE);
  }
  return pRet;
}


x86 assembly (clang, -O0):
<new_vector_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <new_vector_float+0x43>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_vector_float>:
push   %rax
mov    $0x4,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1142 <new_vector_float+0x12>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Out of memory when initializing float vector\0A\00"
@EXIT_FAILURE = global i32 0
define float* @new_vector_float(i64 %0) {
%2 = alloca i64
%3 = alloca float*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @calloc(i64 %4, i32 4)
%6 = inttoptr i64 %5 to float*
store float* %6, float** %3
%7 = load float*, float** %3
%8 = icmp ne float* %7, null
br i1 %8, label %13, label %9
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load float*, float** %3
ret float* %14
}

LLVM IR (-O2):
@.str = [46 x i8] c"Out of memory when initializing float vector\0A\00"
@EXIT_FAILURE = global i32 0
define float* @new_vector_float(i64 %0) {
%2 = tail call i64 @calloc(i64 %0, i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to float*
ret float* %9
}
/* Variables and functions */
int random();
int rnd(int range) { return random() % range; }


x86 assembly (clang, -O0):
<rnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <random@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rnd(i32 %0) {
%2 = tail call i32 (...) @random()
%3 = srem i32 %2, %0
ret i32 %3
}
int cwx_socket_init(char *szErr1K) {
  int ret = 0;
  szErr1K[0] = 0x00;
  return ret;
}


x86 assembly (clang, -O0):
<cwx_socket_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwx_socket_init>:
movb   $0x0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @cwx_socket_init(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned int log2(unsigned long);
unsigned int log2_order(unsigned long size) {
  assert(size != 0);
  if (size == 1) {
    return 0;
  }
  return log2(size - 1) + 1;
}


x86 assembly (clang, -O0):
<log2_order>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x1,-0x10(%rbp)
jne    1155 <log2_order+0x35>
movl   $0x0,-0x4(%rbp)
jmp    1168 <log2_order+0x48>
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <log2@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2_order>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %eax,%eax
cmp    $0x1,%rbx
je     1149 <log2_order+0x29>
add    $0xffffffffffffffff,%rbx
mov    %rbx,%rdi
call   1030 <log2@plt>
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @log2_order(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %16
11: ; preds = %1
%12 = load i64, i64* %3
%13 = sub i64 %12, 1
%14 = call i32 @log2(i64 %13)
%15 = add i32 %14, 1
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @log2_order(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp eq i64 %0, 1
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = add i64 %0, -1
%8 = tail call i32 @log2(i64 %7)
%9 = add i32 %8, 1
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
unsigned char swap_8bits(unsigned char data) {
  unsigned char swap = data;
  swap = (swap >> 4 & 0x0F) | (swap << 4 & 0xF0);
  swap = (swap >> 2 & 0x33) | (swap << 2 & 0xCC);
  swap = (swap >> 1 & 0x55) | (swap << 1 & 0xAA);
  return swap;
}


x86 assembly (clang, -O0):
<swap_8bits>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x4,%ecx
and    $0xf0,%ecx
or     %ecx,%eax
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
sar    $0x2,%eax
and    $0x33,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x2,%ecx
and    $0xcc,%ecx
or     %ecx,%eax
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
sar    $0x1,%eax
and    $0x55,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x1,%ecx
and    $0xaa,%ecx
or     %ecx,%eax
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_8bits>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %dil,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @swap_8bits(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = ashr i32 %6, 4
%8 = and i32 %7, 15
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 4
%12 = and i32 %11, 240
%13 = or i32 %8, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 2
%18 = and i32 %17, 51
%19 = load i8, i8* %3
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 2
%22 = and i32 %21, 204
%23 = or i32 %18, %22
%24 = trunc i32 %23 to i8
store i8 %24, i8* %3
%25 = load i8, i8* %3
%26 = zext i8 %25 to i32
%27 = ashr i32 %26, 1
%28 = and i32 %27, 85
%29 = load i8, i8* %3
%30 = zext i8 %29 to i32
%31 = shl i32 %30, 1
%32 = and i32 %31, 170
%33 = or i32 %28, %32
%34 = trunc i32 %33 to i8
store i8 %34, i8* %3
%35 = load i8, i8* %3
ret i8 %35
}

LLVM IR (-O2):
define zeroext i8 @swap_8bits(i8 zeroext %0) {
%2 = tail call i8 @llvm.bitreverse.i8(i8 %0)
ret i8 %2
}
void INT_Excep_RSPI0_SPEI0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RSPI0_SPEI0() {
ret void
}
void I400ToARGBRow_Any_NEON() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @I400ToARGBRow_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LastSystemError();
const char *LastSystemErrorText() {
  return LastSystemErrorText(LastSystemError());
}


x86 assembly (clang, -O0):
<LastSystemErrorText>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <LastSystemError@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1040 <LastSystemErrorText@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LastSystemErrorText>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <LastSystemError@plt>
jmp    1120 <LastSystemErrorText+0x10>

LLVM IR (-O0):
define i8* @LastSystemErrorText() {
%1 = call i32 (...) @LastSystemError()
%2 = call i8* (i32, ...) bitcast (i8* ()* @LastSystemErrorText to i8* (i32, ...)*)(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @LastSystemErrorText() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @LastSystemError()
br label %1
}
/* Variables and functions */
long atoi(char *);
int /*<<< orphan*/ wo_redundant_call();
int main(int argc, char *argv[]) {
  long i, n;
  n = atoi(argv[1]);
  for (i = 0; i < n; i++)
    wo_redundant_call();
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1175 <main+0x55>
mov    $0x0,%al
call   1030 <wo_redundant_call@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
test   %rax,%rax
jle    114d <main+0x2d>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <wo_redundant_call@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @atoi(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = phi i64 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 (...) @wo_redundant_call()
%10 = add nuw nsw i64 %8, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: bigfile-ls [-l] filepath [block]\n");
  fprintf(stderr, "-l: long format: blockname dtype nmemb counts sysvchecksum "
                  "nfile abspath\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeea(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"usage: bigfile-ls [-l] filepath [block]\0A\00"
@.str.1 = [74 x i8] c"-l: long format: blockname dtype nmemb counts sysvchecksum nfile abspath\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"usage: bigfile-ls [-l] filepath [block]\0A\00"
@.str.1 = [74 x i8] c"-l: long format: blockname dtype nmemb counts sysvchecksum nfile abspath\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t FlashUserSet(uint32_t ui32User0, uint32_t ui32User1) {
  (*((volatile uint32_t *)(0x400FE1E0))) = ui32User0;
  (*((volatile uint32_t *)(0x400FE1E4))) = ui32User1;
  return (0);
}


x86 assembly (clang, -O0):
<FlashUserSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x400fe1e0,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
mov    $0x400fe1e4,%eax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashUserSet>:
mov    %edi,0x400fe1e0
mov    %esi,0x400fe1e4
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @FlashUserSet(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
store volatile i32 %5, i32* inttoptr (i64 1074782688 to i32*)
%6 = load i32, i32* %4
store volatile i32 %6, i32* inttoptr (i64 1074782692 to i32*)
ret i32 0
}

LLVM IR (-O2):
define i32 @FlashUserSet(i32 %0, i32 %1) {
store volatile i32 %0, i32* inttoptr (i64 1074782688 to i32*)
store volatile i32 %1, i32* inttoptr (i64 1074782692 to i32*)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void my_output(const char *prompt, void *userdata) {
  printf("[CLI]%s", prompt);
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"[CLI]%s\00"
define void @my_output(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int damroll(num, sides)
int num, sides;
{
  register int i, sum = 0;
  for (i = 0; i < num; i++)
    sum += randint(sides);
  return (sum);
}


x86 assembly (clang, -O0):
<damroll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <damroll+0x46>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <randint@plt>
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <damroll+0x1c>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<damroll>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1133 <damroll+0x23>
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
nop
mov    %r14d,%edi
xor    %eax,%eax
call   1030 <randint@plt>
add    %eax,%ebx
add    $0xffffffff,%ebp
jne    1120 <damroll+0x10>
jmp    1135 <damroll+0x25>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @damroll(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ 0, %2 ]
%6 = phi i32 [ %9, %4 ], [ 0, %2 ]
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @randint to i32 (i32, ...)*)(i32 %1)
%8 = add nsw i32 %7, %5
%9 = add nuw nsw i32 %6, 1
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = phi i32 [ 0, %2 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
char *longestPalindrome(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char src[] = "abcdeedcjif";
  char *result = NULL;
  result = longestPalindrome(src);
  printf("%s\n", result);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6364656564636261,%rax
65 64 63
mov    %rax,0x8(%rsp)
movl   $0x66696a,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <longestPalindrome@plt>
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.src = [12 x i8] c"abcdeedcjif\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [12 x i8]* %2 to i8*
store i8* null, i8** %3
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%6 = call i8* @longestPalindrome(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.src = [12 x i8] c"abcdeedcjif\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i8* @longestPalindrome(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *griddoor_malloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<griddoor_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @griddoor_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}