xunge/DecIR huggingface dataset:
void putstr(s) char *s;
{
  while (*s != '\0')
    putchr(*s++);
}


x86 assembly (clang, -O0):
<putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114a <putstr+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <putchr@plt>
jmp    111c <putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1135 <putstr+0x25>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <putchr@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <putstr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchr to i32 (i32, ...)*)(i32 %7)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Type definitions */
struct udev_queue {
  int dummy;
};

/* Variables and functions */
int udev_queue_get_queue_is_empty(struct udev_queue *);
__attribute__((visibility("default"))) int
udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue,
                                           unsigned long long int start,
                                           unsigned long long int end) {
  return udev_queue_get_queue_is_empty(udev_queue);
}


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

x86 assembly (clang, -O2):
<udev_queue_get_seqnum_sequence_is_finished>:
jmp    1030 <udev_queue_get_queue_is_empty@plt>

LLVM IR (-O0):
%struct.udev_queue = type { i32 }
define i32 @udev_queue_get_seqnum_sequence_is_finished(%struct.udev_queue* %0, i64 %1, i64 %2) {
%4 = alloca %struct.udev_queue*
%5 = alloca i64
%6 = alloca i64
store %struct.udev_queue* %0, %struct.udev_queue** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.udev_queue*, %struct.udev_queue** %4
%8 = call i32 @udev_queue_get_queue_is_empty(%struct.udev_queue* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.udev_queue = type { i32 }
define i32 @udev_queue_get_seqnum_sequence_is_finished(%struct.udev_queue* %0, i64 %1, i64 %2) {
%4 = tail call i32 @udev_queue_get_queue_is_empty(%struct.udev_queue* %0)
ret i32 %4
}
/* Variables and functions */
int strcmp(char *, char *);
int ascending(const void *a1, const void *a2) {
  return strcmp((char *)a1, (char *)a2);
}


x86 assembly (clang, -O0):
<ascending>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascending>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @ascending(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int setbits(unsigned int const, int, int, unsigned int const);
int main() {
  unsigned const TESTNUM = 0177;
  unsigned const SOURCENUM = 0106;
  printf("\n%o\n\n", setbits(TESTNUM, 5, 1, SOURCENUM));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7f,-0x4(%rbp)
movl   $0x46,-0x8(%rbp)
mov    $0x7f,%edi
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x46,%ecx
call   1040 <setbits@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7f,%edi
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x46,%ecx
call   1040 <setbits@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%o\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @setbits(i32 127, i32 5, i32 1, i32 70)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\n\n\nHi there!!!!!!\n\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [20 x i8] c"\0A\0A\0AHi there!!!!!!\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned int orig_sleep(unsigned int);
int /*<<< orphan*/ printf(char *);
unsigned int sleep(unsigned int seconds) {
  printf("sleep intercepted\n");
  return orig_sleep(seconds);
}


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

x86 assembly (clang, -O2):
<sleep>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <orig_sleep@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"sleep intercepted\0A\00"
define i32 @sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @orig_sleep(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@str = [18 x i8] c"sleep intercepted\00"
define i32 @sleep(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @orig_sleep(i32 %0)
ret i32 %3
}
int is_in_bound(int *arr, int size, int *ptr) {
  if (ptr < arr + size) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_in_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jae    1137 <is_in_bound+0x37>
movl   $0x1,-0x4(%rbp)
jmp    113e <is_in_bound+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in_bound>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rcx
xor    %eax,%eax
cmp    %rdx,%rcx
seta   %al
ret

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

LLVM IR (-O2):
define i32 @is_in_bound(i32* readnone %0, i32 %1, i32* readnone %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = icmp ugt i32* %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef unsigned char uint32_t;

/* Variables and functions */
uint32_t read_utf32le(void *p) {
  unsigned char *s = p;
  return s[0] + (s[1] << 8) + (s[2] << 16) + (s[3] << 24);
}


x86 assembly (clang, -O0):
<read_utf32le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_utf32le>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @read_utf32le(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = add nsw i32 %8, %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 16
%20 = add nsw i32 %14, %19
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = shl i32 %24, 24
%26 = add nsw i32 %20, %25
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @read_utf32le(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ __fpurge(int /*<<< orphan*/);
char fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char __readCharToPointer() {
  char value;
  value = fgetc(stdin);
  __fpurge(stdin);
  return value;
}


x86 assembly (clang, -O0):
<__readCharToPointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1040 <fgetc@plt>
mov    %al,-0x1(%rbp)
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <__fpurge@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__readCharToPointer>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
mov    (%r14),%edi
call   1040 <fgetc@plt>
mov    %eax,%ebx
mov    (%r14),%edi
call   1030 <__fpurge@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define signext i8 @__readCharToPointer() {
%1 = alloca i8
%2 = load i32, i32* @stdin
%3 = call signext i8 @fgetc(i32 %2)
store i8 %3, i8* %1
%4 = load i32, i32* @stdin
%5 = call i32 @__fpurge(i32 %4)
%6 = load i8, i8* %1
ret i8 %6
}

LLVM IR (-O2):
@stdin = global i32 0
define signext i8 @__readCharToPointer() {
%1 = load i32, i32* @stdin
%2 = tail call signext i8 @fgetc(i32 %1)
%3 = load i32, i32* @stdin
%4 = tail call i32 @__fpurge(i32 %3)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ _c_setbyte(int);
void POP_ES() {
  ;
  _c_setbyte(0x07);
  ;
}


x86 assembly (clang, -O0):
<POP_ES>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <_c_setbyte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<POP_ES>:
mov    $0x7,%edi
jmp    1030 <_c_setbyte@plt>

LLVM IR (-O0):
define void @POP_ES() {
%1 = call i32 @_c_setbyte(i32 7)
ret void
}

LLVM IR (-O2):
define void @POP_ES() {
%1 = tail call i32 @_c_setbyte(i32 7)
ret void
}
/* Type definitions */
struct robot {
  int dummy;
};

/* Variables and functions */
int scan(struct robot *, int, int);
int cmd_scan(struct robot *robot, int *args) {
  return scan(robot, args[0], args[1]);
}


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

x86 assembly (clang, -O2):
<cmd_scan>:
mov    (%rsi),%eax
mov    0x4(%rsi),%edx
mov    %eax,%esi
jmp    1030 <scan@plt>

LLVM IR (-O0):
%struct.robot = type { i32 }
define i32 @cmd_scan(%struct.robot* %0, i32* %1) {
%3 = alloca %struct.robot*
%4 = alloca i32*
store %struct.robot* %0, %struct.robot** %3
store i32* %1, i32** %4
%5 = load %struct.robot*, %struct.robot** %3
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = call i32 @scan(%struct.robot* %5, i32 %8, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.robot = type { i32 }
define i32 @cmd_scan(%struct.robot* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @scan(%struct.robot* %0, i32 %3, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ process_who(int);
void process_spread(int cc) { process_who(cc); }


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

x86 assembly (clang, -O2):
<process_spread>:
jmp    1030 <process_who@plt>

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

LLVM IR (-O2):
define void @process_spread(i32 %0) {
%2 = tail call i32 @process_who(i32 %0)
ret void
}
/* Variables and functions */
double atanh(double);
double sinh(double);
double __attribute__((no)) sinatan_(double x) {
  double atg = atanh(x);
  return sinh(atg) + atg;
}


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

x86 assembly (clang, -O2):
<sinatan_>:
push   %rax
call   1040 <atanh@plt>
movsd  %xmm0,(%rsp)
call   1030 <sinh@plt>
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinatan_(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @atanh(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @sinh(double %6)
%8 = load double, double* %3
%9 = fadd double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @sinatan_(double %0) {
%2 = tail call double @atanh(double %0)
%3 = tail call double @sinh(double %2)
%4 = fadd double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(int, size_t);
void *create(size_t n) {
  void *ptr = calloc(1, n);
  if (!ptr)
    abort();
  return ptr;
}


x86 assembly (clang, -O0):
<create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <create+0x30>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create>:
push   %rax
mov    %rdi,%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
test   %rax,%rax
je     1135 <create+0x15>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i8* @create(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret i8* %2
}
int comp_zlib_getcompressbuffersize(int uncompsize) {
  return uncompsize + uncompsize / 1000 + 13;
}


x86 assembly (clang, -O0):
<comp_zlib_getcompressbuffersize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0xd,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_zlib_getcompressbuffersize>:
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
add    %ecx,%eax
add    $0xd,%eax
ret

LLVM IR (-O0):
define i32 @comp_zlib_getcompressbuffersize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000
%6 = add nsw i32 %3, %5
%7 = add nsw i32 %6, 13
ret i32 %7
}

LLVM IR (-O2):
define i32 @comp_zlib_getcompressbuffersize(i32 %0) {
%2 = sdiv i32 %0, 1000
%3 = add i32 %0, 13
%4 = add i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
CSPL_Optimizers_DifferentialEvolution() {
  printf("Will calculate differential evolution.");
}


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

LLVM IR (-O0):
@.str = [39 x i8] c"Will calculate differential evolution.\00"
define i32 @CSPL_Optimizers_DifferentialEvolution() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [39 x i8] c"Will calculate differential evolution.\00"
define i32 @CSPL_Optimizers_DifferentialEvolution() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ CONF_modules_unload(int);
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_remove_state(int /*<<< orphan*/);
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ FIPS_mode_set(int /*<<< orphan*/);
void pem_openssl_terminate() {
  FIPS_mode_set(0);
  CONF_modules_unload(1);
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_remove_state(0);
  ERR_free_strings();
}


x86 assembly (clang, -O0):
<pem_openssl_terminate>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <FIPS_mode_set@plt>
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
mov    $0x0,%al
call   1070 <EVP_cleanup@plt>
mov    $0x0,%al
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %edi,%edi
call   1030 <ERR_remove_state@plt>
mov    $0x0,%al
call   1080 <ERR_free_strings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pem_openssl_terminate>:
push   %rax
xor    %edi,%edi
call   1050 <FIPS_mode_set@plt>
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
xor    %eax,%eax
call   1070 <EVP_cleanup@plt>
xor    %eax,%eax
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %edi,%edi
call   1030 <ERR_remove_state@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <ERR_free_strings@plt>

LLVM IR (-O0):
define void @pem_openssl_terminate() {
%1 = call i32 @FIPS_mode_set(i32 0)
%2 = call i32 @CONF_modules_unload(i32 1)
%3 = call i32 (...) @EVP_cleanup()
%4 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%5 = call i32 @ERR_remove_state(i32 0)
%6 = call i32 (...) @ERR_free_strings()
ret void
}

LLVM IR (-O2):
define void @pem_openssl_terminate() {
%1 = tail call i32 @FIPS_mode_set(i32 0)
%2 = tail call i32 @CONF_modules_unload(i32 1)
%3 = tail call i32 (...) @EVP_cleanup()
%4 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%5 = tail call i32 @ERR_remove_state(i32 0)
%6 = tail call i32 (...) @ERR_free_strings()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ api_end();
int api_getkey(int);
int api_openwin(char *, int, int, int, char *);
void HariMain(void) {
  int win;
  char buf[150 * 50];
  win = api_openwin(buf, 150, 50, -1, "hello");
  for (;;) {
    if (api_getkey(1) == 0x0a) {
      break;
    }
  }
  api_end();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d50,%rsp
lea    -0x1d50(%rbp),%rdi
mov    $0x96,%esi
mov    $0x32,%edx
mov    $0xffffffff,%ecx
lea    0xea8(%rip),%r8
call   1050 <api_openwin@plt>
mov    %eax,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <api_getkey@plt>
cmp    $0xa,%eax
jne    1178 <HariMain+0x48>
jmp    117d <HariMain+0x4d>
jmp    1160 <HariMain+0x30>
mov    $0x0,%al
call   1030 <api_end@plt>
add    $0x1d50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HariMain>:
sub    $0x1d58,%rsp
lea    0xec2(%rip),%r8
mov    %rsp,%rdi
mov    $0x96,%esi
mov    $0x32,%edx
mov    $0xffffffff,%ecx
call   1050 <api_openwin@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%edi
call   1040 <api_getkey@plt>
cmp    $0xa,%eax
jne    1160 <HariMain+0x30>
xor    %eax,%eax
call   1030 <api_end@plt>
add    $0x1d58,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define void @HariMain() {
%1 = alloca i32
%2 = alloca [7500 x i8]
%3 = getelementptr inbounds [7500 x i8], [7500 x i8]* %2, i64 0, i64 0
%4 = call i32 @api_openwin(i8* %3, i32 150, i32 50, i32 -1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* %1
br label %5
5: ; preds = %9, %0
%6 = call i32 @api_getkey(i32 1)
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %5
br label %10
9: ; preds = %5
br label %5
10: ; preds = %8
%11 = call i32 (...) @api_end()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define void @HariMain() {
%1 = alloca [7500 x i8]
%2 = getelementptr inbounds [7500 x i8], [7500 x i8]* %1, i64 0, i64 0
%3 = call i32 @api_openwin(i8* %2, i32 150, i32 50, i32 -1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
%5 = call i32 @api_getkey(i32 1)
%6 = icmp eq i32 %5, 10
br i1 %6, label %7, label %4
7: ; preds = %4
%8 = call i32 (...) @api_end()
ret void
}
void neural_layer_maxpool_update(const struct Layer *l) { (void)l; }


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

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

LLVM IR (-O0):
%struct.Layer = type opaque
define void @neural_layer_maxpool_update(%struct.Layer* %0) {
%2 = alloca %struct.Layer*
store %struct.Layer* %0, %struct.Layer** %2
%3 = load %struct.Layer*, %struct.Layer** %2
ret void
}

LLVM IR (-O2):
%struct.Layer = type opaque
define void @neural_layer_maxpool_update(%struct.Layer* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ errno;
long strtol(char *, char **, int);
int as_long(char *str, long *l) {
  char *endptr = NULL;
  errno = 0;
  *l = strtol(str, &endptr, 10);
  if (!endptr || *endptr)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<as_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2eb1(%rip),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     116d <as_long+0x5d>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1179 <as_long+0x69>
movl   $0x0,-0x4(%rbp)
jmp    1180 <as_long+0x70>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<as_long>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movq   $0x0,0x8(%rsp)
mov    0x2eb8(%rip),%rax
movq   $0x0,(%rax)
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %rax,(%rbx)
mov    0x8(%rsp),%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1153 <as_long+0x43>
cmpb   $0x0,(%rcx)
sete   %al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
define i32 @as_long(i8* %0, i64* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i8*
store i8* %0, i8** %4
store i64* %1, i64** %5
store i8* null, i8** %6
store i64 0, i64* @errno
%7 = load i8*, i8** %4
%8 = call i64 @strtol(i8* %7, i8** %6, i32 10)
%9 = load i64*, i64** %5
store i64 %8, i64* %9
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %12, %2
store i32 0, i32* %3
br label %19
18: ; preds = %12
store i32 1, i32* %3
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @as_long(i8* %0, i64* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
store i64 0, i64* @errno
%5 = call i64 @strtol(i8* %0, i8** %3, i32 10)
store i64 %5, i64* %1
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %2
%13 = phi i32 [ 0, %2 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
long long _f_llrintf(float);
long long int llrintf(float x) { return _f_llrintf(x); }


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

x86 assembly (clang, -O2):
<llrintf>:
jmp    1030 <_f_llrintf@plt>

LLVM IR (-O0):
define i64 @llrintf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @_f_llrintf(float %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @llrintf(float %0) {
%2 = tail call i64 @_f_llrintf(float %0)
ret i64 %2
}
int test_imm_F1int16_reg(short val) {
  return ((val) & (0xF1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F1int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xf1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F1int16_reg>:
test   $0xf1,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F1int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 241
%6 = icmp ne i32 %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_F1int16_reg(i16 signext %0) {
%2 = and i16 %0, 241
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello world, this binary's execution should be blocked");
  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)
lea    0xed3(%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
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"Hello world, this binary's execution should be blocked\00"
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 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [55 x i8] c"Hello world, this binary's execution should be blocked\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void mdp4_mddi_free_base_pipe(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_mddi_free_base_pipe(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
int bar(int x, int y) {
  int sum = x + y;
  return sum;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @bar(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_variable_header();
void fgmvwrite_variable_header_() { gmvwrite_variable_header(); }


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

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

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

LLVM IR (-O2):
define void @fgmvwrite_variable_header_() {
%1 = tail call i32 (...) @gmvwrite_variable_header()
ret void
}
/* Variables and functions */
int Sum(int, int);
int Diff(int a, int b) { return Sum(a, -b); }


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

x86 assembly (clang, -O2):
<Diff>:
neg    %esi
jmp    1030 <Sum@plt>

LLVM IR (-O0):
define i32 @Diff(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 0, %6
%8 = call i32 @Sum(i32 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @Diff(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = tail call i32 @Sum(i32 %0, i32 %3)
ret i32 %4
}
int getMax(int one, int two) {
  if (one > two)
    return one;
  return two;
}


x86 assembly (clang, -O0):
<getMax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <getMax+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <getMax+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @getMax(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @getMax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;
typedef int /*<<< orphan*/ gmp_randstate_t;

/* Variables and functions */
int /*<<< orphan*/ gen_range(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init_set_ui(int /*<<< orphan*/, unsigned long);
void gen_range_ui(mpz_t rop, unsigned long int min, mpz_t max,
                  gmp_randstate_t r_state) {
  mpz_t tmin;
  mpz_init_set_ui(tmin, min);
  gen_range(rop, tmin, max, r_state);
  mpz_clear(tmin);
}


x86 assembly (clang, -O0):
<gen_range_ui>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <mpz_init_set_ui@plt>
mov    -0x4(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1050 <gen_range@plt>
mov    -0x1c(%rbp),%edi
call   1040 <mpz_clear@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_range_ui>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %edi,%ebx
call   1030 <mpz_init_set_ui@plt>
mov    %ebx,%edi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1050 <gen_range@plt>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <mpz_clear@plt>

LLVM IR (-O0):
define void @gen_range_ui(i32 %0, i64 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %9
%11 = load i64, i64* %6
%12 = call i32 @mpz_init_set_ui(i32 %10, i64 %11)
%13 = load i32, i32* %5
%14 = load i32, i32* %9
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @gen_range(i32 %13, i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* %9
%19 = call i32 @mpz_clear(i32 %18)
ret void
}

LLVM IR (-O2):
define void @gen_range_ui(i32 %0, i64 %1, i32 %2, i32 %3) {
%5 = tail call i32 @mpz_init_set_ui(i32 undef, i64 %1)
%6 = tail call i32 @gen_range(i32 %0, i32 undef, i32 %2, i32 %3)
%7 = tail call i32 @mpz_clear(i32 undef)
ret void
}
void RTSymlinkRead(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSymlinkRead() {
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t oid_to_vid(uint64_t oid) { return (oid & 0x00FFFFFF00000000) >> 32; }


x86 assembly (clang, -O0):
<oid_to_vid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xffffff00000000,%rcx
and    %rcx,%rax
sar    $0x20,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oid_to_vid>:
mov    %edi,%eax
sar    $0x1f,%eax
and    $0xffffff,%eax
ret

LLVM IR (-O0):
define i32 @oid_to_vid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 72057589742960640
%6 = ashr i64 %5, 32
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @oid_to_vid(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 16777215, i32 0
ret i32 %3
}
/* Variables and functions */
int EXIT_FAILURE;
int run(int, char **);
int main(int argc, char **argv) {
  int exit_value = EXIT_FAILURE;
  exit_value = run(argc, argv);
  return exit_value;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <run@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <run@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @EXIT_FAILURE
store i32 %7, i32* %6
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @run(i32 %8, i8** %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @run(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
struct rbtree_bp_node {
  int dummy;
};
struct rbtree_bp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ delete_case2(struct rbtree_bp *, struct rbtree_bp_node *,
                                struct rbtree_bp_node *);
void delete_case1(struct rbtree_bp *target, struct rbtree_bp_node *P,
                  struct rbtree_bp_node *N) {
  if (P != NULL)
    delete_case2(target, P, N);
}


x86 assembly (clang, -O0):
<delete_case1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <delete_case1+0x30>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <delete_case2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_case1>:
test   %rsi,%rsi
je     111a <delete_case1+0xa>
jmp    1030 <delete_case2@plt>
ret

LLVM IR (-O0):
%struct.rbtree_bp = type { i32 }
%struct.rbtree_bp_node = type { i32 }
define void @delete_case1(%struct.rbtree_bp* %0, %struct.rbtree_bp_node* %1, %struct.rbtree_bp_node* %2) {
%4 = alloca %struct.rbtree_bp*
%5 = alloca %struct.rbtree_bp_node*
%6 = alloca %struct.rbtree_bp_node*
store %struct.rbtree_bp* %0, %struct.rbtree_bp** %4
store %struct.rbtree_bp_node* %1, %struct.rbtree_bp_node** %5
store %struct.rbtree_bp_node* %2, %struct.rbtree_bp_node** %6
%7 = load %struct.rbtree_bp_node*, %struct.rbtree_bp_node** %5
%8 = icmp ne %struct.rbtree_bp_node* %7, null
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load %struct.rbtree_bp*, %struct.rbtree_bp** %4
%11 = load %struct.rbtree_bp_node*, %struct.rbtree_bp_node** %5
%12 = load %struct.rbtree_bp_node*, %struct.rbtree_bp_node** %6
%13 = call i32 @delete_case2(%struct.rbtree_bp* %10, %struct.rbtree_bp_node* %11, %struct.rbtree_bp_node* %12)
br label %14
14: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
%struct.rbtree_bp = type { i32 }
%struct.rbtree_bp_node = type { i32 }
define void @delete_case1(%struct.rbtree_bp* %0, %struct.rbtree_bp_node* %1, %struct.rbtree_bp_node* %2) {
%4 = icmp eq %struct.rbtree_bp_node* %1, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @delete_case2(%struct.rbtree_bp* %0, %struct.rbtree_bp_node* %1, %struct.rbtree_bp_node* %2)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int asuint64(double);
int ulpscale_d(double x) {
  int e = asuint64(x) >> 52 & 0x7ff;
  if (!e)
    e++;
  return e - 0x3ff - 52;
}


x86 assembly (clang, -O0):
<ulpscale_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <asuint64@plt>
mov    $0x34,%ecx
sar    %cl,%eax
and    $0x7ff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1149 <ulpscale_d+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x3ff,%eax
sub    $0x34,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulpscale_d>:
jmp    1030 <asuint64@plt>

LLVM IR (-O0):
define i32 @ulpscale_d(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @asuint64(double %4)
%6 = ashr i32 %5, 52
%7 = and i32 %6, 2047
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %1
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %13
13: ; preds = %10, %1
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1023
%16 = sub nsw i32 %15, 52
ret i32 %16
}

LLVM IR (-O2):
define i32 @ulpscale_d(double %0) {
%2 = tail call i32 @asuint64(double %0)
ret i32 poison
}
/* Variables and functions */
int execlp(char *, char *, char *, char *, int /*<<< orphan*/ *);
int intrp_copyfile(char *src, char *dest) {
  return execlp("cp", "cp", src, dest, NULL);
}


x86 assembly (clang, -O0):
<intrp_copyfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xed1(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   1030 <execlp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intrp_copyfile>:
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xee3(%rip),%rdi
mov    %rdi,%rsi
xor    %r8d,%r8d
jmp    1030 <execlp@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"cp\00"
define i32 @intrp_copyfile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6, i32* null)
ret i32 %7
}

LLVM IR (-O2):
@.str = [3 x i8] c"cp\00"
define i32 @intrp_copyfile(i8* %0, i8* %1) {
%3 = tail call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32* null)
ret i32 %3
}
/* Variables and functions */
int slk_noutrefresh();
int wrap_slk_noutrefresh(void) { return slk_noutrefresh(); }


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

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

LLVM IR (-O0):
define i32 @wrap_slk_noutrefresh() {
%1 = call i32 (...) @slk_noutrefresh()
ret i32 %1
}

LLVM IR (-O2):
define i32 @wrap_slk_noutrefresh() {
%1 = tail call i32 (...) @slk_noutrefresh()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *);
int main(int argc, char **argv) {
  execl("hello", "world", "!");
  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)
lea    0xed3(%rip),%rdi
lea    0xed2(%rip),%rsi
lea    0xed1(%rip),%rdx
call   1030 <execl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
@.str.1 = [6 x i8] c"world\00"
@.str.2 = [2 x i8] c"!\00"
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 @execl(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [6 x i8] c"world\00"
@.str.2 = [2 x i8] c"!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @execl(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(char);
int /*<<< orphan*/ uart_puthex(unsigned int const);
void uart_puthexnl(const unsigned int value) {
  uart_puthex(value);
  uart_putc('\n');
}


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

x86 assembly (clang, -O2):
<uart_puthexnl>:
push   %rax
call   1040 <uart_puthex@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <uart_putc@plt>

LLVM IR (-O0):
define void @uart_puthexnl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @uart_puthex(i32 %3)
%5 = call i32 @uart_putc(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @uart_puthexnl(i32 %0) {
%2 = tail call i32 @uart_puthex(i32 %0)
%3 = tail call i32 @uart_putc(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C0_ISR();
int /*<<< orphan*/ I2C1_ISR();
void I2C0_I2C1_ISR(void) {
  I2C0_ISR();
  I2C1_ISR();
}


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

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

LLVM IR (-O0):
define void @I2C0_I2C1_ISR() {
%1 = call i32 (...) @I2C0_ISR()
%2 = call i32 (...) @I2C1_ISR()
ret void
}

LLVM IR (-O2):
define void @I2C0_I2C1_ISR() {
%1 = tail call i32 (...) @I2C0_ISR()
%2 = tail call i32 (...) @I2C1_ISR()
ret void
}