xunge/DecIR huggingface dataset:
/* Variables and functions */
double log(double);
double ftom(double f) {
  return (f > 0 ? (log(f / 440.0) / 0.69314718055994528623) * 12.0 + 69
                : -1500);
}


x86 assembly (clang, -O0):
<ftom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1173 <ftom+0x63>
movsd  -0x8(%rbp),%xmm0
movsd  0xee4(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movsd  0xecb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeaf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeab(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1185 <ftom+0x75>
movsd  0xe85(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1185 <ftom+0x75>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftom>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1142 <ftom+0x32>
divsd  0xee5(%rip),%xmm0
call   1030 <log@plt>
divsd  0xee0(%rip),%xmm0
mulsd  0xee0(%rip),%xmm0
addsd  0xee0(%rip),%xmm0
pop    %rax
ret
movsd  0xeb6(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ftom(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load double, double* %2
%7 = fdiv double %6, 4.400000e+02
%8 = call double @log(double %7)
%9 = fdiv double %8, 0x3FE62E42FEFA39EF
%10 = call double @llvm.fmuladd.f64(double %9, double 1.200000e+01, double 6.900000e+01)
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %5
%13 = phi double [ %10, %5 ], [ -1.500000e+03, %11 ]
ret double %13
}

LLVM IR (-O2):
define double @ftom(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = fdiv double %0, 4.400000e+02
%5 = tail call double @log(double %4)
%6 = fdiv double %5, 0x3FE62E42FEFA39EF
%7 = tail call double @llvm.fmuladd.f64(double %6, double 1.200000e+01, double 6.900000e+01)
br label %8
8: ; preds = %1, %3
%9 = phi double [ %7, %3 ], [ -1.500000e+03, %1 ]
ret double %9
}
__attribute__((visibility("hidden"))) int colour_to_red(const int colour) {
  int return_val = 0;
  switch (colour) {
  case 8:
  case 3:
  case 4:
  case 5:
    return_val = 255;
    break;
  }
  return return_val;
}


x86 assembly (clang, -O0):
<colour_to_red>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffffd,%eax
sub    $0x3,%eax
jb     1136 <colour_to_red+0x36>
jmp    1125 <colour_to_red+0x25>
mov    -0xc(%rbp),%eax
sub    $0x8,%eax
jne    113d <colour_to_red+0x3d>
jmp    1136 <colour_to_red+0x36>
movl   $0xff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<colour_to_red>:
add    $0xfffffffd,%edi
xor    %eax,%eax
cmp    $0x5,%edi
ja     1117 <colour_to_red+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define hidden i32 @colour_to_red(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %6 [
i32 8, label %5
i32 3, label %5
i32 4, label %5
i32 5, label %5
]
5: ; preds = %1, %1, %1, %1
store i32 255, i32* %3
br label %6
6: ; preds = %1, %5
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@switch.table.colour_to_red = [6 x i32] [i32 255, i32 255, i32 255, i32 0, i32 0, i32 255]
define hidden i32 @colour_to_red(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.colour_to_red, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ syscall(int, int, void const *, int);
void *shmat(int id, const void *addr, int flag) {
  return (void *)syscall(305, id, addr, flag);
}


x86 assembly (clang, -O0):
<shmat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x131,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmat>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x131,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i8* @shmat(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
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i64 @syscall(i32 305, i32 %7, i8* %8, i32 %9)
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @shmat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i64 @syscall(i32 305, i32 %0, i8* %1, i32 %2)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
int getClass(int *entry) { return *(entry + 3); }


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

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

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

LLVM IR (-O2):
define i32 @getClass(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ OPLinkStatusHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void OPLinkStatusRequestUpdate() { UAVObjRequestUpdate(OPLinkStatusHandle()); }


x86 assembly (clang, -O0):
<OPLinkStatusRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OPLinkStatusHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPLinkStatusRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <OPLinkStatusHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @OPLinkStatusRequestUpdate() {
%1 = call i32 (...) @OPLinkStatusHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OPLinkStatusRequestUpdate() {
%1 = tail call i32 (...) @OPLinkStatusHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
float foo() { return 42; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @foo() {
ret float 4.200000e+01
}

LLVM IR (-O2):
define float @foo() {
ret float 4.200000e+01
}
const char *efp_banner(void) {
  static const char banner[] = "LIBEFP ver. "
                               "1.5.0"
                               "\n"
                               "Copyright (c) 2012-2017 Ilya Kaliman\n"
                               "\n"
                               "Journal References:\n"
                               "  - Kaliman and Slipchenko, JCC 2013.\n"
                               "    DOI: http://dx.doi.org/10.1002/jcc.23375\n"
                               "  - Kaliman and Slipchenko, JCC 2015.\n"
                               "    DOI: http://dx.doi.org/10.1002/jcc.23772\n"
                               "\n"
                               "Project web site: https://libefp.github.io/\n";
  return banner;
}


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

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

LLVM IR (-O0):
@efp_banner.banner = internal constant [288 x i8] c"LIBEFP ver. 1.5.0\0ACopyright (c) 2012-2017 Ilya Kaliman\0A\0AJournal References:\0A - Kaliman and Slipchenko, JCC 2013.\0A DOI: http://dx.doi.org/10.1002/jcc.23375\0A - Kaliman and Slipchenko, JCC 2015.\0A DOI: http://dx.doi.org/10.1002/jcc.23772\0A\0AProject web site: https://libefp.github.io/\0A\00"
define i8* @efp_banner() {
ret i8* getelementptr inbounds ([288 x i8], [288 x i8]* @efp_banner.banner, i64 0, i64 0)
}

LLVM IR (-O2):
@efp_banner.banner = internal constant [288 x i8] c"LIBEFP ver. 1.5.0\0ACopyright (c) 2012-2017 Ilya Kaliman\0A\0AJournal References:\0A - Kaliman and Slipchenko, JCC 2013.\0A DOI: http://dx.doi.org/10.1002/jcc.23375\0A - Kaliman and Slipchenko, JCC 2015.\0A DOI: http://dx.doi.org/10.1002/jcc.23772\0A\0AProject web site: https://libefp.github.io/\0A\00"
define i8* @efp_banner() {
ret i8* getelementptr inbounds ([288 x i8], [288 x i8]* @efp_banner.banner, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
void clrKeyboardBuffer() {
  char ch;
  scanf("%c", &ch);
  while (ch != '\n')
    scanf("%c", &ch);
}


x86 assembly (clang, -O0):
<clrKeyboardBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1030 <scanf@plt>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
je     114a <clrKeyboardBuffer+0x3a>
lea    0xec4(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1030 <scanf@plt>
jmp    1128 <clrKeyboardBuffer+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clrKeyboardBuffer>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1030 <scanf@plt>
cmpb   $0xa,0x7(%rsp)
je     1152 <clrKeyboardBuffer+0x42>
lea    0xecd(%rip),%r14
lea    0x7(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
cmpb   $0xa,0x7(%rsp)
jne    1140 <clrKeyboardBuffer+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @clrKeyboardBuffer() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 10
br i1 %4, label %9, label %5
5: ; preds = %0, %5
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = load i8, i8* %1
%8 = icmp eq i8 %7, 10
br i1 %8, label %9, label %5
9: ; preds = %5, %0
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int mb = 0;
  while (malloc(1 << 20))
    ++mb;
  printf("Allocated %d Mb\n", mb);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x100000,%edi
call   1040 <malloc@plt>
cmp    $0x0,%rax
je     1158 <main+0x38>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x100000,%edi
call   1040 <malloc@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1130 <main+0x10>
lea    0xeb7(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Allocated %d Mb\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = call i64 @malloc(i32 1048576)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@.str = [17 x i8] c"Allocated %d Mb\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i64 @malloc(i32 1048576)
%4 = icmp eq i64 %3, 0
%5 = add nuw nsw i32 %2, 1
br i1 %4, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int age;
  scanf("%d", &age);
  if (age >= 0 && age <= 150)
    printf("YES");
  else
    printf("NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1167 <main+0x47>
cmpl   $0x96,-0x8(%rbp)
jg     1167 <main+0x47>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    1173 <main+0x53>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x97,0x4(%rsp)
lea    0xec2(%rip),%rax
lea    0xebf(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 150
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %6, %0
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp ult i32 %4, 151
%6 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* dereferenceable(1) %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_int(char *, int);
void set_led(int on) {
  write_int("/sys/class/leds/hp::hddprotect/brightness", on);
}


x86 assembly (clang, -O0):
<set_led>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <write_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_led>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <write_int@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"/sys/class/leds/hp::hddprotect/brightness\00"
define void @set_led(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @write_int(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"/sys/class/leds/hp::hddprotect/brightness\00"
define void @set_led(i32 %0) {
%2 = tail call i32 @write_int(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int arg_char_ptr(int, char *);
int use_arg_char_ptr(int i, char *str) { return arg_char_ptr(i, str); }


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

x86 assembly (clang, -O2):
<use_arg_char_ptr>:
jmp    1030 <arg_char_ptr@plt>

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

LLVM IR (-O2):
define i32 @use_arg_char_ptr(i32 %0, i8* %1) {
%3 = tail call i32 @arg_char_ptr(i32 %0, i8* %1)
ret i32 %3
}
int isAlphaChecker(char inputChar) {
  if (((inputChar >= 'A') && (inputChar <= 'Z')) ||
      ((inputChar >= 'a') && (inputChar <= 'z')))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isAlphaChecker>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1124 <isAlphaChecker+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    113e <isAlphaChecker+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     114a <isAlphaChecker+0x4a>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     114a <isAlphaChecker+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <isAlphaChecker+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAlphaChecker>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isAlphaChecker(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %19, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 122
br i1 %18, label %19, label %20
19: ; preds = %15, %7
store i32 1, i32* %2
br label %21
20: ; preds = %15, %11
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @isAlphaChecker(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void gtk_widget_send_expose() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_send_expose() {
ret void
}
int verify_benchmark(int r) {
  int expected = 8;
  if (r != expected)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<verify_benchmark>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1126 <verify_benchmark+0x26>
movl   $0x0,-0x4(%rbp)
jmp    112d <verify_benchmark+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_benchmark>:
xor    %eax,%eax
cmp    $0x8,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @verify_benchmark(i32 %0) {
%2 = icmp eq i32 %0, 8
%3 = zext i1 %2 to i32
ret i32 %3
}
void BlendPlaneRow_C() {}


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

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

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

LLVM IR (-O2):
define void @BlendPlaneRow_C() {
ret void
}
int libfunc2() { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @libfunc2() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ Cvar_VariableStringBuffer(char const *, char *, int);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int /*<<< orphan*/);
char *xmalloc(int /*<<< orphan*/);
char *GetCvar(const char *var_name) {
  char buffer[1024];
  Cvar_VariableStringBuffer(var_name, buffer, 1024);
  char *ret = xmalloc(strlen(buffer + 1));
  strncpy(ret, buffer, strlen(buffer));
  return ret;
}


x86 assembly (clang, -O0):
<GetCvar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
call   1060 <Cvar_VariableStringBuffer@plt>
lea    -0x410(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <xmalloc@plt>
mov    %rax,-0x418(%rbp)
mov    -0x418(%rbp),%rax
mov    %rax,-0x428(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x420(%rbp)
lea    -0x410(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x428(%rbp),%rdi
mov    -0x420(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x418(%rbp),%rax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCvar>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rsp,%r14
mov    %r14,%rsi
mov    $0x400,%edx
call   1060 <Cvar_VariableStringBuffer@plt>
lea    0x1(%rsp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @GetCvar(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%7 = call i32 @Cvar_VariableStringBuffer(i8* %5, i8* %6, i32 1024)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = call i32 @strlen(i8* %9)
%11 = call i8* @xmalloc(i32 %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%15 = call i32 @strlen(i8* %14)
%16 = call i32 @strncpy(i8* %12, i8* %13, i32 %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @GetCvar(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @Cvar_VariableStringBuffer(i8* %0, i8* %3, i32 1024)
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 1
%6 = call i32 @strlen(i8* %5)
%7 = call i8* @xmalloc(i32 %6)
%8 = call i32 @strlen(i8* %3)
%9 = call i32 @strncpy(i8* %7, i8* %3, i32 %8)
ret i8* %7
}
void PiComs_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @PiComs_SaveConfig() {
ret void
}
/* Variables and functions */
char wrap(char);
char bar(char f) { return wrap(f); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <wrap@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <wrap@plt>

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

LLVM IR (-O2):
define signext i8 @bar(i8 signext %0) {
%2 = tail call signext i8 @wrap(i8 signext %0)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t, v;
  float lt;
  scanf("%d", &t);
  scanf("%d", &v);
  lt = (float)(t * v) / (12);
  printf("%.3f\n", lt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebe(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xe9e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
imul   0xc(%rsp),%eax
cvtsi2ss %eax,%xmm0
divss  0xea5(%rip),%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
%10 = sitofp i32 %9 to float
%11 = fdiv float %10, 1.200000e+01
store float %11, float* %4
%12 = load float, float* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, %7
%10 = sitofp i32 %9 to float
%11 = fdiv float %10, 1.200000e+01
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %11)
ret i32 0
}
/* Variables and functions */
int append_mode();
int /*<<< orphan*/ insertch(char);
int /*<<< orphan*/ lnbegin();
int /*<<< orphan*/ up();
int open_after(void) {
  lnbegin();
  if (!insertch('\n') && !up())
    return append_mode();
  return 0;
}


x86 assembly (clang, -O0):
<open_after>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <lnbegin@plt>
mov    $0xa,%edi
call   1030 <insertch@plt>
cmp    $0x0,%eax
jne    1181 <open_after+0x41>
mov    $0x0,%al
call   1040 <up@plt>
cmp    $0x0,%eax
jne    1181 <open_after+0x41>
mov    $0x0,%al
call   1050 <append_mode@plt>
mov    %eax,-0x4(%rbp)
jmp    1188 <open_after+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_after>:
push   %rax
xor    %eax,%eax
call   1060 <lnbegin@plt>
mov    $0xa,%edi
call   1030 <insertch@plt>
test   %eax,%eax
jne    1161 <open_after+0x21>
xor    %eax,%eax
call   1040 <up@plt>
test   %eax,%eax
je     1165 <open_after+0x25>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1050 <append_mode@plt>

LLVM IR (-O0):
define i32 @open_after() {
%1 = alloca i32
%2 = call i32 (...) @lnbegin()
%3 = call i32 @insertch(i8 signext 10)
%4 = icmp ne i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0
%6 = call i32 (...) @up()
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 (...) @append_mode()
store i32 %9, i32* %1
br label %11
10: ; preds = %5, %0
store i32 0, i32* %1
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @open_after() {
%1 = tail call i32 (...) @lnbegin()
%2 = tail call i32 @insertch(i8 signext 10)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = tail call i32 (...) @up()
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 (...) @append_mode()
br label %9
9: ; preds = %0, %4, %7
%10 = phi i32 [ %8, %7 ], [ 0, %4 ], [ 0, %0 ]
ret i32 %10
}
double INtoCM(double IN) { return IN * 2.54; }


x86 assembly (clang, -O0):
<INtoCM>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<INtoCM>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @INtoCM(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 2.540000e+00
ret double %4
}

LLVM IR (-O2):
define double @INtoCM(double %0) {
%2 = fmul double %0, 2.540000e+00
ret double %2
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y, z;
  x = __VERIFIER_nondet_int();
  y = 100;
  z = 1;
  while (x >= 0) {
    x = x - y;
    y = y - z;
    z = -z;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x64,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1160 <main+0x50>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1137 <main+0x27>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void *copyFunction(void *toBeCopy) { return toBeCopy; }


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

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

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

LLVM IR (-O2):
define i8* @copyFunction(i8* readnone returned %0) {
ret i8* %0
}
void main(void) {
  int a = 1, b = 2, res;
  res = a + b;
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = add nsw i32 %4, %5
store i32 %6, i32* %3
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *p;
  p = (void *)malloc(size);
  if (p == 0) {
    fprintf(stderr, "xmalloc: Virtual memory exhausted.\n");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"xmalloc: Virtual memory exhausted.\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"xmalloc: Virtual memory exhausted.\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to i8*
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void die(int sig) { _exit(0); }


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @die(i32 %0) {
%2 = tail call i32 @_exit(i32 0)
unreachable
}
int printToBinary(char *a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @printToBinary(i8* nocapture readnone %0) {
ret i32 0
}
unsigned int f4(unsigned int x, unsigned int y) {
  y &= 31;
  return x >> y | (x << (32 - y));
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @f4(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 = and i32 %5, 31
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = lshr i32 %7, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub i32 32, %11
%13 = shl i32 %10, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshr.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int integers_cmp(int, int);
int side_no_cmp(const void *first, const void *second) {
  return integers_cmp(*(int *)first, *(int *)second);
}


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

x86 assembly (clang, -O2):
<side_no_cmp>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <integers_cmp@plt>

LLVM IR (-O0):
define i32 @side_no_cmp(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 = call i32 @integers_cmp(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @side_no_cmp(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 = tail call i32 @integers_cmp(i32 %4, i32 %6)
ret i32 %7
}
int main(void) {
  int a, b;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
float sinapprox(float val) {
  float val2 = val * val;
  return val *
         (0.9999793767f +
          val2 * (-0.1666243672f + val2 * (8.3089787513e-3f +
                                           val2 * (-1.9264918228e-4f +
                                                   val2 * 2.1478401777e-6f))));
}


x86 assembly (clang, -O0):
<sinapprox>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movss  -0x8(%rbp),%xmm3
movss  -0x8(%rbp),%xmm4
movss  0xed3(%rip),%xmm5
mulss  %xmm5,%xmm4
movss  0xecb(%rip),%xmm5
addss  %xmm5,%xmm4
mulss  %xmm4,%xmm3
movss  0xeb3(%rip),%xmm4
addss  %xmm4,%xmm3
mulss  %xmm3,%xmm2
movss  0xe9f(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  0xe8b(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinapprox>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0xef1(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xee9(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xee1(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xed9(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xed1(%rip),%xmm2
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @sinapprox(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = fmul float %4, %5
store float %6, float* %3
%7 = load float, float* %2
%8 = load float, float* %3
%9 = load float, float* %3
%10 = load float, float* %3
%11 = load float, float* %3
%12 = call float @llvm.fmuladd.f32(float %11, float 0x3EC20473A0000000, float 0xBF29403BE0000000)
%13 = call float @llvm.fmuladd.f32(float %10, float %12, float 0x3F81044C40000000)
%14 = call float @llvm.fmuladd.f32(float %9, float %13, float 0xBFC553F280000000)
%15 = call float @llvm.fmuladd.f32(float %8, float %14, float 0x3FEFFFD4C0000000)
%16 = fmul float %7, %15
ret float %16
}

LLVM IR (-O2):
define float @sinapprox(float %0) {
%2 = fmul float %0, %0
%3 = tail call float @llvm.fmuladd.f32(float %2, float 0x3EC20473A0000000, float 0xBF29403BE0000000)
%4 = tail call float @llvm.fmuladd.f32(float %2, float %3, float 0x3F81044C40000000)
%5 = tail call float @llvm.fmuladd.f32(float %2, float %4, float 0xBFC553F280000000)
%6 = tail call float @llvm.fmuladd.f32(float %2, float %5, float 0x3FEFFFD4C0000000)
%7 = fmul float %6, %0
ret float %7
}
int f(int n, int x, int stride) {
  int a, x1, x2, x3;
  a = x * stride;
  x1 = x + 3;
  a += x1 * stride;
  if (n > 64) {
    x2 = x1 + 3;
    a += x2 * stride;
    x3 = x2 + 3;
    a += x3 * stride;
  }
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x40,-0x4(%rbp)
jle    1163 <f+0x63>
mov    -0x14(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rsi,%rsi,1),%ecx
add    $0x3,%ecx
imul   %edx,%ecx
add    %esi,%esi
add    $0xf,%esi
imul   %edx,%esi
xor    %eax,%eax
cmp    $0x41,%edi
cmovge %esi,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %7
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 3
store i32 %15, i32* %8
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = mul nsw i32 %16, %17
%19 = load i32, i32* %7
%20 = add nsw i32 %19, %18
store i32 %20, i32* %7
%21 = load i32, i32* %4
%22 = icmp sgt i32 %21, 64
br i1 %22, label %23, label %38
23: ; preds = %3
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 3
store i32 %25, i32* %9
%26 = load i32, i32* %9
%27 = load i32, i32* %6
%28 = mul nsw i32 %26, %27
%29 = load i32, i32* %7
%30 = add nsw i32 %29, %28
store i32 %30, i32* %7
%31 = load i32, i32* %9
%32 = add nsw i32 %31, 3
store i32 %32, i32* %10
%33 = load i32, i32* %10
%34 = load i32, i32* %6
%35 = mul nsw i32 %33, %34
%36 = load i32, i32* %7
%37 = add nsw i32 %36, %35
store i32 %37, i32* %7
br label %38
38: ; preds = %23, %3
%39 = load i32, i32* %7
ret i32 %39
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 1
%5 = add i32 %4, 3
%6 = mul i32 %5, %2
%7 = icmp sgt i32 %0, 64
%8 = add i32 %4, 15
%9 = mul i32 %8, %2
%10 = select i1 %7, i32 %9, i32 0
%11 = add i32 %6, %10
ret i32 %11
}
int fn3(int n) {
  if (n == 42)
    return 1;
  if (n == 42)
    return 2;
  if (n)
    if (n)
      if (n)
        if (n)
          return 42;
  if (!n)
    return 10;
  else
    return 11;
}


x86 assembly (clang, -O0):
<fn3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
jne    111d <fn3+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1193 <fn3+0x93>
cmpl   $0x2a,-0x8(%rbp)
jne    1133 <fn3+0x33>
movl   $0x2,-0x4(%rbp)
jmp    1193 <fn3+0x93>
cmpl   $0x0,-0x8(%rbp)
je     1176 <fn3+0x76>
cmpl   $0x0,-0x8(%rbp)
je     1171 <fn3+0x71>
cmpl   $0x0,-0x8(%rbp)
je     116c <fn3+0x6c>
cmpl   $0x0,-0x8(%rbp)
je     1167 <fn3+0x67>
movl   $0x2a,-0x4(%rbp)
jmp    1193 <fn3+0x93>
jmp    116c <fn3+0x6c>
jmp    1171 <fn3+0x71>
jmp    1176 <fn3+0x76>
cmpl   $0x0,-0x8(%rbp)
jne    118c <fn3+0x8c>
movl   $0xa,-0x4(%rbp)
jmp    1193 <fn3+0x93>
movl   $0xb,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn3>:
xor    %ecx,%ecx
test   %edi,%edi
setne  %cl
shl    $0x5,%ecx
or     $0xa,%ecx
cmp    $0x2a,%edi
mov    $0x1,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fn3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 42
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %32
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 42
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 2, i32* %2
br label %32
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %27
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %26
17: ; preds = %14
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 42, i32* %2
br label %32
24: ; preds = %20
br label %25
25: ; preds = %24, %17
br label %26
26: ; preds = %25, %14
br label %27
27: ; preds = %26, %11
%28 = load i32, i32* %3
%29 = icmp ne i32 %28, 0
br i1 %29, label %31, label %30
30: ; preds = %27
store i32 10, i32* %2
br label %32
31: ; preds = %27
store i32 11, i32* %2
br label %32
32: ; preds = %31, %30, %23, %10, %6
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @fn3(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 10, i32 42
%4 = icmp eq i32 %0, 42
%5 = select i1 %4, i32 1, i32 %3
ret i32 %5
}
void cpy(int *op1, int *op2, unsigned int *pc) {
  *op2 = *op1;
  (*pc)++;
}


x86 assembly (clang, -O0):
<cpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy>:
mov    (%rdi),%eax
mov    %eax,(%rsi)
addl   $0x1,(%rdx)
ret

LLVM IR (-O0):
define void @cpy(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
store i32 %8, i32* %9
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = add i32 %11, 1
store i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @cpy(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2) {
%4 = load i32, i32* %0
store i32 %4, i32* %1
%5 = load i32, i32* %2
%6 = add i32 %5, 1
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void foo(int n) {
  int i;
#pragma omp for schedule(runtime)
  for (i = 0; i < n; ++i)
    bar(i);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1144 <foo+0x34>
mov    -0x8(%rbp),%edi
call   1030 <bar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <foo+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    112e <foo+0x1e>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <bar@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <foo+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @bar(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}