xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int main(void) {
  float F = 27.0;
  float C;
  C = (F - 32) / 1.8f;
  printf("%f degrees Fahrenheit is %f degrees Celsius\n", F, C);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"%f degrees Fahrenheit is %f degrees Celsius\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 2.700000e+01, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 3.200000e+01
%6 = fdiv float %5, 0x3FFCCCCCC0000000
store float %6, float* %3
%7 = load float, float* %2
%8 = load float, float* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), float %7, float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"%f degrees Fahrenheit is %f degrees Celsius\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), float 2.700000e+01, float 0xC00638E3A0000000)
ret i32 0
}
unsigned xrop3_225_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | S;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_225_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_225_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
lea    (%rcx,%rdi,1),%edx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     $0xff,%ecx
xor    %eax,%ecx
or     %edx,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_225_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %7
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_225_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = mul nuw nsw i32 %6, 257
%8 = or i32 %4, 255
%9 = xor i32 %7, %8
%10 = or i32 %5, %7
%11 = or i32 %10, %9
%12 = xor i32 %11, -1
%13 = or i8 %1, %0
%14 = zext i8 %13 to i32
%15 = or i32 %14, %12
ret i32 %15
}
double max2d(double x, double y) { return (x > y) ? x : y; }


x86 assembly (clang, -O0):
<max2d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <max2d+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <max2d+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max2d>:
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @max2d(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main() {
  fprintf(stderr, "error\n");
  fprintf(stdout, "stdout\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"error\0A\00"
@stdout = global i32 0
@.str.1 = [8 x i8] c"stdout\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int float_to_signed();
int float_to_unsigned();
int main(void) { return float_to_unsigned() + float_to_signed(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <float_to_unsigned@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <float_to_signed@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <float_to_unsigned@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <float_to_signed@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @float_to_unsigned()
%3 = call i32 (...) @float_to_signed()
%4 = add nsw i32 %2, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @float_to_unsigned()
%2 = tail call i32 (...) @float_to_signed()
%3 = add nsw i32 %2, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ OSRAMWriteByte(int);
int /*<<< orphan*/ OSRAMWriteFinal(int);
int /*<<< orphan*/ OSRAMWriteFirst(int);
void OSRAMDisplayOn(void) {
  OSRAMWriteFirst(0x80);
  OSRAMWriteByte(0xad);
  OSRAMWriteByte(0x80);
  OSRAMWriteByte(0x8b);
  OSRAMWriteByte(0x80);
  OSRAMWriteFinal(0xaf);
}


x86 assembly (clang, -O0):
<OSRAMDisplayOn>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
call   1050 <OSRAMWriteFirst@plt>
mov    $0xad,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x8b,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0xaf,%edi
call   1030 <OSRAMWriteFinal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSRAMDisplayOn>:
push   %rax
mov    $0x80,%edi
call   1050 <OSRAMWriteFirst@plt>
mov    $0xad,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x8b,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0xaf,%edi
pop    %rax
jmp    1030 <OSRAMWriteFinal@plt>

LLVM IR (-O0):
define void @OSRAMDisplayOn() {
%1 = call i32 @OSRAMWriteFirst(i32 128)
%2 = call i32 @OSRAMWriteByte(i32 173)
%3 = call i32 @OSRAMWriteByte(i32 128)
%4 = call i32 @OSRAMWriteByte(i32 139)
%5 = call i32 @OSRAMWriteByte(i32 128)
%6 = call i32 @OSRAMWriteFinal(i32 175)
ret void
}

LLVM IR (-O2):
define void @OSRAMDisplayOn() {
%1 = tail call i32 @OSRAMWriteFirst(i32 128)
%2 = tail call i32 @OSRAMWriteByte(i32 173)
%3 = tail call i32 @OSRAMWriteByte(i32 128)
%4 = tail call i32 @OSRAMWriteByte(i32 139)
%5 = tail call i32 @OSRAMWriteByte(i32 128)
%6 = tail call i32 @OSRAMWriteFinal(i32 175)
ret void
}
void foo578(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo578(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *skip_separators(const char *s) {
  while (isspace(*s) || *s == '=' || *s == ':')
    ++s;
  return (char *)s;
}


x86 assembly (clang, -O0):
<skip_separators>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115f <skip_separators+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x3d,%ecx
mov    %al,-0x9(%rbp)
je     115f <skip_separators+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116f <skip_separators+0x5f>
jmp    1180 <skip_separators+0x70>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_separators+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_separators>:
push   %rbx
mov    %rdi,%rbx
jmp    1124 <skip_separators+0x14>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%rbx),%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_separators+0x10>
movzbl (%rbx),%eax
cmp    $0x3d,%al
je     1120 <skip_separators+0x10>
cmp    $0x3a,%al
je     1120 <skip_separators+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_separators(i8* %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i8* [ %0, %1 ], [ %10, %9 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i8, i8* %3
switch i8 %8, label %11 [
i8 61, label %9
i8 58, label %9
]
9: ; preds = %7, %7, %2
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %7
ret i8* %3
}
int smb1357_has_charger_error(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @smb1357_has_charger_error() {
ret i32 0
}

LLVM IR (-O2):
define i32 @smb1357_has_charger_error() {
ret i32 0
}
void rop3_191_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk2 = ~stk2;
  stk1 = *D | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


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

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

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

LLVM IR (-O2):
define void @rop3_191_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %6
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ solveDiscriminant(double, double, double);
double sqrt(int /*<<< orphan*/);
double solveRootTwoNeg(double a, double b, double c) {
  return (-b - sqrt(solveDiscriminant(a, b, c))) / (2 * a);
}


x86 assembly (clang, -O0):
<solveRootTwoNeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <solveDiscriminant@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solveRootTwoNeg>:
sub    $0x28,%rsp
movsd  %xmm0,0x8(%rsp)
movaps 0xecf(%rip),%xmm3
xorps  %xmm1,%xmm3
movaps %xmm3,0x10(%rsp)
call   1030 <solveDiscriminant@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @solveRootTwoNeg(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 = fneg double %7
%9 = load double, double* %4
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call i32 @solveDiscriminant(double %9, double %10, double %11)
%13 = call double @sqrt(i32 %12)
%14 = fsub double %8, %13
%15 = load double, double* %4
%16 = fmul double 2.000000e+00, %15
%17 = fdiv double %14, %16
ret double %17
}

LLVM IR (-O2):
define double @solveRootTwoNeg(double %0, double %1, double %2) {
%4 = fneg double %1
%5 = tail call i32 @solveDiscriminant(double %0, double %1, double %2)
%6 = tail call double @sqrt(i32 %5)
%7 = fsub double %4, %6
%8 = fmul double %0, 2.000000e+00
%9 = fdiv double %7, %8
ret double %9
}
void cmsfs_write_super(struct super_block *sb) {}


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

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

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

LLVM IR (-O2):
%struct.super_block = type opaque
define void @cmsfs_write_super(%struct.super_block* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(int argc, char **argv) {
  foo(5);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ samlmu_(double *, int *, double *, int *);
void csamlmu(double *x, int n, double *xmom, int nmom) {
  samlmu_(x, &n, xmom, &nmom);
}


x86 assembly (clang, -O0):
<csamlmu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0xc(%rbp),%rsi
lea    -0x1c(%rbp),%rcx
call   1030 <samlmu_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csamlmu>:
push   %rax
mov    %esi,0x4(%rsp)
mov    %ecx,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rcx
call   1030 <samlmu_@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @csamlmu(double* %0, i32 %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
store i32 %1, i32* %5
store i32 %3, i32* %6
%7 = call i32 @samlmu_(double* %0, i32* %5, double* %2, i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ skip_space(char **);
int read_eol(char **str) {
  int ok = 0;
  char c;
  skip_space(str);
  c = **str;
  if (c == '\n') {
    ++(*str);
    ok = 1;
  }
  skip_space(str);
  return ok;
}


x86 assembly (clang, -O0):
<read_eol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <skip_space@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0xa,%eax
jne    115a <read_eol+0x4a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <skip_space@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_eol>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <skip_space@plt>
mov    (%rbx),%rax
xor    %ebp,%ebp
cmpb   $0xa,(%rax)
jne    1131 <read_eol+0x21>
add    $0x1,%rax
mov    %rax,(%rbx)
mov    $0x1,%ebp
mov    %rbx,%rdi
call   1030 <skip_space@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @read_eol(i8** %0) {
%2 = tail call i32 @skip_space(i8** %0)
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 10
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %7, i8** %0
br label %8
8: ; preds = %6, %1
%9 = phi i32 [ 1, %6 ], [ 0, %1 ]
%10 = tail call i32 @skip_space(i8** %0)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ link_failure();
void t_exit(void) {
  extern void _exit(int);
#pragma weak _exit
  _exit(1);
  link_failure();
}


x86 assembly (clang, -O0):
<t_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<t_exit>:
push   %rax
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @t_exit() {
unreachable
}

LLVM IR (-O2):
define void @t_exit() {
tail call void @_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ TimerLoadSet(int, int, unsigned long);
void wave_interrupt_load(unsigned long value) {
  TimerLoadSet(0x40031000, 0x000000ff, value);
}


x86 assembly (clang, -O0):
<wave_interrupt_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x40031000,%edi
mov    $0xff,%esi
call   1030 <TimerLoadSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_interrupt_load>:
mov    %rdi,%rdx
mov    $0x40031000,%edi
mov    $0xff,%esi
jmp    1030 <TimerLoadSet@plt>

LLVM IR (-O0):
define void @wave_interrupt_load(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @TimerLoadSet(i32 1073942528, i32 255, i64 %3)
ret void
}

LLVM IR (-O2):
define void @wave_interrupt_load(i64 %0) {
%2 = tail call i32 @TimerLoadSet(i32 1073942528, i32 255, i64 %0)
ret void
}
int linkTrap(int old __attribute__((unused)), int new) { return new == 6; }


x86 assembly (clang, -O0):
<linkTrap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linkTrap>:
xor    %eax,%eax
cmp    $0x6,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @linkTrap(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 = icmp eq i32 %5, 6
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @linkTrap(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 6
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) { sleep(10); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sleep(i32 10)
ret i32 0
}
unsigned int unicoder_uint32_reverseByteEndian(unsigned int x) {
  unsigned int ret = 0;
  ret |= x & 0x000000ff;
  ret <<= 8;
  ret |= (x >> 8) & 0x000000ff;
  ret <<= 8;
  ret |= (x >> 16) & 0x000000ff;
  ret <<= 8;
  ret |= (x >> 24) & 0x000000ff;
  return ret;
}


x86 assembly (clang, -O0):
<unicoder_uint32_reverseByteEndian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @unicoder_uint32_reverseByteEndian(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
struct mtwist_state {
  int dummy;
};

/* Variables and functions */
scalar_t__ mtwist_next(struct mtwist_state *);
char *random_word(struct mtwist_state *mt, char *w[], int nwords) {
  int x;
  x = (int)(((double)mtwist_next(mt) / (double)(0xffffffff)) * nwords);
  return w[x];
}


x86 assembly (clang, -O0):
<random_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mtwist_next@plt>
cvtsi2sd %rax,%xmm0
movsd  0xec7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_word>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
call   1030 <mtwist_next@plt>
cvtsi2sd %rax,%xmm0
divsd  0xed5(%rip),%xmm0
cvtsi2sd %ebx,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
cltq
mov    (%r14,%rax,8),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.mtwist_state = type { i32 }
define i8* @random_word(%struct.mtwist_state* %0, i8** %1, i32 %2) {
%4 = alloca %struct.mtwist_state*
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store %struct.mtwist_state* %0, %struct.mtwist_state** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%8 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%9 = call i64 @mtwist_next(%struct.mtwist_state* %8)
%10 = sitofp i64 %9 to double
%11 = fdiv double %10, 0x41EFFFFFFFE00000
%12 = load i32, i32* %6
%13 = sitofp i32 %12 to double
%14 = fmul double %11, %13
%15 = fptosi double %14 to i32
store i32 %15, i32* %7
%16 = load i8**, i8*** %5
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
ret i8* %20
}

LLVM IR (-O2):
%struct.mtwist_state = type { i32 }
define i8* @random_word(%struct.mtwist_state* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @mtwist_next(%struct.mtwist_state* %0)
%5 = sitofp i64 %4 to double
%6 = fdiv double %5, 0x41EFFFFFFFE00000
%7 = sitofp i32 %2 to double
%8 = fmul double %6, %7
%9 = fptosi double %8 to i32
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello,world!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello,world!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello,world!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int getByteFromMask(int mask, int position) {
  int i;
  for (i = 0; i < position; i++) {
    mask /= 2;
  }
  return mask;
}


x86 assembly (clang, -O0):
<getByteFromMask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1139 <getByteFromMask+0x39>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <getByteFromMask+0x11>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getByteFromMask>:
mov    %edi,%eax
test   %esi,%esi
jle    1150 <getByteFromMask+0x50>
lea    -0x1(%rsi),%edx
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0x3,%edx
jae    1117 <getByteFromMask+0x17>
mov    %eax,%edx
jmp    1132 <getByteFromMask+0x32>
and    $0xfffffffc,%esi
nopw   0x0(%rax,%rax,1)
lea    0xf(%rax),%edx
test   %eax,%eax
cmovns %eax,%edx
sar    $0x4,%edx
mov    %edx,%eax
add    $0xfffffffc,%esi
jne    1120 <getByteFromMask+0x20>
mov    %edx,%eax
test   %ecx,%ecx
je     1150 <getByteFromMask+0x50>
nopl   0x0(%rax,%rax,1)
mov    %edx,%eax
shr    $0x1f,%eax
add    %edx,%eax
sar    %eax
mov    %eax,%edx
add    $0xffffffff,%ecx
jne    1140 <getByteFromMask+0x40>
ret

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

LLVM IR (-O2):
define i32 @getByteFromMask(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %26
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 3
%7 = icmp ult i32 %5, 3
br i1 %7, label %16, label %8
8: ; preds = %4
%9 = and i32 %1, -4
br label %10
10: ; preds = %10, %8
%11 = phi i32 [ %0, %8 ], [ %13, %10 ]
%12 = phi i32 [ 0, %8 ], [ %14, %10 ]
%13 = sdiv i32 %11, 16
%14 = add i32 %12, 4
%15 = icmp eq i32 %14, %9
br i1 %15, label %16, label %10
16: ; preds = %10, %4
%17 = phi i32 [ undef, %4 ], [ %13, %10 ]
%18 = phi i32 [ %0, %4 ], [ %13, %10 ]
%19 = icmp eq i32 %6, 0
br i1 %19, label %26, label %20
20: ; preds = %16, %20
%21 = phi i32 [ %23, %20 ], [ %18, %16 ]
%22 = phi i32 [ %24, %20 ], [ 0, %16 ]
%23 = sdiv i32 %21, 2
%24 = add i32 %22, 1
%25 = icmp eq i32 %24, %6
br i1 %25, label %26, label %20
26: ; preds = %16, %20, %2
%27 = phi i32 [ %0, %2 ], [ %17, %16 ], [ %23, %20 ]
ret i32 %27
}
int HashMap_HashMethod(int key, int arraySize) {
  int index = 0;
  index = (key % arraySize);
  return index;
}


x86 assembly (clang, -O0):
<HashMap_HashMethod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashMap_HashMethod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @HashMap_HashMethod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
int x28_process_synack(struct mypacket *packet) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x28_process_synack(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XAnyEvent;

/* Variables and functions */
int get_XAnyEvent_send_event(void *_p) {
  return (int)((XAnyEvent *)_p)->send_event;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XAnyEvent_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XAnyEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void foo469(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo469(i32 %0) {
ret void
}
void DocFormats() {}


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

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

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

LLVM IR (-O2):
define void @DocFormats() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void trc_0() { fprintf(stderr, "trc_0\n"); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"trc_0\0A\00"
define void @trc_0() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"trc_0\0A\00"
define void @trc_0() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ applyGenfskPatch();
void rf_patch_cpe_genfsk(void) { applyGenfskPatch(); }


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

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

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

LLVM IR (-O2):
define void @rf_patch_cpe_genfsk() {
%1 = tail call i32 (...) @applyGenfskPatch()
ret void
}
void print_script(void *script) {}


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

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

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

LLVM IR (-O2):
define void @print_script(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int ipInit();
int init() {
  int res;
  if ((res = ipInit()) < 0)
    return res;
  return res;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ipInit@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    1136 <init+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113c <init+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @init() {
%1 = tail call i32 (...) @ipInit()
ret i32 %1
}
/* Variables and functions */
int biscDrive(int, int);
int biscDriveStraight(int velocity) { return biscDrive(velocity, 0x7FFF); }


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

x86 assembly (clang, -O2):
<biscDriveStraight>:
mov    $0x7fff,%esi
jmp    1030 <biscDrive@plt>

LLVM IR (-O0):
define i32 @biscDriveStraight(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @biscDrive(i32 %3, i32 32767)
ret i32 %4
}

LLVM IR (-O2):
define i32 @biscDriveStraight(i32 %0) {
%2 = tail call i32 @biscDrive(i32 %0, i32 32767)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  float a, b, c;
  a = 0.6;
  b = 0.4;
  c = 0.2;
  printf("%s\n", a - b == c ? "a-b == c" : "a-b != c");
  printf("a-b: %.20f\nc: %.20f\n", a - b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xebd(%rip),%rsi
lea    0xead(%rip),%rax
ucomiss %xmm1,%xmm0
setnp  %dl
sete   %cl
test   %dl,%cl
cmovne %rax,%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe84(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee5(%rip),%rdi
movsd  0xec4(%rip),%xmm0
movsd  0xec4(%rip),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"a-b == c\00"
@.str.2 = [9 x i8] c"a-b != c\00"
@.str.3 = [21 x i8] c"a-b: %.20f\0Ac: %.20f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 0x3FE3333340000000, float* %2
store float 0x3FD99999A0000000, float* %3
store float 0x3FC99999A0000000, float* %4
%5 = load float, float* %2
%6 = load float, float* %3
%7 = fsub float %5, %6
%8 = load float, float* %4
%9 = fcmp oeq float %7, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load float, float* %2
%14 = load float, float* %3
%15 = fsub float %13, %14
%16 = fpext float %15 to double
%17 = load float, float* %4
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), double %16, double %18)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [9 x i8] c"a-b != c\00"
@.str.3 = [21 x i8] c"a-b: %.20f\0Ac: %.20f\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), double 0x3FC99999C0000000, double 0x3FC99999A0000000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_epi64(int /*<<< orphan*/, int);
__m128i test_mm_slli_epi64_1(__m128i A) { return _mm_slli_epi64(A, -1); }


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

x86 assembly (clang, -O2):
<test_mm_slli_epi64_1>:
mov    $0xffffffff,%esi
jmp    1030 <_mm_slli_epi64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_slli_epi64_1(i32 %0) {
%2 = tail call i32 @_mm_slli_epi64(i32 %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
int atomic_exchange(int volatile *, int);
int ExchangeInt(volatile int *ptr, int newval) {
  return atomic_exchange(ptr, newval);
}


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

x86 assembly (clang, -O2):
<ExchangeInt>:
jmp    1030 <atomic_exchange@plt>

LLVM IR (-O0):
define i32 @ExchangeInt(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 = call i32 @atomic_exchange(i32* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ExchangeInt(i32* %0, i32 %1) {
%3 = tail call i32 @atomic_exchange(i32* %0, i32 %1)
ret i32 %3
}
void foo369() {}


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

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

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

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