xunge/DecIR huggingface dataset:
double get_dx(const double x[]) { return x[1] - x[0]; }


x86 assembly (clang, -O0):
<get_dx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dx>:
movsd  0x8(%rdi),%xmm0
subsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @get_dx(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 1
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fsub double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @get_dx(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = load double, double* %2
%4 = load double, double* %0
%5 = fsub double %3, %4
ret double %5
}
int bitcount(unsigned x) {
  int count;
  for (count = 0; x != 0; ++count)
    x &= x - 1;
  return count;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <bitcount+0x32>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <bitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitcount+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitcount+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add i32 %5, -1
%7 = and i32 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int i;
#pragma acc data create(i)
  {
    fprintf(stderr, "CheCKpOInT\n");
#pragma acc parallel copyin(i)
    ++i;
  }
  return 0;
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 1
store i32 %10, i32* %6
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void PutNum(numb, h, v) double numb;
int h, v;
{
  char temp[255];
  sprintf((char *)temp, "%le", numb);
  moveTo(h, v);
  drawString(h, v, temp);
}


x86 assembly (clang, -O0):
<PutNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xea7(%rip),%rsi
mov    $0x1,%al
call   1040 <sprintf@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x0,%al
call   1050 <moveTo@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
lea    -0x110(%rbp),%rdx
mov    $0x0,%al
call   1030 <drawString@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PutNum>:
push   %rbp
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xeba(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <sprintf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <moveTo@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <drawString@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%le\00"
define void @PutNum(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca [255 x i8]
store double %0, double* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%9 = load double, double* %4
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 (i32, i32, ...) bitcast (i32 (...)* @moveTo to i32 (i32, i32, ...)*)(i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%17 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @drawString to i32 (i32, i32, i8*, ...)*)(i32 %14, i32 %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%le\00"
define void @PutNum(double %0, i32 %1, i32 %2) {
%4 = alloca [255 x i8]
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %0)
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @moveTo to i32 (i32, i32, ...)*)(i32 %1, i32 %2)
%8 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @drawString to i32 (i32, i32, i8*, ...)*)(i32 %1, i32 %2, i8* %5)
ret void
}
int eb_d1c_to_float(unsigned char src, float *tgt) {
  if (src > 0xC8) {
    *tgt = (float)(0xFF);
    return 0;
  } else {
    *tgt = (float)(src / 2.0);
    return 1;
  }
}


x86 assembly (clang, -O0):
<eb_d1c_to_float>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0xc8,%eax
jle    1139 <eb_d1c_to_float+0x39>
mov    -0x10(%rbp),%rax
movss  0xedf(%rip),%xmm0
movss  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1160 <eb_d1c_to_float+0x60>
movzbl -0x5(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb_d1c_to_float>:
xor    %eax,%eax
cmp    $0xc9,%dil
setb   %cl
jae    111d <eb_d1c_to_float+0x1d>
cvtsi2sd %edi,%xmm0
mulsd  0xee9(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
jmp    1125 <eb_d1c_to_float+0x25>
movss  0xee3(%rip),%xmm0
mov    %cl,%al
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define i32 @eb_d1c_to_float(i8 zeroext %0, float* %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca float*
store i8 %0, i8* %4
store float* %1, float** %5
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = icmp sgt i32 %7, 200
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float*, float** %5
store float 2.550000e+02, float* %10
store i32 0, i32* %3
br label %18
11: ; preds = %2
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = sitofp i32 %13 to double
%15 = fdiv double %14, 2.000000e+00
%16 = fptrunc double %15 to float
%17 = load float*, float** %5
store float %16, float* %17
store i32 1, i32* %3
br label %18
18: ; preds = %11, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @eb_d1c_to_float(i8 zeroext %0, float* nocapture writeonly %1) {
%3 = icmp ugt i8 %0, -56
%4 = uitofp i8 %0 to double
%5 = fmul double %4, 5.000000e-01
%6 = fptrunc double %5 to float
%7 = select i1 %3, float 2.550000e+02, float %6
%8 = xor i1 %3, true
%9 = zext i1 %8 to i32
store float %7, float* %1
ret i32 %9
}
int d_bgt_mm2(double *a1, double *a2) {
  return !(__builtin_isgreater(*a1, *a2));
}


x86 assembly (clang, -O0):
<d_bgt_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_bgt_mm2>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
setbe  %al
ret

LLVM IR (-O0):
define i32 @d_bgt_mm2(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fcmp ogt double %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @d_bgt_mm2(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp ule double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ lexer(char *);
int main() {
  char *test = "select * from mytable where city = \"Auckland\" and            "
               "var1 = 123 and var2 = \"test\" ; ";
  lexer(test);
  char *test2 = "select foo, bar , baz ,test from mytable ; ";
  lexer(test2);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [93 x i8] c"select * from mytable where city = \22Auckland\22 and var1 = 123 and var2 = \22test\22 ; \00"
@.str.1 = [44 x i8] c"select foo, bar , baz ,test from mytable ; \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @lexer(i8* %4)
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @lexer(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [93 x i8] c"select * from mytable where city = \22Auckland\22 and var1 = 123 and var2 = \22test\22 ; \00"
@.str.1 = [44 x i8] c"select foo, bar , baz ,test from mytable ; \00"
define i32 @main() {
%1 = tail call i32 @lexer(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @lexer(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int spi_command_write(char, char *, int, char *);
int nrf_write_register_mb(char reg, char *writebuffer, int length,
                          char *retstatus) {
  return spi_command_write((reg | 0x20), writebuffer, length, retstatus);
}


x86 assembly (clang, -O0):
<nrf_write_register_mb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movsbl -0x1(%rbp),%eax
or     $0x20,%eax
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
movsbl %al,%edi
call   1030 <spi_command_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_write_register_mb>:
or     $0x20,%dil
movsbl %dil,%edi
jmp    1030 <spi_command_write@plt>

LLVM IR (-O0):
define i32 @nrf_write_register_mb(i8 signext %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8 %0, i8* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = or i32 %10, 32
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = load i8*, i8** %8
%16 = call i32 @spi_command_write(i8 signext %12, i8* %13, i32 %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @nrf_write_register_mb(i8 signext %0, i8* %1, i32 %2, i8* %3) {
%5 = or i8 %0, 32
%6 = tail call i32 @spi_command_write(i8 signext %5, i8* %1, i32 %2, i8* %3)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *select_config(char *config_file) {
  FILE *fp;
  fp = fopen(config_file, "r");
  return fp;
}


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @select_config(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getlong(int /*<<< orphan*/ *);
void readtab(FILE *inf, unsigned long *tab, int len) {
  while (len) {
    *tab++ = getlong(inf);
    len -= 4;
  }
}


x86 assembly (clang, -O0):
<readtab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1159 <readtab+0x49>
mov    -0x8(%rbp),%rdi
call   1030 <getlong@plt>
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
sub    $0x4,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <readtab+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readtab>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
je     1147 <readtab+0x37>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <getlong@plt>
cltq
mov    %rax,(%r14,%rbx,2)
add    $0x4,%rbx
cmp    %ebx,%r12d
jne    1130 <readtab+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @readtab(i32* %0, i64* nocapture writeonly %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %13, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %11, %5 ], [ %2, %3 ]
%7 = phi i64* [ %10, %5 ], [ %1, %3 ]
%8 = tail call i32 @getlong(i32* %0)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %7, i64 1
store i64 %9, i64* %7
%11 = add nsw i32 %6, -4
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ crush_hash32_rjenkins1_5(int /*<<< orphan*/,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/);
__u32 crush_hash32_5(int type, __u32 a, __u32 b, __u32 c, __u32 d, __u32 e) {
  switch (type) {
  case 0:
    return crush_hash32_rjenkins1_5(a, b, c, d, e);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<crush_hash32_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    1159 <crush_hash32_5+0x49>
jmp    113c <crush_hash32_5+0x2c>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
call   1030 <crush_hash32_rjenkins1_5@plt>
mov    %eax,-0x4(%rbp)
jmp    1160 <crush_hash32_5+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crush_hash32_5>:
test   %edi,%edi
je     1117 <crush_hash32_5+0x7>
xor    %eax,%eax
ret
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8d,%ecx
mov    %r9d,%r8d
jmp    1030 <crush_hash32_rjenkins1_5@plt>

LLVM IR (-O0):
define i32 @crush_hash32_5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
%14 = load i32, i32* %8
switch i32 %14, label %22 [
i32 0, label %15
]
15: ; preds = %6
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = call i32 @crush_hash32_rjenkins1_5(i32 %16, i32 %17, i32 %18, i32 %19, i32 %20)
store i32 %21, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %15
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @crush_hash32_5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp eq i32 %0, 0
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @crush_hash32_rjenkins1_5(i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
br label %10
10: ; preds = %6, %8
%11 = phi i32 [ %9, %8 ], [ 0, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int syntax() {
  puts("prog size_of_mem_to_alloc");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"prog size_of_mem_to_alloc\00"
define i32 @syntax() {
%1 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [26 x i8] c"prog size_of_mem_to_alloc\00"
define i32 @syntax() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ putc(unsigned char, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void cmd_beep(char *arg) { putc((unsigned char)('\007'), stdout); }


x86 assembly (clang, -O0):
<cmd_beep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    $0x7,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_beep>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    $0x7,%edi
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @cmd_beep(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @putc(i8 zeroext 7, i32 %3)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @cmd_beep(i8* nocapture readnone %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @putc(i8 zeroext 7, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputc(int ch __attribute__((unused)),
          FILE *stream __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @fputc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @fputc(i32 %0, i32* nocapture readnone %1) {
ret i32 0
}
three_args_with_no_inner_calls(a, b, c) { echo("a + b =", a + b, ", c = ", c); }


x86 assembly (clang, -O0):
<three_args_with_no_inner_calls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x10(%rbp),%ecx
lea    0xecf(%rip),%rdi
lea    0xed0(%rip),%rdx
mov    $0x0,%al
call   1030 <echo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<three_args_with_no_inner_calls>:
mov    %edx,%ecx
add    %edi,%esi
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rdx
xor    %eax,%eax
jmp    1030 <echo@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"a + b =\00"
@.str.1 = [7 x i8] c", c = \00"
define i32 @three_args_with_no_inner_calls(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %7
%12 = call i32 (i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @echo to i32 (i8*, i32, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"a + b =\00"
@.str.1 = [7 x i8] c", c = \00"
define i32 @three_args_with_no_inner_calls(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = tail call i32 (i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @echo to i32 (i8*, i32, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int hd_supp(FILE *f) {
  static int count = 0;
  if (!count++)
    printf("No header has been defined for the supplier table\n");
  return (0);
}


x86 assembly (clang, -O0):
<hd_supp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2f0a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2eff(%rip)
cmp    $0x0,%eax
jne    1142 <hd_supp+0x32>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hd_supp>:
push   %rax
mov    0x2f15(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0c(%rip)
test   %eax,%eax
jne    1130 <hd_supp+0x20>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@hd_supp.count = internal global i32 0
@.str = [51 x i8] c"No header has been defined for the supplier table\0A\00"
define i32 @hd_supp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @hd_supp.count
%4 = add nsw i32 %3, 1
store i32 %4, i32* @hd_supp.count
%5 = icmp ne i32 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret i32 0
}

LLVM IR (-O2):
@hd_supp.count = internal unnamed_addr global i32 0
@str = [50 x i8] c"No header has been defined for the supplier table\00"
define i32 @hd_supp(i32* nocapture readnone %0) {
%2 = load i32, i32* @hd_supp.count
%3 = add nsw i32 %2, 1
store i32 %3, i32* @hd_supp.count
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void exit_del_mq(int mqid) { exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<exit_del_mq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<exit_del_mq>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @exit_del_mq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @exit_del_mq(i32 %0) {
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int cgiReadInt(FILE *out, int *i) {
  if (!fread(i, sizeof(int), 1, out)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<cgiReadInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x0,%eax
jne    114c <cgiReadInt+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1153 <cgiReadInt+0x43>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiReadInt>:
push   %rax
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @cgiReadInt(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @fread(i32* %1, i32 4, i32 1, i32* %0)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
struct node *XOR(struct node *a, struct node *b) {
  return (struct node *)((unsigned int)(a) ^ (unsigned int)(b));
}


x86 assembly (clang, -O0):
<XOR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
xor    %ecx,%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XOR>:
mov    %rsi,%rax
xor    %edi,%eax
ret

LLVM IR (-O0):
%struct.node = type opaque
define %struct.node* @XOR(%struct.node* %0, %struct.node* %1) {
%3 = alloca %struct.node*
%4 = alloca %struct.node*
store %struct.node* %0, %struct.node** %3
store %struct.node* %1, %struct.node** %4
%5 = load %struct.node*, %struct.node** %3
%6 = ptrtoint %struct.node* %5 to i32
%7 = load %struct.node*, %struct.node** %4
%8 = ptrtoint %struct.node* %7 to i32
%9 = xor i32 %6, %8
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to %struct.node*
ret %struct.node* %11
}

LLVM IR (-O2):
%struct.node = type opaque
define %struct.node* @XOR(%struct.node* %0, %struct.node* %1) {
%3 = ptrtoint %struct.node* %0 to i64
%4 = ptrtoint %struct.node* %1 to i64
%5 = xor i64 %4, %3
%6 = and i64 %5, 4294967295
%7 = inttoptr i64 %6 to %struct.node*
ret %struct.node* %7
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_INT1_PIN() { return 0x01 & (inp_emulate(0x44) >> 1); }


x86 assembly (clang, -O0):
<TOSH_READ_INT1_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44,%edi
call   1030 <inp_emulate@plt>
sar    $0x1,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_INT1_PIN>:
push   %rax
mov    $0x44,%edi
call   1030 <inp_emulate@plt>
shr    %al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_INT1_PIN() {
%1 = call i32 @inp_emulate(i32 68)
%2 = ashr i32 %1, 1
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_INT1_PIN() {
%1 = tail call i32 @inp_emulate(i32 68)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 1
%4 = and i8 %3, 1
ret i8 %4
}
int getCharacterByAlias(unsigned char *character, const char *alias) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @getCharacterByAlias(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int IL_re_compile_fastmap(bufp)
struct re_pattern_buffer *bufp;
{
  return byte_re_compile_fastmap(bufp);
}


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

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

LLVM IR (-O0):
%struct.re_pattern_buffer = type opaque
define i32 @IL_re_compile_fastmap(%struct.re_pattern_buffer* %0) {
%2 = alloca %struct.re_pattern_buffer*
store %struct.re_pattern_buffer* %0, %struct.re_pattern_buffer** %2
%3 = load %struct.re_pattern_buffer*, %struct.re_pattern_buffer** %2
%4 = call i32 (%struct.re_pattern_buffer*, ...) bitcast (i32 (...)* @byte_re_compile_fastmap to i32 (%struct.re_pattern_buffer*, ...)*)(%struct.re_pattern_buffer* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.re_pattern_buffer = type opaque
define i32 @IL_re_compile_fastmap(%struct.re_pattern_buffer* %0) {
%2 = tail call i32 (%struct.re_pattern_buffer*, ...) bitcast (i32 (...)* @byte_re_compile_fastmap to i32 (%struct.re_pattern_buffer*, ...)*)(%struct.re_pattern_buffer* %0)
ret i32 %2
}
void vPortFree(void *ptr) { (void)ptr; }


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

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

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

LLVM IR (-O2):
define void @vPortFree(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *cnfCreim(char *const, int);
int /*<<< orphan*/ cnfFree(char *);
int /*<<< orphan*/ hdsGtune(char *, int *, int *);
void hds_gtune_(char *const param_str, int *value, int *status,
                int param_str_length) {
  char *param_str_c;
  param_str_c = cnfCreim(param_str, param_str_length);
  hdsGtune(param_str_c, value, status);
  cnfFree(param_str_c);
}


x86 assembly (clang, -O0):
<hds_gtune_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1050 <cnfCreim@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <hdsGtune@plt>
mov    -0x28(%rbp),%rdi
call   1030 <cnfFree@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hds_gtune_>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %ecx,%esi
call   1050 <cnfCreim@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <hdsGtune@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <cnfFree@plt>

LLVM IR (-O0):
define void @hds_gtune_(i8* %0, i32* %1, i32* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i8*
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %8
%12 = call i8* @cnfCreim(i8* %10, i32 %11)
store i8* %12, i8** %9
%13 = load i8*, i8** %9
%14 = load i32*, i32** %6
%15 = load i32*, i32** %7
%16 = call i32 @hdsGtune(i8* %13, i32* %14, i32* %15)
%17 = load i8*, i8** %9
%18 = call i32 @cnfFree(i8* %17)
ret void
}

LLVM IR (-O2):
define void @hds_gtune_(i8* %0, i32* %1, i32* %2, i32 %3) {
%5 = tail call i8* @cnfCreim(i8* %0, i32 %3)
%6 = tail call i32 @hdsGtune(i8* %5, i32* %1, i32* %2)
%7 = tail call i32 @cnfFree(i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: chroot [-g group] [-G group,group,...] "
                        "[-u user] newroot [command]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [75 x i8] c"usage: chroot [-g group] [-G group,group,...] [-u user] newroot [command]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [75 x i8] c"usage: chroot [-g group] [-G group,group,...] [-u user] newroot [command]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ dirname(char *);
void path_dirname(char *path) { dirname(path); }


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

x86 assembly (clang, -O2):
<path_dirname>:
jmp    1030 <dirname@plt>

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

LLVM IR (-O2):
define void @path_dirname(i8* %0) {
%2 = tail call i32 @dirname(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  i = 100;
  while (i < 200) {
    i = i + 1;
    assert(i > 0);
  }
  assert(i == 200);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jge    1152 <main+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1126 <main+0x16>
cmpl   $0xc8,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <assert@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 100, %0 ], [ %3, %1 ]
%3 = add nuw nsw i32 %2, 1
%4 = tail call i32 @assert(i32 1)
%5 = icmp eq i32 %3, 200
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ alloc1(int volatile);
int /*<<< orphan*/ free1(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  volatile int one = 1;
  free1(alloc1(one));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x4(%rsp),%edi
call   1030 <alloc1@plt>
mov    %eax,%edi
call   1040 <free1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store volatile i32 1, i32* %6
%7 = load volatile i32, i32* %6
%8 = call i32 @alloc1(i32 %7)
%9 = call i32 @free1(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store volatile i32 1, i32* %3
%5 = load volatile i32, i32* %3
%6 = tail call i32 @alloc1(i32 %5)
%7 = tail call i32 @free1(i32 %6)
ret i32 0
}
void WriteLog(char *Msg, ...) {}


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

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

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

LLVM IR (-O2):
define void @WriteLog(i8* nocapture %0, ...) {
ret void
}
void g_string_prepend() {}


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

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

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

LLVM IR (-O2):
define void @g_string_prepend() {
ret void
}
void gtk_file_selection_hide_fileop_buttons() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_selection_hide_fileop_buttons() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int f5() { bar(12); }


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

x86 assembly (clang, -O2):
<f5>:
mov    $0xc,%edi
jmp    1030 <bar@plt>

LLVM IR (-O0):
define i32 @f5() {
%1 = alloca i32
%2 = call i32 @bar(i32 12)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f5() {
%1 = tail call i32 @bar(i32 12)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void say_bye() { printf("Bye Bye"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"Bye Bye\00"
define void @say_bye() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
void *__attribute__((no, noclone)) foo(void) {
  register void *chain __asm__("%r10");
  return chain;
}


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

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

LLVM IR (-O0):
define i8* @foo() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @foo() {
ret i8* undef
}
/* Variables and functions */
void *mandoc_calloc(size_t, size_t);
void *hash_calloc(size_t n, size_t sz, void *arg) {
  return mandoc_calloc(n, sz);
}


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

x86 assembly (clang, -O2):
<hash_calloc>:
jmp    1030 <mandoc_calloc@plt>

LLVM IR (-O0):
define i8* @hash_calloc(i64 %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = call i8* @mandoc_calloc(i64 %7, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @hash_calloc(i64 %0, i64 %1, i8* nocapture readnone %2) {
%4 = tail call i8* @mandoc_calloc(i64 %0, i64 %1)
ret i8* %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t toInt(uint8_t *t) {
  return (t[0] << 24) | (t[1] << 16) | (t[2] << 8) | t[3];
}


x86 assembly (clang, -O0):
<toInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toInt>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @toInt(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = or i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @toInt(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}
void bzero(s1, n) char *s1;
int n;
{ (void)memset(s1, 0, n); }


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
movslq %esi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @bzero(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
ret void
}

LLVM IR (-O2):
define void @bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %3, i1 false)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int send(int, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int zkp_send(char *data, int sockfd) {
  if ((int)sizeof(data) > 1024) {
    printf("Warning, size of data (%lu) is greater than %i", sizeof(data),
           1024);
    return (-1);
  }
  return send(sockfd, data, strlen(data), 0);
}


x86 assembly (clang, -O0):
<zkp_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zkp_send>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <send@plt>

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

LLVM IR (-O2):
define i32 @zkp_send(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @send(i32 %1, i8* %0, i32 %3, i32 0)
ret i32 %4
}
/* Variables and functions */
int spi_command_write(char, char *, int, char *);
int nrf_write_register(char reg, char regval, char *retstatus) {
  return spi_command_write((reg | 0x20), &regval, 1, retstatus);
}


x86 assembly (clang, -O0):
<nrf_write_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
or     $0x20,%eax
mov    -0x10(%rbp),%rcx
lea    -0x2(%rbp),%rsi
mov    $0x1,%edx
movsbl %al,%edi
call   1030 <spi_command_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_write_register>:
push   %rax
mov    %rdx,%rcx
mov    %sil,0x7(%rsp)
or     $0x20,%dil
movsbl %dil,%edi
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <spi_command_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrf_write_register(i8 signext %0, i8 signext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = or i32 %8, 32
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %6
%12 = call i32 @spi_command_write(i8 signext %10, i8* %5, i32 1, i8* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @nrf_write_register(i8 signext %0, i8 signext %1, i8* %2) {
%4 = alloca i8
store i8 %1, i8* %4
%5 = or i8 %0, 32
%6 = call i32 @spi_command_write(i8 signext %5, i8* %4, i32 1, i8* %2)
ret i32 %6
}