xunge/DecIR huggingface dataset:
int Procura(int Nums[], int qnt, int val) {
  int result = -1;
  int i;
  for (i = 0; i < qnt; i++) {
    if (Nums[i] == val) {
      result = i;
      break;
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<Procura>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <Procura+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jne    1147 <Procura+0x47>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    115a <Procura+0x5a>
jmp    114c <Procura+0x4c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <Procura+0x1c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Procura>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    111e <Procura+0x1e>
mov    %esi,%esi
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edx,(%rdi,%rcx,4)
je     111f <Procura+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <Procura+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Procura(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
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 i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %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 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G19_f(char *s) {
  debug("G19_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G19_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G19_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G19_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G19_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G19_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G19_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
void lcm_suspend_power(void) {}


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

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

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

LLVM IR (-O2):
define void @lcm_suspend_power() {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
void flush() {
  int c;
  do
    c = getchar();
  while (c != '\n' && c != EOF);
}


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1143 <flush+0x33>
mov    -0x4(%rbp),%eax
mov    0x2ead(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1118 <flush+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     1130 <flush+0x20>
cmp    (%rbx),%eax
jne    1120 <flush+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @flush() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* %1
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ false, %4 ], [ %10, %7 ]
br i1 %12, label %2, label %13
13: ; preds = %11
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @flush() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = icmp ne i32 %2, 10
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
int C_Fixed_Num_Readings(void) { return 361; }


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

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

LLVM IR (-O0):
define i32 @C_Fixed_Num_Readings() {
ret i32 361
}

LLVM IR (-O2):
define i32 @C_Fixed_Num_Readings() {
ret i32 361
}
/* Variables and functions */
int XConvertUtf8ToUcs(unsigned char const *, int, unsigned int *);
int XUtf8CharByteLen(const unsigned char *buf, int len) {
  unsigned int ucs;
  return XConvertUtf8ToUcs(buf, len, &ucs);
}


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

x86 assembly (clang, -O2):
<XUtf8CharByteLen>:
push   %rax
lea    0x4(%rsp),%rdx
call   1030 <XConvertUtf8ToUcs@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @XUtf8CharByteLen(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @XConvertUtf8ToUcs(i8* %0, i32 %1, i32* %3)
ret i32 %5
}
/* Variables and functions */
double ighmm_rand_normal_density_trunc(double, double, double, double);
double ighmm_gtail_pmue_umin(double mue, double A, double B, double eps) {
  double feps, u;
  u = 1E-4;
  feps = ighmm_rand_normal_density_trunc(-eps, mue, u, -eps);
  return (A - mue - u * feps);
}


x86 assembly (clang, -O0):
<ighmm_gtail_pmue_umin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
call   1030 <ighmm_rand_normal_density_trunc@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ighmm_gtail_pmue_umin>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movaps %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
xorpd  0xed5(%rip),%xmm3
movsd  0xedd(%rip),%xmm2
movapd %xmm3,%xmm0
call   1030 <ighmm_rand_normal_density_trunc@plt>
movsd  0x10(%rsp),%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  0xec8(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ighmm_gtail_pmue_umin(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
store double 1.000000e-04, double* %10
%11 = load double, double* %8
%12 = fneg double %11
%13 = load double, double* %5
%14 = load double, double* %10
%15 = load double, double* %8
%16 = fneg double %15
%17 = call double @ighmm_rand_normal_density_trunc(double %12, double %13, double %14, double %16)
store double %17, double* %9
%18 = load double, double* %6
%19 = load double, double* %5
%20 = fsub double %18, %19
%21 = load double, double* %10
%22 = load double, double* %9
%23 = fneg double %21
%24 = call double @llvm.fmuladd.f64(double %23, double %22, double %20)
ret double %24
}

LLVM IR (-O2):
define double @ighmm_gtail_pmue_umin(double %0, double %1, double %2, double %3) {
%5 = fneg double %3
%6 = tail call double @ighmm_rand_normal_density_trunc(double %5, double %0, double 1.000000e-04, double %5)
%7 = fsub double %1, %0
%8 = tail call double @llvm.fmuladd.f64(double %6, double -1.000000e-04, double %7)
ret double %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void crash_fputs() {
  FILE *f;
  f = fopen("this_file_doesnt_exist", "r");
  fputs("blablabla", f);
  fclose(f);
}


x86 assembly (clang, -O0):
<crash_fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crash_fputs>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"blablabla\00"
define void @crash_fputs() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i64 9, i64 1, i32* %1)
%3 = tail call i32 @fclose(i32* %1)
ret void
}
/* Variables and functions */
int cclock_r8_();
int cclock_r4_() { return cclock_r8_(); }


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

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

LLVM IR (-O0):
define i32 @cclock_r4_() {
%1 = call i32 (...) @cclock_r8_()
ret i32 %1
}

LLVM IR (-O2):
define i32 @cclock_r4_() {
%1 = tail call i32 (...) @cclock_r8_()
ret i32 %1
}
gnargs(d) int d;
{
  output_with_tab("mvi \ta,");
  output_number(d);
  newline();
}


x86 assembly (clang, -O0):
<gnargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <output_with_tab@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1050 <output_number@plt>
mov    $0x0,%al
call   1030 <newline@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnargs>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <output_with_tab@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <output_number@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"mvi \09a,\00"
define i32 @gnargs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @output_with_tab to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @output_number to i32 (i32, ...)*)(i32 %5)
%7 = call i32 (...) @newline()
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [8 x i8] c"mvi \09a,\00"
define i32 @gnargs(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @output_with_tab to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @output_number to i32 (i32, ...)*)(i32 %0)
%4 = tail call i32 (...) @newline()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char **argv) {
  int c = 84;
  printf("Filled %d dozens (%d per dozen).\n", c / 13, 13);
  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   $0x54,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xd,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xebf(%rip),%rdi
mov    $0xd,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"Filled %d dozens (%d per dozen).\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
store i32 84, i32* %6
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 13
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %8, i32 13)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"Filled %d dozens (%d per dozen).\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 6, i32 13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_tagstruct_getu64() {
  printf("NOT IMPLEMENTED:"
         "pa_tagstruct_getu64"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"NOT IMPLEMENTED:pa_tagstruct_getu64\0A\00"
define i32 @pa_tagstruct_getu64() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_tagstruct_getu64\00"
define i32 @pa_tagstruct_getu64() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct fcoe_fcf_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct fcoe_fcf_device *);
void free_fcoe_fcf_device(void *ep, __attribute__((__unused__)) void *arg) {
  struct fcoe_fcf_device *fcf = (struct fcoe_fcf_device *)ep;
  free(fcf);
}


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

x86 assembly (clang, -O2):
<free_fcoe_fcf_device>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.fcoe_fcf_device = type { i32 }
define void @free_fcoe_fcf_device(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.fcoe_fcf_device*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.fcoe_fcf_device*
store %struct.fcoe_fcf_device* %7, %struct.fcoe_fcf_device** %5
%8 = load %struct.fcoe_fcf_device*, %struct.fcoe_fcf_device** %5
%9 = call i32 @free(%struct.fcoe_fcf_device* %8)
ret void
}

LLVM IR (-O2):
%struct.fcoe_fcf_device = type { i32 }
define void @free_fcoe_fcf_device(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to %struct.fcoe_fcf_device*
%4 = tail call i32 @free(%struct.fcoe_fcf_device* %3)
ret void
}
void rop3_47_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = S | stk3;
  stk1 = T & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_47_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_47_1_1>:
mov    (%rdi),%al
mov    %edx,%ecx
or     %sil,%cl
not    %cl
and    %al,%sil
or     %cl,%sil
and    %dl,%al
or     %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_47_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %9
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = xor i32 %28, -1
%30 = trunc i32 %29 to i8
store i8 %30, i8* %7
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %5
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8, i8* %6
%38 = zext i8 %37 to i32
%39 = xor i32 %38, -1
%40 = and i32 %36, %39
%41 = load i8*, i8** %4
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = load i8, i8* %5
%45 = zext i8 %44 to i32
%46 = and i32 %43, %45
%47 = or i32 %40, %46
%48 = load i8*, i8** %4
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = load i8, i8* %6
%52 = zext i8 %51 to i32
%53 = and i32 %50, %52
%54 = or i32 %47, %53
%55 = trunc i32 %54 to i8
%56 = load i8*, i8** %4
store i8 %55, i8* %56
ret void
}

LLVM IR (-O2):
define void @rop3_47_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = xor i8 %5, -1
%7 = and i8 %4, %1
%8 = or i8 %7, %6
%9 = and i8 %4, %2
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stacktrace_pop();
void stacktrace_vpop() { stacktrace_pop(); }


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

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

LLVM IR (-O0):
define void @stacktrace_vpop() {
%1 = call i32 (...) @stacktrace_pop()
ret void
}

LLVM IR (-O2):
define void @stacktrace_vpop() {
%1 = tail call i32 (...) @stacktrace_pop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *strdup(char *);
int main(int argc, char **argv) {
  char buf[] = "abc";
  char *p = strdup(buf);
  if (*p)
    exit(0);
  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    0xec4(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <main+0x40>
xor    %edi,%edi
call   1030 <exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x636261,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <strdup@plt>
cmpb   $0x0,(%rax)
jne    113c <main+0x1c>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@__const.main.buf = [4 x i8] c"abc\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i8]
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x i8]* %6 to i8*
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %2
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 i32 6513249, i32* %3
%5 = call i8* @strdup(i8* %4)
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %2
ret i32 0
}
/* Variables and functions */
int testfunc_compat2(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @testfunc_compat2() {
ret i32 2
}

LLVM IR (-O2):
define i32 @testfunc_compat2() {
ret i32 2
}
void CRYPTO_set_ex_data_implementation(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_set_ex_data_implementation() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setlinebuf(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void BUFFERLINES() {
  setlinebuf(stdout);
  return;
}


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

x86 assembly (clang, -O2):
<BUFFERLINES>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <setlinebuf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @BUFFERLINES() {
%1 = load i32, i32* @stdout
%2 = call i32 @setlinebuf(i32 %1)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @BUFFERLINES() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setlinebuf(i32 %1)
ret void
}
/* Variables and functions */
int pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
void print1ToMaxOfNDigits(int n) {
  int maxNumber = pow(10, n - 1);
  for (int i = 1; i < maxNumber; ++i) {
    printf("%d ", i);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print1ToMaxOfNDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
sub    $0x1,%esi
mov    $0xa,%edi
call   1040 <pow@plt>
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1170 <print1ToMaxOfNDigits+0x50>
mov    -0xc(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <print1ToMaxOfNDigits+0x25>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print1ToMaxOfNDigits>:
push   %rbp
push   %r14
push   %rbx
lea    -0x1(%rdi),%esi
mov    $0xa,%edi
call   1050 <pow@plt>
cmp    $0x2,%eax
jl     1173 <print1ToMaxOfNDigits+0x43>
mov    %eax,%ebx
mov    $0x1,%ebp
lea    0xeac(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1160 <print1ToMaxOfNDigits+0x30>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print1ToMaxOfNDigits(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 @pow(i32 10, i32 %2)
%4 = icmp sgt i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %7, %1
%6 = tail call i32 @putchar(i32 10)
ret void
7: ; preds = %1, %7
%8 = phi i32 [ %10, %7 ], [ 1, %1 ]
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %3
br i1 %11, label %5, label %7
}
void problem_finish() {}


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

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

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

LLVM IR (-O2):
define void @problem_finish() {
ret void
}
void set_sys_keys(int set) {}


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

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

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

LLVM IR (-O2):
define void @set_sys_keys(i32 %0) {
ret void
}
char *procprt_SORTITEM_ae(struct tstat *curstat, int avgval, int nsecs) {
  return "";
}


x86 assembly (clang, -O0):
<procprt_SORTITEM_ae>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeeb(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<procprt_SORTITEM_ae>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [1 x i8] zeroinitializer
define i8* @procprt_SORTITEM_ae(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [1 x i8] zeroinitializer
define i8* @procprt_SORTITEM_ae(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
void FlashEraseNonBlocking(unsigned long ulAddress) {
  ;
  (*((volatile unsigned long *)(0x400FD000 + 0x00000014))) =
      (0x00000001 | 0x00000200 | 0x00000800);
  (*((volatile unsigned long *)(0x400FD000 + 0x00000000))) = ulAddress;
  (*((volatile unsigned long *)(0x400FD000 + 0x00000008))) =
      0xA4420000 | 0x00000002;
}


x86 assembly (clang, -O0):
<FlashEraseNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400fd014,%eax
movq   $0xa01,(%rax)
mov    -0x8(%rbp),%rcx
mov    $0x400fd000,%eax
mov    %rcx,(%rax)
mov    $0x400fd008,%eax
mov    $0xa4420002,%ecx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashEraseNonBlocking>:
movq   $0xa01,0x400fd014
mov    %rdi,0x400fd000
40
mov    $0xa4420002,%eax
mov    %rax,0x400fd008
40
ret

LLVM IR (-O0):
define void @FlashEraseNonBlocking(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
store volatile i64 2561, i64* inttoptr (i64 1074778132 to i64*)
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074778112 to i64*)
store volatile i64 2755788802, i64* inttoptr (i64 1074778120 to i64*)
ret void
}

LLVM IR (-O2):
define void @FlashEraseNonBlocking(i64 %0) {
store volatile i64 2561, i64* inttoptr (i64 1074778132 to i64*)
store volatile i64 %0, i64* inttoptr (i64 1074778112 to i64*)
store volatile i64 2755788802, i64* inttoptr (i64 1074778120 to i64*)
ret void
}
/* Variables and functions */
scalar_t__ OCTEON_IS_OCTEON1PLUS();
int /*<<< orphan*/ cvmx_fuse_read(int);
int octeon_has_feature_OCTEON_FEATURE_HFA(void) {
  if (OCTEON_IS_OCTEON1PLUS())
    return 0;
  else
    return !cvmx_fuse_read(90);
}


x86 assembly (clang, -O0):
<octeon_has_feature_OCTEON_FEATURE_HFA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <OCTEON_IS_OCTEON1PLUS@plt>
cmp    $0x0,%rax
je     1145 <octeon_has_feature_OCTEON_FEATURE_HFA+0x25>
movl   $0x0,-0x4(%rbp)
jmp    115f <octeon_has_feature_OCTEON_FEATURE_HFA+0x3f>
mov    $0x5a,%edi
call   1040 <cvmx_fuse_read@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<octeon_has_feature_OCTEON_FEATURE_HFA>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <OCTEON_IS_OCTEON1PLUS@plt>
test   %rax,%rax
jne    1140 <octeon_has_feature_OCTEON_FEATURE_HFA+0x20>
mov    $0x5a,%edi
call   1040 <cvmx_fuse_read@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @octeon_has_feature_OCTEON_FEATURE_HFA() {
%1 = alloca i32
%2 = call i64 (...) @OCTEON_IS_OCTEON1PLUS()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 0, i32* %1
br label %10
5: ; preds = %0
%6 = call i32 @cvmx_fuse_read(i32 90)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
store i32 %9, i32* %1
br label %10
10: ; preds = %5, %4
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @octeon_has_feature_OCTEON_FEATURE_HFA() {
%1 = tail call i64 (...) @OCTEON_IS_OCTEON1PLUS()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @cvmx_fuse_read(i32 90)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ %6, %3 ], [ 0, %0 ]
ret i32 %8
}
/* Variables and functions */
void *cfw_ref(void *);
void *copy(void *ptr) { return cfw_ref(ptr); }


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

x86 assembly (clang, -O2):
<copy>:
jmp    1030 <cfw_ref@plt>

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

LLVM IR (-O2):
define i8* @copy(i8* %0) {
%2 = tail call i8* @cfw_ref(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ StubBug(char *);
void endgrent() {
  StubBug("STUB:"
          "endgrent");
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"STUB:endgrent\00"
define void @endgrent() {
%1 = tail call i32 @StubBug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printLineDelim() {
  printf("%s\n", "-------------------------------------------------------------"
                 "--------------------");
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [82 x i8] c"---------------------------------------------------------------------------------\00"
define void @printLineDelim() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int __attribute__((weak)) _read(int file, char *ptr, int len) { return 0; }


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

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

LLVM IR (-O0):
define weak i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define weak i32 @_read(i32 %0, i8* %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int f(int *);
int main() {
  int a = 0;
  return f(&a);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @f(i32* %1)
ret i32 %3
}
void reverse_line(char line[], int maxline) {
  int i;
  char temp_line[maxline];
  for (i = 0; i < maxline; i++) {
    temp_line[i] = line[maxline - 1 - i];
  }
  line = temp_line;
  return;
}


x86 assembly (clang, -O0):
<reverse_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1174 <reverse_line+0x74>
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
sub    -0x10(%rbp),%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,1),%dl
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113c <reverse_line+0x3c>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @reverse_line(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_write_next_solution_to_defined_output_file(int *k, int n, int m,
                                                      double *sol) {
  int b[2], fail;
  b[0] = n;
  b[1] = m;
  fail = _ada_use_c2phc4c(141, k, b, sol, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_write_next_solution_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x8d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_write_next_solution_to_defined_output_file>:
push   %rax
mov    %rdi,%rax
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %rsp,%rdx
mov    $0x8d,%edi
mov    %rax,%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_write_next_solution_to_defined_output_file(i32* %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [2 x i32]
%10 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double* %3, double** %8
%11 = load i32, i32* %6
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32, i32* %7
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %13, i32* %14
%15 = load i32*, i32** %5
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%17 = load double*, double** %8
%18 = call i32 @_ada_use_c2phc4c(i32 141, i32* %15, i32* %16, double* %17, i32 0)
store i32 %18, i32* %10
%19 = load i32, i32* %10
ret i32 %19
}

LLVM IR (-O2):
define i32 @solcon_write_next_solution_to_defined_output_file(i32* %0, i32 %1, i32 %2, double* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 141, i32* %0, i32* %7, double* %3, i32 0)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ send_packet(unsigned char *, int);
void send_command(unsigned char uc) { send_packet(&uc, 1); }


x86 assembly (clang, -O0):
<send_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <send_packet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_command>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <send_packet@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @send_command(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @send_packet(i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @send_command(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @send_packet(i8* %2, i32 1)
ret void
}
int canPCCover(int locctr, int target) {
  return -2048 <= (target - locctr - 3) && (target - locctr - 3) < 2048;
}


x86 assembly (clang, -O0):
<canPCCover>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
sub    -0x4(%rbp),%edx
sub    $0x3,%edx
xor    %eax,%eax
mov    $0xfffff800,%ecx
cmp    %edx,%ecx
mov    %al,-0x9(%rbp)
jg     1139 <canPCCover+0x39>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
sub    $0x3,%eax
cmp    $0x800,%eax
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<canPCCover>:
sub    %edi,%esi
add    $0x7fd,%esi
xor    %eax,%eax
cmp    $0x1000,%esi
setb   %al
ret

LLVM IR (-O0):
define i32 @canPCCover(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
%8 = sub nsw i32 %7, 3
%9 = icmp sle i32 -2048, %8
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = sub nsw i32 %13, 3
%15 = icmp slt i32 %14, 2048
br label %16
16: ; preds = %10, %2
%17 = phi i1 [ false, %2 ], [ %15, %10 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @canPCCover(i32 %0, i32 %1) {
%3 = sub i32 2045, %0
%4 = add i32 %3, %1
%5 = icmp ult i32 %4, 4096
%6 = zext i1 %5 to i32
ret i32 %6
}
long double bar(long double x) { return x; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
fldt   0x8(%rsp)
ret

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

LLVM IR (-O2):
define x86_fp80 @bar(x86_fp80 returned %0) {
ret x86_fp80 %0
}
void gtk_scrolled_window_set_policy() {}


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

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

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

LLVM IR (-O2):
define void @gtk_scrolled_window_set_policy() {
ret void
}
void emit_float32(struct processor_explicatory_state *process_state,
                  struct modern_stream *stream, void *stream_state,
                  struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_float32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_float32(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_float32(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ print_byte_field(int /*<<< orphan*/ const *, size_t);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
void default_print_security_descriptor(const uint8_t *sd, size_t size) {
  printf("Security Descriptor = ");
  print_byte_field(sd, size);
  putchar('\n');
}


x86 assembly (clang, -O0):
<default_print_security_descriptor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <print_byte_field@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_print_security_descriptor>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <print_byte_field@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Security Descriptor = \00"
define void @default_print_security_descriptor(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = load i32*, i32** %3
%7 = load i64, i64* %4
%8 = call i32 @print_byte_field(i32* %6, i64 %7)
%9 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Security Descriptor = \00"
define void @default_print_security_descriptor(i32* %0, i64 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @print_byte_field(i32* %0, i64 %1)
%5 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
unsigned long vx86_NBSB_Read(int, unsigned char);
unsigned long nb1_Read(unsigned char offset) {
  return vx86_NBSB_Read(1, offset);
}


x86 assembly (clang, -O0):
<nb1_Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edi
movzbl -0x1(%rbp),%esi
call   1030 <vx86_NBSB_Read@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @nb1_Read(i8 zeroext %0) {
%2 = tail call i64 @vx86_NBSB_Read(i32 1, i8 zeroext %0)
ret i64 %2
}