xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DI();
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_0xf3(void) {
  DI();
  T_WAIT_UNTIL(4);
  return;
}


x86 assembly (clang, -O0):
<op_0xf3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <DI@plt>
mov    $0x4,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_0xf3>:
push   %rax
xor    %eax,%eax
call   1030 <DI@plt>
mov    $0x4,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_0xf3() {
%1 = call i32 (...) @DI()
%2 = call i32 @T_WAIT_UNTIL(i32 4)
ret void
}

LLVM IR (-O2):
define void @op_0xf3() {
%1 = tail call i32 (...) @DI()
%2 = tail call i32 @T_WAIT_UNTIL(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void default_error_handler(const char *message) {
  fprintf(stderr, "ERROR: %s\n", message);
  abort();
}


x86 assembly (clang, -O0):
<default_error_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<default_error_handler>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @default_error_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @default_error_handler(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
void foo454(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo454(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__9__GeneralIO__set();
void CC2420ControlP__VREN__set(void) { Msp430GpioC__9__GeneralIO__set(); }


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

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

LLVM IR (-O0):
define void @CC2420ControlP__VREN__set() {
%1 = call i32 (...) @Msp430GpioC__9__GeneralIO__set()
ret void
}

LLVM IR (-O2):
define void @CC2420ControlP__VREN__set() {
%1 = tail call i32 (...) @Msp430GpioC__9__GeneralIO__set()
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ puts(char *);
char *strerror(int);
void write_error() {
  int saved_errno = errno;
  puts("error");
  puts(strerror(saved_errno));
}


x86 assembly (clang, -O0):
<write_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%edi
call   1040 <strerror@plt>
mov    %rax,%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_error>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <strerror@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [6 x i8] c"error\00"
define void @write_error() {
%1 = alloca i32
%2 = load i32, i32* @errno
store i32 %2, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = call i8* @strerror(i32 %4)
%6 = call i32 @puts(i8* %5)
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [6 x i8] c"error\00"
define void @write_error() {
%1 = load i32, i32* @errno
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @strerror(i32 %1)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
scalar_t__ isalpha(char const);
scalar_t__ isxdigit(char const);
int toupper(char const);
int eb_htoi(const char *buf) {
  int ret;
  ret = -1;
  if (isxdigit(*buf)) {
    if (isalpha(*buf))
      ret = 55;
    else
      ret = 48;
    ret = toupper(*buf) - ret;
  }
  return ret;
}


x86 assembly (clang, -O0):
<eb_htoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isxdigit@plt>
cmp    $0x0,%rax
je     1194 <eb_htoi+0x64>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     117b <eb_htoi+0x4b>
movl   $0x37,-0xc(%rbp)
jmp    1182 <eb_htoi+0x52>
movl   $0x30,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb_htoi>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1050 <isxdigit@plt>
test   %rax,%rax
je     1165 <eb_htoi+0x35>
movsbl (%rbx),%edi
call   1040 <isalpha@plt>
mov    %rax,%r14
movsbl (%rbx),%edi
call   1030 <toupper@plt>
lea    -0x37(%rax),%ecx
add    $0xffffffd0,%eax
test   %r14,%r14
cmovne %ecx,%eax
jmp    116a <eb_htoi+0x3a>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @eb_htoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 -1, i32* %3
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isxdigit(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isalpha(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 55, i32* %3
br label %15
14: ; preds = %8
store i32 48, i32* %3
br label %15
15: ; preds = %14, %13
%16 = load i8*, i8** %2
%17 = load i8, i8* %16
%18 = call i32 @toupper(i8 signext %17)
%19 = load i32, i32* %3
%20 = sub nsw i32 %18, %19
store i32 %20, i32* %3
br label %21
21: ; preds = %15, %1
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @eb_htoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isxdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = load i8, i8* %0
%7 = tail call i64 @isalpha(i8 signext %6)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i32 -48, i32 -55
%10 = load i8, i8* %0
%11 = tail call i32 @toupper(i8 signext %10)
%12 = add i32 %9, %11
br label %13
13: ; preds = %5, %1
%14 = phi i32 [ %12, %5 ], [ -1, %1 ]
ret i32 %14
}
void writestring(out, x) int out;
char *x;
{
  register int size;
  write(out, x, strlen(x));
}


x86 assembly (clang, -O0):
<writestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
mov    $0x0,%al
call   1030 <write@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writestring>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @writestring(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %6, i8* %7, i64 %9)
ret void
}

LLVM IR (-O2):
define void @writestring(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %0, i8* %1, i64 %3)
ret void
}
void rte_prefetch1(const volatile void *p) {}


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

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

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

LLVM IR (-O2):
define void @rte_prefetch1(i8* nocapture %0) {
ret void
}
int barbar(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @barbar() {
ret i32 2
}

LLVM IR (-O2):
define i32 @barbar() {
ret i32 2
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  while (x > 1) {
    int old_x = x;
    x = __VERIFIER_nondet_int();
    if (-2 * x != old_x) {
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    115d <main+0x4d>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
imul   $0xfffffffe,-0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1158 <main+0x48>
jmp    115d <main+0x4d>
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
cmp    $0x2,%ebx
jl     1136 <main+0x26>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ecx
add    %eax,%ecx
add    %ebx,%ecx
mov    %eax,%ebx
je     1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
br label %5
5: ; preds = %16, %0
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
store i32 %9, i32* %3
%10 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = mul nsw i32 -2, %11
%13 = load i32, i32* %3
%14 = icmp ne i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %8
br label %17
16: ; preds = %8
br label %5
17: ; preds = %15, %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
br label %2
2: ; preds = %5, %0
%3 = phi i32 [ %1, %0 ], [ %6, %5 ]
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 (...) @__VERIFIER_nondet_int()
%7 = mul nsw i32 %6, -2
%8 = icmp eq i32 %7, %3
br i1 %8, label %2, label %9
9: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t get_u16(const void *buf) {
  const uint8_t *p = buf;
  return ((uint16_t)p[1] + ((uint16_t)p[0] << 8));
}


x86 assembly (clang, -O0):
<get_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_u16>:
mov    (%rdi),%eax
shl    $0x8,%eax
add    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_u16(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = load i64*, i64** %3
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 8
%15 = add nsw i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_u16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %2
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = add nsw i32 %9, %6
ret i32 %10
}
/* Variables and functions */
char *concatenate(char *, char *, int, char const *, char *);
char *get_task_launcher_file(const char *work_dir) {
  return concatenate("%s/%s", "task launcher", 2, work_dir, "taskjvm.sh");
}


x86 assembly (clang, -O0):
<get_task_launcher_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xed9(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x2,%edx
lea    0xeda(%rip),%r8
call   1030 <concatenate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_task_launcher_file>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xeec(%rip),%r8
mov    $0x2,%edx
jmp    1030 <concatenate@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [14 x i8] c"task launcher\00"
@.str.2 = [11 x i8] c"taskjvm.sh\00"
define i8* @get_task_launcher_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @concatenate(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [14 x i8] c"task launcher\00"
@.str.2 = [11 x i8] c"taskjvm.sh\00"
define i8* @get_task_launcher_file(i8* %0) {
%2 = tail call i8* @concatenate(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *p) {
  printf("usage: %s [count (default 100)] \n", p);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"usage: %s [count (default 100)] \0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"usage: %s [count (default 100)] \0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int main() { return 10; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
/* Variables and functions */
int biscSendByte(unsigned char);
int biscPlaySong(unsigned char songNum) {
  if (songNum > 15)
    return -1;
  if (biscSendByte(141) == -1)
    return -1;
  if (biscSendByte(songNum) == -1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<biscPlaySong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0xf,%eax
jle    1137 <biscPlaySong+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <biscPlaySong+0x6b>
mov    $0x8d,%edi
call   1030 <biscSendByte@plt>
cmp    $0xffffffff,%eax
jne    1156 <biscPlaySong+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <biscPlaySong+0x6b>
movzbl -0x5(%rbp),%edi
call   1030 <biscSendByte@plt>
cmp    $0xffffffff,%eax
jne    1174 <biscPlaySong+0x64>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <biscPlaySong+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<biscPlaySong>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0xffffffff,%ebx
cmp    $0xf,%bpl
ja     1142 <biscPlaySong+0x32>
mov    $0x8d,%edi
call   1030 <biscSendByte@plt>
cmp    $0xffffffff,%eax
je     1142 <biscPlaySong+0x32>
movzbl %bpl,%edi
call   1030 <biscSendByte@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
sete   %bl
neg    %ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @biscPlaySong(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sgt i32 %5, 15
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %18
8: ; preds = %1
%9 = call i32 @biscSendByte(i8 zeroext -115)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 -1, i32* %2
br label %18
12: ; preds = %8
%13 = load i8, i8* %3
%14 = call i32 @biscSendByte(i8 zeroext %13)
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 -1, i32* %2
br label %18
17: ; preds = %12
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %11, %7
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @biscPlaySong(i8 zeroext %0) {
%2 = icmp ugt i8 %0, 15
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 @biscSendByte(i8 zeroext -115)
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 @biscSendByte(i8 zeroext %0)
%8 = icmp eq i32 %7, -1
%9 = sext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ -1, %1 ], [ -1, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_quaddobl_Laurent_sampler(int dim) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(806, &dim, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_quaddobl_Laurent_sampler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x326,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_quaddobl_Laurent_sampler>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x326,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_quaddobl_Laurent_sampler(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 806, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_quaddobl_Laurent_sampler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 806, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ test5();
int main(int argc, char **argv) {
  if (!test5())
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test5@plt>
cmp    $0x0,%eax
jne    114d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test5@plt>
test   %eax,%eax
je     1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test5()
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test5()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void *hello(void *myrank) {
  long rank = (long)myrank;
  printf("Ae, sou %i, vai encarar?\n", rank);
}


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

x86 assembly (clang, -O2):
<hello>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Ae, sou %i, vai encarar?\0A\00"
define i8* @hello(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [26 x i8] c"Ae, sou %i, vai encarar?\0A\00"
define noalias i8* @hello(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i8* undef
}
/* Type definitions */
struct dma_channel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_dma_channel(struct dma_channel *);
void mic_dma_thread_free_chan(struct dma_channel *chan) {
  free_dma_channel(chan);
}


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

x86 assembly (clang, -O2):
<mic_dma_thread_free_chan>:
jmp    1030 <free_dma_channel@plt>

LLVM IR (-O0):
%struct.dma_channel = type { i32 }
define void @mic_dma_thread_free_chan(%struct.dma_channel* %0) {
%2 = alloca %struct.dma_channel*
store %struct.dma_channel* %0, %struct.dma_channel** %2
%3 = load %struct.dma_channel*, %struct.dma_channel** %2
%4 = call i32 @free_dma_channel(%struct.dma_channel* %3)
ret void
}

LLVM IR (-O2):
%struct.dma_channel = type { i32 }
define void @mic_dma_thread_free_chan(%struct.dma_channel* %0) {
%2 = tail call i32 @free_dma_channel(%struct.dma_channel* %0)
ret void
}
void _mesa_svga15_dummy_function(void) {}


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

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

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

LLVM IR (-O2):
define void @_mesa_svga15_dummy_function() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a = 0;
  int sum = 0;
  while (a < 100) {
    if (a % 2 == 1) {
      sum = sum + a;
    }
    a = a + 1;
  }
  printf("%d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1162 <main+0x52>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1154 <main+0x44>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2500)
ret i32 0
}
int int32_to_uint8(int x) {
  unsigned char y = x;
  int z = y;
  return z;
}


x86 assembly (clang, -O0):
<int32_to_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int32_to_uint8>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @int32_to_uint8(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @int32_to_uint8(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ a(int *, int *);
int /*<<< orphan*/ printf(char *, int);
main() {
  int sum, i;
  sum = 0;
  i = 1;
  while (i < 11)
    a(&sum, &i);
  printf("%d\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0xb,-0xc(%rbp)
jge    1159 <main+0x39>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <a@plt>
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x1,(%rsp)
lea    0x4(%rsp),%r14
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <a@plt>
cmpl   $0xb,(%rsp)
jl     1140 <main+0x20>
mov    0x4(%rsp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %1
store i32 1, i32* %2
br label %5
5: ; preds = %0, %5
%6 = call i32 @a(i32* %1, i32* %2)
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 11
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
int test_imm_E8int64_lowword_mem(long long *val) {
  return ((*val) & (0xE8 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E8int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 232
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double flat() { return (double)rand() / (double)RAND_MAX; }


x86 assembly (clang, -O0):
<flat>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<flat>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @flat() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @flat() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void WatchdogLock(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000C00))) = 0x00000001;
}


x86 assembly (clang, -O0):
<WatchdogLock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x1,0xc00(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogLock>:
movq   $0x1,0xc00(%rdi)
ret

LLVM IR (-O0):
define void @WatchdogLock(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 3072
%5 = inttoptr i64 %4 to i64*
store volatile i64 1, i64* %5
ret void
}

LLVM IR (-O2):
define void @WatchdogLock(i64 %0) {
%2 = add nsw i64 %0, 3072
%3 = inttoptr i64 %2 to i64*
store volatile i64 1, i64* %3
ret void
}
/* Variables and functions */
char *NP_GetPluginVersion();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("version: %s\n", NP_GetPluginVersion());
  printf("pass\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <NP_GetPluginVersion@plt>
mov    %rax,%rsi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%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
xor    %eax,%eax
call   1050 <NP_GetPluginVersion@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"version: %s\0A\00"
@.str.1 = [6 x i8] c"pass\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* (...) @NP_GetPluginVersion()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"version: %s\0A\00"
@str = [5 x i8] c"pass\00"
define i32 @main() {
%1 = tail call i8* (...) @NP_GetPluginVersion()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void console_invert(int invert) {
  putchar(0x1b);
  if (invert) {
    putchar('x');
  } else {
    putchar('y');
  }
  putchar('>');
}


x86 assembly (clang, -O0):
<console_invert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1b,%edi
call   1030 <putchar@plt>
cmpl   $0x0,-0x4(%rbp)
je     113e <console_invert+0x2e>
mov    $0x78,%edi
call   1030 <putchar@plt>
jmp    1148 <console_invert+0x38>
mov    $0x79,%edi
call   1030 <putchar@plt>
mov    $0x3e,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_invert>:
push   %rbx
mov    %edi,%ebx
mov    $0x1b,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
test   %ebx,%ebx
sete   %dil
or     $0x78,%edi
call   1030 <putchar@plt>
mov    $0x3e,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @console_invert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @putchar(i8 signext 27)
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @putchar(i8 signext 120)
br label %10
8: ; preds = %1
%9 = call i32 @putchar(i8 signext 121)
br label %10
10: ; preds = %8, %6
%11 = call i32 @putchar(i8 signext 62)
ret void
}

LLVM IR (-O2):
define void @console_invert(i32 %0) {
%2 = tail call i32 @putchar(i8 signext 27)
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8 121, i8 120
%5 = tail call i32 @putchar(i8 signext %4)
%6 = tail call i32 @putchar(i8 signext 62)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XSelectionRequestEvent;

/* Variables and functions */
void *get_XSelectionRequestEvent_display(void *_p) {
  return (void *)((XSelectionRequestEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XSelectionRequestEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XSelectionRequestEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void gtk_icon_theme_load_icon() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_theme_load_icon() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int trust;
};
typedef TYPE_1__ X509_PURPOSE;

/* Variables and functions */
int X509_PURPOSE_get_trust(const X509_PURPOSE *xp) { return xp->trust; }


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

x86 assembly (clang, -O2):
<X509_PURPOSE_get_trust>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @X509_PURPOSE_get_trust(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @X509_PURPOSE_get_trust(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
void test___atomic_and_fetch_1(short *mem) { __atomic_and_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_and_fetch_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x24(%rbp)
and    %esi,%edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    115d <test___atomic_and_fetch_1+0x5d>
jmp    1125 <test___atomic_and_fetch_1+0x25>
mov    -0x10(%rbp),%cx
mov    -0x1a(%rbp),%ax
and    %cx,%ax
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_and_fetch_1>:
lock andw $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_and_fetch_1(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
store i16 1, i16* %3
%6 = load i16, i16* %3
%7 = atomicrmw and i16* %5, i16 %6 acq_rel
%8 = and i16 %7, %6
store i16 %8, i16* %4
%9 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_and_fetch_1(i16* nocapture %0) {
%2 = atomicrmw and i16* %0, i16 1 acq_rel
ret void
}
void f1(struct S { int i; } * a) {}


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

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

LLVM IR (-O0):
%struct.S = type { i32 }
define void @f1(%struct.S* %0) {
%2 = alloca %struct.S*
store %struct.S* %0, %struct.S** %2
ret void
}

LLVM IR (-O2):
%struct.S = type { i32 }
define void @f1(%struct.S* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_printf(char *);
int /*<<< orphan*/ io_put_char(char);
int /*<<< orphan*/ itoa(char *, int, int);
void io_print_i(int i) {
  char num[16];
  if (i < 0) {
    io_put_char('-');
    i *= -1;
  }
  itoa(num, i, 10);
  io_printf(num);
}


x86 assembly (clang, -O0):
<io_print_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1156 <io_print_i+0x26>
mov    $0x2d,%edi
call   1030 <io_put_char@plt>
imul   $0xffffffff,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0xa,%edx
call   1050 <itoa@plt>
lea    -0x20(%rbp),%rdi
call   1040 <io_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_print_i>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
test   %edi,%edi
jns    1149 <io_print_i+0x19>
mov    $0x2d,%edi
call   1030 <io_put_char@plt>
neg    %ebx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0xa,%edx
call   1050 <itoa@plt>
mov    %r14,%rdi
call   1040 <io_printf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @io_print_i(i32 %0) {
%2 = alloca i32
%3 = alloca [16 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @io_put_char(i8 signext 45)
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, -1
store i32 %9, i32* %2
br label %10
10: ; preds = %6, %1
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%12 = load i32, i32* %2
%13 = call i32 @itoa(i8* %11, i32 %12, i32 10)
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%15 = call i32 @io_printf(i8* %14)
ret void
}

LLVM IR (-O2):
define void @io_print_i(i32 %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = icmp slt i32 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @io_put_char(i8 signext 45)
%7 = sub nsw i32 0, %0
br label %8
8: ; preds = %5, %1
%9 = phi i32 [ %7, %5 ], [ %0, %1 ]
%10 = call i32 @itoa(i8* %3, i32 %9, i32 10)
%11 = call i32 @io_printf(i8* %3)
ret void
}
double r5(void *x) { return *(double *)(x + 32763); }


x86 assembly (clang, -O0):
<r5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x7ffb(%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<r5>:
movsd  0x7ffb(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @r5(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32763
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @r5(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32763
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ glm_clamp_zo(float);
float glm_smoothinterp(float, float, int /*<<< orphan*/);
__attribute((always_)) float glm_smoothinterpc(float from, float to, float t) {
  return glm_smoothinterp(from, to, glm_clamp_zo(t));
}


x86 assembly (clang, -O0):
<glm_smoothinterpc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
call   1040 <glm_clamp_zo@plt>
movss  -0x14(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
mov    %eax,%edi
call   1030 <glm_smoothinterp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glm_smoothinterpc>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
movaps %xmm2,%xmm0
call   1040 <glm_clamp_zo@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
mov    %eax,%edi
pop    %rax
jmp    1030 <glm_smoothinterp@plt>

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

LLVM IR (-O2):
define float @glm_smoothinterpc(float %0, float %1, float %2) {
%4 = tail call i32 @glm_clamp_zo(float %2)
%5 = tail call float @glm_smoothinterp(float %0, float %1, i32 %4)
ret float %5
}
/* Variables and functions */
scalar_t__ ScreenMarker();
int ScreenAllMarker() {

  if (ScreenMarker() < 0) {
    return (-1);
  }
  while (ScreenMarker() >= 0)
    ;
  return (0);
}


x86 assembly (clang, -O0):
<ScreenAllMarker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ScreenMarker@plt>
cmp    $0x0,%rax
jge    1135 <ScreenAllMarker+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <ScreenAllMarker+0x47>
jmp    113a <ScreenAllMarker+0x2a>
mov    $0x0,%al
call   1030 <ScreenMarker@plt>
cmp    $0x0,%rax
jl     1150 <ScreenAllMarker+0x40>
jmp    113a <ScreenAllMarker+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScreenAllMarker>:
push   %rbx
xor    %eax,%eax
call   1030 <ScreenMarker@plt>
test   %rax,%rax
js     112e <ScreenAllMarker+0x1e>
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1030 <ScreenMarker@plt>
test   %rax,%rax
jns    1120 <ScreenAllMarker+0x10>
jmp    1133 <ScreenAllMarker+0x23>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ScreenAllMarker() {
%1 = alloca i32
%2 = call i64 (...) @ScreenMarker()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %11
5: ; preds = %0
br label %6
6: ; preds = %9, %5
%7 = call i64 (...) @ScreenMarker()
%8 = icmp sge i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %6
10: ; preds = %6
store i32 0, i32* %1
br label %11
11: ; preds = %10, %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @ScreenAllMarker() {
%1 = tail call i64 (...) @ScreenMarker()
%2 = icmp slt i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @ScreenMarker()
%5 = icmp sgt i64 %4, -1
br i1 %5, label %3, label %6
6: ; preds = %3, %0
%7 = phi i32 [ -1, %0 ], [ 0, %3 ]
ret i32 %7
}
int main(void) {
  int a = sizeof(int) + sizeof 0x10 + sizeof '\0';
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 12
}
int get_size(void) {
  int fd = device_open();
  int size;
  if (ioctl(fd, (0x7000 + 2), &size) < 0)
    perror("SIMPLE_PEBS_GET_SIZE"), exit(1);
  close(fd);
  printf("size %d\n", size);
  return size;
}


x86 assembly (clang, -O0):
<get_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <device_open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7002,%esi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1050 <ioctl@plt>
cmp    $0x0,%eax
jge    11a6 <get_size+0x46>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1070 <perror@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1060 <close@plt>
mov    -0x8(%rbp),%esi
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_size>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <device_open@plt>
mov    %eax,%ebx
lea    0xc(%rsp),%rdx
mov    %eax,%edi
mov    $0x7002,%esi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %eax,%eax
js     11aa <get_size+0x4a>
mov    %ebx,%edi
xor    %eax,%eax
call   1060 <close@plt>
mov    0xc(%rsp),%esi
lea    0xe7c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1070 <perror@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"SIMPLE_PEBS_GET_SIZE\00"
@.str.1 = [9 x i8] c"size %d\0A\00"
define i32 @get_size() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @device_open()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 (i32, i32, i32*, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i32*, ...)*)(i32 %4, i32 28674, i32* %2)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
unreachable
9: ; preds = %0
%10 = load i32, i32* %1
%11 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %10)
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [21 x i8] c"SIMPLE_PEBS_GET_SIZE\00"
@.str.1 = [9 x i8] c"size %d\0A\00"
define i32 @get_size() {
%1 = alloca i32
%2 = tail call i32 (...) @device_open()
%3 = bitcast i32* %1 to i8*
%4 = call i32 (i32, i32, i32*, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i32*, ...)*)(i32 %2, i32 28674, i32* %1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
unreachable
8: ; preds = %0
%9 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %2)
%10 = load i32, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %1
ret i32 %12
}