xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ EINVAL;
scalar_t__ errno;
long strtol(char const *, char **, int);
long estrtol(const char *str, int base) {
  char *end;
  long n;
  errno = 0;
  n = strtol(str, &end, base);
  if (end == str || *end != '\0')
    errno = EINVAL;
  return n;
}


x86 assembly (clang, -O0):
<estrtol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   1030 <strtol@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     115f <estrtol+0x4f>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1173 <estrtol+0x63>
mov    0x2e72(%rip),%rax
mov    (%rax),%rcx
mov    0x2e70(%rip),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrtol>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%edx
mov    %rdi,%rbx
mov    0x2ec0(%rip),%r14
movq   $0x0,(%r14)
mov    %rsp,%rsi
call   1030 <strtol@plt>
mov    (%rsp),%rcx
cmp    %rbx,%rcx
je     113d <estrtol+0x2d>
cmpb   $0x0,(%rcx)
je     114a <estrtol+0x3a>
mov    0x2e94(%rip),%rcx
mov    (%rcx),%rcx
mov    %rcx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i64 0
@EINVAL = global i64 0
define i64 @estrtol(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
store i64 0, i64* @errno
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i64 @strtol(i8* %7, i8** %5, i32 %8)
store i64 %9, i64* %6
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = icmp eq i8* %10, %11
br i1 %12, label %18, label %13
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %13, %2
%19 = load i64, i64* @EINVAL
store i64 %19, i64* @errno
br label %20
20: ; preds = %18, %13
%21 = load i64, i64* %6
ret i64 %21
}

LLVM IR (-O2):
@errno = global i64 0
@EINVAL = global i64 0
define i64 @estrtol(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i64 0, i64* @errno
%5 = call i64 @strtol(i8* %0, i8** %3, i32 %1)
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %8, %2
%12 = load i64, i64* @EINVAL
store i64 %12, i64* @errno
br label %13
13: ; preds = %11, %8
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_error_job_amount() { printf("A quantidade de jobs esta errada.\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"A quantidade de jobs esta errada.\0A\00"
define void @show_error_job_amount() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"A quantidade de jobs esta errada.\00"
define void @show_error_job_amount() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int pifacedigital_open(uint8_t hw_addr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pifacedigital_open(i32 %0) {
ret i32 0
}
/* Variables and functions */
float simple_sin(float const);
float simple_cos(const float x) {
  return simple_sin(x + (3.141592653589793 / 2));
}


x86 assembly (clang, -O0):
<simple_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <simple_sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_cos>:
cvtss2sd %xmm0,%xmm0
addsd  0xee4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
jmp    1030 <simple_sin@plt>

LLVM IR (-O0):
define float @simple_cos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fadd double %4, 0x3FF921FB54442D18
%6 = fptrunc double %5 to float
%7 = call float @simple_sin(float %6)
ret float %7
}

LLVM IR (-O2):
define float @simple_cos(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, 0x3FF921FB54442D18
%4 = fptrunc double %3 to float
%5 = tail call float @simple_sin(float %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "%s\n%s\n",
          "usage:\tkldconfig [-dfimnUv] [-S sysctlname] [path ...]",
          "\tkldconfig -r");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [55 x i8] c"usage:\09kldconfig [-dfimnUv] [-S sysctlname] [path ...]\00"
@.str.2 = [14 x i8] c"\09kldconfig -r\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [55 x i8] c"usage:\09kldconfig [-dfimnUv] [-S sysctlname] [path ...]\00"
@.str.2 = [14 x i8] c"\09kldconfig -r\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
int symlink(char *, char *);
int main(int argc, char *argv[]) {
  if (argc < 3)
    die("usage: sln dest src\n");
  if (symlink(argv[2], argv[1]) == -1)
    die("symlink failed\n");
  return 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)
cmpl   $0x3,-0x8(%rbp)
jge    114c <main+0x2c>
lea    0xeb9(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <symlink@plt>
cmp    $0xffffffff,%eax
jne    1176 <main+0x56>
lea    0xea4(%rip),%rdi
call   1040 <die@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     1135 <main+0x15>
lea    0xed0(%rip),%rdi
call   1040 <die@plt>
mov    0x8(%rbx),%rsi
mov    0x10(%rbx),%rdi
call   1030 <symlink@plt>
cmp    $0xffffffff,%eax
jne    1153 <main+0x33>
lea    0xec7(%rip),%rdi
call   1040 <die@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"usage: sln dest src\0A\00"
@.str.1 = [16 x i8] c"symlink failed\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 2
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @symlink(i8* %13, i8* %16)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %21
19: ; preds = %10
%20 = call i32 @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"usage: sln dest src\0A\00"
@.str.1 = [16 x i8] c"symlink failed\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @symlink(i8* %8, i8* %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %6
%14 = tail call i32 @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %6
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Round200(void *, int);
void keccakP200NRounds(void *state, int rounds) {
  int i = 0;
  for (i = (18 - rounds); i < 18; i++) {
    Round200(state, i);
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x12,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x12,-0x10(%rbp)
jge    1155 <keccakP200NRounds+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <Round200@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1131 <keccakP200NRounds+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    1142 <keccakP200NRounds+0x32>
mov    %rdi,%rbx
mov    $0x12,%ebp
sub    %esi,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <Round200@plt>
add    $0x1,%ebp
cmp    $0x12,%ebp
jne    1130 <keccakP200NRounds+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @keccakP200NRounds(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = sub nsw i32 18, %1
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = tail call i32 @Round200(i8* %0, i32 %7)
%9 = add i32 %7, 1
%10 = icmp eq i32 %9, 18
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void yyerror(char *s) { fprintf(stderr, "Error : Exiting %s\n", s); }


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

x86 assembly (clang, -O2):
<yyerror>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Error : Exiting %s\0A\00"
define void @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Error : Exiting %s\0A\00"
define void @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
void(Memento_startLeaking)(void) {}


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

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

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

LLVM IR (-O2):
define void @Memento_startLeaking() {
ret void
}
/* Variables and functions */
int atan(int);
int /*<<< orphan*/ printf(char *, double);
double sin(int);
int main() {
  int x;
  double y;
  x = atan(1) * 4;
  printf("%f\n", sin(x));
  y = 11 / 10;
  printf("%f\n", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1050 <atan@plt>
shl    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <sin@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe95(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1050 <atan@plt>
lea    0x0(,%rax,4),%edi
call   1040 <sin@plt>
lea    0xeba(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xea2(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @atan(i32 1)
%5 = mul nsw i32 %4, 4
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call double @sin(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %7)
store double 1.000000e+00, double* %3
%9 = load double, double* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @atan(i32 1)
%2 = shl nsw i32 %1, 2
%3 = tail call double @sin(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ print_error(char *, char *);
int id3_seek_header(FILE *fp, char *fn) {
  if (fseek(fp, -128, SEEK_END) < 0) {
    fclose(fp);
    print_error("id3_seek_header: Error reading file %s", fn);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<id3_seek_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
mov    $0xffffff80,%esi
call   1050 <fseek@plt>
cmp    $0x0,%rax
jge    1186 <id3_seek_header+0x56>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x18(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1030 <print_error@plt>
movl   $0x0,-0x4(%rbp)
jmp    118d <id3_seek_header+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id3_seek_header>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
mov    $0xffffff80,%esi
call   1050 <fseek@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jns    1173 <id3_seek_header+0x43>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xe97(%rip),%rdi
mov    %r14,%rsi
call   1030 <print_error@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@.str = [39 x i8] c"id3_seek_header: Error reading file %s\00"
define i32 @id3_seek_header(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
%6 = load i32*, i32** %4
%7 = load i32, i32* @SEEK_END
%8 = call i64 @fseek(i32* %6, i32 -128, i32 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i32*, i32** %4
%12 = call i32 @fclose(i32* %11)
%13 = load i8*, i8** %5
%14 = call i32 @print_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %13)
store i32 0, i32* %3
br label %16
15: ; preds = %2
store i32 1, i32* %3
br label %16
16: ; preds = %15, %10
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@.str = [39 x i8] c"id3_seek_header: Error reading file %s\00"
define i32 @id3_seek_header(i32* nocapture %0, i8* %1) {
%3 = load i32, i32* @SEEK_END
%4 = tail call i64 @fseek(i32* %0, i32 -128, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @fclose(i32* %0)
%8 = tail call i32 @print_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %9
9: ; preds = %2, %6
%10 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %10
}
int somatorio(int mes) {
  int i, soma = 0;
  for (i = 1; i <= mes; i++) {
    soma += i;
  }
  return soma;
}


x86 assembly (clang, -O0):
<somatorio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1138 <somatorio+0x38>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <somatorio+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<somatorio>:
test   %edi,%edi
jle    1118 <somatorio+0x18>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rdi,2),%eax
add    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @somatorio(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = shl nuw i32 %0, 1
%5 = add nsw i32 %0, -1
%6 = zext i32 %5 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %4, %11
%13 = add i32 %12, -1
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ i2c_close();
int /*<<< orphan*/ printf(char *, ...);
void signal_callback_handler(int signum) {
  printf("%c[2J", 27);
  printf("%c[f", 27);
  printf("\nExit via Ctrl-C\n");
  i2c_close();
  exit(signum);
}


x86 assembly (clang, -O0):
<signal_callback_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x1b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x1b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <i2c_close@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<signal_callback_handler>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
mov    $0x1b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x1b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <i2c_close@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%c[2J\00"
@.str.1 = [5 x i8] c"%c[f\00"
@.str.2 = [18 x i8] c"\0AExit via Ctrl-C\0A\00"
define void @signal_callback_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 27)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (...) @i2c_close()
%7 = load i32, i32* %2
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"%c[2J\00"
@.str.1 = [5 x i8] c"%c[f\00"
@str = [17 x i8] c"\0AExit via Ctrl-C\00"
define void @signal_callback_handler(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 27)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @i2c_close()
%6 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
scalar_t__ lookupCodon(char *);
scalar_t__ lookupMitoCodon(char *);
int isReallyStopCodon(char *dna, int selenocysteine) {
  if (selenocysteine) {
    return lookupMitoCodon(dna) == 0;
  } else {
    return lookupCodon(dna) == 0;
  }
}


x86 assembly (clang, -O0):
<isReallyStopCodon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1156 <isReallyStopCodon+0x36>
mov    -0x10(%rbp),%rdi
call   1040 <lookupMitoCodon@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    116e <isReallyStopCodon+0x4e>
mov    -0x10(%rbp),%rdi
call   1030 <lookupCodon@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isReallyStopCodon>:
push   %rax
test   %esi,%esi
je     112c <isReallyStopCodon+0xc>
call   1040 <lookupMitoCodon@plt>
jmp    1131 <isReallyStopCodon+0x11>
call   1030 <lookupCodon@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @isReallyStopCodon(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i64 @lookupMitoCodon(i8* %0)
br label %8
6: ; preds = %2
%7 = tail call i64 @lookupCodon(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i64 [ %5, %4 ], [ %7, %6 ]
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ default_isr();
__attribute__((weak)) void RF_DIAG_Handler() { default_isr(); }


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

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

LLVM IR (-O0):
define weak void @RF_DIAG_Handler() {
%1 = call i32 (...) @default_isr()
ret void
}

LLVM IR (-O2):
define weak void @RF_DIAG_Handler() {
%1 = tail call i32 (...) @default_isr()
ret void
}
int cycle_is_sprite_ptr_dma0(unsigned int flags) {
  return (flags & 0x00000e00) == 0x00000600;
}


x86 assembly (clang, -O0):
<cycle_is_sprite_ptr_dma0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xe00,%eax
cmp    $0x600,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cycle_is_sprite_ptr_dma0>:
and    $0xe00,%edi
xor    %eax,%eax
cmp    $0x600,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @cycle_is_sprite_ptr_dma0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 3584
%5 = icmp eq i32 %4, 1536
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @cycle_is_sprite_ptr_dma0(i32 %0) {
%2 = and i32 %0, 3584
%3 = icmp eq i32 %2, 1536
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void banner() {
  printf("XXL %s by @tlack; http://github.com/tlack/xxl/\n",
         "v0 spiral insana");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"XXL %s by @tlack; http://github.com/tlack/xxl/\0A\00"
@.str.1 = [17 x i8] c"v0 spiral insana\00"
define void @banner() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"XXL %s by @tlack; http://github.com/tlack/xxl/\0A\00"
@.str.1 = [17 x i8] c"v0 spiral insana\00"
define void @banner() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_17int16_mem(short *val) {
  return ((*val) & (0x17 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_17int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 23
%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_17int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 23
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char const *);
int platform_remove(const char *path) {
  unlink(path);
  return 1;
}


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

x86 assembly (clang, -O2):
<platform_remove>:
push   %rax
call   1030 <unlink@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @platform_remove(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 1
}
/* Variables and functions */
size_t strlen(const char *str) {
  if (str == NULL) {
    return 0;
  }
  size_t len = 0;
  while (*str++ != '\0') {
    ++len;
  }
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <strlen+0x20>
movq   $0x0,-0x8(%rbp)
jmp    115c <strlen+0x5c>
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1154 <strlen+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <strlen+0x28>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
test   %rdi,%rdi
je     111f <strlen+0x1f>
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = add i64 %7, 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i64 [ 0, %1 ], [ 0, %3 ], [ %10, %6 ]
ret i64 %14
}
/* Variables and functions */
void vApplicationIdleHook(void) {}


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

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

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

LLVM IR (-O2):
define void @vApplicationIdleHook() {
ret void
}
/* Variables and functions */
int strcmp(void *, void *);
int rbTreeCmpString(void *a, void *b) { return strcmp(a, b); }


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

x86 assembly (clang, -O2):
<rbTreeCmpString>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @rbTreeCmpString(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 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @rbTreeCmpString(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int linkat(int /*<<< orphan*/, char const *, int /*<<< orphan*/, char const *,
           int /*<<< orphan*/);
int link(const char *oldPath, const char *newPath) {
  return linkat(AT_FDCWD, oldPath, AT_FDCWD, newPath, 0);
}


x86 assembly (clang, -O0):
<link>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <linkat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<link>:
mov    %rsi,%rcx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    %edi,%edx
xor    %r8d,%r8d
jmp    1030 <linkat@plt>

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

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32 @link(i8* %0, i8* %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @linkat(i32 %3, i8* %0, i32 %3, i8* %1, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void tableFree(void *p, const char *panicMessage) {
  if (p == NULL)
    return;
  free(p);
}


x86 assembly (clang, -O0):
<tableFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1130 <tableFree+0x20>
jmp    1139 <tableFree+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tableFree>:
test   %rdi,%rdi
je     111a <tableFree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @tableFree(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 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @free(i8* %9)
br label %11
11: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @tableFree(i8* %0, i8* nocapture readnone %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %2, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t h264sps_get_level(const uint8_t *p_h264sps) { return p_h264sps[6]; }


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

x86 assembly (clang, -O2):
<h264sps_get_level>:
mov    0x18(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @h264sps_get_level(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
ret i32 %3
}
void initializeRobot() {}


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

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

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

LLVM IR (-O2):
define void @initializeRobot() {
ret void
}
int ifn(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ifn() {
ret i32 0
}
signed short floatToInt16(float sample) {
  return (signed short)(sample * 32767.0);
}


x86 assembly (clang, -O0):
<floatToInt16>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatToInt16>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define signext i16 @floatToInt16(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 3.276700e+04
%6 = fptosi double %5 to i16
ret i16 %6
}

LLVM IR (-O2):
define signext i16 @floatToInt16(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 3.276700e+04
%4 = fptosi double %3 to i16
ret i16 %4
}
void handle_PIPE(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_PIPE(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Say(char *, int);
void hit(void) { Say("I hate you, scroll of fire!", 1); }


x86 assembly (clang, -O0):
<hit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <Say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hit>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <Say@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"I hate you, scroll of fire!\00"
define void @hit() {
%1 = call i32 @Say(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"I hate you, scroll of fire!\00"
define void @hit() {
%1 = tail call i32 @Say(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int do_766() { return 766; }


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

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

LLVM IR (-O0):
define i32 @do_766() {
ret i32 766
}

LLVM IR (-O2):
define i32 @do_766() {
ret i32 766
}
/* Type definitions */
struct XorrisO {
  int dummy;
};

/* Variables and functions */
int Xorriso_option_help(struct XorrisO *, int /*<<< orphan*/);
int Xorriso_option_prog(struct XorrisO *, char *, int /*<<< orphan*/);
int Xorriso_option_prog_help(struct XorrisO *xorriso, char *name, int flag) {
  int ret;
  ret = Xorriso_option_prog(xorriso, name, 0);
  if (ret <= 0)
    return (ret);
  ret = Xorriso_option_help(xorriso, 0);
  return (ret);
}


x86 assembly (clang, -O0):
<Xorriso_option_prog_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <Xorriso_option_prog@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jg     115a <Xorriso_option_prog_help+0x3a>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <Xorriso_option_prog_help+0x4e>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <Xorriso_option_help@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xorriso_option_prog_help>:
push   %rbx
mov    %rdi,%rbx
xor    %edx,%edx
call   1030 <Xorriso_option_prog@plt>
test   %eax,%eax
jle    113a <Xorriso_option_prog_help+0x1a>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <Xorriso_option_help@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.XorrisO = type { i32 }
define i32 @Xorriso_option_prog_help(%struct.XorrisO* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.XorrisO*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.XorrisO* %0, %struct.XorrisO** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load %struct.XorrisO*, %struct.XorrisO** %5
%10 = load i8*, i8** %6
%11 = call i32 @Xorriso_option_prog(%struct.XorrisO* %9, i8* %10, i32 0)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = icmp sle i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32, i32* %8
store i32 %15, i32* %4
br label %20
16: ; preds = %3
%17 = load %struct.XorrisO*, %struct.XorrisO** %5
%18 = call i32 @Xorriso_option_help(%struct.XorrisO* %17, i32 0)
store i32 %18, i32* %8
%19 = load i32, i32* %8
store i32 %19, i32* %4
br label %20
20: ; preds = %16, %14
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
%struct.XorrisO = type { i32 }
define i32 @Xorriso_option_prog_help(%struct.XorrisO* %0, i8* %1, i32 %2) {
%4 = tail call i32 @Xorriso_option_prog(%struct.XorrisO* %0, i8* %1, i32 0)
%5 = icmp slt i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @Xorriso_option_help(%struct.XorrisO* %0, i32 0)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ %4, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MAP_FIXED was not defined at the time of compilation\n");
  return 2;
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"MAP_FIXED was not defined at the time of compilation\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret i32 2
}

LLVM IR (-O2):
@str = [53 x i8] c"MAP_FIXED was not defined at the time of compilation\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i32 2
}
int is_alpha(char c) {
  if (c < 0) {
    return 1;
  }
  return (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) ||
          (c == '_'));
}


x86 assembly (clang, -O0):
<is_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jge    1123 <is_alpha+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1179 <is_alpha+0x79>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1142 <is_alpha+0x42>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x6(%rbp)
jle    116e <is_alpha+0x6e>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1161 <is_alpha+0x61>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x6(%rbp)
jle    116e <is_alpha+0x6e>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alpha>:
test   %dil,%dil
js     111d <is_alpha+0x1d>
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
cmp    $0x5f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_alpha(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %31
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sge i32 %10, 97
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sle i32 %14, 122
br i1 %15, label %28, label %16
16: ; preds = %12, %8
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 90
br i1 %23, label %28, label %24
24: ; preds = %20, %16
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 95
br label %28
28: ; preds = %24, %20, %12
%29 = phi i1 [ true, %20 ], [ true, %12 ], [ %27, %24 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %2
br label %31
31: ; preds = %28, %7
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @is_alpha(i8 signext %0) {
%2 = icmp slt i8 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = and i8 %0, -33
%5 = add nsw i8 %4, -65
%6 = icmp ult i8 %5, 26
%7 = icmp eq i8 %0, 95
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %3
%11 = phi i32 [ %9, %3 ], [ 1, %1 ]
ret i32 %11
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int __infer_nondet_int();
int fstat(int fildes, struct stat *buf) {
  int ret;
  struct stat s;
  *buf = s;
  ret = __infer_nondet_int();
  if (ret < -1 || ret > 0)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<fstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jl     1146 <fstat+0x36>
cmpl   $0x0,-0x14(%rbp)
jle    1150 <fstat+0x40>
jmp    114b <fstat+0x3b>
jmp    114b <fstat+0x3b>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fstat>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
lea    -0x1(%rax),%ecx
cmp    $0xfffffffd,%ecx
ja     1122 <fstat+0x12>
jmp    1120 <fstat+0x10>
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fstat(i32 %0, %struct.stat* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = add i32 %3, -1
%5 = icmp ult i32 %4, -2
br i1 %5, label %6, label %7
6: ; preds = %2, %6
br label %6
7: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int height(int *, int);
int balance(int *tree, int node) {
  return height(tree, node * 2 + 1) - height(tree, node * 2 + 2);
}


x86 assembly (clang, -O0):
<balance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x1,%esi
add    $0x1,%esi
call   1030 <height@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x1,%esi
add    $0x2,%esi
call   1030 <height@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<balance>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
lea    (%rbx,%rbx,1),%esi
add    $0x1,%esi
call   1030 <height@plt>
mov    %eax,%ebp
lea    (%rbx,%rbx,1),%esi
add    $0x2,%esi
mov    %r14,%rdi
call   1030 <height@plt>
sub    %eax,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @balance(i32* %0, i32 %1) {
%3 = shl nsw i32 %1, 1
%4 = or i32 %3, 1
%5 = tail call i32 @height(i32* %0, i32 %4)
%6 = add nsw i32 %3, 2
%7 = tail call i32 @height(i32* %0, i32 %6)
%8 = sub nsw i32 %5, %7
ret i32 %8
}