xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(size_t, int /*<<< orphan*/ *);
int fput32le(FILE *fp, size_t x) {
  int i;
  for (i = 0; i < 4; i++) {
    fputc(x & 0xFF, fp);
    x >>= 8;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fput32le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    115f <fput32le+0x4f>
mov    -0x10(%rbp),%rdi
and    $0xff,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <fput32le+0x17>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput32le>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movzbl %bl,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
shr    $0x18,%ebx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fputc@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @fput32le(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i64, i64* %4
%11 = and i64 %10, 255
%12 = load i32*, i32** %3
%13 = call i32 @fputc(i64 %11, i32* %12)
%14 = load i64, i64* %4
%15 = lshr i64 %14, 8
store i64 %15, i64* %4
br label %16
16: ; preds = %9
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @fput32le(i32* nocapture %0, i64 %1) {
%3 = and i64 %1, 255
%4 = tail call i32 @fputc(i64 %3, i32* %0)
%5 = lshr i64 %1, 8
%6 = and i64 %5, 255
%7 = tail call i32 @fputc(i64 %6, i32* %0)
%8 = lshr i64 %1, 16
%9 = and i64 %8, 255
%10 = tail call i32 @fputc(i64 %9, i32* %0)
%11 = lshr i64 %1, 24
%12 = and i64 %11, 255
%13 = tail call i32 @fputc(i64 %12, i32* %0)
ret i32 0
}
/* Variables and functions */
int PTHREAD_CANCEL_ASYNCHRONOUS;
int __libc_system(char const *);
int /*<<< orphan*/ pthread_setcanceltype(int, int *);
int __attribute__((weak)) system(const char *line) {
  int result;
  int oldtype;
  pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
  result = __libc_system(line);
  pthread_setcanceltype(oldtype, NULL);
  return result;
}


x86 assembly (clang, -O0):
<system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    -0x8(%rbp),%rdi
call   1030 <__libc_system@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_setcanceltype@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    %rbx,%rdi
call   1030 <__libc_system@plt>
mov    %eax,%ebx
mov    0xc(%rsp),%edi
xor    %esi,%esi
call   1040 <pthread_setcanceltype@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
define weak i32 @system(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%6 = call i32 @pthread_setcanceltype(i32 %5, i32* %4)
%7 = load i8*, i8** %2
%8 = call i32 @__libc_system(i8* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @pthread_setcanceltype(i32 %9, i32* null)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
define weak i32 @system(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%5 = call i32 @pthread_setcanceltype(i32 %4, i32* %2)
%6 = call i32 @__libc_system(i8* %0)
%7 = load i32, i32* %2
%8 = call i32 @pthread_setcanceltype(i32 %7, i32* null)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ENFILE;
int /*<<< orphan*/ errno;
int pipe(int fildes[2]) {
  errno = ENFILE;
  return -1;
}


x86 assembly (clang, -O0):
<pipe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ENFILE = global i32 0
@errno = global i32 0
define i32 @pipe(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENFILE
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
scalar_t__ dns_init_table();
int /*<<< orphan*/ printf(char *, int);
void child_SIGUSR2(int sig) {
  if (dns_init_table() != 0) {
    printf("[DNS filter]:\t? "
           "DNS: Not update hash table from signal -> %d"
           "\n",
           sig);
  }
}


x86 assembly (clang, -O0):
<child_SIGUSR2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <dns_init_table@plt>
cmp    $0x0,%rax
je     114b <child_SIGUSR2+0x2b>
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_SIGUSR2>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <dns_init_table@plt>
test   %rax,%rax
je     113e <child_SIGUSR2+0x1e>
lea    0xeca(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [62 x i8] c"[DNS filter]:\09? DNS: Not update hash table from signal -> %d\0A\00"
define void @child_SIGUSR2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @dns_init_table()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [62 x i8] c"[DNS filter]:\09? DNS: Not update hash table from signal -> %d\0A\00"
define void @child_SIGUSR2(i32 %0) {
%2 = tail call i64 (...) @dns_init_table()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello();
int maxofthree(int, int, int);
int /*<<< orphan*/ printf(char *, int);
main() {
  hello();
  printf("%d\n", maxofthree(1, -4, -7));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <hello@plt>
mov    $0x1,%edi
mov    $0xfffffffc,%esi
mov    $0xfffffff9,%edx
call   1050 <maxofthree@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <hello@plt>
mov    $0x1,%edi
mov    $0xfffffffc,%esi
mov    $0xfffffff9,%edx
call   1050 <maxofthree@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @hello()
%2 = tail call i32 @maxofthree(i32 1, i32 -4, i32 -7)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
void filecopy(FILE *from, FILE *to) {
  int c;
  while ((c = getc(from)) != EOF)
    (void)putc(c, to);
}


x86 assembly (clang, -O0):
<filecopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea5(%rip),%rcx
cmp    (%rcx),%eax
je     115c <filecopy+0x3c>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <putc@plt>
jmp    1130 <filecopy+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filecopy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <getc@plt>
mov    0x2eb1(%rip),%r15
cmp    (%r15),%eax
je     1157 <filecopy+0x37>
nopl   0x0(%rax)
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %rbx,%rdi
call   1040 <getc@plt>
cmp    (%r15),%eax
jne    1140 <filecopy+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @filecopy(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
br label %6
6: ; preds = %11, %2
%7 = load i32*, i32** %3
%8 = call i32 @getc(i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %6
%12 = load i32, i32* %5
%13 = load i32*, i32** %4
%14 = call i32 @putc(i32 %12, i32* %13)
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @filecopy(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @getc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putc(i32 %7, i32* %1)
%9 = tail call i32 @getc(i32* %0)
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
void *__bound_ptr_add(void *, size_t);
int /*<<< orphan*/ bound_error(char *);
void __bound_check(const void *p, size_t size) {
  if (size == 0)
    return;
  p = __bound_ptr_add((void *)p, size);
  if (p == ((void *)(-2)))
    bound_error("invalid pointer");
}


x86 assembly (clang, -O0):
<__bound_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1140 <__bound_check+0x20>
jmp    116e <__bound_check+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__bound_ptr_add@plt>
mov    %rax,-0x8(%rbp)
mov    $0xfffffffffffffffe,%rax
cmp    %rax,-0x8(%rbp)
jne    116e <__bound_check+0x4e>
lea    0xe97(%rip),%rdi
call   1040 <bound_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bound_check>:
test   %rsi,%rsi
je     1136 <__bound_check+0x16>
push   %rax
call   1030 <__bound_ptr_add@plt>
cmp    $0xfffffffffffffffe,%rax
lea    0x8(%rsp),%rsp
je     1137 <__bound_check+0x17>
ret
lea    0xec2(%rip),%rdi
jmp    1040 <bound_error@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"invalid pointer\00"
define void @__bound_check(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %16
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i8* @__bound_ptr_add(i8* %9, i64 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = icmp eq i8* %12, inttoptr (i64 -2 to i8*)
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 @bound_error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %7, %14, %8
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"invalid pointer\00"
define void @__bound_check(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i8* @__bound_ptr_add(i8* %0, i64 %1)
%6 = icmp eq i8* %5, inttoptr (i64 -2 to i8*)
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @bound_error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %2, %7, %4
ret void
}
void foo_1_2_2_1_2_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_2_2_2_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushreal4array_(char *x, unsigned int *n) { pushNarray(x, (*n * 4)); }


x86 assembly (clang, -O0):
<pushreal4array_>:
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
shl    $0x2,%esi
call   1030 <pushNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushreal4array_>:
mov    (%rsi),%esi
shl    $0x2,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushreal4array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 4
%9 = call i32 @pushNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushreal4array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 2
%5 = tail call i32 @pushNarray(i8* %0, i32 %4)
ret void
}
void stringCopy(char *str1, char *str2) {
  int n = 0;
  do {
    str2[n] = str1[n];
  } while (str1[n++] != '\0');
}


x86 assembly (clang, -O0):
<stringCopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1113 <stringCopy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringCopy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
mov    %cl,(%rsi,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <stringCopy+0x10>
ret

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

LLVM IR (-O2):
define void @stringCopy(i8* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %8, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 %4
store i8 %6, i8* %7
%8 = add nuw i64 %4, 1
%9 = load i8, i8* %5
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
ret void
}
void cleanup(int **array, int x) {
  int i;
  for (i = 0; i < x; i++) {
    free(array[i]);
    free(array);
  }
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <cleanup+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <cleanup+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <cleanup+0x3a>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <cleanup+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @cleanup(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = bitcast i32** %0 to i8*
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32*, i32** %0, i64 %8
%10 = bitcast i32** %9 to i8**
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
tail call void @free(i8* %5)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %2
ret void
}
/* Variables and functions */
long gcd(long, long);
long lcm(long p, long q) { return (p / gcd(p, q)) * q; }


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gcd@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cqto
idiv   %rcx
imul   -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <gcd@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1135 <lcm+0x25>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    113b <lcm+0x2b>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
imul   %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @lcm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i64 @gcd(i64 %6, i64 %7)
%9 = sdiv i64 %5, %8
%10 = load i64, i64* %4
%11 = mul nsw i64 %9, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @lcm(i64 %0, i64 %1) {
%3 = tail call i64 @gcd(i64 %0, i64 %1)
%4 = sdiv i64 %0, %3
%5 = mul nsw i64 %4, %1
ret i64 %5
}
void UpError(s) char *s;
{
  printf("\010\010\010\010\010\010Abort: %s\n", s);
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"\08\08\08\08\08\08Abort: %s\0A\00"
define void @UpError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"\08\08\08\08\08\08Abort: %s\0A\00"
define void @UpError(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
tail call void @exit(i32 0)
unreachable
}
/* Variables and functions */
int randombytes_unix_init();
int randombytes_init(void) { return randombytes_unix_init(); }


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

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

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

LLVM IR (-O2):
define i32 @randombytes_init() {
%1 = tail call i32 (...) @randombytes_unix_init()
ret i32 %1
}
void rop3_102_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D ^ S;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_102_0_0>:
xor    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_102_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = load i8*, i8** %4
store i8 %15, i8* %16
ret void
}

LLVM IR (-O2):
define void @rop3_102_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
store i8 %5, i8* %0
ret void
}
/* Type definitions */
struct card {
  int dummy;
};

/* Variables and functions */
int cmp_int_arr(int *, int *, int);
int /*<<< orphan*/ get_tp_cmp_point(struct card *, int *);
int cmp_two_pairs(struct card *c1, struct card *c2) {
  int point1[3];
  int point2[3];
  get_tp_cmp_point(c1, point1);
  get_tp_cmp_point(c2, point2);
  return cmp_int_arr(point1, point2, 3);
}


x86 assembly (clang, -O0):
<cmp_two_pairs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <get_tp_cmp_point@plt>
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <get_tp_cmp_point@plt>
lea    -0x1c(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x3,%edx
call   1030 <cmp_int_arr@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_two_pairs>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rbx
lea    0x14(%rsp),%r14
mov    %r14,%rsi
call   1040 <get_tp_cmp_point@plt>
lea    0x8(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <get_tp_cmp_point@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1030 <cmp_int_arr@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.card = type { i32 }
define i32 @cmp_two_pairs(%struct.card* %0, %struct.card* %1) {
%3 = alloca %struct.card*
%4 = alloca %struct.card*
%5 = alloca [3 x i32]
%6 = alloca [3 x i32]
store %struct.card* %0, %struct.card** %3
store %struct.card* %1, %struct.card** %4
%7 = load %struct.card*, %struct.card** %3
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%9 = call i32 @get_tp_cmp_point(%struct.card* %7, i32* %8)
%10 = load %struct.card*, %struct.card** %4
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%12 = call i32 @get_tp_cmp_point(%struct.card* %10, i32* %11)
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%15 = call i32 @cmp_int_arr(i32* %13, i32* %14, i32 3)
ret i32 %15
}

LLVM IR (-O2):
%struct.card = type { i32 }
define i32 @cmp_two_pairs(%struct.card* %0, %struct.card* %1) {
%3 = alloca [3 x i32]
%4 = alloca [3 x i32]
%5 = bitcast [3 x i32]* %3 to i8*
%6 = bitcast [3 x i32]* %4 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%8 = call i32 @get_tp_cmp_point(%struct.card* %0, i32* %7)
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%10 = call i32 @get_tp_cmp_point(%struct.card* %1, i32* %9)
%11 = call i32 @cmp_int_arr(i32* %7, i32* %9, i32 3)
ret i32 %11
}
unsigned mouseb_none_flags(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mouseb_none_flags() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 1;
  int sum = 0;
lab:
  sum += i++;
  if (i <= 100)
    goto lab;
  printf("sum=%d\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114d <main+0x3d>
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"sum=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5050)
ret i32 0
}
int do_645() { return 645; }


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

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

LLVM IR (-O0):
define i32 @do_645() {
ret i32 645
}

LLVM IR (-O2):
define i32 @do_645() {
ret i32 645
}
/* Variables and functions */
long double logl(float);
long double cbuiltin_lnl(long double x) {
  return logl(x) / logl(2.7182818284590452353602874713526624977572f);
}


x86 assembly (clang, -O0):
<cbuiltin_lnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstps  -0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <logl@plt>
fstpt  -0x20(%rbp)
movss  0xec7(%rip),%xmm0
call   1030 <logl@plt>
fldt   -0x20(%rbp)
fdivp  %st,%st(1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuiltin_lnl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstps  0x8(%rsp)
movss  0x8(%rsp),%xmm0
call   1030 <logl@plt>
fstpt  0xc(%rsp)
movss  0xecd(%rip),%xmm0
call   1030 <logl@plt>
fldt   0xc(%rsp)
fdivp  %st,%st(1)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @cbuiltin_lnl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to float
%5 = call x86_fp80 @logl(float %4)
%6 = call x86_fp80 @logl(float 0x4005BF0A80000000)
%7 = fdiv x86_fp80 %5, %6
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @cbuiltin_lnl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to float
%3 = tail call x86_fp80 @logl(float %2)
%4 = tail call x86_fp80 @logl(float 0x4005BF0A80000000)
%5 = fdiv x86_fp80 %3, %4
ret x86_fp80 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int64_t _prim_int_print(int64_t i) {
  printf("%ld\n", i);
  return i;
}


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

x86 assembly (clang, -O2):
<_prim_int_print>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @_prim_int_print(i32 returned %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %0
}
/* Variables and functions */
int isAnagram(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char s[8] = "anagram";
  char t[8] = "nagaram";
  printf("%d\n", isAnagram(s, t));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x14(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <isAnagram@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6d61726167616e,%rax
lea    0x5fa0cf3(%rax),%rcx
mov    %rcx,0x10(%rsp)
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <isAnagram@plt>
lea    0xeab(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [8 x i8] c"anagram\00"
@__const.main.t = [8 x i8] c"nagaram\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca [8 x i8]
store i32 0, i32* %1
%4 = bitcast [8 x i8]* %2 to i8*
%5 = bitcast [8 x i8]* %3 to i8*
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%8 = call i32 @isAnagram(i8* %6, i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
store i64 30787916450066017, i64* %1
%4 = bitcast i64* %2 to i8*
store i64 30787916349792622, i64* %2
%5 = call i32 @isAnagram(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int64_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ madd(scalar_t__, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ madd1(scalar_t__, int /*<<< orphan*/, int /*<<< orphan*/);
int64_t madd_variants(int64_t a, int32_t rs, int32_t rt) {
  int64_t rd = madd(a, rs, rt);
  int64_t rd1 = madd1(a, rs, rt);
  assert(rd == rd1);
  return rd;
}


x86 assembly (clang, -O0):
<madd_variants>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <madd@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <madd1@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<madd_variants>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <madd@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <madd1@plt>
xor    %edi,%edi
cmp    %rax,%r15
sete   %dil
call   1040 <assert@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @madd_variants(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i64, i64* %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i64 @madd(i64 %9, i32 %10, i32 %11)
store i64 %12, i64* %7
%13 = load i64, i64* %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i64 @madd1(i64 %13, i32 %14, i32 %15)
store i64 %16, i64* %8
%17 = load i64, i64* %7
%18 = load i64, i64* %8
%19 = icmp eq i64 %17, %18
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = load i64, i64* %7
ret i64 %22
}

LLVM IR (-O2):
define i64 @madd_variants(i64 %0, i32 %1, i32 %2) {
%4 = tail call i64 @madd(i64 %0, i32 %1, i32 %2)
%5 = tail call i64 @madd1(i64 %0, i32 %1, i32 %2)
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i64 %4
}
int isgraph(int c) {
  return (((c >= 33) && (c <= 126)) || ((c >= 161) && (c <= 255)));
}


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x21,-0x4(%rbp)
jl     1120 <isgraph+0x20>
mov    $0x1,%al
cmpl   $0x7e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1145 <isgraph+0x45>
xor    %eax,%eax
cmpl   $0xa1,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     113f <isgraph+0x3f>
cmpl   $0xff,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
lea    -0x21(%rdi),%eax
cmp    $0x5e,%eax
setb   %al
add    $0xffffff5f,%edi
cmp    $0x5f,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 33
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 161
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 255
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = add i32 %0, -161
%5 = icmp ult i32 %4, 95
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ GEN_IPADD;
int do_x509_check(int /*<<< orphan*/ *, unsigned char *, size_t, unsigned int,
                  int /*<<< orphan*/);
int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen,
                  unsigned int flags) {
  return do_x509_check(x, (unsigned char *)chk, chklen, flags, GEN_IPADD);
}


x86 assembly (clang, -O0):
<X509_check_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    0x2eab(%rip),%rax
mov    (%rax),%r8d
call   1030 <do_x509_check@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_check_ip>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%r8d
jmp    1030 <do_x509_check@plt>

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

LLVM IR (-O2):
@GEN_IPADD = global i32 0
define i32 @X509_check_ip(i32* %0, i8* %1, i64 %2, i32 %3) {
%5 = load i32, i32* @GEN_IPADD
%6 = tail call i32 @do_x509_check(i32* %0, i8* %1, i64 %2, i32 %3, i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *asciiToUtf8(char *, char *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
char *readLine(char *utf8, int size, FILE *in) {
  char line[512];
  if (fgets(line, 512, in)) {
    return asciiToUtf8(line, utf8);
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<readLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x200,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     116e <readLine+0x4e>
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <asciiToUtf8@plt>
mov    %rax,-0x8(%rbp)
jmp    1176 <readLine+0x56>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readLine>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
mov    $0x200,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     114a <readLine+0x2a>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1030 <asciiToUtf8@plt>
jmp    114c <readLine+0x2c>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @readLine(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca [512 x i8]
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%10 = load i32*, i32** %7
%11 = call i64 @fgets(i8* %9, i32 512, i32* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%15 = load i8*, i8** %5
%16 = call i8* @asciiToUtf8(i8* %14, i8* %15)
store i8* %16, i8** %4
br label %18
17: ; preds = %3
store i8* null, i8** %4
br label %18
18: ; preds = %17, %13
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define i8* @readLine(i8* %0, i32 %1, i32* nocapture %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i64 @fgets(i8* %5, i32 512, i32* %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = call i8* @asciiToUtf8(i8* %5, i8* %0)
br label %10
10: ; preds = %3, %8
%11 = phi i8* [ %9, %8 ], [ null, %3 ]
ret i8* %11
}
int dummy_device_reset(struct bladerf *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.bladerf = type opaque
define i32 @dummy_device_reset(%struct.bladerf* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
void *user_malloc(size_t);
void *opus_alloc(size_t size) { return user_malloc(size); }


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

x86 assembly (clang, -O2):
<opus_alloc>:
jmp    1030 <user_malloc@plt>

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

LLVM IR (-O2):
define i8* @opus_alloc(i64 %0) {
%2 = tail call i8* @user_malloc(i64 %0)
ret i8* %2
}
/* Type definitions */
struct deque {
  int dummy;
};

/* Variables and functions */
scalar_t__ deque_capacity(struct deque const *);
scalar_t__ deque_count(struct deque const *);
bool deque_is_full(const struct deque *deque) {
  return deque_count(deque) >= deque_capacity(deque);
}


x86 assembly (clang, -O0):
<deque_is_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <deque_count@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <deque_capacity@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deque_is_full>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <deque_count@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <deque_capacity@plt>
xor    %ecx,%ecx
cmp    %rax,%r14
setge  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.deque = type { i32 }
define i32 @deque_is_full(%struct.deque* %0) {
%2 = alloca %struct.deque*
store %struct.deque* %0, %struct.deque** %2
%3 = load %struct.deque*, %struct.deque** %2
%4 = call i64 @deque_count(%struct.deque* %3)
%5 = load %struct.deque*, %struct.deque** %2
%6 = call i64 @deque_capacity(%struct.deque* %5)
%7 = icmp sge i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
%struct.deque = type { i32 }
define i32 @deque_is_full(%struct.deque* %0) {
%2 = tail call i64 @deque_count(%struct.deque* %0)
%3 = tail call i64 @deque_capacity(%struct.deque* %0)
%4 = icmp sge i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
unsigned int sleep(unsigned int);
__attribute__((__weak__, __always___)) unsigned int
softboundcets_sleep(unsigned int seconds) {
  return sleep(seconds);
}


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

x86 assembly (clang, -O2):
<softboundcets_sleep>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret i32 %2
}
int bmin_int(int a, int b) { return (a < b ? a : b); }


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

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

LLVM IR (-O0):
define i32 @bmin_int(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @bmin_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int Operand_br4_decode(unsigned int *valp) {
  *valp = *valp << 2;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_br4_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x2,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_br4_decode>:
shll   $0x2,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Operand_br4_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 2
store i32 %3, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char const *, int);
void err_handler(const char *msg) {
  for (; *msg; msg++)
    write(STDOUT_FILENO, msg, 1);
  write(STDOUT_FILENO, "\n", 1);
}


x86 assembly (clang, -O0):
<err_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1151 <err_handler+0x41>
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <err_handler+0xc>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_handler>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x0,(%rdi)
je     114a <err_handler+0x3a>
mov    %rdi,%rbx
mov    0x2ecd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1130 <err_handler+0x20>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
mov    $0x1,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @err_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %11, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i32, i32* @STDOUT_FILENO
%9 = load i8*, i8** %2
%10 = call i32 @write(i32 %8, i8* %9, i32 1)
br label %11
11: ; preds = %7
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
%15 = load i32, i32* @STDOUT_FILENO
%16 = call i32 @write(i32 %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @err_handler(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %0, %1 ]
%6 = load i32, i32* @STDOUT_FILENO
%7 = tail call i32 @write(i32 %6, i8* %5, i32 1)
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = load i32, i32* @STDOUT_FILENO
%13 = tail call i32 @write(i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int test_imm_E4uint32_reg(unsigned int val) {
  return ((val) & (0xE4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E4uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xe4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_E4uint32_reg(i32 %0) {
%2 = and i32 %0, 228
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}