xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double);
int main() {
  double x[] = {3.14159, 6.02e23, 1.6e-19, 1.0 + 1};
  int y[] = {75, 0113, 0x4b};
  printf("hello world %d %g\n", y[0], x[0]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0xed3(%rip),%eax
mov    %eax,-0x24(%rbp)
mov    -0x2c(%rbp),%esi
movsd  -0x20(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.x = [4 x double] [double 3.141590e+00, double 6.020000e+23, double 1.600000e-19, double 2.000000e+00]
@__const.main.y = [3 x i32] [i32 75, i32 75, i32 75]
@.str = [19 x i8] c"hello world %d %g\0A\00"
define i32 @main() {
%1 = alloca [4 x double]
%2 = alloca [3 x i32]
%3 = bitcast [4 x double]* %1 to i8*
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%8 = load double, double* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"hello world %d %g\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 75, double 3.141590e+00)
ret i32 0
}
/* Variables and functions */
size_t is_leap(int);
int days_from_1jan(int year, int month, int mday) {
  static const int days[2][12] = {
      {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
      {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}};
  return days[is_leap(year)][month] + mday - 1;
}


x86 assembly (clang, -O0):
<days_from_1jan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_leap@plt>
mov    %rax,%rcx
lea    0xecd(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0xc(%rbp),%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<days_from_1jan>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <is_leap@plt>
movslq %ebp,%rcx
lea    (%rax,%rax,2),%rax
shl    $0x4,%rax
lea    0xed2(%rip),%rdx
add    %rax,%rdx
mov    (%rdx,%rcx,4),%eax
add    %ebx,%eax
add    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@days_from_1jan.days = internal constant [2 x [12 x i32]] [[12 x i32] [i32 0, i32 31, i32 59, i32 90, i32 120, i32 151, i32 181, i32 212, i32 243, i32 273, i32 304, i32 334], [12 x i32] [i32 0, i32 31, i32 60, i32 91, i32 121, i32 152, i32 182, i32 213, i32 244, i32 274, i32 305, i32 335]]
define i32 @days_from_1jan(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 = call i64 @is_leap(i32 %7)
%9 = getelementptr inbounds [2 x [12 x i32]], [2 x [12 x i32]]* @days_from_1jan.days, i64 0, i64 %8
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [12 x i32], [12 x i32]* %9, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
%16 = sub nsw i32 %15, 1
ret i32 %16
}

LLVM IR (-O2):
@days_from_1jan.days = internal unnamed_addr constant [2 x [12 x i32]] [[12 x i32] [i32 0, i32 31, i32 59, i32 90, i32 120, i32 151, i32 181, i32 212, i32 243, i32 273, i32 304, i32 334], [12 x i32] [i32 0, i32 31, i32 60, i32 91, i32 121, i32 152, i32 182, i32 213, i32 244, i32 274, i32 305, i32 335]]
define i32 @days_from_1jan(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @is_leap(i32 %0)
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds [2 x [12 x i32]], [2 x [12 x i32]]* @days_from_1jan.days, i64 0, i64 %4, i64 %5
%7 = load i32, i32* %6
%8 = add i32 %2, -1
%9 = add i32 %8, %7
ret i32 %9
}
int bt(float x, float s, float e) {
  return (((x > s) && (x < e)) || ((x < s) && (x > e)));
}


x86 assembly (clang, -O0):
<bt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    113a <bt+0x3a>
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
mov    $0x1,%al
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
ja     1167 <bt+0x67>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomiss %xmm1,%xmm0
mov    %al,-0xe(%rbp)
jbe    1161 <bt+0x61>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
seta   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bt>:
ucomiss %xmm1,%xmm0
seta   %al
ucomiss %xmm0,%xmm2
seta   %cl
and    %al,%cl
ucomiss %xmm0,%xmm1
seta   %al
ucomiss %xmm2,%xmm0
seta   %dl
and    %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @bt(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp ogt float %7, %8
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load float, float* %4
%12 = load float, float* %6
%13 = fcmp olt float %11, %12
br i1 %13, label %24, label %14
14: ; preds = %10, %3
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fcmp olt float %15, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load float, float* %4
%20 = load float, float* %6
%21 = fcmp ogt float %19, %20
br label %22
22: ; preds = %18, %14
%23 = phi i1 [ false, %14 ], [ %21, %18 ]
br label %24
24: ; preds = %22, %10
%25 = phi i1 [ true, %10 ], [ %23, %22 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @bt(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %1
%5 = fcmp olt float %0, %2
%6 = and i1 %4, %5
%7 = fcmp olt float %0, %1
%8 = fcmp ogt float %0, %2
%9 = and i1 %7, %8
%10 = or i1 %6, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int free_info(void *cookie) {
  free(cookie);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @free_info(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
void rop3_237_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk2 = ~stk2;
  stk1 = S | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_237_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)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%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_237_0_1>:
mov    (%rdi),%al
mov    %esi,%ecx
not    %cl
and    %dl,%cl
and    %al,%cl
xor    %dl,%al
not    %al
or     %sil,%al
not    %dl
and    %al,%dl
or     %sil,%cl
or     %dl,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_237_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** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%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_237_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = xor i8 %5, -1
%7 = or i8 %6, %1
%8 = xor i8 %2, -1
%9 = and i8 %7, %8
%10 = xor i8 %1, -1
%11 = and i8 %10, %2
%12 = and i8 %11, %4
%13 = or i8 %12, %1
%14 = or i8 %13, %9
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
unsigned long long _bzhi_u64(unsigned long long, unsigned long long);
unsigned long long test_bzhi_u64(unsigned long long __X,
                                 unsigned long long __Y) {
  return _bzhi_u64(__X, __Y);
}


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

x86 assembly (clang, -O2):
<test_bzhi_u64>:
jmp    1030 <_bzhi_u64@plt>

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

LLVM IR (-O2):
define i64 @test_bzhi_u64(i64 %0, i64 %1) {
%3 = tail call i64 @_bzhi_u64(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
void *realloc(void *, long);
void *_xte_realloc(void *in_memory, long in_bytes, int in_zone,
                   char const *in_file, long in_line) {
  void *memory = realloc(in_memory, in_bytes);
  return memory;
}


x86 assembly (clang, -O0):
<_xte_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xte_realloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @_xte_realloc(i8* %0, i64 %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
store i8* %0, i8** %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%12 = load i8*, i8** %6
%13 = load i64, i64* %7
%14 = call i8* @realloc(i8* %12, i64 %13)
store i8* %14, i8** %11
%15 = load i8*, i8** %11
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @_xte_realloc(i8* nocapture %0, i64 %1, i32 %2, i8* nocapture readnone %3, i64 %4) {
%6 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(int);
void my_put_nbr(int nbr) {
  if (nbr < 0) {
    my_putchar('-');
    nbr = -nbr;
  }
  if (nbr > 9) {
    my_put_nbr(nbr / 10);
    my_put_nbr(nbr % 10);
  } else
    my_putchar(nbr + 48);
}


x86 assembly (clang, -O0):
<my_put_nbr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1147 <my_put_nbr+0x27>
mov    $0x2d,%edi
call   1040 <my_putchar@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    117a <my_put_nbr+0x5a>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <my_put_nbr@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <my_put_nbr@plt>
jmp    1185 <my_put_nbr+0x65>
mov    -0x4(%rbp),%edi
add    $0x30,%edi
call   1040 <my_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_put_nbr>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
mov    $0xcccccccd,%r14d
test   %ebp,%ebp
jns    113c <my_put_nbr+0x1c>
mov    $0x2d,%edi
call   1040 <my_putchar@plt>
neg    %ebp
cmp    $0xa,%ebp
jb     115f <my_put_nbr+0x3f>
mov    %ebp,%ebx
imul   %r14,%rbx
shr    $0x23,%rbx
mov    %ebx,%edi
call   1030 <my_put_nbr@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%eax
sub    %eax,%ebp
test   %ebp,%ebp
jns    113c <my_put_nbr+0x1c>
jmp    1130 <my_put_nbr+0x10>
add    $0x30,%ebp
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <my_putchar@plt>

LLVM IR (-O0):
define void @my_put_nbr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @my_putchar(i32 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 9
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 10
%15 = load i32, i32* %2
%16 = srem i32 %15, 10
br label %21
17: ; preds = %9
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 48
%20 = call i32 @my_putchar(i32 %19)
br label %21
21: ; preds = %17, %12
ret void
}

LLVM IR (-O2):
define void @my_put_nbr(i32 %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i32 [ %0, %1 ], [ %13, %11 ]
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @my_putchar(i32 45)
%7 = sub nsw i32 0, %3
br label %8
8: ; preds = %5, %2
%9 = phi i32 [ %7, %5 ], [ %3, %2 ]
%10 = icmp ugt i32 %9, 9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = udiv i32 %9, 10
tail call void @my_put_nbr(i32 %12)
%13 = urem i32 %9, 10
br label %2
14: ; preds = %8
%15 = add nuw nsw i32 %9, 48
%16 = tail call i32 @my_putchar(i32 %15)
ret void
}
int test_imm_7Fuint16_mem(unsigned short *val) {
  return ((*val) & (0x7F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Fuint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x7f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Fuint16_mem>:
testb  $0x7f,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Fuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 127
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_7Fuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 127
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int is_utf32_be(const unsigned char *data) {
  return data[0] == 0xFF && data[1] == 0xFE && data[2] == 0x00 &&
         data[3] == 0x00;
}


x86 assembly (clang, -O0):
<is_utf32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xff,%ecx
mov    %al,-0x9(%rbp)
jne    1160 <is_utf32_be+0x60>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0xfe,%ecx
mov    %al,-0x9(%rbp)
jne    1160 <is_utf32_be+0x60>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1160 <is_utf32_be+0x60>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_utf32_be>:
xor    %eax,%eax
cmpb   $0xff,(%rdi)
je     1108 <is_utf32_be+0x8>
ret
cmpb   $0xfe,0x1(%rdi)
jne    1107 <is_utf32_be+0x7>
cmpb   $0x0,0x2(%rdi)
jne    1107 <is_utf32_be+0x7>
xor    %eax,%eax
cmpb   $0x0,0x3(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_utf32_be(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, -1
br i1 %3, label %4, label %17
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, -2
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %0, i64 3
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %12, %8, %4, %1
%18 = phi i32 [ 0, %8 ], [ 0, %4 ], [ 0, %1 ], [ %16, %12 ]
ret i32 %18
}
f(i) {
  if (i)
    return 3;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1118 <f+0x18>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 3
}
void BN_set_negative(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_set_negative() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int settype(int tipo) {
  printf("{FONTE}33[%dm", tipo);
  return 1;
}


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

x86 assembly (clang, -O2):
<settype>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"{FONTE}33[%dm\00"
define i32 @settype(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 1
}

LLVM IR (-O2):
@.str = [14 x i8] c"{FONTE}33[%dm\00"
define i32 @settype(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 1
}
double sum(double a, double b) { return a + b; }


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sum(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 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @sum(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
bool is_sq_empty_impl(int n) { return n == 0; }


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

x86 assembly (clang, -O2):
<is_sq_empty_impl>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_sq_empty_impl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_sq_empty_impl(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ benefitOf(int);
scalar_t__ inverseSigmoid(double);
double sigmoid(scalar_t__);
double newProbability(double currentProbability, int usage) {
  return sigmoid(benefitOf(usage) + inverseSigmoid(currentProbability));
}


x86 assembly (clang, -O0):
<newProbability>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <benefitOf@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <inverseSigmoid@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1030 <sigmoid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newProbability>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <benefitOf@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1050 <inverseSigmoid@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <sigmoid@plt>

LLVM IR (-O0):
define double @newProbability(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i64 @benefitOf(i32 %5)
%7 = load double, double* %3
%8 = call i64 @inverseSigmoid(double %7)
%9 = add nsw i64 %6, %8
%10 = call double @sigmoid(i64 %9)
ret double %10
}

LLVM IR (-O2):
define double @newProbability(double %0, i32 %1) {
%3 = tail call i64 @benefitOf(i32 %1)
%4 = tail call i64 @inverseSigmoid(double %0)
%5 = add nsw i64 %4, %3
%6 = tail call double @sigmoid(i64 %5)
ret double %6
}
void regerror(s) char *s;
{ emsg(s); }


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

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

LLVM IR (-O0):
define void @regerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @emsg to i32 (i8*, ...)*)(i8* %3)
ret void
}

LLVM IR (-O2):
define void @regerror(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @emsg to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
char *strptime(char const *, char *, struct tm *);
char *parse_imap_date(const char *str, struct tm *time) {
  return strptime(str, "%d-%b-%Y %H:%M:%S %z", time);
}


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

x86 assembly (clang, -O2):
<parse_imap_date>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <strptime@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [21 x i8] c"%d-%b-%Y %H:%M:%S %z\00"
define i8* @parse_imap_date(i8* %0, %struct.tm* %1) {
%3 = alloca i8*
%4 = alloca %struct.tm*
store i8* %0, i8** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load i8*, i8** %3
%6 = load %struct.tm*, %struct.tm** %4
%7 = call i8* @strptime(i8* %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [21 x i8] c"%d-%b-%Y %H:%M:%S %z\00"
define i8* @parse_imap_date(i8* %0, %struct.tm* %1) {
%3 = tail call i8* @strptime(i8* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), %struct.tm* %1)
ret i8* %3
}
int fdatasync(int fd) {
  ;
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @fdatasync(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ read_varid();
int /*<<< orphan*/ write_src(char *, int /*<<< orphan*/);
void POP_handler(void) {
  write_src("setvar("
            "%d"
            ", POP());\n",
            read_varid());
}


x86 assembly (clang, -O0):
<POP_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <read_varid@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <write_src@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<POP_handler>:
push   %rax
xor    %eax,%eax
call   1040 <read_varid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <write_src@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"setvar(%d, POP());\0A\00"
define void @POP_handler() {
%1 = call i32 (...) @read_varid()
%2 = call i32 @write_src(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"setvar(%d, POP());\0A\00"
define void @POP_handler() {
%1 = tail call i32 (...) @read_varid()
%2 = tail call i32 @write_src(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int send(int /*<<< orphan*/, void *, int, int /*<<< orphan*/);
int send_ether(void *buffer, int len) { return send(0, buffer, len, 0); }


x86 assembly (clang, -O0):
<send_ether>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
mov    %ecx,%edi
call   1030 <send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_ether>:
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
xor    %ecx,%ecx
jmp    1030 <send@plt>

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

LLVM IR (-O2):
define i32 @send_ether(i8* %0, i32 %1) {
%3 = tail call i32 @send(i32 0, i8* %0, i32 %1, i32 0)
ret i32 %3
}
int test_imm_C8int64_midword_reg(long long val) {
  return ((val >> 16) & (0xC8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C8int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xc8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C8int64_midword_reg>:
test   $0xc80000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C8int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 200
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_C8int64_midword_reg(i64 %0) {
%2 = and i64 %0, 13107200
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void compErrorMessage(const char *title, const char *message) {
  (void)title;
  (void)message;
}


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

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

LLVM IR (-O0):
define void @compErrorMessage(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 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @compErrorMessage(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ AT_SYMLINK_FOLLOW;
int linkat(int /*<<< orphan*/, char *, int /*<<< orphan*/, char *,
           int /*<<< orphan*/);
int main(void) {
  int r = linkat(AT_FDCWD, "/foo", AT_FDCWD, "foo", AT_SYMLINK_FOLLOW);
  return (r < 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
mov    0x2eb0(%rip),%rax
mov    (%rax),%r8d
lea    0xebe(%rip),%rsi
lea    0xeb8(%rip),%rcx
call   1030 <linkat@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2ec7(%rip),%rax
mov    (%rax),%r8d
lea    0xed5(%rip),%rsi
lea    0xecf(%rip),%rcx
mov    %edi,%edx
call   1030 <linkat@plt>
shr    $0x1f,%eax
pop    %rcx
ret

LLVM IR (-O0):
@AT_FDCWD = global i32 0
@.str = [5 x i8] c"/foo\00"
@.str.1 = [4 x i8] c"foo\00"
@AT_SYMLINK_FOLLOW = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @AT_FDCWD
%4 = load i32, i32* @AT_FDCWD
%5 = load i32, i32* @AT_SYMLINK_FOLLOW
%6 = call i32 @linkat(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
@.str = [5 x i8] c"/foo\00"
@.str.1 = [4 x i8] c"foo\00"
@AT_SYMLINK_FOLLOW = global i32 0
define i32 @main() {
%1 = load i32, i32* @AT_FDCWD
%2 = load i32, i32* @AT_SYMLINK_FOLLOW
%3 = tail call i32 @linkat(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = lshr i32 %3, 31
ret i32 %4
}
/* Variables and functions */
int sprintf(char *, char *, int, int, int);
char *print_vfpusingle(int reg, char *output) {
  int len;
  len = sprintf(output, "S%d%d%d", (reg >> 2) & 7, reg & 3, (reg >> 5) & 3);
  return output + len;
}


x86 assembly (clang, -O0):
<print_vfpusingle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
sar    $0x2,%edx
and    $0x7,%edx
mov    -0x4(%rbp),%ecx
and    $0x3,%ecx
mov    -0x4(%rbp),%r8d
sar    $0x5,%r8d
and    $0x3,%r8d
lea    0xebb(%rip),%rsi
call   1030 <sprintf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_vfpusingle>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r8d
mov    %edi,%edx
shr    $0x2,%edx
and    $0x7,%edx
mov    %edi,%ecx
and    $0x3,%ecx
shr    $0x5,%r8d
and    $0x3,%r8d
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"S%d%d%d\00"
define i8* @print_vfpusingle(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i32, i32* %3
%8 = ashr i32 %7, 2
%9 = and i32 %8, 7
%10 = load i32, i32* %3
%11 = and i32 %10, 3
%12 = load i32, i32* %3
%13 = ashr i32 %12, 5
%14 = and i32 %13, 3
%15 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11, i32 %14)
store i32 %15, i32* %5
%16 = load i8*, i8** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
ret i8* %19
}

LLVM IR (-O2):
@.str = [8 x i8] c"S%d%d%d\00"
define i8* @print_vfpusingle(i32 %0, i8* writeonly %1) {
%3 = lshr i32 %0, 2
%4 = and i32 %3, 7
%5 = and i32 %0, 3
%6 = lshr i32 %0, 5
%7 = and i32 %6, 3
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %1, i64 %9
ret i8* %10
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ MSG_PEEK;
scalar_t__ errno;
int recv(int, void *, size_t, int /*<<< orphan*/);
ssize_t recv_peek(int sockfd, void *buf, size_t len) {
  while (1) {
    int ret = recv(sockfd, buf, len, MSG_PEEK);
    if (ret == -1 && errno == EINTR)
      continue;
    return ret;
  }
}


x86 assembly (clang, -O0):
<recv_peek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ecx
call   1030 <recv@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1168 <recv_peek+0x58>
mov    0x2e88(%rip),%rax
mov    (%rax),%rax
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
jne    1168 <recv_peek+0x58>
jmp    1123 <recv_peek+0x13>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recv_peek>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ebe(%rip),%r15
mov    0x2ea7(%rip),%r12
mov    0x2e98(%rip),%r13
nopl   0x0(%rax,%rax,1)
mov    (%r15),%ecx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <recv@plt>
cmp    $0xffffffff,%eax
jne    115f <recv_peek+0x4f>
mov    (%r12),%rcx
cmp    0x0(%r13),%rcx
je     1140 <recv_peek+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@MSG_PEEK = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @recv_peek(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
br label %8
8: ; preds = %3, %20
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i32, i32* @MSG_PEEK
%13 = call i32 @recv(i32 %9, i8* %10, i64 %11, i32 %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %8
%17 = load i64, i64* @errno
%18 = load i64, i64* @EINTR
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
br label %8
21: ; preds = %16, %8
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
@MSG_PEEK = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @recv_peek(i32 %0, i8* %1, i64 %2) {
br label %4
4: ; preds = %8, %3
%5 = load i32, i32* @MSG_PEEK
%6 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i64, i64* @errno
%10 = load i64, i64* @EINTR
%11 = icmp eq i64 %9, %10
br i1 %11, label %4, label %12
12: ; preds = %4, %8
ret i32 %6
}
void rl_callback_read_char(void) {}


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

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

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

LLVM IR (-O2):
define void @rl_callback_read_char() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void print_help(FILE *out, char *program) {
  fprintf(out,
          "Usage %s [-g] [-p] [-I <include>] [-o <output>]"
          " [-e <label>] <file>\n",
          program);
}


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

x86 assembly (clang, -O2):
<print_help>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"Usage %s [-g] [-p] [-I <include>] [-o <output>] [-e <label>] <file>\0A\00"
define void @print_help(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 @fprintf(i32* %5, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"Usage %s [-g] [-p] [-I <include>] [-o <output>] [-e <label>] <file>\0A\00"
define void @print_help(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
char strcmp(char const *, char const *);
char compare_strings(const char *s1, const char *s2) {
  if (s1 == s2)
    return 0;
  else if (s1) {
    if (s2)
      return strcmp(s1, s2);
    else
      return 1;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<compare_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1137 <compare_strings+0x27>
movb   $0x0,-0x1(%rbp)
jmp    116f <compare_strings+0x5f>
cmpq   $0x0,-0x10(%rbp)
je     116b <compare_strings+0x5b>
cmpq   $0x0,-0x18(%rbp)
je     1162 <compare_strings+0x52>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %al,-0x1(%rbp)
jmp    116f <compare_strings+0x5f>
movb   $0x1,-0x1(%rbp)
jmp    116f <compare_strings+0x5f>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_strings>:
cmp    %rsi,%rdi
je     1126 <compare_strings+0x16>
mov    $0x1,%al
test   %rdi,%rdi
je     1128 <compare_strings+0x18>
test   %rsi,%rsi
je     1128 <compare_strings+0x18>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @compare_strings(i8* %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i8 0, i8* %3
br label %22
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i8*, i8** %4
%18 = load i8*, i8** %5
%19 = call signext i8 @strcmp(i8* %17, i8* %18)
store i8 %19, i8* %3
br label %22
20: ; preds = %13
store i8 1, i8* %3
br label %22
21: ; preds = %10
store i8 1, i8* %3
br label %22
22: ; preds = %21, %20, %16, %9
%23 = load i8, i8* %3
ret i8 %23
}

LLVM IR (-O2):
define signext i8 @compare_strings(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call signext i8 @strcmp(i8* %0, i8* %1)
br label %10
10: ; preds = %4, %2, %8
%11 = phi i8 [ %9, %8 ], [ 0, %2 ], [ 1, %4 ]
ret i8 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void killParent() { exit(0); }


x86 assembly (clang, -O0):
<killParent>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @killParent() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @killParent() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
int __irq_payload_tx() { return -1; }


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

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

LLVM IR (-O0):
define i32 @__irq_payload_tx() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @__irq_payload_tx() {
ret i32 -1
}
void op0x27(void) {}


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

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

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

LLVM IR (-O2):
define void @op0x27() {
ret void
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_INC_PIN() { return 0x01 & (inp_emulate(0x35) >> 2); }


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

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

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

LLVM IR (-O2):
define signext i8 @TOSH_READ_INC_PIN() {
%1 = tail call i32 @inp_emulate(i32 53)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 2
%4 = and i8 %3, 1
ret i8 %4
}
/* Type definitions */
struct timeval {
  int tv_sec;
};
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, struct timeval *);
void block(int fd) {
  fd_set fds;
  struct timeval tv;
  FD_ZERO(&fds);
  FD_SET(fd, &fds);
  tv.tv_sec = 100;
  select(fd + 1, &fds, NULL, NULL, &tv);
}


x86 assembly (clang, -O0):
<block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <FD_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <FD_SET@plt>
movl   $0x64,-0x10(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
lea    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x10(%rbp),%r8
mov    %rcx,%rdx
call   1040 <select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1030 <FD_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <FD_SET@plt>
movl   $0x64,(%rsp)
add    $0x1,%ebx
mov    %rsp,%r8
mov    %ebx,%edi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <select@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @block(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.timeval
store i32 %0, i32* %2
%5 = call i32 @FD_ZERO(i32* %3)
%6 = load i32, i32* %2
%7 = call i32 @FD_SET(i32 %6, i32* %3)
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
store i32 100, i32* %8
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
%11 = call i32 @select(i32 %10, i32* %3, i32* null, i32* null, %struct.timeval* %4)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @block(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timeval
%4 = bitcast i32* %2 to i8*
%5 = bitcast %struct.timeval* %3 to i8*
%6 = call i32 @FD_ZERO(i32* %2)
%7 = call i32 @FD_SET(i32 %0, i32* %2)
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
store i32 100, i32* %8
%9 = add nsw i32 %0, 1
%10 = call i32 @select(i32 %9, i32* %2, i32* null, i32* null, %struct.timeval* %3)
ret void
}
unsigned char glk_char_to_lower(unsigned char ch) {
  if (ch >= 'A' && ch <= 'Z')
    return ch + ('a' - 'A');
  if (ch >= 0xC0 && ch <= 0xDE && ch != 0xD7)
    return ch + 0x20;
  return ch;
}


x86 assembly (clang, -O0):
<glk_char_to_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <glk_char_to_lower+0x33>
movzbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <glk_char_to_lower+0x33>
movzbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1175 <glk_char_to_lower+0x75>
movzbl -0x2(%rbp),%eax
cmp    $0xc0,%eax
jl     116f <glk_char_to_lower+0x6f>
movzbl -0x2(%rbp),%eax
cmp    $0xde,%eax
jg     116f <glk_char_to_lower+0x6f>
movzbl -0x2(%rbp),%eax
cmp    $0xd7,%eax
je     116f <glk_char_to_lower+0x6f>
movzbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1175 <glk_char_to_lower+0x75>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<glk_char_to_lower>:
mov    %edi,%eax
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     110d <glk_char_to_lower+0xd>
add    $0x20,%al
ret
lea    0x40(%rax),%ecx
lea    0x20(%rax),%edx
cmp    $0x1f,%cl
movzbl %al,%ecx
movzbl %dl,%edx
cmovae %ecx,%edx
cmp    $0xd7,%al
cmove  %ecx,%edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @glk_char_to_lower(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %35
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = zext i8 %17 to i32
%19 = icmp sge i32 %18, 192
br i1 %19, label %20, label %33
20: ; preds = %16
%21 = load i8, i8* %3
%22 = zext i8 %21 to i32
%23 = icmp sle i32 %22, 222
br i1 %23, label %24, label %33
24: ; preds = %20
%25 = load i8, i8* %3
%26 = zext i8 %25 to i32
%27 = icmp ne i32 %26, 215
br i1 %27, label %28, label %33
28: ; preds = %24
%29 = load i8, i8* %3
%30 = zext i8 %29 to i32
%31 = add nsw i32 %30, 32
%32 = trunc i32 %31 to i8
store i8 %32, i8* %2
br label %35
33: ; preds = %24, %20, %16
%34 = load i8, i8* %3
store i8 %34, i8* %2
br label %35
35: ; preds = %33, %28, %11
%36 = load i8, i8* %2
ret i8 %36
}

LLVM IR (-O2):
define zeroext i8 @glk_char_to_lower(i8 zeroext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nuw nsw i8 %0, 32
br label %13
6: ; preds = %1
%7 = add i8 %0, 64
%8 = icmp ult i8 %7, 31
%9 = icmp ne i8 %0, -41
%10 = and i1 %9, %8
%11 = add i8 %0, 32
%12 = select i1 %10, i8 %11, i8 %0
br label %13
13: ; preds = %6, %4
%14 = phi i8 [ %5, %4 ], [ %12, %6 ]
ret i8 %14
}