xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t strnlen(const char *str, size_t maxlen) {
  size_t len;
  const char *s = str;
  for (len = 0; len <= maxlen; len++) {
    if ('\0' == *s++) {
      break;
    }
  }
  return len;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
ja     1161 <strnlen+0x61>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    114b <strnlen+0x4b>
jmp    1161 <strnlen+0x61>
jmp    1150 <strnlen+0x50>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111c <strnlen+0x1c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
je     111f <strnlen+0x1f>
add    $0x1,%rax
cmp    %rsi,%rax
jbe    1110 <strnlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strnlen(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %2, %8
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i64 [ 0, %2 ], [ %10, %8 ]
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = add i64 %5, 1
%11 = icmp ugt i64 %10, %1
br i1 %11, label %12, label %3
12: ; preds = %3, %8
%13 = phi i64 [ %5, %3 ], [ %10, %8 ]
ret i64 %13
}
/* Variables and functions */
int frobcmp(char const *, char const *);
int cmpwrap(const void *a, const void *b) {
  return frobcmp(*((const char **)a), *((const char **)b));
}


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

x86 assembly (clang, -O2):
<cmpwrap>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <frobcmp@plt>

LLVM IR (-O0):
define i32 @cmpwrap(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @frobcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmpwrap(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @frobcmp(i8* %4, i8* %6)
ret i32 %7
}
void count_tz_v4si(unsigned *__restrict a, int *__restrict b) {
  int i;
  for (i = 0; i < 4; i++)
    b[i] = __builtin_ctz(a[i]);
}


x86 assembly (clang, -O0):
<count_tz_v4si>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1144 <count_tz_v4si+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
bsf    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <count_tz_v4si+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_tz_v4si>:
bsf    (%rdi),%eax
bsf    0x4(%rdi),%ecx
mov    %eax,(%rsi)
mov    %ecx,0x4(%rsi)
bsf    0x8(%rdi),%eax
mov    %eax,0x8(%rsi)
bsf    0xc(%rdi),%eax
mov    %eax,0xc(%rsi)
ret

LLVM IR (-O0):
define void @count_tz_v4si(i32* noalias %0, i32* noalias %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %20, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32*, i32** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = call i32 @llvm.cttz.i32(i32 %14, i1 true)
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
store i32 %15, i32* %19
br label %20
20: ; preds = %9
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @count_tz_v4si(i32* noalias nocapture %0, i32* noalias nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @llvm.cttz.i32(i32 %3, i1 true)
store i32 %4, i32* %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = tail call i32 @llvm.cttz.i32(i32 %6, i1 true)
%8 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %7, i32* %8
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = tail call i32 @llvm.cttz.i32(i32 %10, i1 true)
%12 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %11, i32* %12
%13 = getelementptr inbounds i32, i32* %0, i64 3
%14 = load i32, i32* %13
%15 = tail call i32 @llvm.cttz.i32(i32 %14, i1 true)
%16 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %15, i32* %16
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pr_info(char *);
void myexit(void) { pr_info("hello exit\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello exit\0A\00"
define void @myexit() {
%1 = call i32 @pr_info(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello exit\0A\00"
define void @myexit() {
%1 = tail call i32 @pr_info(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int regcomp(int /*<<< orphan*/ *, char const *, int);
char *string_regex_flags(char const *, int, int *);
int string_regcomp(void *preg, const char *regex, int default_flags) {
  const char *ptr_regex;
  int flags;
  ptr_regex = string_regex_flags(regex, default_flags, &flags);
  return regcomp((regex_t *)preg, ptr_regex, flags);
}


x86 assembly (clang, -O0):
<string_regcomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x24(%rbp),%rdx
call   1040 <string_regex_flags@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <regcomp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_regcomp>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
call   1040 <string_regex_flags@plt>
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <regcomp@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @string_regcomp(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i8* @string_regex_flags(i8* %9, i32 %10, i32* %8)
store i8* %11, i8** %7
%12 = load i8*, i8** %4
%13 = bitcast i8* %12 to i32*
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 @regcomp(i32* %13, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @string_regcomp(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i8* @string_regex_flags(i8* %1, i32 %2, i32* %4)
%7 = bitcast i8* %0 to i32*
%8 = load i32, i32* %4
%9 = call i32 @regcomp(i32* %7, i8* %6, i32 %8)
ret i32 %9
}
double itod(int i) { return i; }


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

x86 assembly (clang, -O2):
<itod>:
cvtsi2sd %edi,%xmm0
ret

LLVM IR (-O0):
define double @itod(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
ret double %4
}

LLVM IR (-O2):
define double @itod(i32 %0) {
%2 = sitofp i32 %0 to double
ret double %2
}
/* Variables and functions */
float randf01();
float randf() { return randf01() * 2.0f - 1.0f; }


x86 assembly (clang, -O0):
<randf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <randf01@plt>
addss  %xmm0,%xmm0
movss  0xed9(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randf>:
push   %rax
xor    %eax,%eax
call   1030 <randf01@plt>
addss  %xmm0,%xmm0
addss  0xedc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @randf() {
%1 = call float (...) @randf01()
%2 = call float @llvm.fmuladd.f32(float %1, float 2.000000e+00, float -1.000000e+00)
ret float %2
}

LLVM IR (-O2):
define float @randf() {
%1 = tail call float (...) @randf01()
%2 = tail call float @llvm.fmuladd.f32(float %1, float 2.000000e+00, float -1.000000e+00)
ret float %2
}
/* Variables and functions */
int strtol(char *, char *, int);
int /*<<< orphan*/ threes(int);
int main(int argc, char *argv[]) {
  char p;
  int start = strtol(argv[1], &p, 10);
  threes(start);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x11(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1040 <threes@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
lea    0x7(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,%edi
call   1040 <threes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @strtol(i8* %9, i8* %5, i32 10)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = call i32 @threes(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = call i32 @strtol(i8* %5, i8* %3, i32 10)
%7 = tail call i32 @threes(i32 %6)
ret i32 0
}
/* Variables and functions */
size_t UA_atomic_subSize(volatile size_t *addr, size_t decrease) {
  *addr -= decrease;
  return *addr;
}


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

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

LLVM IR (-O0):
define i64 @UA_atomic_subSize(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 = load volatile i64, i64* %6
%8 = sub i64 %7, %5
store volatile i64 %8, i64* %6
%9 = load i64*, i64** %3
%10 = load volatile i64, i64* %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @UA_atomic_subSize(i64* %0, i64 %1) {
%3 = load volatile i64, i64* %0
%4 = sub i64 %3, %1
store volatile i64 %4, i64* %0
%5 = load volatile i64, i64* %0
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int dopr(char *, unsigned int, char const *, int /*<<< orphan*/);
int vsnprintf(char *str, unsigned int count, const char *fmt, va_list args) {
  return dopr(str, count, fmt, args);
}


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

x86 assembly (clang, -O2):
<vsnprintf>:
jmp    1030 <dopr@plt>

LLVM IR (-O0):
define i32 @vsnprintf(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @dopr(i8* %9, i32 %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @vsnprintf(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @dopr(i8* %0, i32 %1, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
scalar_t__ value_as_float(unsigned int);
unsigned int value_as_int(scalar_t__);
unsigned int sub_func(unsigned int param1, unsigned int param2) {
  return value_as_int(value_as_float(param1) - value_as_float(param2));
}


x86 assembly (clang, -O0):
<sub_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <value_as_float@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <value_as_float@plt>
mov    -0x10(%rbp),%rdi
sub    %rax,%rdi
call   1040 <value_as_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_func>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <value_as_float@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <value_as_float@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <value_as_int@plt>

LLVM IR (-O0):
define i32 @sub_func(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i64 @value_as_float(i32 %5)
%7 = load i32, i32* %4
%8 = call i64 @value_as_float(i32 %7)
%9 = sub nsw i64 %6, %8
%10 = call i32 @value_as_int(i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @sub_func(i32 %0, i32 %1) {
%3 = tail call i64 @value_as_float(i32 %0)
%4 = tail call i64 @value_as_float(i32 %1)
%5 = sub nsw i64 %3, %4
%6 = tail call i32 @value_as_int(i64 %5)
ret i32 %6
}
void slashcharclass2NDECDIGIT() {}


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

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

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

LLVM IR (-O2):
define void @slashcharclass2NDECDIGIT() {
ret void
}
/* Variables and functions */
char const *getenv(char *);
const char *os_user_get_homedir() { return getenv("HOME"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"HOME\00"
define i8* @os_user_get_homedir() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [5 x i8] c"HOME\00"
define i8* @os_user_get_homedir() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, int, int);
int main(int argc, char **argv) {
  char buf[1000];
  sprintf(buf, "%s %d %d\n", "hello world", 3, 9);
  puts(buf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x400(%rbp),%rdi
lea    0xec0(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    $0x3,%ecx
mov    $0x9,%r8d
call   1040 <sprintf@plt>
lea    -0x400(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xed1(%rip),%rsi
lea    0xed4(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3,%ecx
mov    $0x9,%r8d
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%s %d %d\0A\00"
@.str.1 = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [1000 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 9)
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s %d %d\0A\00"
@.str.1 = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 9)
%6 = call i32 @puts(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ motorSet(int, int);
void intakeOut() {
  motorSet(5, 60);
  motorSet(6, -60);
}


x86 assembly (clang, -O0):
<intakeOut>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
mov    $0x3c,%esi
call   1030 <motorSet@plt>
mov    $0x6,%edi
mov    $0xffffffc4,%esi
call   1030 <motorSet@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intakeOut>:
push   %rax
mov    $0x5,%edi
mov    $0x3c,%esi
call   1030 <motorSet@plt>
mov    $0x6,%edi
mov    $0xffffffc4,%esi
pop    %rax
jmp    1030 <motorSet@plt>

LLVM IR (-O0):
define void @intakeOut() {
%1 = call i32 @motorSet(i32 5, i32 60)
%2 = call i32 @motorSet(i32 6, i32 -60)
ret void
}

LLVM IR (-O2):
define void @intakeOut() {
%1 = tail call i32 @motorSet(i32 5, i32 60)
%2 = tail call i32 @motorSet(i32 6, i32 -60)
ret void
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_project_errorcallback(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_project_errorcallback() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_project_errorcallback() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
/* Variables and functions */
int WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
int system(char *);
int basic_system(void *p) {
  int status = system((char *)p);
  if (WIFEXITED(status))
    return WEXITSTATUS(status);
  else
    return -1;
}


x86 assembly (clang, -O0):
<basic_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <system@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <WIFEXITED@plt>
cmp    $0x0,%rax
je     116a <basic_system+0x3a>
mov    -0x14(%rbp),%edi
call   1040 <WEXITSTATUS@plt>
mov    %eax,-0x4(%rbp)
jmp    1171 <basic_system+0x41>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_system>:
push   %rbx
call   1030 <system@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <WIFEXITED@plt>
test   %rax,%rax
je     114c <basic_system+0x1c>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <WEXITSTATUS@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @basic_system(i8* nocapture %0) {
%2 = tail call i32 @system(i8* %0)
%3 = tail call i64 @WIFEXITED(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @WEXITSTATUS(i32 %2)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ %6, %5 ], [ -1, %1 ]
ret i32 %8
}
void fa27(void) {
P0A:
  goto P0A;
  ({
    a:
      goto a;
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa27>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa27+0x4>

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

LLVM IR (-O0):
define void @fa27() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; preds = %10
br label %10
11: ; No predecessors!
br label %12
12: ; preds = %12, %11
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %16
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; No predecessors!
br label %21
21: ; preds = %21, %20
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
br label %24
24: ; preds = %24, %23
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
27: ; preds = %27
br label %27
}

LLVM IR (-O2):
define void @fa27() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ re_compile(char const *);
int re_matchp(int /*<<< orphan*/, char const *, int *);
int re_match(const char *pattern, const char *text, int *matchlength) {
  return re_matchp(re_compile(pattern), text, matchlength);
}


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

x86 assembly (clang, -O2):
<re_match>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <re_compile@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <re_matchp@plt>

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

LLVM IR (-O2):
define i32 @re_match(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32 @re_compile(i8* %0)
%5 = tail call i32 @re_matchp(i32 %4, i8* %1, i32* %2)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ vsprintf(char *, char *, int /*<<< orphan*/);
int xwrite(int, char *, int /*<<< orphan*/);
int xvprintf(char *f, va_list v) {
  static char buf[4096];
  return xwrite(1, buf, vsprintf(buf, f, v));
}


x86 assembly (clang, -O0):
<xvprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0x2f03(%rip),%rdi
call   1040 <vsprintf@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0x2ef0(%rip),%rsi
call   1030 <xwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xvprintf>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0x2f13(%rip),%rbx
mov    %rbx,%rdi
call   1040 <vsprintf@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <xwrite@plt>

LLVM IR (-O0):
@xvprintf.buf = internal global [4096 x i8] zeroinitializer
define i32 @xvprintf(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 @vsprintf(i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @xvprintf.buf, i64 0, i64 0), i8* %5, i32 %6)
%8 = call i32 @xwrite(i32 1, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @xvprintf.buf, i64 0, i64 0), i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@xvprintf.buf = internal global [4096 x i8] zeroinitializer
define i32 @xvprintf(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @vsprintf(i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @xvprintf.buf, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i32 @xwrite(i32 1, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @xvprintf.buf, i64 0, i64 0), i32 %3)
ret i32 %4
}
/* Variables and functions */
size_t strlen(char *);
void strip_string(char string[]) {
  size_t l = strlen(string);
  if (string[l - 1] == '\n')
    string[l - 1] = '\0';
  return;
}


x86 assembly (clang, -O0):
<strip_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1152 <strip_string+0x42>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1125 <strip_string+0x15>
movb   $0x0,-0x1(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @strip_string(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, -1
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 10
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 0, i8* %4
br label %8
8: ; preds = %7, %1
ret void
}
float AnchorBasesPerRead(int readLength, float pAnchor) {
  return pAnchor * readLength;
}


x86 assembly (clang, -O0):
<AnchorBasesPerRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<AnchorBasesPerRead>:
cvtsi2ss %edi,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @AnchorBasesPerRead(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to float
%8 = fmul float %5, %7
ret float %8
}

LLVM IR (-O2):
define float @AnchorBasesPerRead(i32 %0, float %1) {
%3 = sitofp i32 %0 to float
%4 = fmul float %3, %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ MapFile(char *);
int /*<<< orphan*/ TellFile(int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *);
TellSymbolFile() {
  char name[4096];
  extern char *SourceName();
  sprintf(name, "%s.if", SourceName());
  TellFile(MapFile(name));
}


x86 assembly (clang, -O0):
<TellSymbolFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
lea    -0x1010(%rbp),%rax
mov    %rax,-0x1018(%rbp)
mov    $0x0,%al
call   1040 <SourceName@plt>
mov    -0x1018(%rbp),%rdi
mov    %rax,%rdx
lea    0xe8f(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x1010(%rbp),%rdi
call   1030 <MapFile@plt>
mov    %eax,%edi
call   1060 <TellFile@plt>
mov    -0x4(%rbp),%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TellSymbolFile>:
push   %rbx
sub    $0x1000,%rsp
xor    %eax,%eax
call   1040 <SourceName@plt>
lea    0xeaa(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <MapFile@plt>
mov    %eax,%edi
call   1060 <TellFile@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s.if\00"
define i32 @TellSymbolFile() {
%1 = alloca i32
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i8* (...) @SourceName()
%5 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%7 = call i32 @MapFile(i8* %6)
%8 = call i32 @TellFile(i32 %7)
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s.if\00"
define i32 @TellSymbolFile() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = tail call i8* (...) @SourceName()
%4 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @MapFile(i8* %2)
%6 = call i32 @TellFile(i32 %5)
ret i32 undef
}
int DEBUG_PRINT(const char *str, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DEBUG_PRINT(i8* nocapture readnone %0, ...) {
ret i32 0
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
uint bytes(uint x) { return x / 8 + (x % 8 > 0); }


x86 assembly (clang, -O0):
<bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
cmp    $0x0,%edx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes>:
lea    0x7(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
sar    $0x3,%ecx
xor    %eax,%eax
test   $0x80000007,%edi
setg   %al
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bytes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 8
%5 = load i32, i32* %2
%6 = srem i32 %5, 8
%7 = icmp sgt i32 %6, 0
%8 = zext i1 %7 to i32
%9 = add nsw i32 %4, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @bytes(i32 %0) {
%2 = sdiv i32 %0, 8
%3 = and i32 %0, -2147483641
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %2, %5
ret i32 %6
}
void printfe(const char *str, ...) {}


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

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

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

LLVM IR (-O2):
define void @printfe(i8* nocapture %0, ...) {
ret void
}
void rop3_95_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D & T;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


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

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

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

LLVM IR (-O2):
define void @rop3_95_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = xor i8 %5, -1
%7 = and i8 %6, %1
%8 = xor i8 %2, -1
%9 = xor i8 %1, -1
%10 = and i8 %5, %9
%11 = or i8 %10, %8
%12 = or i8 %11, %7
store i8 %12, i8* %0
ret void
}
/* Variables and functions */
int *func_dep_one(int, int *);
int func_dep_two();
int main() {
  int a = 10;
  int *p = func_dep_one(10, &a);
  *p = 20;
  return *p + func_dep_two();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    $0xa,%edi
lea    -0x8(%rbp),%rsi
call   1040 <func_dep_one@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x14,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <func_dep_two@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xa,%edi
call   1040 <func_dep_one@plt>
movl   $0x14,(%rax)
xor    %eax,%eax
call   1030 <func_dep_two@plt>
add    $0x14,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 10, i32* %2
%4 = call i32* @func_dep_one(i32 10, i32* %2)
store i32* %4, i32** %3
%5 = load i32*, i32** %3
store i32 20, i32* %5
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 (...) @func_dep_two()
%9 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = call i32* @func_dep_one(i32 10, i32* %1)
store i32 20, i32* %3
%4 = call i32 (...) @func_dep_two()
%5 = add nsw i32 %4, 20
ret i32 %5
}
void *ctx_module_at(void *ip) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @ctx_module_at(i8* nocapture readnone %0) {
ret i8* null
}
void sdr_combine(const char *sdrsrc) {}


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

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

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

LLVM IR (-O2):
define void @sdr_combine(i8* nocapture %0) {
ret void
}
rmtstatus(argc, argv) char *argv[];
{ (void)command(argc > 1 ? "STAT %s" : "STAT", argv[1]); }


x86 assembly (clang, -O0):
<rmtstatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
lea    0xedf(%rip),%rdi
lea    0xed0(%rip),%rax
cmp    $0x1,%ecx
cmovg  %rax,%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    $0x0,%al
call   1030 <command@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmtstatus>:
cmp    $0x2,%edi
lea    0xee6(%rip),%rax
lea    0xee7(%rip),%rdi
cmovge %rax,%rdi
mov    0x8(%rsi),%rsi
xor    %eax,%eax
jmp    1030 <command@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"STAT %s\00"
@.str.1 = [5 x i8] c"STAT\00"
define i32 @rmtstatus(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @command to i32 (i8*, i8*, ...)*)(i8* %9, i8* %12)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [8 x i8] c"STAT %s\00"
@.str.1 = [5 x i8] c"STAT\00"
define i32 @rmtstatus(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
%4 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @command to i32 (i8*, i8*, ...)*)(i8* %4, i8* %6)
ret i32 undef
}
/* Variables and functions */
scalar_t__ isspace(char);
void skipspc(char **buff) {
  while (isspace(**buff))
    ++(*buff);
  return;
}


x86 assembly (clang, -O0):
<skipspc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1148 <skipspc+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <skipspc+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipspc>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isspace@plt>
test   %rax,%rax
je     113a <skipspc+0x2a>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <skipspc+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @skipspc(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @isspace(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i64 @isspace(i8 signext %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
void gdk_window_set_group() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ece391_sbrk(int);
caddr_t sbrk(int incr) { return (caddr_t)ece391_sbrk(incr); }


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

x86 assembly (clang, -O2):
<sbrk>:
jmp    1030 <ece391_sbrk@plt>

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

LLVM IR (-O2):
define i32 @sbrk(i32 %0) {
%2 = tail call i32 @ece391_sbrk(i32 %0)
ret i32 %2
}
/* Variables and functions */
double cos(double);
double libm_cos(double x) { return cos(x); }


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

x86 assembly (clang, -O2):
<libm_cos>:
jmp    1030 <cos@plt>

LLVM IR (-O0):
define double @libm_cos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @cos(double %3)
ret double %4
}

LLVM IR (-O2):
define double @libm_cos(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
int get_hpo2(int x) { return (sizeof(x) * 8) - __builtin_clz(x - 1); }


x86 assembly (clang, -O0):
<get_hpo2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
bsr    %eax,%eax
xor    $0x1f,%eax
movslq %eax,%rcx
mov    $0x20,%eax
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hpo2>:
add    $0xffffffff,%edi
bsr    %edi,%eax
xor    $0xffffffe0,%eax
add    $0x21,%eax
ret

LLVM IR (-O0):
define i32 @get_hpo2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = call i32 @llvm.ctlz.i32(i32 %4, i1 true)
%6 = sext i32 %5 to i64
%7 = sub i64 32, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_hpo2(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 @llvm.ctlz.i32(i32 %2, i1 true)
%4 = sub nuw nsw i32 32, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fetchXGetURL(char const *, int /*<<< orphan*/ *,
                                 char const *);
FILE *fetchGetURL(const char *URL, const char *flags) {
  return (fetchXGetURL(URL, NULL, flags));
}


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

x86 assembly (clang, -O2):
<fetchGetURL>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <fetchXGetURL@plt>

LLVM IR (-O0):
define i32* @fetchGetURL(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* @fetchXGetURL(i8* %5, i32* null, i8* %6)
ret i32* %7
}

LLVM IR (-O2):
define i32* @fetchGetURL(i8* %0, i8* %1) {
%3 = tail call i32* @fetchXGetURL(i8* %0, i32* null, i8* %1)
ret i32* %3
}
/* Variables and functions */
scalar_t__ ds18b20Init();
int /*<<< orphan*/ ds18b20WriteByte(int);
unsigned char ds18b20Start() {
  if (ds18b20Init())
    return 1;
  ds18b20WriteByte(0xCC);
  ds18b20WriteByte(0x44);
  return 0;
}


x86 assembly (clang, -O0):
<ds18b20Start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <ds18b20Init@plt>
cmp    $0x0,%rax
je     1142 <ds18b20Start+0x22>
movb   $0x1,-0x1(%rbp)
jmp    115a <ds18b20Start+0x3a>
mov    $0xcc,%edi
call   1030 <ds18b20WriteByte@plt>
mov    $0x44,%edi
call   1030 <ds18b20WriteByte@plt>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds18b20Start>:
push   %rax
xor    %eax,%eax
call   1040 <ds18b20Init@plt>
mov    %rax,%rcx
mov    $0x1,%al
test   %rcx,%rcx
je     1134 <ds18b20Start+0x14>
pop    %rcx
ret
mov    $0xcc,%edi
call   1030 <ds18b20WriteByte@plt>
mov    $0x44,%edi
call   1030 <ds18b20WriteByte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @ds18b20Start() {
%1 = alloca i8
%2 = call i64 (...) @ds18b20Init()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8 1, i8* %1
br label %8
5: ; preds = %0
%6 = call i32 @ds18b20WriteByte(i32 204)
%7 = call i32 @ds18b20WriteByte(i32 68)
store i8 0, i8* %1
br label %8
8: ; preds = %5, %4
%9 = load i8, i8* %1
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @ds18b20Start() {
%1 = tail call i64 (...) @ds18b20Init()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @ds18b20WriteByte(i32 204)
%5 = tail call i32 @ds18b20WriteByte(i32 68)
br label %6
6: ; preds = %0, %3
%7 = phi i8 [ 0, %3 ], [ 1, %0 ]
ret i8 %7
}