xunge/DecIR huggingface dataset:
/* Variables and functions */
int O_CREAT;
int O_WRONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ open(char *, int, int);
int main(int argc, char *argv[]) {
  close(1);
  open("comout", O_WRONLY | O_CREAT, 0666);
  execvp(argv[1], &argv[1]);
  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    $0x1,%edi
call   1030 <close@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
mov    0x2e98(%rip),%rax
or     (%rax),%esi
lea    0xe97(%rip),%rdi
mov    $0x1b6,%edx
call   1040 <open@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1050 <execvp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%edi
call   1030 <close@plt>
mov    0x2e8b(%rip),%rax
mov    0x2eac(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xea9(%rip),%rdi
mov    $0x1b6,%edx
call   1040 <open@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
mov    %rbx,%rsi
call   1050 <execvp@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"comout\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @close(i32 1)
%7 = load i32, i32* @O_WRONLY
%8 = load i32, i32* @O_CREAT
%9 = or i32 %7, %8
%10 = call i32 @open(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9, i32 438)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = call i32 @execvp(i8* %13, i8** %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"comout\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @close(i32 1)
%4 = load i32, i32* @O_WRONLY
%5 = load i32, i32* @O_CREAT
%6 = or i32 %5, %4
%7 = tail call i32 @open(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i32 438)
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @execvp(i8* %9, i8** %8)
ret i32 0
}
void f(void) {
  int i;
#pragma hlt unroll(11)
  for (i = 0; i < 100; i++) {
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1128 <f+0x28>
jmp    111a <f+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <f+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
int five_binary() { return 101; }


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

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

LLVM IR (-O0):
define i32 @five_binary() {
ret i32 101
}

LLVM IR (-O2):
define i32 @five_binary() {
ret i32 101
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void funcb2(void) { printf("B2 not defined\n"); }


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"B2 not defined\00"
define void @funcb2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int upper_power_of_2(int n) {
  n--;
  n |= n >> 1;
  n |= n >> 2;
  n |= n >> 4;
  n |= n >> 8;
  n |= n >> 16;
  return ++n;
}


x86 assembly (clang, -O0):
<upper_power_of_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper_power_of_2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @upper_power_of_2(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %12, 1
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int16_t;

/* Variables and functions */
u_int16_t store_swp_fake16(u_int16_t v) { return v; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
scalar_t__ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                       int /*<<< orphan*/);
void BlockSegv() {
  sigset_t ss;
  sigemptyset(&ss);
  sigaddset(&ss, SIGSEGV);
  if (sigprocmask(SIG_BLOCK, &ss, 0) != 0) {
    printf("Unable to block SEGV\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<BlockSegv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <sigemptyset@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1070 <sigaddset@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
cmp    $0x0,%rax
je     11a7 <BlockSegv+0x57>
lea    0xe68(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BlockSegv>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <sigemptyset@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1070 <sigaddset@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
test   %rax,%rax
jne    1191 <BlockSegv+0x41>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe68(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@SIGSEGV = global i32 0
@SIG_BLOCK = global i32 0
@.str = [22 x i8] c"Unable to block SEGV\0A\00"
define void @BlockSegv() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGSEGV
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_BLOCK
%6 = call i64 @sigprocmask(i32 %5, i32* %1, i32 0)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %0
ret void
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
@SIG_BLOCK = global i32 0
@str = [21 x i8] c"Unable to block SEGV\00"
define void @BlockSegv() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGSEGV
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_BLOCK
%7 = call i64 @sigprocmask(i32 %6, i32* %1, i32 0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %0
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ non_fatal(int /*<<< orphan*/, char *);
int /*<<< orphan*/ readline(char *, int, int, int /*<<< orphan*/);
void pragerror() {
  char msgbuf[5100];
  non_fatal(readline(msgbuf, 5100, 0x0001, 0), "");
}


x86 assembly (clang, -O0):
<pragerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x13f0,%rsp
lea    -0x13f0(%rbp),%rdi
mov    $0x13ec,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <readline@plt>
mov    %eax,%edi
lea    0xeb4(%rip),%rsi
call   1040 <non_fatal@plt>
add    $0x13f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pragerror>:
sub    $0x13f8,%rsp
mov    %rsp,%rdi
mov    $0x13ec,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <readline@plt>
lea    0xebe(%rip),%rsi
mov    %eax,%edi
call   1040 <non_fatal@plt>
add    $0x13f8,%rsp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @pragerror() {
%1 = alloca [5100 x i8]
%2 = getelementptr inbounds [5100 x i8], [5100 x i8]* %1, i64 0, i64 0
%3 = call i32 @readline(i8* %2, i32 5100, i32 1, i32 0)
%4 = call i32 @non_fatal(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @pragerror() {
%1 = alloca [5100 x i8]
%2 = getelementptr inbounds [5100 x i8], [5100 x i8]* %1, i64 0, i64 0
%3 = call i32 @readline(i8* %2, i32 5100, i32 1, i32 0)
%4 = call i32 @non_fatal(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
int fun937() { return 937; }


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

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

LLVM IR (-O0):
define i32 @fun937() {
ret i32 937
}

LLVM IR (-O2):
define i32 @fun937() {
ret i32 937
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_zi_numeric(long *, long *, double *, double *,
                                      void *, void **, double *, double *);
void umf4znum(long Ap[], long Ai[], double Ax[], double Az[], void **Symbolic,
              void **Numeric, double Control[20], double Info[90]) {
  (void)umfpack_zi_numeric(Ap, Ai, Ax, Az, *Symbolic, Numeric, Control, Info);
}


x86 assembly (clang, -O0):
<umf4znum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    (%rax),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <umfpack_zi_numeric@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4znum>:
mov    (%r8),%r8
jmp    1030 <umfpack_zi_numeric@plt>

LLVM IR (-O0):
define void @umf4znum(i64* %0, i64* %1, double* %2, double* %3, i8** %4, i8** %5, double* %6, double* %7) {
%9 = alloca i64*
%10 = alloca i64*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i8**
%14 = alloca i8**
%15 = alloca double*
%16 = alloca double*
store i64* %0, i64** %9
store i64* %1, i64** %10
store double* %2, double** %11
store double* %3, double** %12
store i8** %4, i8*** %13
store i8** %5, i8*** %14
store double* %6, double** %15
store double* %7, double** %16
%17 = load i64*, i64** %9
%18 = load i64*, i64** %10
%19 = load double*, double** %11
%20 = load double*, double** %12
%21 = load i8**, i8*** %13
%22 = load i8*, i8** %21
%23 = load i8**, i8*** %14
%24 = load double*, double** %15
%25 = load double*, double** %16
%26 = call i32 @umfpack_zi_numeric(i64* %17, i64* %18, double* %19, double* %20, i8* %22, i8** %23, double* %24, double* %25)
ret void
}

LLVM IR (-O2):
define void @umf4znum(i64* %0, i64* %1, double* %2, double* %3, i8** nocapture %4, i8** %5, double* %6, double* %7) {
%9 = load i8*, i8** %4
%10 = tail call i32 @umfpack_zi_numeric(i64* %0, i64* %1, double* %2, double* %3, i8* %9, i8** %5, double* %6, double* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char const *);
int /*<<< orphan*/ printi(int);
int sieve(char *, int);
void test_sieve(const char *msg, char *data, int size) {
  int r;
  print(msg);
  print(": ");
  r = sieve(data, size);
  printi(r);
  print("\n");
}


x86 assembly (clang, -O0):
<test_sieve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print@plt>
lea    0xead(%rip),%rdi
call   1040 <print@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <sieve@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <printi@plt>
lea    0xe8d(%rip),%rdi
call   1040 <print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sieve>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1040 <print@plt>
lea    0xebc(%rip),%rdi
call   1040 <print@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <sieve@plt>
mov    %eax,%edi
call   1030 <printi@plt>
lea    0xea2(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print@plt>

LLVM IR (-O0):
@.str = [3 x i8] c": \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @test_sieve(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i32 @print(i8* %8)
%10 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @sieve(i8* %11, i32 %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = call i32 @printi(i32 %14)
%16 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c": \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @test_sieve(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @print(i8* %0)
%5 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @sieve(i8* %1, i32 %2)
%7 = tail call i32 @printi(i32 %6)
%8 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ ccitt_crc16(unsigned char *, short);
char ccitt_crc16_test(unsigned char *message, short length) {
  char result;
  if (ccitt_crc16(message, length) == 0)
    result = 1;
  else
    result = 0;
  return result;
}


x86 assembly (clang, -O0):
<ccitt_crc16_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movswl -0xa(%rbp),%esi
call   1030 <ccitt_crc16@plt>
cmp    $0x0,%rax
jne    1143 <ccitt_crc16_test+0x33>
movb   $0x1,-0xb(%rbp)
jmp    1147 <ccitt_crc16_test+0x37>
movb   $0x0,-0xb(%rbp)
movsbl -0xb(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccitt_crc16_test>:
push   %rax
call   1030 <ccitt_crc16@plt>
test   %rax,%rax
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @ccitt_crc16_test(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i8
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = load i8*, i8** %3
%7 = load i16, i16* %4
%8 = call i64 @ccitt_crc16(i8* %6, i16 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i8 1, i8* %5
br label %12
11: ; preds = %2
store i8 0, i8* %5
br label %12
12: ; preds = %11, %10
%13 = load i8, i8* %5
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @ccitt_crc16_test(i8* %0, i16 signext %1) {
%3 = tail call i64 @ccitt_crc16(i8* %0, i16 signext %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i8
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ SO_RCVBUF;
int /*<<< orphan*/ SO_SNDBUF;
int getbuffsize(int, int /*<<< orphan*/);
void buffsizes(int sfd, int *srb, int *ssb) {
  *srb = getbuffsize(sfd, SO_RCVBUF);
  *ssb = getbuffsize(sfd, SO_SNDBUF);
}


x86 assembly (clang, -O0):
<buffsizes>:
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    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1030 <getbuffsize@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
call   1030 <getbuffsize@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffsizes>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
call   1030 <getbuffsize@plt>
mov    %eax,(%rbx)
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
call   1030 <getbuffsize@plt>
mov    %eax,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SO_RCVBUF = global i32 0
@SO_SNDBUF = global i32 0
define void @buffsizes(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load i32, i32* @SO_RCVBUF
%9 = call i32 @getbuffsize(i32 %7, i32 %8)
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = load i32, i32* @SO_SNDBUF
%13 = call i32 @getbuffsize(i32 %11, i32 %12)
%14 = load i32*, i32** %6
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
@SO_RCVBUF = global i32 0
@SO_SNDBUF = global i32 0
define void @buffsizes(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* @SO_RCVBUF
%5 = tail call i32 @getbuffsize(i32 %0, i32 %4)
store i32 %5, i32* %1
%6 = load i32, i32* @SO_SNDBUF
%7 = tail call i32 @getbuffsize(i32 %0, i32 %6)
store i32 %7, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void bzeroAligned8(void *dest, int size) {
  int *p = (int *)dest;
  assert((size & 7) == 0 && size > 0);
  do {
    p[0] = p[1] = 0;
    p += 2;
    size -= 8;
  } while (size);
}


x86 assembly (clang, -O0):
<bzeroAligned8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
jne    1145 <bzeroAligned8+0x35>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1152 <bzeroAligned8+0x42>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzeroAligned8>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
test   $0x7,%bl
sete   %al
test   %esi,%esi
setg   %cl
and    %al,%cl
movzbl %cl,%edi
call   1040 <assert@plt>
add    $0xfffffff8,%ebx
and    $0xfffffff8,%ebx
add    $0x8,%rbx
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @bzeroAligned8(i8* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 7
%4 = icmp eq i32 %3, 0
%5 = icmp sgt i32 %1, 0
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = add i32 %1, -8
%10 = and i32 %9, -8
%11 = zext i32 %10 to i64
%12 = add nuw nsw i64 %11, 8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, char *);
int pthread_self();
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void *thread_func(void *arg) {
  while (1) {
    time_t t_time = time(NULL);
    char *time_text = ctime(&t_time);
    printf("Thread: %x  Data and Time: %s", pthread_self(), time_text);
  }
}


x86 assembly (clang, -O0):
<thread_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <pthread_self@plt>
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
jmp    114c <thread_func+0xc>

x86 assembly (clang, -O2):
<thread_func>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%r14
lea    0xeab(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
mov    %r14,%rdi
call   1030 <ctime@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <pthread_self@plt>
mov    %r15,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1040 <printf@plt>
jmp    1160 <thread_func+0x20>

LLVM IR (-O0):
@.str = [30 x i8] c"Thread: %x Data and Time: %s\00"
define i8* @thread_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
br label %5
5: ; preds = %1, %5
%6 = call i32 @time(i32* null)
store i32 %6, i32* %3
%7 = call i8* @ctime(i32* %3)
store i8* %7, i8** %4
%8 = call i32 (...) @pthread_self()
%9 = load i8*, i8** %4
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
br label %5
}

LLVM IR (-O2):
@.str = [30 x i8] c"Thread: %x Data and Time: %s\00"
define noalias i8* @thread_func(i8* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %1, %4
%5 = call i32 @time(i32* null)
store i32 %5, i32* %2
%6 = call i8* @ctime(i32* %2)
%7 = call i32 (...) @pthread_self()
%8 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %6)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_motor_speed() {
  printf("INFO: program is attacked but with protection!\n");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"INFO: program is attacked but with protection!\0A\00"
define void @print_motor_speed() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"INFO: program is attacked but with protection!\00"
define void @print_motor_speed() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret void
}
void esock_ssl_finish(void) {}


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

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

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

LLVM IR (-O2):
define void @esock_ssl_finish() {
ret void
}
/* Variables and functions */
int rand();
float frand(void) { return (float)(rand() % 1000) / 999; }


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
movss  0xed1(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
divss  0xebe(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @frand() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 1000
%3 = sitofp i32 %2 to float
%4 = fdiv float %3, 9.990000e+02
ret float %4
}

LLVM IR (-O2):
define float @frand() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 1000
%3 = sitofp i32 %2 to float
%4 = fdiv float %3, 9.990000e+02
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x7c() {
  Assert_real((islower(124) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              625, ("islower should be 0 for |"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x7c>:
push   %rax
mov    $0x7c,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x271,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for |\00"
define void @t_islower_0x7c() {
%1 = tail call i64 @islower(i32 124)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void show_usage(void) {
  fprintf(stderr, "Usage:\n");
  fprintf(stderr, "paint [imagefile0] [imagefile1] [brush]\n");
}


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

x86 assembly (clang, -O2):
<show_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed9(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [41 x i8] c"paint [imagefile0] [imagefile1] [brush]\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [41 x i8] c"paint [imagefile0] [imagefile1] [brush]\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x28_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x28_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x28_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x28_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x28_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void ADCPhaseDelaySet(uint32_t ui32Base, uint32_t ui32Phase) {
  ;

  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000024))) = ui32Phase;
}


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

x86 assembly (clang, -O2):
<ADCPhaseDelaySet>:
mov    %rsi,0x24(%rdi)
ret

LLVM IR (-O0):
define void @ADCPhaseDelaySet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 36
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @ADCPhaseDelaySet(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 36
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ benchmark_executor();
int main(int argc, char **argv) {
  benchmark_executor();
  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 <benchmark_executor@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <benchmark_executor@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 (...) @benchmark_executor()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @benchmark_executor()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double third = (1.0 / 3.0);
  double infinity = third * 3.0;
  printf("%f\n", infinity);
  double check = third + third + third;
  printf("%f\n", check);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
store double 0x3FD5555555555555, double* %1
%4 = load double, double* %1
%5 = fmul double %4, 3.000000e+00
store double %5, double* %2
%6 = load double, double* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load double, double* %1
%9 = load double, double* %1
%10 = fadd double %8, %9
%11 = load double, double* %1
%12 = fadd double %10, %11
store double %12, double* %3
%13 = load double, double* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
ret i32 0
}
/* Variables and functions */
int sched_get_priority_max(int /*<<< orphan*/);
int main(void) { return sched_get_priority_max(0); }


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

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <sched_get_priority_max@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sched_get_priority_max(i32 0)
ret i32 %1
}
/* Variables and functions */
int Q_strncasecmp(char const *, char const *, int);
int Q_strcasecmp(const char *s1, const char *s2) {
  return Q_strncasecmp(s1, s2, 99999);
}


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

x86 assembly (clang, -O2):
<Q_strcasecmp>:
mov    $0x1869f,%edx
jmp    1030 <Q_strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @Q_strcasecmp(i8* %0, i8* %1) {
%3 = tail call i32 @Q_strncasecmp(i8* %0, i8* %1, i32 99999)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ convert_fahrenheit(float);
int /*<<< orphan*/ scanf(char *, float *);
int main(int argc, char const *argv[]) {
  float value = 0.0;
  scanf("%f", &value);
  convert_fahrenheit(value);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xebb(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
call   1030 <convert_fahrenheit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1030 <convert_fahrenheit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0.000000e+00, float* %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%8 = load float, float* %6
%9 = call i32 @convert_fahrenheit(float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%6 = load float, float* %3
%7 = call i32 @convert_fahrenheit(float %6)
ret i32 0
}
/* Type definitions */
struct base_of_conn {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_close(struct base_of_conn *);
void close_cb(int fd, short which, void *arg) {
  struct base_of_conn *c = (struct base_of_conn *)arg;
  do_close(c);
}


x86 assembly (clang, -O0):
<close_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <do_close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_cb>:
mov    %rdx,%rdi
jmp    1030 <do_close@plt>

LLVM IR (-O0):
%struct.base_of_conn = type { i32 }
define void @close_cb(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
%7 = alloca %struct.base_of_conn*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to %struct.base_of_conn*
store %struct.base_of_conn* %9, %struct.base_of_conn** %7
%10 = load %struct.base_of_conn*, %struct.base_of_conn** %7
%11 = call i32 @do_close(%struct.base_of_conn* %10)
ret void
}

LLVM IR (-O2):
%struct.base_of_conn = type { i32 }
define void @close_cb(i32 %0, i16 signext %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.base_of_conn*
%5 = tail call i32 @do_close(%struct.base_of_conn* %4)
ret void
}
unsigned long chip_base_address(unsigned long address) {
  return address & (~0x7FFFUL);
}


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

x86 assembly (clang, -O2):
<chip_base_address>:
mov    %rdi,%rax
and    $0xffffffffffff8000,%rax
ret

LLVM IR (-O0):
define i64 @chip_base_address(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, -32768
ret i64 %4
}

LLVM IR (-O2):
define i64 @chip_base_address(i64 %0) {
%2 = and i64 %0, -32768
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ phantom_threads_init();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ threads_test();
int main() {
  setvbuf(stdin, 0, _IONBF, 0);
  printf("Testing threads lib\n");
  printf("Do phantom_threads_init()\n");
  phantom_threads_init();
  threads_test();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2e8c(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1050 <setvbuf@plt>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <phantom_threads_init@plt>
mov    $0x0,%al
call   1030 <threads_test@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1050 <setvbuf@plt>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <phantom_threads_init@plt>
xor    %eax,%eax
call   1040 <threads_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
@_IONBF = global i32 0
@.str = [21 x i8] c"Testing threads lib\0A\00"
@.str.1 = [27 x i8] c"Do phantom_threads_init()\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = load i32, i32* @_IONBF
%3 = call i32 @setvbuf(i32 %1, i32 0, i32 %2, i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @phantom_threads_init()
%7 = call i32 (...) @threads_test()
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@_IONBF = global i32 0
@str = [20 x i8] c"Testing threads lib\00"
@str.2 = [26 x i8] c"Do phantom_threads_init()\00"
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = load i32, i32* @_IONBF
%3 = tail call i32 @setvbuf(i32 %1, i32 0, i32 %2, i32 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
%6 = tail call i32 (...) @phantom_threads_init()
%7 = tail call i32 (...) @threads_test()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ EPERM;
int /*<<< orphan*/ errno;
int setuid(uid_t uid) {
  errno = -EPERM;
  return -1;
}


x86 assembly (clang, -O0):
<setuid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %ecx,%ecx
mov    0x2ec0(%rip),%rax
sub    (%rax),%ecx
mov    0x2ec7(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setuid>:
mov    0x2ec9(%rip),%rax
xor    %ecx,%ecx
sub    (%rax),%ecx
mov    0x2ece(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EPERM = global i32 0
@errno = global i32 0
define i32 @setuid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EPERM
%4 = sub nsw i32 0, %3
store i32 %4, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EPERM = global i32 0
@errno = global i32 0
define i32 @setuid(i32 %0) {
%2 = load i32, i32* @EPERM
%3 = sub nsw i32 0, %2
store i32 %3, i32* @errno
ret i32 -1
}
int test_imm_1Euint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x1E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Euint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x1e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Euint64_highword_reg>:
movabs $0x1e00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Euint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 30
%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_1Euint64_highword_reg(i64 %0) {
%2 = and i64 %0, 128849018880
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned short U8TO16(const unsigned char *p) {
  return (((unsigned short)(p[0] & 0xff)) |
          ((unsigned short)(p[1] & 0xff) << 8));
}


x86 assembly (clang, -O0):
<U8TO16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0xff,%eax
movzwl %ax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
and    $0xff,%ecx
movzwl %cx,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<U8TO16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @U8TO16(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 = and i32 %6, 255
%8 = trunc i32 %7 to i16
%9 = zext i16 %8 to i32
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i16
%16 = zext i16 %15 to i32
%17 = shl i32 %16, 8
%18 = or i32 %9, %17
%19 = trunc i32 %18 to i16
ret i16 %19
}

LLVM IR (-O2):
define zeroext i16 @U8TO16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = or i16 %7, %3
ret i16 %8
}
/* Variables and functions */
scalar_t__ isdigit(char);
bool integer_char_p(char c) { return (isdigit(c) || c == '-'); }


x86 assembly (clang, -O0):
<integer_char_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <integer_char_p+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_char_p>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
cmp    $0x2d,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @integer_char_p(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isdigit(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @integer_char_p(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 45
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}