xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
unsigned int sysconf(int /*<<< orphan*/);
unsigned int Sys_ProcessorCount() { return sysconf(_SC_NPROCESSORS_ONLN); }


x86 assembly (clang, -O0):
<Sys_ProcessorCount>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_ProcessorCount>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_NPROCESSORS_ONLN = global i32 0
define i32 @Sys_ProcessorCount() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = call i32 @sysconf(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@_SC_NPROCESSORS_ONLN = global i32 0
define i32 @Sys_ProcessorCount() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = tail call i32 @sysconf(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void irq_remap() {
  outb(0x20, 0x11);
  outb(0xA0, 0x11);
  outb(0x21, 0x20);
  outb(0xA1, 0x28);
  outb(0x21, 0x04);
  outb(0xA1, 0x02);
  outb(0x21, 0x01);
  outb(0xA1, 0x01);
  outb(0x21, 0x00);
  outb(0xA1, 0x00);
}


x86 assembly (clang, -O0):
<irq_remap>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_remap>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @irq_remap() {
%1 = call i32 @outb(i32 32, i32 17)
%2 = call i32 @outb(i32 160, i32 17)
%3 = call i32 @outb(i32 33, i32 32)
%4 = call i32 @outb(i32 161, i32 40)
%5 = call i32 @outb(i32 33, i32 4)
%6 = call i32 @outb(i32 161, i32 2)
%7 = call i32 @outb(i32 33, i32 1)
%8 = call i32 @outb(i32 161, i32 1)
%9 = call i32 @outb(i32 33, i32 0)
%10 = call i32 @outb(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @irq_remap() {
%1 = tail call i32 @outb(i32 32, i32 17)
%2 = tail call i32 @outb(i32 160, i32 17)
%3 = tail call i32 @outb(i32 33, i32 32)
%4 = tail call i32 @outb(i32 161, i32 40)
%5 = tail call i32 @outb(i32 33, i32 4)
%6 = tail call i32 @outb(i32 161, i32 2)
%7 = tail call i32 @outb(i32 33, i32 1)
%8 = tail call i32 @outb(i32 161, i32 1)
%9 = tail call i32 @outb(i32 33, i32 0)
%10 = tail call i32 @outb(i32 161, i32 0)
ret void
}
float phi2(float mu, float psi) { return mu * (1.0 - psi); }


x86 assembly (clang, -O0):
<phi2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xed8(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<phi2>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movsd  0xef0(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @phi2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fsub double 1.000000e+00, %8
%10 = fmul double %6, %9
%11 = fptrunc double %10 to float
ret float %11
}

LLVM IR (-O2):
define float @phi2(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = fsub double 1.000000e+00, %4
%6 = fmul double %5, %3
%7 = fptrunc double %6 to float
ret float %7
}
/* Variables and functions */
scalar_t__ mt_genrand_int32();
double mt_genrand_real3(void) {
  return (((double)mt_genrand_int32()) + 0.5) * (1.0 / 4294967296.0);
}


x86 assembly (clang, -O0):
<mt_genrand_real3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mt_genrand_int32@plt>
cvtsi2sd %rax,%xmm0
movsd  0xee0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_genrand_real3>:
push   %rax
xor    %eax,%eax
call   1030 <mt_genrand_int32@plt>
cvtsi2sd %rax,%xmm0
addsd  0xedb(%rip),%xmm0
mulsd  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mt_genrand_real3() {
%1 = call i64 (...) @mt_genrand_int32()
%2 = sitofp i64 %1 to double
%3 = fadd double %2, 5.000000e-01
%4 = fmul double %3, 0x3DF0000000000000
ret double %4
}

LLVM IR (-O2):
define double @mt_genrand_real3() {
%1 = tail call i64 (...) @mt_genrand_int32()
%2 = sitofp i64 %1 to double
%3 = fadd double %2, 5.000000e-01
%4 = fmul double %3, 0x3DF0000000000000
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int, int);
void power_down() {
  outb((0xa0000000 + 0x1fbf0000), 4, 42);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<power_down>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbfbf0000,%edi
mov    $0x4,%esi
mov    $0x2a,%edx
call   1030 <outb@plt>
jmp    1128 <power_down+0x18>

x86 assembly (clang, -O2):
<power_down>:
push   %rax
mov    $0xbfbf0000,%edi
mov    $0x4,%esi
mov    $0x2a,%edx
call   1030 <outb@plt>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1130 <power_down+0x20>

LLVM IR (-O0):
define void @power_down() {
%1 = call i32 @outb(i32 -1078001664, i32 4, i32 42)
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @power_down() {
%1 = tail call i32 @outb(i32 -1078001664, i32 4, i32 42)
br label %2
2: ; preds = %0, %2
br label %2
}
int small(int num1, int num2) {
  int menor;
  menor = num1;
  if (num2 < num1) {
    menor = num2;
  }
  return menor;
}


x86 assembly (clang, -O0):
<small>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1122 <small+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<small>:
mov    %edi,%eax
cmp    %edi,%esi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @small(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void PrintHelp(void) {
  printf("usage: %s [-aefhrsv] [-l length] -x suffix file ...\n", "setsuffix");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"usage: %s [-aefhrsv] [-l length] -x suffix file ...\0A\00"
@.str.1 = [10 x i8] c"setsuffix\00"
define void @PrintHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"usage: %s [-aefhrsv] [-l length] -x suffix file ...\0A\00"
@.str.1 = [10 x i8] c"setsuffix\00"
define void @PrintHelp() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ errno;
long strtol(char const *, char **, int);
int check_strtol(const char *str, int base, long *value) {
  char *endptr = NULL;
  errno = 0;
  *value = strtol(str, &endptr, base);
  return (errno || endptr == str) ? -1 : 0;
}


x86 assembly (clang, -O0):
<check_strtol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2eae(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    -0x20(%rbp),%rsi
call   1030 <strtol@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x1,%al
mov    0x2e84(%rip),%rcx
cmpq   $0x0,(%rcx)
mov    %al,-0x21(%rbp)
jne    1177 <check_strtol+0x67>
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%dl
xor    %eax,%eax
mov    $0xffffffff,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_strtol>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %esi,%edx
mov    %rdi,%rbx
movq   $0x0,0x8(%rsp)
mov    0x2eaf(%rip),%r15
movq   $0x0,(%r15)
lea    0x8(%rsp),%rsi
call   1030 <strtol@plt>
mov    %rax,(%r14)
cmpq   $0x0,(%r15)
setne  %al
cmp    %rbx,0x8(%rsp)
sete   %cl
or     %al,%cl
movzbl %cl,%eax
neg    %eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@errno = global i64 0
define i32 @check_strtol(i8* %0, i32 %1, i64* nocapture writeonly %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
store i8* null, i8** %4
store i64 0, i64* @errno
%6 = call i64 @strtol(i8* %0, i8** %4, i32 %1)
store i64 %6, i64* %2
%7 = load i64, i64* @errno
%8 = icmp ne i64 %7, 0
%9 = load i8*, i8** %4
%10 = icmp eq i8* %9, %0
%11 = select i1 %8, i1 true, i1 %10
%12 = sext i1 %11 to i32
ret i32 %12
}
double game_adapt_result(double w) {
  if (w == 0)
    return 0.0;
  if (w < 0)
    return -1.0;
  return 1.0;
  ;
}


x86 assembly (clang, -O0):
<game_adapt_result>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112e <game_adapt_result+0x2e>
jp     112e <game_adapt_result+0x2e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115b <game_adapt_result+0x5b>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114e <game_adapt_result+0x4e>
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115b <game_adapt_result+0x5b>
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<game_adapt_result>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm2
cmpeqsd %xmm1,%xmm0
andnpd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @game_adapt_result(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store double -1.000000e+00, double* %2
br label %12
11: ; preds = %7
store double 1.000000e+00, double* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @game_adapt_result(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
%3 = fcmp olt double %0, 0.000000e+00
%4 = select i1 %3, double -1.000000e+00, double 1.000000e+00
%5 = select i1 %2, double 0.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int checker_read_long_double(int, char const *, int, long double *);
int checker_read_team_long_double(const char *name, int eof_error_flag,
                                  long double *p_val) {
  return checker_read_long_double(1, name, eof_error_flag, p_val);
}


x86 assembly (clang, -O0):
<checker_read_team_long_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%edi
call   1030 <checker_read_long_double@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker_read_team_long_double>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <checker_read_long_double@plt>

LLVM IR (-O0):
define i32 @checker_read_team_long_double(i8* %0, i32 %1, x86_fp80* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca x86_fp80*
store i8* %0, i8** %4
store i32 %1, i32* %5
store x86_fp80* %2, x86_fp80** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load x86_fp80*, x86_fp80** %6
%10 = call i32 @checker_read_long_double(i32 1, i8* %7, i32 %8, x86_fp80* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @checker_read_team_long_double(i8* %0, i32 %1, x86_fp80* %2) {
%4 = tail call i32 @checker_read_long_double(i32 1, i8* %0, i32 %1, x86_fp80* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "Usage: <input-stream> | cmr-bucket -x <delimiter> -d <destination "
          "folder> -n <num-partitions> -m <map-id> [-p <prefix> -s <sort>]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [131 x i8] c"Usage: <input-stream> | cmr-bucket -x <delimiter> -d <destination folder> -n <num-partitions> -m <map-id> [-p <prefix> -s <sort>]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [131 x i8] c"Usage: <input-stream> | cmr-bucket -x <delimiter> -d <destination folder> -n <num-partitions> -m <map-id> [-p <prefix> -s <sort>]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
ret void
}
int DUMMY_ReturnVideoInfo(struct vidinfo_struct *v) { return (0); }


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

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

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

LLVM IR (-O2):
%struct.vidinfo_struct = type opaque
define i32 @DUMMY_ReturnVideoInfo(%struct.vidinfo_struct* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
void sysWarn(const char *msg) { fprintf(stdout, "Warning: %s\n", msg); }


x86 assembly (clang, -O0):
<sysWarn>:
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):
<sysWarn>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"Warning: %s\0A\00"
define void @sysWarn(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned int thash_str_hash(const void *vkey) {
  unsigned int hash = 5381;
  unsigned int i;
  const char *key = (char *)vkey;
  for (i = 0; key[i]; i++)
    hash = ((hash << 5) + hash) + key[i];
  return hash;
}


x86 assembly (clang, -O0):
<thash_str_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1156 <thash_str_hash+0x56>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%edx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111e <thash_str_hash+0x1e>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<thash_str_hash>:
mov    (%rdi),%dl
mov    $0x1505,%eax
test   %dl,%dl
je     1129 <thash_str_hash+0x29>
mov    $0x1,%ecx
mov    %eax,%esi
shl    $0x5,%esi
add    %eax,%esi
movsbl %dl,%eax
add    %esi,%eax
mov    %ecx,%edx
movzbl (%rdi,%rdx,1),%edx
add    $0x1,%ecx
test   %dl,%dl
jne    1110 <thash_str_hash+0x10>
ret

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

LLVM IR (-O2):
define i32 @thash_str_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %14, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 5381, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = mul i32 %6, 33
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = add i32 %7, 1
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 5381, %1 ], [ %10, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, float);
int main() {
  float n = 10.45678;
  printf("%.2e \n"
         "%.4e \n"
         "%.8e \n",
         n, n, n);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"%.2e \0A%.4e \0A%.8e \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float 0x4024E9DF20000000, float 0x4024E9DF20000000, float 0x4024E9DF20000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_proposer();
int main(int argc, char **args) {
  test_proposer();
  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)
mov    $0x0,%al
call   1030 <test_proposer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_proposer()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int storage_open(char const *config_file) {
  printf("Initializing storage: config_file=\"%s\"\n", config_file);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Initializing storage: config_file=\22%s\22\0A\00"
define i32 @storage_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Initializing storage: config_file=\22%s\22\0A\00"
define i32 @storage_open(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
void FreeIntMatrix(int **Matrix, int M) {
  int m;
  for (m = 0; m < M; m++)
    free(Matrix[m]);
  free(Matrix);
}


x86 assembly (clang, -O0):
<FreeIntMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <FreeIntMatrix+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <FreeIntMatrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeIntMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <FreeIntMatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <FreeIntMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @FreeIntMatrix(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
unsigned short int smatrix_indexsearch(unsigned short int *_list,
                                       unsigned int _num_elements,
                                       unsigned short int _value) {
  unsigned int i;
  for (i = 0; i < _num_elements; i++) {
    if (_list[i] > _value)
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<smatrix_indexsearch>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1154 <smatrix_indexsearch+0x54>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzwl (%rax,%rcx,2),%eax
movzwl -0xe(%rbp),%ecx
cmp    %ecx,%eax
jle    1141 <smatrix_indexsearch+0x41>
jmp    1154 <smatrix_indexsearch+0x54>
jmp    1146 <smatrix_indexsearch+0x46>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <smatrix_indexsearch+0x19>
mov    -0x14(%rbp),%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smatrix_indexsearch>:
test   %esi,%esi
je     1122 <smatrix_indexsearch+0x22>
mov    %esi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmp    %dx,(%rdi,%rax,2)
ja     1121 <smatrix_indexsearch+0x21>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <smatrix_indexsearch+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i16 @smatrix_indexsearch(i16* %0, i32 %1, i16 zeroext %2) {
%4 = alloca i16*
%5 = alloca i32
%6 = alloca i16
%7 = alloca i32
store i16* %0, i16** %4
store i32 %1, i32* %5
store i16 %2, i16* %6
store i32 0, i32* %7
br label %8
8: ; preds = %24, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp ult i32 %9, %10
br i1 %11, label %12, label %27
12: ; preds = %8
%13 = load i16*, i16** %4
%14 = load i32, i32* %7
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i16, i16* %13, i64 %15
%17 = load i16, i16* %16
%18 = zext i16 %17 to i32
%19 = load i16, i16* %6
%20 = zext i16 %19 to i32
%21 = icmp sgt i32 %18, %20
br i1 %21, label %22, label %23
22: ; preds = %12
br label %27
23: ; preds = %12
br label %24
24: ; preds = %23
%25 = load i32, i32* %7
%26 = add i32 %25, 1
store i32 %26, i32* %7
br label %8
27: ; preds = %22, %8
%28 = load i32, i32* %7
%29 = trunc i32 %28 to i16
ret i16 %29
}

LLVM IR (-O2):
define zeroext i16 @smatrix_indexsearch(i16* nocapture %0, i32 %1, i16 zeroext %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %17, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i16, i16* %0, i64 %8
%10 = load i16, i16* %9
%11 = icmp ugt i16 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ 0, %3 ], [ %16, %15 ], [ %1, %12 ]
%19 = trunc i32 %18 to i16
ret i16 %19
}
/* Type definitions */
typedef int uint64_t;
struct pcg_state_128 {
  int dummy;
};

/* Variables and functions */
int pcg_unique_128_xsh_rr_64_random_r(struct pcg_state_128 *);
uint64_t pcg_unique_128_xsh_rr_64_boundedrand_r(struct pcg_state_128 *rng,
                                                uint64_t bound) {
  uint64_t threshold = -bound % bound;
  for (;;) {
    uint64_t r = pcg_unique_128_xsh_rr_64_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_unique_128_xsh_rr_64_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_unique_128_xsh_rr_64_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_unique_128_xsh_rr_64_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_unique_128_xsh_rr_64_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_unique_128_xsh_rr_64_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_unique_128_xsh_rr_64_random_r@plt>
test   %eax,%eax
js     1120 <pcg_unique_128_xsh_rr_64_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.pcg_state_128 = type { i32 }
define i32 @pcg_unique_128_xsh_rr_64_boundedrand_r(%struct.pcg_state_128* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_unique_128_xsh_rr_64_random_r(%struct.pcg_state_128* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
int fun438() { return 438; }


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

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

LLVM IR (-O0):
define i32 @fun438() {
ret i32 438
}

LLVM IR (-O2):
define i32 @fun438() {
ret i32 438
}
/* Type definitions */
struct sigevent {
  int dummy;
};
typedef int /*<<< orphan*/ mqd_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int mq_notify(mqd_t mqdes, const struct sigevent *notification) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<mq_notify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sigevent = type { i32 }
@ENOSYS = global i32 0
define i32 @mq_notify(i32 %0, %struct.sigevent* %1) {
%3 = alloca i32
%4 = alloca %struct.sigevent*
store i32 %0, i32* %3
store %struct.sigevent* %1, %struct.sigevent** %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
%struct.sigevent = type { i32 }
@ENOSYS = global i32 0
define i32 @mq_notify(i32 %0, %struct.sigevent* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  if (argc == 1) {
    printf("\n");
  } else if (argc == 2) {
    printf("%s\n", argv[1]);
  } else {
    return 1;
  }
  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   $0x1,-0x8(%rbp)
jne    1143 <main+0x33>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1179 <main+0x69>
cmpl   $0x2,-0x8(%rbp)
jne    1168 <main+0x58>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1174 <main+0x64>
movl   $0x1,-0x4(%rbp)
jmp    1180 <main+0x70>
jmp    1179 <main+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
je     113c <main+0x1c>
mov    $0x1,%eax
cmp    $0x1,%edi
jne    1147 <main+0x27>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1145 <main+0x25>
mov    0x8(%rsi),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [4 x i8] c"%s\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 eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %20
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %16)
br label %19
18: ; preds = %10
store i32 1, i32* %3
br label %21
19: ; preds = %13
br label %20
20: ; preds = %19, %8
store i32 0, i32* %3
br label %21
21: ; preds = %20, %18
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %9 [
i32 1, label %3
i32 2, label %5
]
3: ; preds = %2
%4 = tail call i32 @putchar(i32 10)
br label %9
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
br label %9
9: ; preds = %3, %5, %2
%10 = phi i32 [ 1, %2 ], [ 0, %5 ], [ 0, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ PrintErrorCode();
int dxl_read_byte(int, int);
int getMoving(int Id) {
  int CurrentMove;
  CurrentMove = dxl_read_byte(Id, 46);
  PrintErrorCode();
  return CurrentMove;
}


x86 assembly (clang, -O0):
<getMoving>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2e,%esi
call   1040 <dxl_read_byte@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PrintErrorCode@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMoving>:
push   %rbx
mov    $0x2e,%esi
call   1040 <dxl_read_byte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <PrintErrorCode@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getMoving(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @dxl_read_byte(i32 %4, i32 46)
store i32 %5, i32* %3
%6 = call i32 (...) @PrintErrorCode()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @getMoving(i32 %0) {
%2 = tail call i32 @dxl_read_byte(i32 %0, i32 46)
%3 = tail call i32 (...) @PrintErrorCode()
ret i32 %2
}
float Lerp(float a, float b, float f) { return (a + (f * (b - a))); }


x86 assembly (clang, -O0):
<Lerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lerp>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = load float, float* %5
%10 = load float, float* %4
%11 = fsub float %9, %10
%12 = call float @llvm.fmuladd.f32(float %8, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @Lerp(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %2, float %4, float %0)
ret float %5
}
void register_cpu_notifier(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<register_cpu_notifier>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_cpu_notifier>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.register_cpu_notifier = [22 x i8] c"register_cpu_notifier\00"
define void @register_cpu_notifier() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.register_cpu_notifier, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.register_cpu_notifier = [22 x i8] c"register_cpu_notifier\00"
define void @register_cpu_notifier() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.register_cpu_notifier, i64 0, i64 0))
ret void
}
int ph1_sld3_sbc_init(const struct uniphier_board_data *bd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @ph1_sld3_sbc_init(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
void *fopen(char *, char *);
void *pc_openbin(char *filename) { return fopen(filename, "wb"); }


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

x86 assembly (clang, -O2):
<pc_openbin>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
define i8* @pc_openbin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @fopen(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define noalias i8* @pc_openbin(i8* nocapture %0) {
%2 = tail call i8* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
void libmsbcg729_init() {}


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

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

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

LLVM IR (-O2):
define void @libmsbcg729_init() {
ret void
}
int rlIsValidSocket(int theSocket) { return theSocket != -1; }


x86 assembly (clang, -O0):
<rlIsValidSocket>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rlIsValidSocket>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @rlIsValidSocket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @rlIsValidSocket(i32 %0) {
%2 = icmp ne i32 %0, -1
%3 = zext i1 %2 to i32
ret i32 %3
}
int ll_cmpr(const void *v1, const void *v2) {
  long long ll1 = *(long long *)v1;
  long long ll2 = *(long long *)v2;
  return (ll1 > ll2) ? 1 : ((ll1 == ll2) ? 0 : -1);
}


x86 assembly (clang, -O0):
<ll_cmpr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    113d <ll_cmpr+0x3d>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1155 <ll_cmpr+0x55>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ll_cmpr>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setne  %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @ll_cmpr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %23
17: ; preds = %2
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = icmp eq i64 %18, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 0, i32 -1
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ 1, %16 ], [ %22, %17 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @ll_cmpr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp ne i64 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int inet_pton(int /*<<< orphan*/, char const *, struct in_addr *);
int mask2prefix(struct in_addr);
int ipv4_mask_to_int(const char *prefix) {
  int ret;
  struct in_addr in;
  ret = inet_pton(AF_INET, prefix, &in);
  if (ret == 0)
    return -1;
  return mask2prefix(in);
}


x86 assembly (clang, -O0):
<ipv4_mask_to_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <inet_pton@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    115b <ipv4_mask_to_int+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <ipv4_mask_to_int+0x46>
mov    -0x18(%rbp),%edi
call   1030 <mask2prefix@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_mask_to_int>:
push   %rax
mov    %rdi,%rsi
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
call   1040 <inet_pton@plt>
test   %eax,%eax
je     1143 <ipv4_mask_to_int+0x23>
mov    (%rsp),%edi
call   1030 <mask2prefix@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@AF_INET = global i32 0
define i32 @ipv4_mask_to_int(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.in_addr
store i8* %0, i8** %3
%6 = load i32, i32* @AF_INET
%7 = load i8*, i8** %3
%8 = call i32 @inet_pton(i32 %6, i8* %7, %struct.in_addr* %5)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %16
12: ; preds = %1
%13 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %5, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @mask2prefix(i32 %14)
store i32 %15, i32* %2
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@AF_INET = global i32 0
define i32 @ipv4_mask_to_int(i8* %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = load i32, i32* @AF_INET
%5 = call i32 @inet_pton(i32 %4, i8* %0, %struct.in_addr* %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @mask2prefix(i32 %9)
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ -1, %1 ]
ret i32 %12
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ seedbcn(int);
int /*<<< orphan*/ seedlcg(int);
void seedCombined(uint64_t count) {
  seedbcn(count * 53);
  seedlcg(count);
}


x86 assembly (clang, -O0):
<seedCombined>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x35,-0x4(%rbp),%edi
call   1030 <seedbcn@plt>
mov    -0x4(%rbp),%edi
call   1040 <seedlcg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seedCombined>:
push   %rbx
mov    %edi,%ebx
imul   $0x35,%edi,%edi
call   1030 <seedbcn@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <seedlcg@plt>

LLVM IR (-O0):
define void @seedCombined(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 53
%5 = call i32 @seedbcn(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @seedlcg(i32 %6)
ret void
}

LLVM IR (-O2):
define void @seedCombined(i32 %0) {
%2 = mul nsw i32 %0, 53
%3 = tail call i32 @seedbcn(i32 %2)
%4 = tail call i32 @seedlcg(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ write_com_4bit(int);
void lcd_clear() {
  write_com_4bit(0x0001);
  while (write_com_4bit(0x0100) != 0)
    ;
}


x86 assembly (clang, -O0):
<lcd_clear>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <write_com_4bit@plt>
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
cmp    $0x0,%rax
je     1137 <lcd_clear+0x27>
jmp    111e <lcd_clear+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_clear>:
push   %rax
mov    $0x1,%edi
call   1030 <write_com_4bit@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
test   %rax,%rax
jne    1120 <lcd_clear+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @lcd_clear() {
%1 = call i64 @write_com_4bit(i32 1)
br label %2
2: ; preds = %5, %0
%3 = call i64 @write_com_4bit(i32 256)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @lcd_clear() {
%1 = tail call i64 @write_com_4bit(i32 1)
br label %2
2: ; preds = %2, %0
%3 = tail call i64 @write_com_4bit(i32 256)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}