xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ ceil(double);
int ceili(double x) { return (int)ceil(x); }


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

x86 assembly (clang, -O2):
<ceili>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @ceili(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @ceil(double %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ceili(double %0) {
%2 = tail call i64 @ceil(double %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void _ZN9__gnu_cxx13new_allocatorIPiEC2Ev(
    struct l_class_OC_DummyStream *llvm_cbe_this) {
  unsigned char *llvm_cbe__rethrow;
  struct l_class_OC_DummyStream *llvm_cbe_this_2e_addr;
  struct l_class_OC_DummyStream *llvm_cbe_this1;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  return;
}


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

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

LLVM IR (-O0):
%struct.l_class_OC_DummyStream = type opaque
define void @_ZN9__gnu_cxx13new_allocatorIPiEC2Ev(%struct.l_class_OC_DummyStream* %0) {
%2 = alloca %struct.l_class_OC_DummyStream*
%3 = alloca i8*
%4 = alloca %struct.l_class_OC_DummyStream*
%5 = alloca %struct.l_class_OC_DummyStream*
store %struct.l_class_OC_DummyStream* %0, %struct.l_class_OC_DummyStream** %2
%6 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %2
store %struct.l_class_OC_DummyStream* %6, %struct.l_class_OC_DummyStream** %4
%7 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %4
store %struct.l_class_OC_DummyStream* %7, %struct.l_class_OC_DummyStream** %5
ret void
}

LLVM IR (-O2):
%struct.l_class_OC_DummyStream = type opaque
define void @_ZN9__gnu_cxx13new_allocatorIPiEC2Ev(%struct.l_class_OC_DummyStream* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int /*<<< orphan*/, char *);
int /*<<< orphan*/ toUpperCase(char *);
void testConvertToUpperCase(void) {
  test(toUpperCase("abc"), "ABC");
  test(toUpperCase("#a1"), "#A1");
}


x86 assembly (clang, -O0):
<testConvertToUpperCase>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <toUpperCase@plt>
mov    %eax,%edi
lea    0xecb(%rip),%rsi
call   1040 <test@plt>
lea    0xec3(%rip),%rdi
call   1030 <toUpperCase@plt>
mov    %eax,%edi
lea    0xeb9(%rip),%rsi
call   1040 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testConvertToUpperCase>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <toUpperCase@plt>
lea    0xed0(%rip),%rsi
mov    %eax,%edi
call   1040 <test@plt>
lea    0xec6(%rip),%rdi
call   1030 <toUpperCase@plt>
lea    0xebe(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1040 <test@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"ABC\00"
@.str.2 = [4 x i8] c"#a1\00"
@.str.3 = [4 x i8] c"#A1\00"
define void @testConvertToUpperCase() {
%1 = call i32 @toUpperCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @test(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @toUpperCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @test(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"ABC\00"
@.str.2 = [4 x i8] c"#a1\00"
@.str.3 = [4 x i8] c"#A1\00"
define void @testConvertToUpperCase() {
%1 = tail call i32 @toUpperCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @test(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @toUpperCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @test(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  long member_0;
  long member_1;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
void slip(long sec, long nano) {
  long seconds = sec;
  long nanoseconds = nano;
  struct timespec reqDelay = {seconds, nanoseconds};
  nanosleep(&reqDelay, (struct timespec *)NULL);
}


x86 assembly (clang, -O0):
<slip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x30(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slip>:
sub    $0x18,%rsp
mov    %rdi,0x8(%rsp)
mov    %rsi,0x10(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define void @slip(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca %struct.timespec
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
store i64 %8, i64* %5
%9 = load i64, i64* %4
store i64 %9, i64* %6
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
%11 = load i64, i64* %5
store i64 %11, i64* %10
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 1
%13 = load i64, i64* %6
store i64 %13, i64* %12
%14 = call i32 @nanosleep(%struct.timespec* %7, %struct.timespec* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @slip(i64 %0, i64 %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
store i64 %0, i64* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 1
store i64 %1, i64* %6
%7 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void test_invalid_clause() {
  int i;
#pragma omp parallel sections foo bar
  {
    foo();
#pragma omp section nowait
    ;
  }
}


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

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

LLVM IR (-O0):
define void @test_invalid_clause() {
%1 = alloca i32
%2 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @test_invalid_clause() {
%1 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
scalar_t__ mkdir(char const *, int);
int main(int argc, const char *argv[]) {
  if (argc < 2)
    return (64);
  return (mkdir(argv[1], 0777) == 0 ? 0 : 1);
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    113c <main+0x2c>
movl   $0x40,-0x4(%rbp)
jmp    1162 <main+0x52>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x40,%eax
cmp    $0x2,%edi
jl     1138 <main+0x28>
push   %rax
mov    0x8(%rsi),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
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 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 64, i32* %3
br label %17
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i64 @mkdir(i8* %12, i32 511)
%14 = icmp eq i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
store i32 %16, i32* %3
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @mkdir(i8* %6, i32 511)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 64, %2 ]
ret i32 %11
}
int repeatedRightShift(int x, int count) {
  while (count-- > 0) {
    x >>= 1;
  }
  return x;
}


x86 assembly (clang, -O0):
<repeatedRightShift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    112c <repeatedRightShift+0x2c>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110a <repeatedRightShift+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<repeatedRightShift>:
mov    %edi,%eax
test   %esi,%esi
jle    114b <repeatedRightShift+0x4b>
lea    -0x1(%rsi),%ecx
mov    %esi,%edx
and    $0x7,%edx
je     112b <repeatedRightShift+0x2b>
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
sar    %eax
add    $0x1,%edi
cmp    %edi,%edx
jne    1120 <repeatedRightShift+0x20>
sub    %edi,%esi
cmp    $0x7,%ecx
jb     114b <repeatedRightShift+0x4b>
add    $0xffffffff,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
sar    $0x8,%eax
add    $0xfffffff8,%esi
cmp    $0xfffffffe,%esi
jb     1140 <repeatedRightShift+0x40>
ret

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

LLVM IR (-O2):
define i32 @repeatedRightShift(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %28
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp eq i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %4, %8
%9 = phi i32 [ %12, %8 ], [ %1, %4 ]
%10 = phi i32 [ %13, %8 ], [ %0, %4 ]
%11 = phi i32 [ %14, %8 ], [ 0, %4 ]
%12 = add nsw i32 %9, -1
%13 = ashr i32 %10, 1
%14 = add i32 %11, 1
%15 = icmp eq i32 %14, %6
br i1 %15, label %16, label %8
16: ; preds = %8, %4
%17 = phi i32 [ %1, %4 ], [ %12, %8 ]
%18 = phi i32 [ %0, %4 ], [ %13, %8 ]
%19 = phi i32 [ undef, %4 ], [ %13, %8 ]
%20 = icmp ult i32 %5, 7
br i1 %20, label %28, label %21
21: ; preds = %16, %21
%22 = phi i32 [ %24, %21 ], [ %17, %16 ]
%23 = phi i32 [ %25, %21 ], [ %18, %16 ]
%24 = add nsw i32 %22, -8
%25 = ashr i32 %23, 8
%26 = add i32 %22, -9
%27 = icmp ult i32 %26, -2
br i1 %27, label %21, label %28
28: ; preds = %16, %21, %2
%29 = phi i32 [ %0, %2 ], [ %19, %16 ], [ %25, %21 ]
ret i32 %29
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void test(void) {
  printf("%zu", (double)42);
  printf("%jd", (double)42);
  printf("%ju", (double)42);
  printf("%td", (double)42);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
movsd  0xedd(%rip),%xmm0
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
movsd  0xec9(%rip),%xmm0
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
movsd  0xeb5(%rip),%xmm0
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
movsd  0xea1(%rip),%xmm0
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
movsd  0xecc(%rip),%xmm0
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
movsd  0xeb8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
movsd  0xea4(%rip),%xmm0
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%zu\00"
@.str.1 = [4 x i8] c"%jd\00"
@.str.2 = [4 x i8] c"%ju\00"
@.str.3 = [4 x i8] c"%td\00"
define void @test() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 4.200000e+01)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double 4.200000e+01)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double 4.200000e+01)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double 4.200000e+01)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%zu\00"
@.str.1 = [4 x i8] c"%jd\00"
@.str.2 = [4 x i8] c"%ju\00"
@.str.3 = [4 x i8] c"%td\00"
define void @test() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 4.200000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double 4.200000e+01)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double 4.200000e+01)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double 4.200000e+01)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *opendcp_log_timestamp() {
  time_t time_ptr;
  struct tm *time_struct;
  static char buffer[30];
  time(&time_ptr);
  time_struct = localtime(&time_ptr);
  strftime(buffer, 30, "%Y%m%d%I%M%S", time_struct);
  return buffer;
}


x86 assembly (clang, -O0):
<opendcp_log_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0x2ef7(%rip),%rdi
mov    $0x1e,%esi
lea    0xe9b(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2edf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opendcp_log_timestamp>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0x2eff(%rip),%rbx
lea    0xea8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@opendcp_log_timestamp.buffer = internal global [30 x i8] zeroinitializer
@.str = [13 x i8] c"%Y%m%d%I%M%S\00"
define i8* @opendcp_log_timestamp() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @strftime(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @opendcp_log_timestamp.buffer, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @opendcp_log_timestamp.buffer, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@opendcp_log_timestamp.buffer = internal global [30 x i8] zeroinitializer
@.str = [13 x i8] c"%Y%m%d%I%M%S\00"
define i8* @opendcp_log_timestamp() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i32 @strftime(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @opendcp_log_timestamp.buffer, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @opendcp_log_timestamp.buffer, i64 0, i64 0)
}
int test_imm_47uint16_reg(unsigned short val) {
  return ((val) & (0x47 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_47uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x47,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_47uint16_reg>:
test   $0x47,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_47uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 71
%6 = icmp ne i32 %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_47uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 71
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ chmod(char *, int);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ stat(char *, struct stat *);
void privatise(char *f) {
  struct stat b;
  printf("debug: privatising %s\n", f);
  if (stat(f, &b) < 0)
    return;
  chmod(f, b.st_mode & 0700);
}


x86 assembly (clang, -O0):
<privatise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    1168 <privatise+0x38>
jmp    117a <privatise+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
and    $0x1c0,%esi
call   1050 <chmod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<privatise>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <stat@plt>
test   %rax,%rax
js     116a <privatise+0x3a>
mov    $0x1c0,%esi
and    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1050 <chmod@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [23 x i8] c"debug: privatising %s\0A\00"
define void @privatise(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i64 @stat(i8* %6, %struct.stat* %3)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
br label %16
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%13 = load i32, i32* %12
%14 = and i32 %13, 448
%15 = call i32 @chmod(i8* %11, i32 %14)
br label %16
16: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [23 x i8] c"debug: privatising %s\0A\00"
define void @privatise(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i64 @stat(i8* %0, %struct.stat* %2)
%6 = icmp slt i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%9 = load i32, i32* %8
%10 = and i32 %9, 448
%11 = call i32 @chmod(i8* %0, i32 %10)
br label %12
12: ; preds = %1, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("./../../../../../../../Files/77.sh");
  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 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [35 x i8] c"./../../../../../../../Files/77.sh\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"./../../../../../../../Files/77.sh\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int fiveeighths(int x) {
  int xl3 = x & 0x7;
  int xl1 = (x & 1) << 2;
  int x_mask = x >> ((sizeof(int) << 3) - 1u);
  int bias = x_mask & 7;
  int incr = (xl3 + xl1 + bias) >> 3;
  int s3 = x >> 3;
  int s1 = x >> 1;
  return s1 + s3 + incr;
}


x86 assembly (clang, -O0):
<fiveeighths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiveeighths>:
mov    %edi,%eax
and    $0x7,%eax
mov    %edi,%ecx
and    $0x1,%ecx
mov    %edi,%edx
sar    $0x1f,%edx
and    $0x7,%edx
lea    (%rax,%rcx,4),%ecx
add    %edx,%ecx
shr    $0x3,%ecx
mov    %edi,%eax
sar    $0x3,%eax
sar    %edi
add    %edi,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fiveeighths(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 7
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = and i32 %12, 1
%14 = shl i32 %13, 2
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = ashr i32 %15, 31
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = and i32 %17, 7
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %6
%23 = add nsw i32 %21, %22
%24 = ashr i32 %23, 3
store i32 %24, i32* %7
%25 = load i32, i32* %2
%26 = ashr i32 %25, 3
store i32 %26, i32* %8
%27 = load i32, i32* %2
%28 = ashr i32 %27, 1
store i32 %28, i32* %9
%29 = load i32, i32* %9
%30 = load i32, i32* %8
%31 = add nsw i32 %29, %30
%32 = load i32, i32* %7
%33 = add nsw i32 %31, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @fiveeighths(i32 %0) {
%2 = and i32 %0, 7
%3 = shl i32 %0, 2
%4 = and i32 %3, 4
%5 = icmp slt i32 %0, 0
%6 = select i1 %5, i32 7, i32 0
%7 = add nuw nsw i32 %4, %2
%8 = add nuw nsw i32 %7, %6
%9 = lshr i32 %8, 3
%10 = ashr i32 %0, 3
%11 = ashr i32 %0, 1
%12 = add nsw i32 %11, %10
%13 = add nsw i32 %12, %9
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_tokenizer_get() {
  printf("NOT IMPLEMENTED:"
         "pa_tokenizer_get"
         "\n");
}


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

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

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

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

/* Variables and functions */
int64_t asrl63(int64_t x) { return x >> 63; }


x86 assembly (clang, -O0):
<asrl63>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @asrl63(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 63
ret i32 %4
}

LLVM IR (-O2):
define i32 @asrl63(i32 %0) {
ret i32 poison
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ crc32_le_generic(int /*<<< orphan*/, unsigned char const *,
                                    size_t, int);
__u32 crc32c_le(__u32 crc, unsigned char const *p, size_t len) {
  return crc32_le_generic(crc, p, len, 0x82F63B78);
}


x86 assembly (clang, -O0):
<crc32c_le>:
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    $0x82f63b78,%ecx
call   1030 <crc32_le_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32c_le>:
mov    $0x82f63b78,%ecx
jmp    1030 <crc32_le_generic@plt>

LLVM IR (-O0):
define i32 @crc32c_le(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @crc32_le_generic(i32 %7, i8* %8, i64 %9, i32 -2097792136)
ret i32 %10
}

LLVM IR (-O2):
define i32 @crc32c_le(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @crc32_le_generic(i32 %0, i8* %1, i64 %2, i32 -2097792136)
ret i32 %4
}
/* Variables and functions */
int error(int, char *);
int /*<<< orphan*/ putjobtable();
int b_jobs(int argc, char *argv[]) {
  if (argc > 1)
    return error(1, argv[0]);
  putjobtable();
  return 0;
}


x86 assembly (clang, -O0):
<b_jobs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1152 <b_jobs+0x32>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x1,%edi
call   1040 <error@plt>
mov    %eax,-0x4(%rbp)
jmp    1160 <b_jobs+0x40>
mov    $0x0,%al
call   1030 <putjobtable@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_jobs>:
push   %rax
cmp    $0x2,%edi
jl     1134 <b_jobs+0x14>
mov    (%rsi),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1040 <error@plt>
xor    %eax,%eax
call   1030 <putjobtable@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @b_jobs(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @error(i32 1, i8* %11)
store i32 %12, i32* %3
br label %15
13: ; preds = %2
%14 = call i32 (...) @putjobtable()
store i32 0, i32* %3
br label %15
15: ; preds = %13, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @b_jobs(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @error(i32 1, i8* %5)
br label %9
7: ; preds = %2
%8 = tail call i32 (...) @putjobtable()
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ 0, %7 ]
ret i32 %10
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int8_t reverseBits_fun_int8_t(int8_t x) {
  int8_t r = x;
  int i = 7;
  for (x = x >> 1 & 0x7f; x; x >>= 1) {
    r = (r << 1) | (x & 1);
    --i;
  }
  return r << i;
}


x86 assembly (clang, -O0):
<reverseBits_fun_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
and    $0x7f,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1152 <reverseBits_fun_int8_t+0x52>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1120 <reverseBits_fun_int8_t+0x20>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseBits_fun_int8_t>:
mov    %edi,%eax
mov    %edi,%edx
shr    %edx
mov    $0x7,%ecx
and    $0x7f,%edx
je     1134 <reverseBits_fun_int8_t+0x34>
mov    %edx,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%edi
and    $0x1,%edi
lea    (%rdi,%rax,2),%eax
add    $0xffffffff,%ecx
shr    %esi
cmp    $0x1,%edx
mov    %esi,%edx
ja     1120 <reverseBits_fun_int8_t+0x20>
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @reverseBits_fun_int8_t(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
store i32 7, i32* %4
%6 = load i32, i32* %2
%7 = ashr i32 %6, 1
%8 = and i32 %7, 127
store i32 %8, i32* %2
br label %9
9: ; preds = %20, %1
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load i32, i32* %3
%14 = shl i32 %13, 1
%15 = load i32, i32* %2
%16 = and i32 %15, 1
%17 = or i32 %14, %16
store i32 %17, i32* %3
%18 = load i32, i32* %4
%19 = add nsw i32 %18, -1
store i32 %19, i32* %4
br label %20
20: ; preds = %12
%21 = load i32, i32* %2
%22 = ashr i32 %21, 1
store i32 %22, i32* %2
br label %9
23: ; preds = %9
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = shl i32 %24, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @reverseBits_fun_int8_t(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 127
%4 = icmp eq i32 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %12, %5 ], [ 7, %1 ]
%7 = phi i32 [ %11, %5 ], [ %0, %1 ]
%8 = phi i32 [ %13, %5 ], [ %3, %1 ]
%9 = shl i32 %7, 1
%10 = and i32 %8, 1
%11 = or i32 %9, %10
%12 = add nsw i32 %6, -1
%13 = lshr i32 %8, 1
%14 = icmp ult i32 %8, 2
br i1 %14, label %15, label %5
15: ; preds = %5, %1
%16 = phi i32 [ %0, %1 ], [ %11, %5 ]
%17 = phi i32 [ 7, %1 ], [ %12, %5 ]
%18 = shl i32 %16, %17
ret i32 %18
}
/* Variables and functions */
int summing(int);
int srav(int register2, int register3) {
  return (register2 >> register3 + summing(register3) * (register2 >> 31));
}


x86 assembly (clang, -O0):
<srav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <summing@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%esi
sar    $0x1f,%esi
imul   %esi,%edx
add    %edx,%ecx
sar    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srav>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
call   1030 <summing@plt>
mov    %ebp,%ecx
sar    $0x1f,%ecx
imul   %eax,%ecx
add    %ebx,%ecx
sar    %cl,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @srav(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 = load i32, i32* %4
%8 = call i32 @summing(i32 %7)
%9 = load i32, i32* %3
%10 = ashr i32 %9, 31
%11 = mul nsw i32 %8, %10
%12 = add nsw i32 %6, %11
%13 = ashr i32 %5, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @srav(i32 %0, i32 %1) {
%3 = tail call i32 @summing(i32 %1)
%4 = ashr i32 %0, 31
%5 = mul nsw i32 %3, %4
%6 = add nsw i32 %5, %1
%7 = ashr i32 %0, %6
ret i32 %7
}
/* Variables and functions */
scalar_t__ is_reversible_two(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int count = 0;
  for (int i = 0; i < 1000000000; i++) {
    if (is_reversible_two(i))
      count++;
  }
  printf("%d\n", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3b9aca00,-0xc(%rbp)
jge    1178 <main+0x58>
mov    -0xc(%rbp),%edi
call   1040 <is_reversible_two@plt>
cmp    $0x0,%rax
je     1165 <main+0x45>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <main+0x4a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1040 <is_reversible_two@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
add    $0x1,%ebp
cmp    $0x3b9aca00,%ebp
jne    1130 <main+0x10>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %3
1: ; preds = %3
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %10, %3 ]
%5 = phi i32 [ 0, %0 ], [ %9, %3 ]
%6 = tail call i64 @is_reversible_two(i32 %4)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %5, %8
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 1000000000
br i1 %11, label %1, label %3
}
int replaceByte(int x, int n, int c) {
  n = n << 3;
  return (x & ~(0xFF << n)) ^ (c << n);
}


x86 assembly (clang, -O0):
<replaceByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0xff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<replaceByte>:
lea    0x0(,%rsi,8),%ecx
mov    $0xff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
shl    %cl,%edx
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @replaceByte(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* %5
%8 = shl i32 %7, 3
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = shl i32 255, %10
%12 = xor i32 %11, -1
%13 = and i32 %9, %12
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = shl i32 %14, %15
%17 = xor i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @replaceByte(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 3
%5 = shl i32 255, %4
%6 = xor i32 %5, -1
%7 = and i32 %6, %0
%8 = shl i32 %2, %4
%9 = xor i32 %7, %8
ret i32 %9
}
RX0AR1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[x0]) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<RX0AR1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  0x10f444(%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0AR1>:
movss  0x10f444(%rcx),%xmm0
movslq %edi,%rax
movss  %xmm0,(%rdx,%rax,4)
ret

LLVM IR (-O0):
define i32 @RX0AR1(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = getelementptr inbounds float, float* %16, i64 277777
%18 = load float, float* %17
%19 = load float*, float** %12
%20 = load i32, i32* %10
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %19, i64 %21
store float %18, float* %22
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @RX0AR1(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture %5) {
%7 = getelementptr inbounds float, float* %5, i64 277777
%8 = load float, float* %7
%9 = sext i32 %2 to i64
%10 = getelementptr inbounds float, float* %4, i64 %9
store float %8, float* %10
ret i32 undef
}
/* Variables and functions */
int g_tcp_bind_address(int, char *, char *);
int scp_tcp_bind(int sck, char *addr, char *port) {
  return g_tcp_bind_address(sck, port, addr);
}


x86 assembly (clang, -O0):
<scp_tcp_bind>:
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    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <g_tcp_bind_address@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scp_tcp_bind>:
mov    %rsi,%rax
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <g_tcp_bind_address@plt>

LLVM IR (-O0):
define i32 @scp_tcp_bind(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %6
%9 = load i8*, i8** %5
%10 = call i32 @g_tcp_bind_address(i32 %7, i8* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @scp_tcp_bind(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @g_tcp_bind_address(i32 %0, i8* %2, i8* %1)
ret i32 %4
}
void I422ToRGBA() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void evdns_server_callback(struct evdns_server_request *req, void *data) {
  printf("Get DNS query\n");
  return;
}


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

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

LLVM IR (-O0):
%struct.evdns_server_request = type { i32 }
@.str = [15 x i8] c"Get DNS query\0A\00"
define void @evdns_server_callback(%struct.evdns_server_request* %0, i8* %1) {
%3 = alloca %struct.evdns_server_request*
%4 = alloca i8*
store %struct.evdns_server_request* %0, %struct.evdns_server_request** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.evdns_server_request = type { i32 }
@str = [14 x i8] c"Get DNS query\00"
define void @evdns_server_callback(%struct.evdns_server_request* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ app_init();
int /*<<< orphan*/ hal_init();
int /*<<< orphan*/ loop_process();
int /*<<< orphan*/ os_init();
int /*<<< orphan*/ scheduler_process();
int main(void) {
  hal_init();
  os_init();
  app_init();
  while (1) {
    scheduler_process();
    loop_process();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <hal_init@plt>
mov    $0x0,%al
call   1070 <os_init@plt>
mov    $0x0,%al
call   1030 <app_init@plt>
mov    $0x0,%al
call   1060 <scheduler_process@plt>
mov    $0x0,%al
call   1050 <loop_process@plt>
jmp    1174 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <hal_init@plt>
xor    %eax,%eax
call   1070 <os_init@plt>
xor    %eax,%eax
call   1030 <app_init@plt>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <scheduler_process@plt>
xor    %eax,%eax
call   1050 <loop_process@plt>
jmp    1170 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @hal_init()
%3 = call i32 (...) @os_init()
%4 = call i32 (...) @app_init()
br label %5
5: ; preds = %0, %5
%6 = call i32 (...) @scheduler_process()
%7 = call i32 (...) @loop_process()
br label %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hal_init()
%2 = tail call i32 (...) @os_init()
%3 = tail call i32 (...) @app_init()
br label %4
4: ; preds = %0, %4
%5 = tail call i32 (...) @scheduler_process()
%6 = tail call i32 (...) @loop_process()
br label %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t rotr32(uint32_t x, uint8_t n) { return ((x >> n) | (x << (32 - n))); }


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

x86 assembly (clang, -O2):
<rotr32>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotr32(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 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotr32(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int get_data_size(int *data_set) { return sizeof(data_set) / sizeof(int); }


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

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

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

LLVM IR (-O2):
define i32 @get_data_size(i32* nocapture readnone %0) {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ test_descriptions();
int /*<<< orphan*/ test_init();
int /*<<< orphan*/ test_states();
int main(int argc, char *argv[]) {
  test_init();
  test_descriptions();
  test_states();
  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    $0x0,%al
call   1030 <test_init@plt>
mov    $0x0,%al
call   1050 <test_descriptions@plt>
mov    $0x0,%al
call   1040 <test_states@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_init@plt>
xor    %eax,%eax
call   1050 <test_descriptions@plt>
xor    %eax,%eax
call   1040 <test_states@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 (...) @test_init()
%7 = call i32 (...) @test_descriptions()
%8 = call i32 (...) @test_states()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_init()
%4 = tail call i32 (...) @test_descriptions()
%5 = tail call i32 (...) @test_states()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mem_free(char *);
void string_free(char *str) { mem_free(str); }


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

x86 assembly (clang, -O2):
<string_free>:
jmp    1030 <mem_free@plt>

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

LLVM IR (-O2):
define void @string_free(i8* %0) {
%2 = tail call i32 @mem_free(i8* %0)
ret void
}
void gf_multby_zero(void *dest, int bytes, int xor) {
  if (xor)
    return;
  bzero(dest, bytes);
  return;
}


x86 assembly (clang, -O0):
<gf_multby_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1131 <gf_multby_zero+0x21>
jmp    1140 <gf_multby_zero+0x30>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf_multby_zero>:
test   %edx,%edx
je     1115 <gf_multby_zero+0x5>
ret
movslq %esi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @gf_multby_zero(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %14
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
br label %14
14: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @gf_multby_zero(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = sext i32 %1 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %6, i1 false)
br label %7
7: ; preds = %3, %5
ret void
}
char *Getenv(char *x) { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @Getenv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @Getenv(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
int fun646() { return 646; }


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

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

LLVM IR (-O0):
define i32 @fun646() {
ret i32 646
}

LLVM IR (-O2):
define i32 @fun646() {
ret i32 646
}