xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void init() {
  freopen("age.in", "r", stdin);
  freopen("age.out", "w+", stdout);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edx
lea    0xedc(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1030 <freopen@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
lea    0xec9(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1030 <freopen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
lea    0xedf(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <freopen@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    0xecc(%rip),%rdi
lea    0xecd(%rip),%rsi
pop    %rax
jmp    1030 <freopen@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"age.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [8 x i8] c"age.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
define void @init() {
%1 = load i32, i32* @stdin
%2 = call i32 @freopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"age.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [8 x i8] c"age.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
define void @init() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @freopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int getStringFromFile_n(char *, char *, char *, int);
int strtol(char *, int /*<<< orphan*/ *, int);
int getIntFromFile(char *file, char *name) {
  int val = 0;
  char value_string[200];
  if (getStringFromFile_n(file, name, value_string, 200) == -1 ||
      value_string == NULL)
    return -1;
  val = strtol(value_string, NULL, 10);
  return val;
}


x86 assembly (clang, -O0):
<getIntFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0xf0(%rbp),%rdx
mov    $0xc8,%ecx
call   1030 <getStringFromFile_n@plt>
cmp    $0xffffffff,%eax
jne    1168 <getIntFromFile+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    1186 <getIntFromFile+0x66>
lea    -0xf0(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getIntFromFile>:
sub    $0xc8,%rsp
mov    %rsp,%rdx
mov    $0xc8,%ecx
call   1030 <getStringFromFile_n@plt>
cmp    $0xffffffff,%eax
je     1150 <getIntFromFile+0x30>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
add    $0xc8,%rsp
ret
mov    $0xffffffff,%eax
add    $0xc8,%rsp
ret

LLVM IR (-O0):
define i32 @getIntFromFile(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [200 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @getStringFromFile_n(i8* %8, i8* %9, i8* %10, i32 200)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %18
14: ; preds = %2
%15 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%16 = call i32 @strtol(i8* %15, i32* null, i32 10)
store i32 %16, i32* %6
%17 = load i32, i32* %6
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %13
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @getIntFromFile(i8* %0, i8* %1) {
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = call i32 @getStringFromFile_n(i8* %0, i8* %1, i8* %4, i32 200)
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @strtol(i8* nocapture %4, i32* null, i32 10)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ -1, %2 ]
ret i32 %10
}
char *extGetIpAdd(void) { return (0); }


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

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

LLVM IR (-O0):
define i8* @extGetIpAdd() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @extGetIpAdd() {
ret i8* null
}
int getpagesize() { return (4096); }


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

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

LLVM IR (-O0):
define i32 @getpagesize() {
ret i32 4096
}

LLVM IR (-O2):
define i32 @getpagesize() {
ret i32 4096
}
/* Variables and functions */
int /*<<< orphan*/ strerror(int);
int /*<<< orphan*/ strncpy(char *, int /*<<< orphan*/, size_t);
char *ne_strerror(int errnum, char *buf, size_t buflen) {
  do {
    strncpy(buf, strerror(errnum), buflen - 1);
    buf[buflen - 1] = '\0';
  } while (0);
  return buf;
}


x86 assembly (clang, -O0):
<ne_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <strerror@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_strerror>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1040 <strerror@plt>
lea    -0x1(%r14),%rdx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%rbx,%r14,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ne_strerror(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
br label %7
7: ; preds = %3
%8 = load i8*, i8** %5
%9 = load i32, i32* %4
%10 = call i32 @strerror(i32 %9)
%11 = load i64, i64* %6
%12 = sub i64 %11, 1
%13 = call i32 @strncpy(i8* %8, i32 %10, i64 %12)
%14 = load i8*, i8** %5
%15 = load i64, i64* %6
%16 = sub i64 %15, 1
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
br label %18
18: ; preds = %7
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @ne_strerror(i32 %0, i8* returned %1, i64 %2) {
%4 = tail call i32 @strerror(i32 %0)
%5 = add i64 %2, -1
%6 = tail call i32 @strncpy(i8* %1, i32 %4, i64 %5)
%7 = getelementptr inbounds i8, i8* %1, i64 %5
store i8 0, i8* %7
ret i8* %1
}
void intToBytes(int n, char *bytes) {
  bytes[0] = (n >> 24) & 0xFF;
  bytes[1] = (n >> 16) & 0xFF;
  bytes[2] = (n >> 8) & 0xFF;
  bytes[3] = n & 0xFF;
}


x86 assembly (clang, -O0):
<intToBytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<intToBytes>:
bswap  %edi
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @intToBytes(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %3
%12 = ashr i32 %11, 16
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i32, i32* %3
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
%23 = load i32, i32* %3
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @intToBytes(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %1
%5 = lshr i32 %0, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %0, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %0 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
double M1y_z(double, double, double, double);
double M1z_y(double sign, double xi, double et, double qq) {
  return M1y_z(sign, xi, et, qq);
}


x86 assembly (clang, -O0):
<M1z_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <M1y_z@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M1z_y>:
jmp    1030 <M1y_z@plt>

LLVM IR (-O0):
define double @M1z_y(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call double @M1y_z(double %9, double %10, double %11, double %12)
ret double %13
}

LLVM IR (-O2):
define double @M1z_y(double %0, double %1, double %2, double %3) {
%5 = tail call double @M1y_z(double %0, double %1, double %2, double %3)
ret double %5
}
/* Variables and functions */
double log(double);
double ra_funcbare(double Zt, double Zref, double d0m, double z0m, double Psih,
                   double Psir, double ustar, double K) {
  double rabr;
  rabr = (log(((Zt - d0m) / (Zref - d0m)) - Psih + Psir)) / (ustar * K);
  return (rabr);
}


x86 assembly (clang, -O0):
<ra_funcbare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
subsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
call   1030 <log@plt>
movsd  -0x38(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ra_funcbare>:
sub    $0x18,%rsp
movsd  %xmm7,0x10(%rsp)
movsd  %xmm6,0x8(%rsp)
subsd  %xmm2,%xmm0
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
subsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
call   1030 <log@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @ra_funcbare(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fsub double %0, %2
%10 = fsub double %1, %2
%11 = fdiv double %9, %10
%12 = fsub double %11, %4
%13 = fadd double %12, %5
%14 = tail call double @log(double %13)
%15 = fmul double %6, %7
%16 = fdiv double %14, %15
ret double %16
}
/* Variables and functions */
size_t upper_pow2(size_t v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v++;
  return v;
}


x86 assembly (clang, -O0):
<upper_pow2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x4,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper_pow2>:
lea    -0x1(%rdi),%rax
mov    %rax,%rcx
shr    %rcx
or     %rax,%rcx
mov    %rcx,%rax
shr    $0x2,%rax
or     %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
or     %rax,%rcx
mov    %rcx,%rdx
shr    $0x8,%rdx
or     %rcx,%rdx
mov    %rdx,%rax
shr    $0x10,%rax
or     %rdx,%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @upper_pow2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, -1
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = lshr i64 %5, 1
%7 = load i64, i64* %2
%8 = or i64 %7, %6
store i64 %8, i64* %2
%9 = load i64, i64* %2
%10 = lshr i64 %9, 2
%11 = load i64, i64* %2
%12 = or i64 %11, %10
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = lshr i64 %13, 4
%15 = load i64, i64* %2
%16 = or i64 %15, %14
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = lshr i64 %17, 8
%19 = load i64, i64* %2
%20 = or i64 %19, %18
store i64 %20, i64* %2
%21 = load i64, i64* %2
%22 = lshr i64 %21, 16
%23 = load i64, i64* %2
%24 = or i64 %23, %22
store i64 %24, i64* %2
%25 = load i64, i64* %2
%26 = add i64 %25, 1
store i64 %26, i64* %2
%27 = load i64, i64* %2
ret i64 %27
}

LLVM IR (-O2):
define i64 @upper_pow2(i64 %0) {
%2 = add i64 %0, -1
%3 = lshr i64 %2, 1
%4 = or i64 %3, %2
%5 = lshr i64 %4, 2
%6 = or i64 %5, %4
%7 = lshr i64 %6, 4
%8 = or i64 %7, %6
%9 = lshr i64 %8, 8
%10 = or i64 %9, %8
%11 = lshr i64 %10, 16
%12 = or i64 %11, %10
%13 = add i64 %12, 1
ret i64 %13
}
void MD5_Final(void) {}


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

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

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

LLVM IR (-O2):
define void @MD5_Final() {
ret void
}
/* Type definitions */
struct board {
  int dummy;
};

/* Variables and functions */
char board_merge_right(struct board *);
char board_shift_right(struct board *);
int board_move_right(struct board *board) {
  char a = board_merge_right(board);
  return a | board_shift_right(board);
}


x86 assembly (clang, -O0):
<board_move_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <board_merge_right@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <board_shift_right@plt>
mov    %al,%cl
mov    -0x10(%rbp),%eax
movsbl %cl,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_move_right>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <board_merge_right@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <board_shift_right@plt>
or     %bpl,%al
movsbl %al,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.board = type { i32 }
define i32 @board_move_right(%struct.board* %0) {
%2 = alloca %struct.board*
%3 = alloca i8
store %struct.board* %0, %struct.board** %2
%4 = load %struct.board*, %struct.board** %2
%5 = call signext i8 @board_merge_right(%struct.board* %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = load %struct.board*, %struct.board** %2
%9 = call signext i8 @board_shift_right(%struct.board* %8)
%10 = sext i8 %9 to i32
%11 = or i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.board = type { i32 }
define i32 @board_move_right(%struct.board* %0) {
%2 = tail call signext i8 @board_merge_right(%struct.board* %0)
%3 = tail call signext i8 @board_shift_right(%struct.board* %0)
%4 = or i8 %3, %2
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Type definitions */
struct clk {
  int dummy;
};

/* Variables and functions */
struct clk *clk_fixed_factor(char const *, char const *, unsigned int,
                             unsigned int);
struct clk *imx_clk_fixed_factor(const char *name, const char *parent,
                                 unsigned int mult, unsigned int div) {
  return clk_fixed_factor(name, parent, mult, div);
}


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

x86 assembly (clang, -O2):
<imx_clk_fixed_factor>:
jmp    1030 <clk_fixed_factor@plt>

LLVM IR (-O0):
%struct.clk = type { i32 }
define %struct.clk* @imx_clk_fixed_factor(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call %struct.clk* @clk_fixed_factor(i8* %9, i8* %10, i32 %11, i32 %12)
ret %struct.clk* %13
}

LLVM IR (-O2):
%struct.clk = type { i32 }
define %struct.clk* @imx_clk_fixed_factor(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call %struct.clk* @clk_fixed_factor(i8* %0, i8* %1, i32 %2, i32 %3)
ret %struct.clk* %5
}
__attribute__((__no__)) void
do_nothing_big_hole_assigned_dynamic_all(struct test_big_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_big_hole_assigned_dynamic_all>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_big_hole_assigned_dynamic_all+0x1b>
jmp    1120 <do_nothing_big_hole_assigned_dynamic_all+0x20>
jmp    1120 <do_nothing_big_hole_assigned_dynamic_all+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_big_hole = type opaque
define void @do_nothing_big_hole_assigned_dynamic_all(%struct.test_big_hole* %0) {
%2 = alloca %struct.test_big_hole*
store %struct.test_big_hole* %0, %struct.test_big_hole** %2
%3 = load %struct.test_big_hole*, %struct.test_big_hole** %2
%4 = ptrtoint %struct.test_big_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_big_hole = type opaque
define void @do_nothing_big_hole_assigned_dynamic_all(%struct.test_big_hole* nocapture %0) {
ret void
}
/* Variables and functions */
int toascii(char);
int getsn2(char *str) {
  int i;
  int sum;
  sum = 0;
  for (i = 6; i < 11; i++) {
    sum = sum + toascii(str[i]);
  }
  return sum;
}


x86 assembly (clang, -O0):
<getsn2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x6,-0xc(%rbp)
cmpl   $0xb,-0xc(%rbp)
jge    1163 <getsn2+0x53>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toascii@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <getsn2+0x1a>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsn2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
movsbl 0x6(%rdi),%edi
call   1030 <toascii@plt>
mov    %eax,%r14d
movsbl 0x7(%r15),%edi
call   1030 <toascii@plt>
mov    %eax,%ebp
add    %r14d,%ebp
movsbl 0x8(%r15),%edi
call   1030 <toascii@plt>
mov    %eax,%ebx
add    %ebp,%ebx
movsbl 0x9(%r15),%edi
call   1030 <toascii@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsbl 0xa(%r15),%edi
call   1030 <toascii@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @getsn2(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 6
%3 = load i8, i8* %2
%4 = tail call i32 @toascii(i8 signext %3)
%5 = getelementptr inbounds i8, i8* %0, i64 7
%6 = load i8, i8* %5
%7 = tail call i32 @toascii(i8 signext %6)
%8 = add nsw i32 %7, %4
%9 = getelementptr inbounds i8, i8* %0, i64 8
%10 = load i8, i8* %9
%11 = tail call i32 @toascii(i8 signext %10)
%12 = add nsw i32 %11, %8
%13 = getelementptr inbounds i8, i8* %0, i64 9
%14 = load i8, i8* %13
%15 = tail call i32 @toascii(i8 signext %14)
%16 = add nsw i32 %15, %12
%17 = getelementptr inbounds i8, i8* %0, i64 10
%18 = load i8, i8* %17
%19 = tail call i32 @toascii(i8 signext %18)
%20 = add nsw i32 %19, %16
ret i32 %20
}
void gf8mul_00000011(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm3\n"
                       "\tpxor    %xmm7, %xmm1\n"
                       "\tpxor    %xmm7, %xmm0\n"
                       "\tpxor    %xmm6, %xmm7\n"
                       "\tpxor    %xmm5, %xmm6\n"
                       "\tpxor    %xmm4, %xmm5\n"
                       "\tpxor    %xmm3, %xmm4\n"
                       "\tpxor    %xmm2, %xmm3\n"
                       "\tpxor    %xmm1, %xmm2\n"
                       "\tpxor    %xmm0, %xmm1\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm3
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm5,%xmm6
pxor   %xmm4,%xmm5
pxor   %xmm3,%xmm4
pxor   %xmm2,%xmm3
pxor   %xmm1,%xmm2
pxor   %xmm0,%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm3
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm5,%xmm6
pxor   %xmm4,%xmm5
pxor   %xmm3,%xmm4
pxor   %xmm2,%xmm3
pxor   %xmm1,%xmm2
pxor   %xmm0,%xmm1
ret

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

LLVM IR (-O2):
define void @gf8mul_00000011() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm3\0A\09pxor %xmm7, %xmm1\0A\09pxor %xmm7, %xmm0\0A\09pxor %xmm6, %xmm7\0A\09pxor %xmm5, %xmm6\0A\09pxor %xmm4, %xmm5\0A\09pxor %xmm3, %xmm4\0A\09pxor %xmm2, %xmm3\0A\09pxor %xmm1, %xmm2\0A\09pxor %xmm0, %xmm1\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int main() { auto char *multi = "a multi"; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"a multi\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *foo(int);
int main() {
  char volatile *f = foo(5);
  f[0] = 'b';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1030 <foo@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x62,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <foo@plt>
movb   $0x62,(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @foo(i32 5)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
store volatile i8 98, i8* %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8* @foo(i32 5)
store volatile i8 98, i8* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msim_printWestWallEmpty() { printf(" "); }


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

x86 assembly (clang, -O2):
<msim_printWestWallEmpty>:
mov    $0x20,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @msim_printWestWallEmpty() {
%1 = tail call i32 @putchar(i32 32)
ret void
}
signed long long signedlonglong_ignoring_signedlonglong(signed long long x,
                                                        signed long long y) {
  return x;
}


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

x86 assembly (clang, -O2):
<signedlonglong_ignoring_signedlonglong>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlonglong_ignoring_signedlonglong(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlonglong_ignoring_signedlonglong(i64 returned %0, i64 %1) {
ret i64 %0
}
unsigned int uns_min(unsigned int a, unsigned int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<uns_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1121 <uns_min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <uns_min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @uns_min(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int op_ldaa(void) { return (4); }


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

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

LLVM IR (-O0):
define i32 @op_ldaa() {
ret i32 4
}

LLVM IR (-O2):
define i32 @op_ldaa() {
ret i32 4
}
void ff_hevc_put_hevc_uni_w_qpel_hv64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_hv64_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
const char *end_of_word(const char *start_of_word) {
  const char *posn = start_of_word;
  while (*posn && !isspace(*posn))
    posn++;
  return posn;
}


x86 assembly (clang, -O0):
<end_of_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1150 <end_of_word+0x40>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1160 <end_of_word+0x50>
jmp    1171 <end_of_word+0x61>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <end_of_word+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_of_word>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <end_of_word+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <end_of_word+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <end_of_word+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @end_of_word(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %18, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = call i32 @isspace(i8 signext %12)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
br label %16
16: ; preds = %10, %5
%17 = phi i1 [ false, %5 ], [ %15, %10 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %5
21: ; preds = %16
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @end_of_word(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
double const inverf(double);
double const sqrt(double);
double qnorm(const double p, const double mu, const double sigma) {
  return mu + sigma * sqrt(2.0) * inverf(2.0 * p - 1.0);
}


x86 assembly (clang, -O0):
<qnorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xeb5(%rip),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe86(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <inverf@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qnorm>:
sub    $0x18,%rsp
mulsd  0xee4(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
addsd  %xmm0,%xmm0
addsd  0xed4(%rip),%xmm0
call   1030 <inverf@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @qnorm(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %6
%9 = call double @sqrt(double 2.000000e+00)
%10 = fmul double %8, %9
%11 = load double, double* %4
%12 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %11, double -1.000000e+00)
%13 = call double @inverf(double %12)
%14 = call double @llvm.fmuladd.f64(double %10, double %13, double %7)
ret double %14
}

LLVM IR (-O2):
define double @qnorm(double %0, double %1, double %2) {
%4 = fmul double %2, 0x3FF6A09E667F3BCD
%5 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double -1.000000e+00)
%6 = tail call double @inverf(double %5)
%7 = tail call double @llvm.fmuladd.f64(double %4, double %6, double %1)
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ CONF;

/* Variables and functions */
int /*<<< orphan*/ _CONF_free_data(int /*<<< orphan*/ *);
int def_destroy_data(CONF *conf) {
  if (conf == NULL)
    return 0;
  _CONF_free_data(conf);
  return 1;
}


x86 assembly (clang, -O0):
<def_destroy_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <def_destroy_data+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1143 <def_destroy_data+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <_CONF_free_data@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_destroy_data>:
test   %rdi,%rdi
je     1125 <def_destroy_data+0x15>
push   %rax
call   1030 <_CONF_free_data@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @def_destroy_data(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @_CONF_free_data(i32* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 1, %3 ], [ 0, %1 ]
ret i32 %6
}
void uppercase(ch) char *ch;
{ *ch = isupper(*ch) ? *ch : toupper(*ch); }


x86 assembly (clang, -O0):
<uppercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%eax
je     1150 <uppercase+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    115f <uppercase+0x3f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uppercase>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%ebp
mov    %ebp,%edi
call   1040 <isupper@plt>
test   %eax,%eax
jne    113d <uppercase+0x1d>
mov    %ebp,%edi
call   1030 <toupper@plt>
mov    %eax,%ebp
mov    %bpl,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @uppercase(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = call i32 @isupper(i32 %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
br label %17
12: ; preds = %1
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = call i32 @toupper(i32 %15)
br label %17
17: ; preds = %12, %8
%18 = phi i32 [ %11, %8 ], [ %16, %12 ]
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %2
store i8 %19, i8* %20
ret void
}

LLVM IR (-O2):
define void @uppercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = tail call i32 @isupper(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @toupper(i32 %3)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ %3, %1 ]
%10 = trunc i32 %9 to i8
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ display_statistics();
int /*<<< orphan*/ sim_free();
int /*<<< orphan*/ sim_init();
int /*<<< orphan*/ sim_readdata();
int /*<<< orphan*/ sim_setoptions(int, char **);
int main(int argc, char **argv) {
  sim_setoptions(argc, argv);
  sim_init();
  sim_readdata();
  display_statistics();
  sim_free();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <sim_setoptions@plt>
mov    $0x0,%al
call   1040 <sim_init@plt>
mov    $0x0,%al
call   1030 <sim_readdata@plt>
mov    $0x0,%al
call   1060 <display_statistics@plt>
mov    $0x0,%al
call   1070 <sim_free@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <sim_setoptions@plt>
xor    %eax,%eax
call   1040 <sim_init@plt>
xor    %eax,%eax
call   1030 <sim_readdata@plt>
xor    %eax,%eax
call   1060 <display_statistics@plt>
xor    %eax,%eax
call   1070 <sim_free@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @sim_setoptions(i32 %6, i8** %7)
%9 = call i32 (...) @sim_init()
%10 = call i32 (...) @sim_readdata()
%11 = call i32 (...) @display_statistics()
%12 = call i32 (...) @sim_free()
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @sim_setoptions(i32 %0, i8** %1)
%4 = tail call i32 (...) @sim_init()
%5 = tail call i32 (...) @sim_readdata()
%6 = tail call i32 (...) @display_statistics()
%7 = tail call i32 (...) @sim_free()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
int find_host_agent_in_list(void *data, void *needle) {
  return (*(int *)data) == (*(int *)needle) ? 1 : 0;
}


x86 assembly (clang, -O0):
<find_host_agent_in_list>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @find_host_agent_in_list(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @find_host_agent_in_list(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void genori() {}


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

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

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

LLVM IR (-O2):
define void @genori() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x5d() {
  Assert_real((isxdigit(93) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              470, ("isxdigit should be 0 for ]"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for ]\00"
define void @t_isxdigit_0x5d() {
%1 = tail call i64 @isxdigit(i32 93)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 470, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long nibble_sort_word(unsigned long);
void nibble_sort_pdewacht1(unsigned long *buf) {
  for (int i = 0; i < 1024; i++)
    buf[i] = nibble_sort_word(buf[i]);
}


x86 assembly (clang, -O0):
<nibble_sort_pdewacht1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    115e <nibble_sort_pdewacht1+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <nibble_sort_word@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <nibble_sort_pdewacht1+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_sort_pdewacht1>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <nibble_sort_word@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    $0x400,%rbx
jne    1120 <nibble_sort_pdewacht1+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @nibble_sort_pdewacht1(i64* nocapture %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %8, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = tail call i64 @nibble_sort_word(i64 %6)
store i64 %7, i64* %5
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 1024
br i1 %9, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ OPM_WriteString(unsigned char *, long long);
void OPC_Increment(char decrement) {
  if (decrement) {
    OPM_WriteString((unsigned char *)" -= ", (long long)5);
  } else {
    OPM_WriteString((unsigned char *)" += ", (long long)5);
  }
}


x86 assembly (clang, -O0):
<OPC_Increment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     113e <OPC_Increment+0x2e>
lea    0xed1(%rip),%rdi
mov    $0x5,%esi
call   1030 <OPM_WriteString@plt>
jmp    114f <OPC_Increment+0x3f>
lea    0xec0(%rip),%rdi
mov    $0x5,%esi
call   1030 <OPM_WriteString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPC_Increment>:
test   %dil,%dil
lea    0xeeb(%rip),%rax
lea    0xedf(%rip),%rdi
cmove  %rax,%rdi
mov    $0x5,%esi
jmp    1030 <OPM_WriteString@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" -= \00"
@.str.1 = [5 x i8] c" += \00"
define void @OPC_Increment(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @OPM_WriteString(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
br label %9
7: ; preds = %1
%8 = call i32 @OPM_WriteString(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 5)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" -= \00"
@.str.1 = [5 x i8] c" += \00"
define void @OPC_Increment(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @OPM_WriteString(i8* %3, i64 5)
ret void
}
/* Variables and functions */
char *__vstrcat(char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *str = __vstrcat("Hello, ", "world!", "\nBOUYA", (char *)NULL);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xecb(%rip),%rsi
lea    0xecb(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <__vstrcat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed9(%rip),%rsi
lea    0xed9(%rip),%rdx
xor    %ecx,%ecx
call   1030 <__vstrcat@plt>
lea    0xed2(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Hello, \00"
@.str.1 = [7 x i8] c"world!\00"
@.str.2 = [7 x i8] c"\0ABOUYA\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @__vstrcat(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* null)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Hello, \00"
@.str.1 = [7 x i8] c"world!\00"
@.str.2 = [7 x i8] c"\0ABOUYA\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @__vstrcat(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %1)
ret i32 0
}