xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, char const *);
void ok(int ok, const char *msg) {
  static int testnum = 0;
  printf("%s %d - %s\n", (ok ? "ok" : "not ok"), ++testnum, msg);
}


x86 assembly (clang, -O0):
<ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xee3(%rip),%rsi
lea    0xee0(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    0x2eef(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2ee6(%rip)
mov    -0x10(%rbp),%rcx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ok>:
mov    %rsi,%rcx
test   %edi,%edi
lea    0xef0(%rip),%rax
lea    0xeed(%rip),%rsi
cmove  %rax,%rsi
mov    0x2eff(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2ef6(%rip)
lea    0xec3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@ok.testnum = internal global i32 0
@.str = [12 x i8] c"%s %d - %s\0A\00"
@.str.1 = [3 x i8] c"ok\00"
@.str.2 = [7 x i8] c"not ok\00"
define void @ok(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%9 = load i32, i32* @ok.testnum
%10 = add nsw i32 %9, 1
store i32 %10, i32* @ok.testnum
%11 = load i8*, i8** %4
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %10, i8* %11)
ret void
}

LLVM IR (-O2):
@ok.testnum = internal unnamed_addr global i32 0
@.str = [12 x i8] c"%s %d - %s\0A\00"
@.str.1 = [3 x i8] c"ok\00"
@.str.2 = [7 x i8] c"not ok\00"
define void @ok(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%5 = load i32, i32* @ok.testnum
%6 = add nsw i32 %5, 1
store i32 %6, i32* @ok.testnum
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ foo();
int /*<<< orphan*/ foobar();
void main(int i) {
  foo();
  if (1)
    bar(1);
  else
    bar(2);
  foobar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <foo@plt>
mov    $0x1,%edi
call   1030 <bar@plt>
mov    $0x0,%al
call   1040 <foobar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <foo@plt>
mov    $0x1,%edi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <foobar@plt>

LLVM IR (-O0):
define void @main(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @foo()
%4 = call i32 @bar(i32 1)
%5 = call i32 (...) @foobar()
ret void
}

LLVM IR (-O2):
define void @main(i32 %0) {
%2 = tail call i32 (...) @foo()
%3 = tail call i32 @bar(i32 1)
%4 = tail call i32 (...) @foobar()
ret void
}
/* Variables and functions */
void stub1(double, long long);
void testClosureDLLrV(void (*closure)(double, long long), double a1,
                      long long a2) {
  if (closure != NULL)
    (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureDLLrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     112f <testClosureDLLrV+0x2f>
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureDLLrV>:
test   %rdi,%rdi
je     110d <testClosureDLLrV+0xd>
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax
ret

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

LLVM IR (-O2):
define void @testClosureDLLrV(void (double, i64)* %0, double %1, i64 %2) {
%4 = icmp eq void (double, i64)* %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
tail call void %0(double %1, i64 %2)
br label %6
6: ; preds = %5, %3
ret void
}
int neg(int x) { return -x; }


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

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

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

LLVM IR (-O2):
define i32 @neg(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EVP_read_pw_string(char *, size_t, char *, int);
int vg_read_password(char *buf, size_t size) {
  return !EVP_read_pw_string(buf, size, "Enter new password:", 1);
}


x86 assembly (clang, -O0):
<vg_read_password>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xed1(%rip),%rdx
mov    $0x1,%ecx
call   1030 <EVP_read_pw_string@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vg_read_password>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x1,%ecx
call   1030 <EVP_read_pw_string@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter new password:\00"
define i32 @vg_read_password(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @EVP_read_pw_string(i8* %5, i64 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter new password:\00"
define i32 @vg_read_password(i8* %0, i64 %1) {
%3 = tail call i32 @EVP_read_pw_string(i8* %0, i64 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/);
int randNum() {
  srand((unsigned int)time(0));
  return rand() % 2 == 0;
}


x86 assembly (clang, -O0):
<randNum>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<randNum>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
not    %eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @randNum() {
%1 = call i64 @time(i32 0)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @randNum() {
%1 = tail call i64 @time(i32 0)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @rand()
%5 = and i32 %4, 1
%6 = xor i32 %5, 1
ret i32 %6
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t kbi_popcount64(uint64_t y) {
  y -= ((y >> 1) & 0x5555555555555555ull);
  y = (y & 0x3333333333333333ull) + (y >> 2 & 0x3333333333333333ull);
  return ((y + (y >> 4)) & 0xf0f0f0f0f0f0f0full) * 0x101010101010101ull >> 56;
}


x86 assembly (clang, -O0):
<kbi_popcount64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
movslq %eax,%rcx
movabs $0x5555555555555555,%rax
55 55 55
and    %rax,%rcx
movslq -0x4(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x3333333333333333,%rcx
33 33 33
and    %rcx,%rax
mov    -0x4(%rbp),%ecx
sar    $0x2,%ecx
movslq %ecx,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
and    %rdx,%rcx
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
add    %ecx,%eax
cltq
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kbi_popcount64>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %edi,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %eax,%ecx
and    $0xf0f0f0f,%ecx
movabs $0x101010101010101,%rax
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i32 @kbi_popcount64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = sext i32 %4 to i64
%6 = and i64 %5, 6148914691236517205
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = sub i64 %8, %6
%10 = trunc i64 %9 to i32
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = and i64 %12, 3689348814741910323
%14 = load i32, i32* %2
%15 = ashr i32 %14, 2
%16 = sext i32 %15 to i64
%17 = and i64 %16, 3689348814741910323
%18 = add i64 %13, %17
%19 = trunc i64 %18 to i32
store i32 %19, i32* %2
%20 = load i32, i32* %2
%21 = load i32, i32* %2
%22 = ashr i32 %21, 4
%23 = add nsw i32 %20, %22
%24 = sext i32 %23 to i64
%25 = and i64 %24, 1085102592571150095
%26 = mul i64 %25, 72340172838076673
%27 = lshr i64 %26, 56
%28 = trunc i64 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @kbi_popcount64(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub i32 %0, %3
%5 = and i32 %4, 858993459
%6 = lshr i32 %4, 2
%7 = and i32 %6, 858993459
%8 = add nuw nsw i32 %7, %5
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = zext i32 %11 to i64
%13 = mul i64 %12, 72340172838076673
%14 = lshr i64 %13, 56
%15 = trunc i64 %14 to i32
ret i32 %15
}
void f(void) {
  int a[100], b[100];
  int i;
#pragma hlt distribute
  for (i = 0; i < 100; i++) {
    a[i] = i * 1;
    b[i] = 0;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2b0,%rsp
movl   $0x0,-0x324(%rbp)
cmpl   $0x64,-0x324(%rbp)
jge    115f <f+0x5f>
mov    -0x324(%rbp),%ecx
shl    $0x0,%ecx
movslq -0x324(%rbp),%rax
mov    %ecx,-0x190(%rbp,%rax,4)
movslq -0x324(%rbp),%rax
movl   $0x0,-0x320(%rbp,%rax,4)
mov    -0x324(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x324(%rbp)
jmp    1115 <f+0x15>
add    $0x2b0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca [100 x i32]
%2 = alloca [100 x i32]
%3 = alloca i32
store i32 0, i32* %3
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %11
store i32 %9, i32* %12
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %14
store i32 0, i32* %15
br label %16
16: ; preds = %7
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
char *getenv(char const *);
const char *get_optional_env_var(const char *name, const char *fallback) {
  const char *v = getenv(name);
  if (v)
    return v;
  return fallback;
}


x86 assembly (clang, -O0):
<get_optional_env_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1145 <get_optional_env_var+0x35>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <get_optional_env_var+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_optional_env_var>:
push   %rbx
mov    %rsi,%rbx
call   1030 <getenv@plt>
test   %rax,%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_optional_env_var(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i8* @getenv(i8* %7)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i8*, i8** %6
store i8* %12, i8** %3
br label %15
13: ; preds = %2
%14 = load i8*, i8** %5
store i8* %14, i8** %3
br label %15
15: ; preds = %13, %11
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @get_optional_env_var(i8* nocapture %0, i8* readnone %1) {
%3 = tail call i8* @getenv(i8* %0)
%4 = icmp eq i8* %3, null
%5 = select i1 %4, i8* %1, i8* %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ timeout(int /*<<< orphan*/);
void f18a_runterm(void) {
  curs_set(0);
  timeout(0);
  noecho();
}


x86 assembly (clang, -O0):
<f18a_runterm>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <curs_set@plt>
xor    %edi,%edi
call   1030 <timeout@plt>
mov    $0x0,%al
call   1040 <noecho@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f18a_runterm>:
push   %rax
xor    %edi,%edi
call   1050 <curs_set@plt>
xor    %edi,%edi
call   1030 <timeout@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <noecho@plt>

LLVM IR (-O0):
define void @f18a_runterm() {
%1 = call i32 @curs_set(i32 0)
%2 = call i32 @timeout(i32 0)
%3 = call i32 (...) @noecho()
ret void
}

LLVM IR (-O2):
define void @f18a_runterm() {
%1 = tail call i32 @curs_set(i32 0)
%2 = tail call i32 @timeout(i32 0)
%3 = tail call i32 (...) @noecho()
ret void
}
char ch_tolower(char ch) {
  return ((ch >= 'A') && (ch <= 'Z')) ? (ch - 'A' + 'a') : ch;
}


x86 assembly (clang, -O0):
<ch_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <ch_tolower+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <ch_tolower+0x36>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <ch_tolower+0x3d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_tolower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @ch_tolower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
int color_offset_f1(int x, int y) {
  return (((y << 10) - (((x << 10) * 353) / 326) + (30 << 10)) >> 10);
}


x86 assembly (clang, -O0):
<color_offset_f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
imul   $0x161,%eax,%eax
mov    $0x146,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
add    $0x7800,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f1>:
shl    $0xa,%esi
imul   $0x58400,%edi,%eax
cltq
imul   $0xfffffffff36f825b,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rax
add    %ecx,%eax
add    %esi,%eax
add    $0x7800,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 10
%7 = load i32, i32* %3
%8 = shl i32 %7, 10
%9 = mul nsw i32 %8, 353
%10 = sdiv i32 %9, 326
%11 = sub nsw i32 %6, %10
%12 = add nsw i32 %11, 30720
%13 = ashr i32 %12, 10
ret i32 %13
}

LLVM IR (-O2):
define i32 @color_offset_f1(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = mul i32 %0, 361472
%5 = sdiv i32 %4, -326
%6 = add i32 %3, 30720
%7 = add i32 %6, %5
%8 = ashr i32 %7, 10
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  printf("%li\n", time(NULL));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"%li\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%li\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ checkchar(char);
int /*<<< orphan*/ expression();
int /*<<< orphan*/ put1word(int /*<<< orphan*/);
int /*<<< orphan*/ skipspace();
fdb() {
  skipspace();
  do
    put1word(expression());
  while (checkchar(','));
}


x86 assembly (clang, -O0):
<fdb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <skipspace@plt>
mov    $0x0,%al
call   1050 <expression@plt>
mov    %eax,%edi
call   1040 <put1word@plt>
mov    $0x2c,%edi
call   1030 <checkchar@plt>
cmp    $0x0,%rax
jne    114f <fdb+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdb>:
push   %rax
xor    %eax,%eax
call   1060 <skipspace@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <expression@plt>
mov    %eax,%edi
call   1040 <put1word@plt>
mov    $0x2c,%edi
call   1030 <checkchar@plt>
test   %rax,%rax
jne    1150 <fdb+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fdb() {
%1 = alloca i32
%2 = call i32 (...) @skipspace()
br label %3
3: ; preds = %6, %0
%4 = call i32 (...) @expression()
%5 = call i32 @put1word(i32 %4)
br label %6
6: ; preds = %3
%7 = call i64 @checkchar(i8 signext 44)
%8 = icmp ne i64 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @fdb() {
%1 = tail call i32 (...) @skipspace()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @expression()
%4 = tail call i32 @put1word(i32 %3)
%5 = tail call i64 @checkchar(i8 signext 44)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 undef
}
/* Type definitions */
struct rb_root {
  int dummy;
};
struct rb_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __rb_insert(struct rb_node *, struct rb_root *,
                               void (*)(struct rb_node *, struct rb_node *));
void __rb_insert_augmented(struct rb_node *node, struct rb_root *root,
                           void (*augment_rotate)(struct rb_node *old,
                                                  struct rb_node *_new)) {
  __rb_insert(node, root, augment_rotate);
}


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

x86 assembly (clang, -O2):
<__rb_insert_augmented>:
jmp    1030 <__rb_insert@plt>

LLVM IR (-O0):
%struct.rb_node = type { i32 }
%struct.rb_root = type { i32 }
define void @__rb_insert_augmented(%struct.rb_node* %0, %struct.rb_root* %1, void (%struct.rb_node*, %struct.rb_node*)* %2) {
%4 = alloca %struct.rb_node*
%5 = alloca %struct.rb_root*
%6 = alloca void (%struct.rb_node*, %struct.rb_node*)*
store %struct.rb_node* %0, %struct.rb_node** %4
store %struct.rb_root* %1, %struct.rb_root** %5
store void (%struct.rb_node*, %struct.rb_node*)* %2, void (%struct.rb_node*, %struct.rb_node*)** %6
%7 = load %struct.rb_node*, %struct.rb_node** %4
%8 = load %struct.rb_root*, %struct.rb_root** %5
%9 = load void (%struct.rb_node*, %struct.rb_node*)*, void (%struct.rb_node*, %struct.rb_node*)** %6
%10 = call i32 @__rb_insert(%struct.rb_node* %7, %struct.rb_root* %8, void (%struct.rb_node*, %struct.rb_node*)* %9)
ret void
}

LLVM IR (-O2):
%struct.rb_node = type { i32 }
%struct.rb_root = type { i32 }
define void @__rb_insert_augmented(%struct.rb_node* %0, %struct.rb_root* %1, void (%struct.rb_node*, %struct.rb_node*)* %2) {
%4 = tail call i32 @__rb_insert(%struct.rb_node* %0, %struct.rb_root* %1, void (%struct.rb_node*, %struct.rb_node*)* %2)
ret void
}
/* Variables and functions */
int ioCanDeleteFileOfSize(char *, int);
int secCanDeleteFileOfSize(char *fileName, int fileNameSize) {
  return ioCanDeleteFileOfSize(fileName, fileNameSize);
}


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

x86 assembly (clang, -O2):
<secCanDeleteFileOfSize>:
jmp    1030 <ioCanDeleteFileOfSize@plt>

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

LLVM IR (-O2):
define i32 @secCanDeleteFileOfSize(i8* %0, i32 %1) {
%3 = tail call i32 @ioCanDeleteFileOfSize(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int d06(int);
int d07(int a) { return d06(d06(a)); }


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

x86 assembly (clang, -O2):
<d07>:
push   %rax
call   1030 <d06@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d06@plt>

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

LLVM IR (-O2):
define i32 @d07(i32 %0) {
%2 = tail call i32 @d06(i32 %0)
%3 = tail call i32 @d06(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_imm_op();
int /*<<< orphan*/ arm_memio_ldrb(int /*<<< orphan*/);
void arm_ldrb_imm() { arm_memio_ldrb(arm_memio_imm_op()); }


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

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

LLVM IR (-O0):
define void @arm_ldrb_imm() {
%1 = call i32 (...) @arm_memio_imm_op()
%2 = call i32 @arm_memio_ldrb(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_ldrb_imm() {
%1 = tail call i32 (...) @arm_memio_imm_op()
%2 = tail call i32 @arm_memio_ldrb(i32 %1)
ret void
}
/* Variables and functions */
int findFactorial(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, factorial, num;
  printf("Enter a number: ");
  scanf("%d", &num);
  factorial = findFactorial(num);
  printf("Factorial of %d is: %d", num, factorial);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%edi
call   1040 <findFactorial@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <findFactorial@plt>
mov    0x4(%rsp),%esi
lea    0xead(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Factorial of %d is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%7 = load i32, i32* %4
%8 = call i32 @findFactorial(i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Factorial of %d is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @findFactorial(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %6)
ret i32 0
}
int stress_set_vm_mmap_populate(const char *opt) {
  (void)opt;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @stress_set_vm_mmap_populate(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int tolower(int);
int char_to_val(int c) {
  int cl;
  cl = tolower(c);
  if (c >= '0' && c <= '9')
    return c - '0';
  else if (cl >= 'a' && cl <= 'f')
    return cl + (10 - 'a');
  else
    return -1;
}


x86 assembly (clang, -O0):
<char_to_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <tolower@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1148 <char_to_val+0x38>
cmpl   $0x39,-0x8(%rbp)
jg     1148 <char_to_val+0x38>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <char_to_val+0x61>
cmpl   $0x61,-0xc(%rbp)
jl     116a <char_to_val+0x5a>
cmpl   $0x66,-0xc(%rbp)
jg     116a <char_to_val+0x5a>
mov    -0xc(%rbp),%eax
add    $0xffffffa9,%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <char_to_val+0x61>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_to_val>:
push   %rbx
mov    %edi,%ebx
call   1030 <tolower@plt>
add    $0xffffffd0,%ebx
lea    -0x61(%rax),%ecx
add    $0xffffffa9,%eax
cmp    $0x6,%ecx
mov    $0xffffffff,%ecx
cmovae %ecx,%eax
cmp    $0xa,%ebx
cmovb  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @char_to_val(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @tolower(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 57
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 48
store i32 %14, i32* %2
br label %25
15: ; preds = %9, %1
%16 = load i32, i32* %4
%17 = icmp sge i32 %16, 97
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i32, i32* %4
%20 = icmp sle i32 %19, 102
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %4
%23 = add nsw i32 %22, -87
store i32 %23, i32* %2
br label %25
24: ; preds = %18, %15
store i32 -1, i32* %2
br label %25
25: ; preds = %24, %21, %12
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @char_to_val(i32 %0) {
%2 = tail call i32 @tolower(i32 %0)
%3 = add i32 %0, -48
%4 = icmp ult i32 %3, 10
%5 = add i32 %2, -97
%6 = icmp ult i32 %5, 6
%7 = add nsw i32 %2, -87
%8 = select i1 %6, i32 %7, i32 -1
%9 = select i1 %4, i32 %3, i32 %8
ret i32 %9
}
void _set_rebuild(unsigned char *u) { u[1] |= (1 << 1); }


x86 assembly (clang, -O0):
<_set_rebuild>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
or     $0x2,%ecx
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_rebuild>:
orb    $0x2,0x1(%rdi)
ret

LLVM IR (-O0):
define void @_set_rebuild(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = or i32 %6, 2
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @_set_rebuild(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = or i8 %3, 2
store i8 %4, i8* %2
ret void
}
void TXHAL_InitPreReset(void) {}


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

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

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

LLVM IR (-O2):
define void @TXHAL_InitPreReset() {
ret void
}
void SYS_IrqHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<SYS_IrqHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SYS_IrqHandler+0x9>
jmp    1109 <SYS_IrqHandler+0x9>

x86 assembly (clang, -O2):
<SYS_IrqHandler>:
jmp    1100 <SYS_IrqHandler>

LLVM IR (-O0):
define void @SYS_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SYS_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void XCellsOfScreen() {}


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

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

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

LLVM IR (-O2):
define void @XCellsOfScreen() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void EXTI2_TSC_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @EXTI2_TSC_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @EXTI2_TSC_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int SIGSEGV;
int /*<<< orphan*/ slick_fatal(char *, ...);
void slick_sig_fatal(int sig) {
  if (sig == SIGSEGV) {
    slick_fatal("Segmentation fault.");
  } else {
    slick_fatal("Range error / STOP executed (signal %d)", sig);
  }
}


x86 assembly (clang, -O0):
<slick_sig_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    1140 <slick_sig_fatal+0x30>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <slick_fatal@plt>
jmp    1151 <slick_sig_fatal+0x41>
mov    -0x4(%rbp),%esi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <slick_fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slick_sig_fatal>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1129 <slick_sig_fatal+0x19>
lea    0xede(%rip),%rdi
xor    %eax,%eax
jmp    1030 <slick_fatal@plt>
mov    %edi,%esi
lea    0xee2(%rip),%rdi
xor    %eax,%eax
jmp    1030 <slick_fatal@plt>

LLVM IR (-O0):
@SIGSEGV = global i32 0
@.str = [20 x i8] c"Segmentation fault.\00"
@.str.1 = [40 x i8] c"Range error / STOP executed (signal %d)\00"
define void @slick_sig_fatal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGSEGV
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i8*, ...) @slick_fatal(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @slick_fatal(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
@.str = [20 x i8] c"Segmentation fault.\00"
@.str.1 = [40 x i8] c"Range error / STOP executed (signal %d)\00"
define void @slick_sig_fatal(i32 %0) {
%2 = load i32, i32* @SIGSEGV
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @slick_fatal(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @slick_fatal(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
unsigned long long be32dec(unsigned char const *);
extern unsigned long long be64dec(const void *buf) {
  const unsigned char *p = (const unsigned char *)buf;
  return (((unsigned long long)be32dec(p) << 32) | be32dec(p + 4));
}


x86 assembly (clang, -O0):
<be64dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <be32dec@plt>
shl    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1030 <be32dec@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
or     %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be64dec>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <be32dec@plt>
mov    %rax,%r14
shl    $0x20,%r14
add    $0x4,%rbx
mov    %rbx,%rdi
call   1030 <be32dec@plt>
or     %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @be64dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @be32dec(i8* %5)
%7 = shl i64 %6, 32
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 4
%10 = call i64 @be32dec(i8* %9)
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @be64dec(i8* %0) {
%2 = tail call i64 @be32dec(i8* %0)
%3 = shl i64 %2, 32
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = tail call i64 @be32dec(i8* %4)
%6 = or i64 %3, %5
ret i64 %6
}
char *strncpy(char *restrict __dest, const char *restrict __src,
              unsigned long int __len) {
  char *return_value___builtin___strncpy_chk$1;
  return_value___builtin___strncpy_chk$1 = __builtin___strncpy_chk(
      __dest, __src, (unsigned int)__len, 18446744073709551615ul);
  return return_value___builtin___strncpy_chk$1;
}


x86 assembly (clang, -O0):
<strncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%eax
mov    %eax,%edx
mov    $0xffffffffffffffff,%rcx
call   1030 <__strncpy_chk@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @strncpy(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = trunc i64 %10 to i32
%12 = zext i32 %11 to i64
%13 = call i8* @__strncpy_chk(i8* %8, i8* %9, i64 %12, i64 -1)
store i8* %13, i8** %7
%14 = load i8*, i8** %7
ret i8* %14
}

LLVM IR (-O2):
define i8* @strncpy(i8* noalias readnone returned %0, i8* noalias nocapture %1, i64 %2) {
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void mut_print_header_pre(FILE *fpout_vcf) {
  fprintf(fpout_vcf, "##fileformat=VCFv4.1\n");
}


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

x86 assembly (clang, -O2):
<mut_print_header_pre>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"##fileformat=VCFv4.1\0A\00"
define void @mut_print_header_pre(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"##fileformat=VCFv4.1\0A\00"
define void @mut_print_header_pre(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 21, i64 1, i32* %0)
ret void
}
void ScaleRowDown38_2_Box_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown38_2_Box_Any_NEON() {
ret void
}
int contar(char **planta, int x, int y) {
  if (planta[x][y] == '.') {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<contar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
jne    1137 <contar+0x37>
movl   $0x0,-0x4(%rbp)
jmp    113e <contar+0x3e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contar>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rcx
movslq %edx,%rdx
xor    %eax,%eax
cmpb   $0x2e,(%rcx,%rdx,1)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @contar(i8** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %6, i64 %7
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 46
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_tagstruct_getu8() {
  printf("NOT IMPLEMENTED:"
         "pa_tagstruct_getu8"
         "\n");
}


x86 assembly (clang, -O0):
<pa_tagstruct_getu8>:
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_tagstruct_getu8>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_tagstruct_getu8\00"
define i32 @pa_tagstruct_getu8() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int is_snp(char X_org) {
  if (X_org == '1' || X_org == '2' || X_org == '-' || X_org == '.') {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<is_snp>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x31,%eax
je     113e <is_snp+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x32,%eax
je     113e <is_snp+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     113e <is_snp+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
jne    114a <is_snp+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <is_snp+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_snp>:
add    $0xd3,%dil
xor    %eax,%eax
cmp    $0x5,%dil
ja     111a <is_snp+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.is_snp = [6 x i32] [i32 1, i32 1, i32 0, i32 0, i32 1, i32 1]
define i32 @is_snp(i8 signext %0) {
%2 = add i8 %0, -45
%3 = icmp ult i8 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.is_snp, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int bar();
int main() {
  int x = bar();
#pragma omp taskwait
  assert(x == 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = call i32 (...) @bar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 3
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(char *, double *, double *);
main() {
  char x[32688];
  double y, z;
  y = z = 3.0;
  f(x, &y, &z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7fc0,%rsp
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,-0x7fc0(%rbp)
ff
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x7fb8(%rbp)
ff
lea    -0x7fb0(%rbp),%rdi
lea    -0x7fb8(%rbp),%rsi
lea    -0x7fc0(%rbp),%rdx
call   1030 <f@plt>
xor    %eax,%eax
add    $0x7fc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x7fc8,%rsp
movabs $0x4008000000000000,%rax
mov    %rax,(%rsp)
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <f@plt>
xor    %eax,%eax
add    $0x7fc8,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [32688 x i8]
%2 = alloca double
%3 = alloca double
store double 3.000000e+00, double* %3
store double 3.000000e+00, double* %2
%4 = getelementptr inbounds [32688 x i8], [32688 x i8]* %1, i64 0, i64 0
%5 = call i32 @f(i8* %4, double* %2, double* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [32688 x i8]
%2 = alloca double
%3 = alloca double
%4 = getelementptr inbounds [32688 x i8], [32688 x i8]* %1, i64 0, i64 0
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
store double 3.000000e+00, double* %3
store double 3.000000e+00, double* %2
%7 = call i32 @f(i8* %4, double* %2, double* %3)
ret i32 0
}
signed int v_signed_int_func() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @v_signed_int_func() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gmx_anaeig(int, char **);
int main(int argc, char *argv[]) {
  gmx_anaeig(argc, argv);
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_anaeig@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <gmx_anaeig@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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @gmx_anaeig(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_anaeig(i32 %0, i8** %1)
ret i32 0
}
void check_ctz(int n) {
  __builtin_ctz(n);
  __builtin_ctzl(n);
  __builtin_ctzll(n);
}


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

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

LLVM IR (-O0):
define void @check_ctz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.cttz.i32(i32 %3, i1 true)
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = call i64 @llvm.cttz.i64(i64 %6, i1 true)
%8 = trunc i64 %7 to i32
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = call i64 @llvm.cttz.i64(i64 %10, i1 true)
%12 = trunc i64 %11 to i32
ret void
}

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


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

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

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

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