xunge/DecIR huggingface dataset:
void PWMGenIntTrigDisable(unsigned long ulBase, unsigned long ulGen,
                          unsigned long ulIntTrig) {
  ;
  ;

  ;
  (*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000004))) &=
      ~(ulIntTrig);
}


x86 assembly (clang, -O0):
<PWMGenIntTrigDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    0x4(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenIntTrigDisable>:
not    %rdx
and    %rdx,0x4(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @PWMGenIntTrigDisable(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = xor i64 %7, -1
%9 = load i64, i64* %4
%10 = load i64, i64* %5
%11 = add i64 %9, %10
%12 = add i64 %11, 4
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = and i64 %14, %8
store volatile i64 %15, i64* %13
ret void
}

LLVM IR (-O2):
define void @PWMGenIntTrigDisable(i64 %0, i64 %1, i64 %2) {
%4 = xor i64 %2, -1
%5 = add i64 %0, 4
%6 = add i64 %5, %1
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, %4
store volatile i64 %9, i64* %7
ret void
}
int set_sta_wpa_psk(int radio) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_sta_wpa_psk(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ViewExecutionTime();
int /*<<< orphan*/ ViewMatrixResult();
int /*<<< orphan*/ ViewNumberOfProducts();
int /*<<< orphan*/ ViewNumberOfSums();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void Stop(void) {
  ViewMatrixResult();
  ViewNumberOfSums();
  ViewNumberOfProducts();
  ViewExecutionTime();
  printf(".\n.\n.\nSTOP\n");
  system("pause");
  return;
}


x86 assembly (clang, -O0):
<Stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <ViewMatrixResult@plt>
mov    $0x0,%al
call   1060 <ViewNumberOfSums@plt>
mov    $0x0,%al
call   1050 <ViewNumberOfProducts@plt>
mov    $0x0,%al
call   1070 <ViewExecutionTime@plt>
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
lea    0xe79(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Stop>:
push   %rax
xor    %eax,%eax
call   1080 <ViewMatrixResult@plt>
xor    %eax,%eax
call   1060 <ViewNumberOfSums@plt>
xor    %eax,%eax
call   1050 <ViewNumberOfProducts@plt>
xor    %eax,%eax
call   1070 <ViewExecutionTime@plt>
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
lea    0xe70(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [12 x i8] c".\0A.\0A.\0ASTOP\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define void @Stop() {
%1 = call i32 (...) @ViewMatrixResult()
%2 = call i32 (...) @ViewNumberOfSums()
%3 = call i32 (...) @ViewNumberOfProducts()
%4 = call i32 (...) @ViewExecutionTime()
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"pause\00"
@str = [11 x i8] c".\0A.\0A.\0ASTOP\00"
define void @Stop() {
%1 = tail call i32 (...) @ViewMatrixResult()
%2 = tail call i32 (...) @ViewNumberOfSums()
%3 = tail call i32 (...) @ViewNumberOfProducts()
%4 = tail call i32 (...) @ViewExecutionTime()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gmtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ strftime(char *, int /*<<< orphan*/, char *, struct tm *);
void onion_shortcut_date_string_iso(time_t t, char *dest) {
  struct tm ts;
  gmtime_r(&t, &ts);
  strftime(dest, t, "%FT%TZ", &ts);
}


x86 assembly (clang, -O0):
<onion_shortcut_date_string_iso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gmtime_r@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
lea    0xeb6(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onion_shortcut_date_string_iso>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
call   1030 <gmtime_r@plt>
mov    0xc(%rsp),%esi
lea    0xeb5(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rcx
call   1040 <strftime@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [7 x i8] c"%FT%TZ\00"
define void @onion_shortcut_date_string_iso(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.tm
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 @gmtime_r(i32* %3, %struct.tm* %5)
%7 = load i8*, i8** %4
%8 = load i32, i32* %3
%9 = call i32 @strftime(i8* %7, i32 %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [7 x i8] c"%FT%TZ\00"
define void @onion_shortcut_date_string_iso(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.tm
store i32 %0, i32* %3
%5 = bitcast %struct.tm* %4 to i8*
%6 = call i32 @gmtime_r(i32* %3, %struct.tm* %4)
%7 = load i32, i32* %3
%8 = call i32 @strftime(i8* %1, i32 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int fib(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  char *a;
  long x;
  long f;
  if (argc > 1) {
    a = argv[1];
    printf("%d\n", fib(atoi(a)));
  } else {
    printf("more args plz\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1181 <main+0x51>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <fib@plt>
mov    %eax,%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118f <main+0x5f>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1168 <main+0x28>
mov    0x8(%rsi),%rdi
call   1060 <atoi@plt>
mov    %eax,%edi
call   1050 <fib@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1174 <main+0x34>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@str = [14 x i8] c"more args plz\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i32 @fib(i32 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %12
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %12
12: ; preds = %10, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "usage: %s -dpyinfo|-cursorarrow\n", name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"usage: %s -dpyinfo|-cursorarrow\0A\00"
define void @usage(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 ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"usage: %s -dpyinfo|-cursorarrow\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void bwb_Warning_OutOfData(char *Message) {
  bwx_DEBUG(__FUNCTION__);
  bwb_Warning(4, Message);
}


x86 assembly (clang, -O0):
<bwb_Warning_OutOfData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <bwx_DEBUG@plt>
mov    -0x8(%rbp),%rsi
mov    $0x4,%edi
mov    $0x0,%al
call   1040 <bwb_Warning@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_Warning_OutOfData>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <bwx_DEBUG@plt>
mov    $0x4,%edi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <bwb_Warning@plt>

LLVM IR (-O0):
@__FUNCTION__.bwb_Warning_OutOfData = [22 x i8] c"bwb_Warning_OutOfData\00"
define void @bwb_Warning_OutOfData(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__FUNCTION__.bwb_Warning_OutOfData, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 4, i8* %4)
ret void
}

LLVM IR (-O2):
@__FUNCTION__.bwb_Warning_OutOfData = [22 x i8] c"bwb_Warning_OutOfData\00"
define void @bwb_Warning_OutOfData(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__FUNCTION__.bwb_Warning_OutOfData, i64 0, i64 0))
%3 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 4, i8* %0)
ret void
}
/* Type definitions */
struct arg_uint {
  int dummy;
};

/* Variables and functions */
struct arg_uint *arg_uintn(char const *, char const *, char const *,
                           int /*<<< orphan*/, int, char const *);
struct arg_uint *arg_uint0(const char *shortopts, const char *longopts,
                           const char *datatype, const char *glossary) {
  return arg_uintn(shortopts, longopts, datatype, 0, 1, glossary);
}


x86 assembly (clang, -O0):
<arg_uint0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <arg_uintn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_uint0>:
mov    %rcx,%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <arg_uintn@plt>

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

LLVM IR (-O2):
%struct.arg_uint = type { i32 }
define %struct.arg_uint* @arg_uint0(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call %struct.arg_uint* @arg_uintn(i8* %0, i8* %1, i8* %2, i32 0, i32 1, i8* %3)
ret %struct.arg_uint* %5
}
int fun251() { return 251; }


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

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

LLVM IR (-O0):
define i32 @fun251() {
ret i32 251
}

LLVM IR (-O2):
define i32 @fun251() {
ret i32 251
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int sandbox_container_path_for_pid(pid_t pid, char *buffer, size_t bufsize) {
  return -1;
}


x86 assembly (clang, -O0):
<sandbox_container_path_for_pid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sandbox_container_path_for_pid(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @sandbox_container_path_for_pid(i32 %0, i8* nocapture readnone %1, i64 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void arguments_print_version(void) {
  printf("%s %s\n", (strlen("Eucalyptus") ? "Eucalyptus" : "Eucalyptus"),
         "3.1.0");
}


x86 assembly (clang, -O0):
<arguments_print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xedc(%rip),%rdi
call   1030 <strlen@plt>
lea    0xed0(%rip),%rsi
cmp    $0x0,%rax
cmovne %rsi,%rsi
lea    0xeba(%rip),%rdi
lea    0xec5(%rip),%rdx
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arguments_print_version>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xeed(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [11 x i8] c"Eucalyptus\00"
@.str.2 = [6 x i8] c"3.1.0\00"
define void @arguments_print_version() {
%1 = call i64 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [11 x i8] c"Eucalyptus\00"
@.str.2 = [6 x i8] c"3.1.0\00"
define void @arguments_print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdin;
int strcmp(char *, char *);
int be_logikai() {
  char ret[256];
  fscanf(stdin, "%s", ret);
  return strcmp(ret, "hamis");
}


x86 assembly (clang, -O0):
<be_logikai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    -0x100(%rbp),%rdx
lea    0xebe(%rip),%rsi
call   1030 <fscanf@plt>
lea    -0x100(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1040 <strcmp@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_logikai>:
push   %rbx
sub    $0x100,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdx
call   1030 <fscanf@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"hamis\00"
define i32 @be_logikai() {
%1 = alloca [256 x i8]
%2 = load i32, i32* @stdin
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @fscanf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"hamis\00"
define i32 @be_logikai() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fscanf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @strcmp(i8* %2, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ a_and(int *, scalar_t__);
void a_and_64(volatile uint64_t *p, uint64_t v) {
  union {
    uint64_t v;
    uint32_t r[2];
  } u = {v};
  if (u.r[0] + 1)
    a_and((int *)p, u.r[0]);
  if (u.r[1] + 1)
    a_and((int *)p + 1, u.r[1]);
}


x86 assembly (clang, -O0):
<a_and_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
cmp    $0x0,%rax
je     1144 <a_and_64+0x34>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <a_and@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
cmp    $0x0,%rax
je     1167 <a_and_64+0x57>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <a_and@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_and_64>:
mov    %esi,%esi
jmp    1030 <a_and@plt>

LLVM IR (-O0):
%union.anon = type { [2 x i64] }
define void @a_and_64(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca %union.anon
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = bitcast %union.anon* %5 to i32*
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = bitcast %union.anon* %5 to [2 x i64]*
%9 = getelementptr inbounds [2 x i64], [2 x i64]* %8, i64 0, i64 0
%10 = load i64, i64* %9
%11 = add nsw i64 %10, 1
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i32*, i32** %3
%15 = bitcast %union.anon* %5 to [2 x i64]*
%16 = getelementptr inbounds [2 x i64], [2 x i64]* %15, i64 0, i64 0
%17 = load i64, i64* %16
%18 = call i32 @a_and(i32* %14, i64 %17)
br label %19
19: ; preds = %13, %2
%20 = bitcast %union.anon* %5 to [2 x i64]*
%21 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
%22 = load i64, i64* %21
%23 = add nsw i64 %22, 1
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %32
25: ; preds = %19
%26 = load i32*, i32** %3
%27 = getelementptr inbounds i32, i32* %26, i64 1
%28 = bitcast %union.anon* %5 to [2 x i64]*
%29 = getelementptr inbounds [2 x i64], [2 x i64]* %28, i64 0, i64 1
%30 = load i64, i64* %29
%31 = call i32 @a_and(i32* %27, i64 %30)
br label %32
32: ; preds = %25, %19
ret void
}

LLVM IR (-O2):
define void @a_and_64(i32* %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = tail call i32 @a_and(i32* %0, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s", "Hello from another binary built with yabs!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [44 x i8] c"Hello from another binary built with yabs!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [44 x i8] c"Hello from another binary built with yabs!\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int test_imm_9Cuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x9C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Cuint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 156
%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_9Cuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 670014898176
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int count_columns(char *);
int column_count(char *string) { return count_columns(string); }


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

x86 assembly (clang, -O2):
<column_count>:
jmp    1030 <count_columns@plt>

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

LLVM IR (-O2):
define i32 @column_count(i8* %0) {
%2 = tail call i32 @count_columns(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer) {
  ;
  ;
  return ((ui32Timer == 0x000000ff)
              ? (*((volatile uint32_t *)(ui32Base + 0x00000048)))
              : (*((volatile uint32_t *)(ui32Base + 0x0000004C))));
}


x86 assembly (clang, -O0):
<TimerValueGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jne    1129 <TimerValueGet+0x29>
mov    -0x4(%rbp),%eax
add    $0x48,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <TimerValueGet+0x36>
mov    -0x4(%rbp),%eax
add    $0x4c,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerValueGet>:
xor    %eax,%eax
cmp    $0xff,%esi
setne  %al
lea    0x48(,%rax,4),%eax
movslq %edi,%rcx
mov    (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
define i32 @TimerValueGet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 255
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 72
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
br label %19
13: ; preds = %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 76
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
br label %19
19: ; preds = %13, %7
%20 = phi i32 [ %12, %7 ], [ %18, %13 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @TimerValueGet(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 255
%4 = select i1 %3, i32 72, i32 76
%5 = add nsw i32 %4, %0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
ret i32 %8
}
unsigned char GfMultBy02(unsigned char num) {
  if ((num & 0x80) == 0) {
    num = num << 1;
  } else {
    num = (num << 1) ^ 0x1B;
  }
  return num;
}


x86 assembly (clang, -O0):
<GfMultBy02>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    112b <GfMultBy02+0x2b>
movzbl -0x1(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    1138 <GfMultBy02+0x38>
movzbl -0x1(%rbp),%eax
shl    $0x1,%eax
xor    $0x1b,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GfMultBy02>:
lea    (%rdi,%rdi,1),%eax
movzbl %al,%ecx
xor    $0x1b,%al
test   %dil,%dil
movzbl %al,%eax
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @GfMultBy02(i8 zeroext %0) {
%2 = icmp sgt i8 %0, -1
%3 = shl i8 %0, 1
%4 = xor i8 %3, 27
%5 = select i1 %2, i8 %3, i8 %4
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
void mem_swap(int16_t *val) {
  int8_t *smallval = (int8_t *)val;
  int8_t tmp = smallval[0];
  smallval[0] = smallval[1];
  smallval[1] = tmp;
}


x86 assembly (clang, -O0):
<mem_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_swap>:
rolq   $0x20,(%rdi)
ret

LLVM IR (-O0):
define void @mem_swap(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
store i32 %8, i32* %4
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 0
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
ret void
}

LLVM IR (-O2):
define void @mem_swap(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
store i32 %4, i32* %0
store i32 %2, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_ioline_unref() {
  printf("NOT IMPLEMENTED:"
         "pa_ioline_unref"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_ioline_unref\00"
define i32 @pa_ioline_unref() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ init_peripheral();
void main(void) { (void)init_peripheral(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @init_peripheral()
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
void crc_init(uint16_t *crcAccum) { *crcAccum = 0xffff; }


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

x86 assembly (clang, -O2):
<crc_init>:
movl   $0xffff,(%rdi)
ret

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

LLVM IR (-O2):
define void @crc_init(i32* nocapture writeonly %0) {
store i32 65535, i32* %0
ret void
}
/* Type definitions */
struct ioctl_entry {
  int dummy;
};
struct ioctl_args {
  int dummy;
};

/* Variables and functions */
int do_get_ioctl_int(struct ioctl_args *, struct ioctl_entry *);
int get_fullscan_period(struct ioctl_args *args, struct ioctl_entry *entry) {
  return do_get_ioctl_int(args, entry);
}


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

x86 assembly (clang, -O2):
<get_fullscan_period>:
jmp    1030 <do_get_ioctl_int@plt>

LLVM IR (-O0):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @get_fullscan_period(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = alloca %struct.ioctl_args*
%4 = alloca %struct.ioctl_entry*
store %struct.ioctl_args* %0, %struct.ioctl_args** %3
store %struct.ioctl_entry* %1, %struct.ioctl_entry** %4
%5 = load %struct.ioctl_args*, %struct.ioctl_args** %3
%6 = load %struct.ioctl_entry*, %struct.ioctl_entry** %4
%7 = call i32 @do_get_ioctl_int(%struct.ioctl_args* %5, %struct.ioctl_entry* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @get_fullscan_period(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = tail call i32 @do_get_ioctl_int(%struct.ioctl_args* %0, %struct.ioctl_entry* %1)
ret i32 %3
}
OP(dd, c0) {
  illegal_1();
  op_c0();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_c0@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_c0@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_c0()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_c0()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *ut_realloc(void *p, size_t newsz) {
  if ((p = realloc(p, newsz)) == NULL) {
    fprintf(stderr, "ERROR: could not allocate memory.\n");
    exit(EXIT_FAILURE);
  }
  return p;
}


x86 assembly (clang, -O0):
<ut_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    117e <ut_realloc+0x4e>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ut_realloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <ut_realloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"ERROR: could not allocate memory.\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @ut_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %2
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"ERROR: could not allocate memory.\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @ut_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ILibLinkedList_Destroy(void *);
void ILibQueue_Destroy(void *q) { ILibLinkedList_Destroy(q); }


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

x86 assembly (clang, -O2):
<ILibQueue_Destroy>:
jmp    1030 <ILibLinkedList_Destroy@plt>

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

LLVM IR (-O2):
define void @ILibQueue_Destroy(i8* %0) {
%2 = tail call i32 @ILibLinkedList_Destroy(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ process_set_flags(unsigned int, int);
void process_unfreeze(unsigned int process) {
  process_set_flags(process, (1 << 0));
}


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

x86 assembly (clang, -O2):
<process_unfreeze>:
mov    $0x1,%esi
jmp    1030 <process_set_flags@plt>

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

LLVM IR (-O2):
define void @process_unfreeze(i32 %0) {
%2 = tail call i32 @process_set_flags(i32 %0, i32 1)
ret void
}
double far2cel(double far) { return (far - 32) / 1.8; }


x86 assembly (clang, -O0):
<far2cel>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<far2cel>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @far2cel(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 3.200000e+01
%5 = fdiv double %4, 1.800000e+00
ret double %5
}

LLVM IR (-O2):
define double @far2cel(double %0) {
%2 = fadd double %0, -3.200000e+01
%3 = fdiv double %2, 1.800000e+00
ret double %3
}
void rop3_75_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~S;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_75_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%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_75_1_1>:
or     %esi,%edx
mov    %esi,%eax
not    %al
mov    (%rdi),%cl
or     %cl,%al
not    %dl
and    %al,%dl
or     %cl,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_75_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = xor i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = load i8, i8* %6
%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 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = and i32 %39, %41
%43 = or i32 %36, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = load i8, i8* %6
%48 = zext i8 %47 to i32
%49 = and i32 %46, %48
%50 = or i32 %43, %49
%51 = trunc i32 %50 to i8
%52 = load i8*, i8** %4
store i8 %51, i8* %52
ret void
}

LLVM IR (-O2):
define void @rop3_75_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = or i8 %2, %1
%8 = xor i8 %7, -1
%9 = and i8 %6, %8
%10 = or i8 %5, %9
store i8 %10, i8* %0
ret void
}
void create_disconnect_s() {}


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

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

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

LLVM IR (-O2):
define void @create_disconnect_s() {
ret void
}
/* Type definitions */
typedef scalar_t__ y;
typedef scalar_t__ x;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
double matprod_vec_vec_sub(double *, double *, int, double);
double matprod_vec_vec(double *restrict x, double *restrict y, int k) {
  assert(((uintptr_t)(x) & (1 - 1)) == 0);
  assert(((uintptr_t)(y) & (1 - 1)) == 0);
  x = (x);
  y = (y);
  return matprod_vec_vec_sub(x, y, k, 0.0);
}


x86 assembly (clang, -O0):
<matprod_vec_vec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
and    $0x0,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
and    $0x0,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xorps  %xmm0,%xmm0
call   1030 <matprod_vec_vec_sub@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matprod_vec_vec>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    $0x1,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
xorps  %xmm0,%xmm0
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <matprod_vec_vec_sub@plt>

LLVM IR (-O0):
define double @matprod_vec_vec(double* noalias %0, double* noalias %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = ptrtoint double* %7 to i64
%9 = and i64 %8, 0
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load double*, double** %5
%14 = ptrtoint double* %13 to i64
%15 = and i64 %14, 0
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load double*, double** %4
store double* %19, double** %4
%20 = load double*, double** %5
store double* %20, double** %5
%21 = load double*, double** %4
%22 = load double*, double** %5
%23 = load i32, i32* %6
%24 = call double @matprod_vec_vec_sub(double* %21, double* %22, i32 %23, double 0.000000e+00)
ret double %24
}

LLVM IR (-O2):
define double @matprod_vec_vec(double* noalias %0, double* noalias %1, i32 %2) {
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = tail call double @matprod_vec_vec_sub(double* %0, double* %1, i32 %2, double 0.000000e+00)
ret double %6
}
/* Variables and functions */
unsigned char GetAlpha87(unsigned long);
unsigned char getalpha(unsigned long c) { return GetAlpha87(c); }


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

x86 assembly (clang, -O2):
<getalpha>:
jmp    1030 <GetAlpha87@plt>

LLVM IR (-O0):
define zeroext i8 @getalpha(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call zeroext i8 @GetAlpha87(i64 %3)
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @getalpha(i64 %0) {
%2 = tail call zeroext i8 @GetAlpha87(i64 %0)
ret i8 %2
}
void swap(char **str1_ptr, char **str2_ptr) {
  char *temp = *str1_ptr;
  *str1_ptr = *str2_ptr;
  *str2_ptr = temp;
}


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

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

LLVM IR (-O0):
define void @swap(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(int /*<<< orphan*/, int /*<<< orphan*/ *);
void writeLittleInt(FILE *file, uint32_t num) {
  putc((uint8_t)(num), file);
  putc((uint8_t)(num >> 8), file);
  putc((uint8_t)(num >> 16), file);
  putc((uint8_t)(num >> 24), file);
}


x86 assembly (clang, -O0):
<writeLittleInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
sar    $0x8,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
sar    $0x10,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
sar    $0x18,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeLittleInt>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%edi
sar    $0x8,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%edi
sar    $0x10,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
sar    $0x18,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @writeLittleInt(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = call i32 @putc(i32 %5, i32* %6)
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %3
%11 = call i32 @putc(i32 %9, i32* %10)
%12 = load i32, i32* %4
%13 = ashr i32 %12, 16
%14 = load i32*, i32** %3
%15 = call i32 @putc(i32 %13, i32* %14)
%16 = load i32, i32* %4
%17 = ashr i32 %16, 24
%18 = load i32*, i32** %3
%19 = call i32 @putc(i32 %17, i32* %18)
ret void
}

LLVM IR (-O2):
define void @writeLittleInt(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @putc(i32 %1, i32* %0)
%4 = ashr i32 %1, 8
%5 = tail call i32 @putc(i32 %4, i32* %0)
%6 = ashr i32 %1, 16
%7 = tail call i32 @putc(i32 %6, i32* %0)
%8 = ashr i32 %1, 24
%9 = tail call i32 @putc(i32 %8, i32* %0)
ret void
}
void DisplayText(void) {}


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

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

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

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