xunge/DecIR huggingface dataset:
void leftrightcompute(int i, int j, int k, int dir, int is, int ie, int js,
                      int je, int ks, int ke, int *computewithleft,
                      int *computewithright) {
  *computewithleft = 1;
  *computewithright = 1;
}


x86 assembly (clang, -O0):
<leftrightcompute>:
push   %rbp
mov    %rsp,%rbp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    0x30(%rbp),%rax
movl   $0x1,(%rax)
mov    0x38(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftrightcompute>:
mov    0x30(%rsp),%rax
mov    0x28(%rsp),%rcx
movl   $0x1,(%rcx)
movl   $0x1,(%rax)
ret

LLVM IR (-O0):
define void @leftrightcompute(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32* %10, i32* %11) {
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32*
%24 = alloca i32*
store i32 %0, i32* %13
store i32 %1, i32* %14
store i32 %2, i32* %15
store i32 %3, i32* %16
store i32 %4, i32* %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32* %10, i32** %23
store i32* %11, i32** %24
%25 = load i32*, i32** %23
store i32 1, i32* %25
%26 = load i32*, i32** %24
store i32 1, i32* %26
ret void
}

LLVM IR (-O2):
define void @leftrightcompute(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32* nocapture writeonly %10, i32* nocapture writeonly %11) {
store i32 1, i32* %10
store i32 1, i32* %11
ret void
}
int search(int vc[], int key, int no) {
  int i = 0;
  vc[no] = key;
  while (1) {
    if (vc[i] == key)
      break;
    i++;
  }
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    113c <search+0x3c>
jmp    114a <search+0x4a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1123 <search+0x23>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
movslq %edx,%rax
mov    %esi,(%rdi,%rax,4)
cs nopw 0x0(%rax,%rax,1)
lea    0x4(%rdi),%rax
cmp    %esi,(%rdi)
mov    %rax,%rdi
jne    1110 <search+0x10>
ret

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

LLVM IR (-O2):
define i32 @search(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %1, i32* %5
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, %1
%11 = add nuw i64 %7, 1
br i1 %10, label %12, label %6
12: ; preds = %6
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test(int argc) {
  if (argc > 1)
    printf("mocmoc");
  else
    printf("no mocmoc");
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1136 <test+0x26>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <test+0x32>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
cmp    $0x2,%edi
lea    0xee8(%rip),%rax
lea    0xede(%rip),%rdi
cmovge %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"mocmoc\00"
@.str.1 = [10 x i8] c"no mocmoc\00"
define i32 @test(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freeseq(char **seqc0, char **seqc1, char **seqca) {
  free(*seqc0);
  *seqc0 = *seqc1 = *seqca = NULL;
}


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

x86 assembly (clang, -O2):
<freeseq>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%r15)
movq   $0x0,(%r14)
movq   $0x0,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @freeseq(i8** nocapture %0, i8** nocapture writeonly %1, i8** nocapture writeonly %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @free(i8* %4)
store i8* null, i8** %2
store i8* null, i8** %1
store i8* null, i8** %0
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t hash_djb2a(const char *str, const uint32_t id) {
  register uint32_t hash = 5381 + id;
  register int c;
  while ((c = *str++)) {
    hash = ((hash << 5) + hash) ^ c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_djb2a>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1505,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1148 <hash_djb2a+0x48>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <hash_djb2a+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_djb2a>:
add    $0x1505,%esi
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <hash_djb2a+0x38>
add    $0x1,%rdi
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %esi,%eax
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%esi
test   %cl,%cl
jne    1120 <hash_djb2a+0x20>
ret
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_djb2a(i8* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 5381
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %2, %6
%7 = phi i8 [ %14, %6 ], [ %4, %2 ]
%8 = phi i8* [ %11, %6 ], [ %0, %2 ]
%9 = phi i32 [ %13, %6 ], [ %3, %2 ]
%10 = sext i8 %7 to i32
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = mul i32 %9, 33
%13 = xor i32 %12, %10
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %2
%17 = phi i32 [ %3, %2 ], [ %13, %6 ]
ret i32 %17
}
int bar(double a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bar(double %0) {
ret i32 0
}
/* Variables and functions */
char *realloc(char *, scalar_t__);
char *strcat(char *, char const *);
scalar_t__ strlen(char const *);
char *strrecat(char *orig, const char *append) {
  char *new = realloc(orig, strlen(orig) + strlen(append) + 1);
  new = strcat(new, append);
  return new;
}


x86 assembly (clang, -O0):
<strrecat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdi
add    %rax,%rsi
add    $0x1,%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrecat>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    (%r15,%rax,1),%rsi
add    $0x1,%rsi
mov    %rbx,%rdi
call   1040 <realloc@plt>
mov    %rax,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <strcat@plt>

LLVM IR (-O0):
define i8* @strrecat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %8, %10
%12 = add nsw i64 %11, 1
%13 = call i8* @realloc(i8* %6, i64 %12)
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = load i8*, i8** %4
%16 = call i8* @strcat(i8* %14, i8* %15)
store i8* %16, i8** %5
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @strrecat(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i8* @realloc(i8* %0, i64 %6)
%8 = tail call i8* @strcat(i8* dereferenceable(1) %7, i8* dereferenceable(1) %1)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ serial_putc(char);
int /*<<< orphan*/ serial_puts(char *);
int /*<<< orphan*/ shex4(char *, int);
void show16(char *s, int val) {
  char buf[5];
  serial_puts(s);
  shex4(buf, val);
  buf[4] = '\0';
  serial_puts(buf);
  serial_putc('\n');
}


x86 assembly (clang, -O0):
<show16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <serial_puts@plt>
lea    -0x11(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <shex4@plt>
movb   $0x0,-0xd(%rbp)
lea    -0x11(%rbp),%rdi
call   1050 <serial_puts@plt>
mov    $0xa,%edi
call   1040 <serial_putc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show16>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
call   1050 <serial_puts@plt>
lea    0x3(%rsp),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <shex4@plt>
movb   $0x0,0x7(%rsp)
mov    %r14,%rdi
call   1050 <serial_puts@plt>
mov    $0xa,%edi
call   1040 <serial_putc@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @show16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [5 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @serial_puts(i8* %6)
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%9 = load i32, i32* %4
%10 = call i32 @shex4(i8* %8, i32 %9)
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 4
store i8 0, i8* %11
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%13 = call i32 @serial_puts(i8* %12)
%14 = call i32 @serial_putc(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @show16(i8* %0, i32 %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @serial_puts(i8* %0)
%6 = call i32 @shex4(i8* %4, i32 %1)
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 4
store i8 0, i8* %7
%8 = call i32 @serial_puts(i8* %4)
%9 = call i32 @serial_putc(i8 signext 10)
ret void
}
int close(int fd) {
  ;
  typeof(close) *orig_close = osym("close");
  int rc = (*orig_close)(fd);
  if (fd >= 0) {
    trace_close(fd);
  }
  return rc;
}


x86 assembly (clang, -O0):
<close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <osym@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
call   *%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     115f <close+0x3f>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <trace_close@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <osym@plt>
cltq
mov    %ebx,%edi
call   *%rax
mov    %eax,%ebp
test   %ebx,%ebx
js     1148 <close+0x28>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <trace_close@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define i32 @close(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @osym to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32 (i32)*
%5 = tail call i32 %4(i32 %0)
%6 = icmp sgt i32 %0, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @trace_close to i32 (i32, ...)*)(i32 %0)
br label %9
9: ; preds = %7, %1
ret i32 %5
}
void aux_add_elements(d, aux) void *const d;
void *const aux;
{
  assert(d);
  assert(aux);
  int *value = (int *)d;
  int *sum = (int *)aux;
  *sum += *value;
}


x86 assembly (clang, -O0):
<aux_add_elements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aux_add_elements>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <assert@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <assert@plt>
mov    (%rbx),%eax
add    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @aux_add_elements(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %9)
%11 = load i8*, i8** %3
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %5
%13 = load i8*, i8** %4
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %6
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = load i32*, i32** %6
%18 = load i32, i32* %17
%19 = add nsw i32 %18, %16
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @aux_add_elements(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %1)
%5 = bitcast i8* %0 to i32*
%6 = bitcast i8* %1 to i32*
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = add nsw i32 %8, %7
store i32 %9, i32* %6
ret void
}
/* Variables and functions */
char *my_epur_str(char *str) {
  if (str == NULL)
    return (NULL);
  return (str);
}


x86 assembly (clang, -O0):
<my_epur_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <my_epur_str+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1128 <my_epur_str+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @my_epur_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* null, i8** %2
br label %9
7: ; preds = %1
%8 = load i8*, i8** %3
store i8* %8, i8** %2
br label %9
9: ; preds = %7, %6
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
define i8* @my_epur_str(i8* readnone %0) {
ret i8* %0
}
void foo582() {}


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

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

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

LLVM IR (-O2):
define void @foo582() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void crash(void) { bar(); }


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

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

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

LLVM IR (-O2):
define void @crash() {
%1 = tail call i32 (...) @bar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int inet_pton(int /*<<< orphan*/, char const *, char *);
int is_ipv6_address(const char *str) {
  char dst[16];
  int result = inet_pton(AF_INET6, str, dst);
  return result;
}


x86 assembly (clang, -O0):
<is_ipv6_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <inet_pton@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ipv6_address>:
sub    $0x18,%rsp
mov    %rdi,%rsi
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
call   1030 <inet_pton@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@AF_INET6 = global i32 0
define i32 @is_ipv6_address(i8* %0) {
%2 = alloca i8*
%3 = alloca [16 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i32, i32* @AF_INET6
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 @inet_pton(i32 %5, i8* %6, i8* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@AF_INET6 = global i32 0
define i32 @is_ipv6_address(i8* %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @AF_INET6
%5 = call i32 @inet_pton(i32 %4, i8* %0, i8* %3)
ret i32 %5
}
void glProgramBinary(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XtAppGetErrorDatabase() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ctest_assert_false(int, char *);
int test_ctest_assert_false() {
  int value = 0;
  ctest_assert_false(value, "FALSE value PASS the test of assert_false..");
  return 0;
}


x86 assembly (clang, -O0):
<test_ctest_assert_false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xed7(%rip),%rsi
call   1030 <ctest_assert_false@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [44 x i8] c"FALSE value PASS the test of assert_false..\00"
define i32 @test_ctest_assert_false() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @ctest_assert_false(i32 %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"FALSE value PASS the test of assert_false..\00"
define i32 @test_ctest_assert_false() {
%1 = tail call i32 @ctest_assert_false(i32 0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_FFuint32_reg(unsigned int val) {
  return ((val) & (0xFF << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_FFuint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%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_FFuint32_reg(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int Mini_AigLitIsConst1(int Lit) { return Lit == 1; }


x86 assembly (clang, -O0):
<Mini_AigLitIsConst1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mini_AigLitIsConst1>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @Mini_AigLitIsConst1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @Mini_AigLitIsConst1(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fail(int);
int /*<<< orphan*/ fld_release();
void svr_abort(int err_code) {
  fld_release();
  fail(err_code);
}


x86 assembly (clang, -O0):
<svr_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fld_release@plt>
mov    -0x4(%rbp),%edi
call   1030 <fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svr_abort>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <fld_release@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <fail@plt>

LLVM IR (-O0):
define void @svr_abort(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @fld_release()
%4 = load i32, i32* %2
%5 = call i32 @fail(i32 %4)
ret void
}

LLVM IR (-O2):
define void @svr_abort(i32 %0) {
%2 = tail call i32 (...) @fld_release()
%3 = tail call i32 @fail(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ x;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
size_t znload_int(void *, size_t, int /*<<< orphan*/ *, int);
size_t znload_i64(void *__restrict dst, size_t sz, int64_t x) {
  return znload_int(dst, sz, &x, sizeof(x));
}


x86 assembly (clang, -O0):
<znload_i64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x4,%ecx
call   1030 <znload_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<znload_i64>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x4,%ecx
call   1030 <znload_int@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @znload_i64(i8* noalias %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = call i64 @znload_int(i8* %7, i64 %8, i32* %6, i32 4)
ret i64 %9
}

LLVM IR (-O2):
define i64 @znload_i64(i8* noalias %0, i64 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i64 @znload_int(i8* %0, i64 %1, i32* %4, i32 4)
ret i64 %5
}
int f1(int x) {
  int y = 0;
  while (x < 10) {
    x = x + 1;
    y = y + 1;
  }
  return y;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    112f <f1+0x2f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <f1+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
lea    -0xa(%rdi),%ecx
neg    %ecx
xor    %eax,%eax
cmp    $0xa,%edi
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = sub i32 10, %0
%4 = select i1 %2, i32 %3, i32 0
ret i32 %4
}
/* Variables and functions */
char *malloc(int);
int strlen(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *mem_alloc_strn(const char *orig, int nchars) {
  int len = strlen(orig);
  if (len < nchars) {
    nchars = len;
  }
  char *ptr = malloc(nchars + 1);
  strncpy(ptr, orig, nchars);
  ptr[nchars] = 0;
  return ptr;
}


x86 assembly (clang, -O0):
<mem_alloc_strn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <mem_alloc_strn+0x2d>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_alloc_strn>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
call   1040 <strlen@plt>
cmp    %ebx,%eax
cmovl  %eax,%ebx
lea    0x1(%rbx),%edi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movslq %ebx,%rax
movb   $0x0,(%r15,%rax,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @mem_alloc_strn(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, %1
%5 = select i1 %4, i32 %3, i32 %1
%6 = add nsw i32 %5, 1
%7 = tail call i8* @malloc(i32 %6)
%8 = tail call i32 @strncpy(i8* %7, i8* %0, i32 %5)
%9 = sext i32 %5 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
store i8 0, i8* %10
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void end(void) { printf("2"); }


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

x86 assembly (clang, -O2):
<end>:
mov    $0x32,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"2\00"
define void @end() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @end() {
%1 = tail call i32 @putchar(i32 50)
ret void
}
void conio_putchar(void) {}


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

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

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

LLVM IR (-O2):
define void @conio_putchar() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _set_statusline(char *, int /*<<< orphan*/);
void set_statusline(char *text) { _set_statusline(text, 0); }


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

x86 assembly (clang, -O2):
<set_statusline>:
xor    %esi,%esi
jmp    1030 <_set_statusline@plt>

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

LLVM IR (-O2):
define void @set_statusline(i8* %0) {
%2 = tail call i32 @_set_statusline(i8* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checkSizeTypes();
int /*<<< orphan*/ initAaVal();
int /*<<< orphan*/ initNtChars();
int /*<<< orphan*/ initNtCompTable();
int /*<<< orphan*/ initNtMixedCaseChars();
int /*<<< orphan*/ initNtVal();
void dnaUtilOpen() {
  static int opened = 0;
  if (!opened) {
    checkSizeTypes();
    initNtVal();
    initAaVal();
    initNtChars();
    initNtMixedCaseChars();
    initNtCompTable();
    opened = 1;
  }
}


x86 assembly (clang, -O0):
<dnaUtilOpen>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2ee9(%rip)
jne    11a5 <dnaUtilOpen+0x45>
mov    $0x0,%al
call   1070 <checkSizeTypes@plt>
mov    $0x0,%al
call   1050 <initNtVal@plt>
mov    $0x0,%al
call   1040 <initAaVal@plt>
mov    $0x0,%al
call   1030 <initNtChars@plt>
mov    $0x0,%al
call   1060 <initNtMixedCaseChars@plt>
mov    $0x0,%al
call   1080 <initNtCompTable@plt>
movl   $0x1,0x2eaf(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dnaUtilOpen>:
push   %rax
cmpb   $0x0,0x2eec(%rip)
jne    119b <dnaUtilOpen+0x3b>
xor    %eax,%eax
call   1070 <checkSizeTypes@plt>
xor    %eax,%eax
call   1050 <initNtVal@plt>
xor    %eax,%eax
call   1040 <initAaVal@plt>
xor    %eax,%eax
call   1030 <initNtChars@plt>
xor    %eax,%eax
call   1060 <initNtMixedCaseChars@plt>
xor    %eax,%eax
call   1080 <initNtCompTable@plt>
movb   $0x1,0x2eb9(%rip)
pop    %rax
ret

LLVM IR (-O0):
@dnaUtilOpen.opened = internal global i32 0
define void @dnaUtilOpen() {
%1 = load i32, i32* @dnaUtilOpen.opened
%2 = icmp ne i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = call i32 (...) @checkSizeTypes()
%5 = call i32 (...) @initNtVal()
%6 = call i32 (...) @initAaVal()
%7 = call i32 (...) @initNtChars()
%8 = call i32 (...) @initNtMixedCaseChars()
%9 = call i32 (...) @initNtCompTable()
store i32 1, i32* @dnaUtilOpen.opened
br label %10
10: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@dnaUtilOpen.opened = internal unnamed_addr global i1 false
define void @dnaUtilOpen() {
%1 = load i1, i1* @dnaUtilOpen.opened
br i1 %1, label %9, label %2
2: ; preds = %0
%3 = tail call i32 (...) @checkSizeTypes()
%4 = tail call i32 (...) @initNtVal()
%5 = tail call i32 (...) @initAaVal()
%6 = tail call i32 (...) @initNtChars()
%7 = tail call i32 (...) @initNtMixedCaseChars()
%8 = tail call i32 (...) @initNtCompTable()
store i1 true, i1* @dnaUtilOpen.opened
br label %9
9: ; preds = %2, %0
ret void
}
int glutGetModifiers() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @glutGetModifiers() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dcc_cleanup_tempfiles_inner(int /*<<< orphan*/);
void dcc_cleanup_tempfiles(void) { dcc_cleanup_tempfiles_inner(0); }


x86 assembly (clang, -O0):
<dcc_cleanup_tempfiles>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <dcc_cleanup_tempfiles_inner@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcc_cleanup_tempfiles>:
xor    %edi,%edi
jmp    1030 <dcc_cleanup_tempfiles_inner@plt>

LLVM IR (-O0):
define void @dcc_cleanup_tempfiles() {
%1 = call i32 @dcc_cleanup_tempfiles_inner(i32 0)
ret void
}

LLVM IR (-O2):
define void @dcc_cleanup_tempfiles() {
%1 = tail call i32 @dcc_cleanup_tempfiles_inner(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sqlite3_free(void *);
void fts2HashFree(void *p) { sqlite3_free(p); }


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

x86 assembly (clang, -O2):
<fts2HashFree>:
jmp    1030 <sqlite3_free@plt>

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

LLVM IR (-O2):
define void @fts2HashFree(i8* %0) {
%2 = tail call i32 @sqlite3_free(i8* %0)
ret void
}
char *realloc(cp, nbytes)
char *cp;
int nbytes;
{ return bZr(cp, nbytes); }


x86 assembly (clang, -O0):
<realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <bZr@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc>:
push   %rax
xor    %eax,%eax
call   1030 <bZr@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @realloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @bZr to i32 (i8*, i32, ...)*)(i8* %5, i32 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @realloc(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @bZr to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int LOG_LOCAL3;
int os_facstr2int(char const *);
void *os_log_open(const char *facility) {
  int ifacility = os_facstr2int(facility);
  if (ifacility <= 0)
    ifacility = LOG_LOCAL3;
  return ((void *)(intptr_t)ifacility);
}


x86 assembly (clang, -O0):
<os_log_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <os_facstr2int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     113e <os_log_open+0x2e>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_log_open>:
push   %rax
call   1030 <os_facstr2int@plt>
test   %eax,%eax
jg     1123 <os_log_open+0x13>
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
@LOG_LOCAL3 = global i32 0
define i8* @os_log_open(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @os_facstr2int(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* @LOG_LOCAL3
store i32 %9, i32* %3
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
ret i8* %13
}

LLVM IR (-O2):
@LOG_LOCAL3 = global i32 0
define i8* @os_log_open(i8* %0) {
%2 = tail call i32 @os_facstr2int(i8* %0)
%3 = icmp slt i32 %2, 1
%4 = load i32, i32* @LOG_LOCAL3
%5 = select i1 %3, i32 %4, i32 %2
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
int cRoot(int n) {
  int i = 1;
  while (i * i * i < n) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<cRoot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1130 <cRoot+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <cRoot+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cRoot>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%eax
mov    %eax,%ecx
imul   %eax,%ecx
imul   %eax,%ecx
cmp    %edi,%ecx
jl     1110 <cRoot+0x10>
ret

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

LLVM IR (-O2):
define i32 @cRoot(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %7, %2 ]
%4 = mul nsw i32 %3, %3
%5 = mul nsw i32 %4, %3
%6 = icmp slt i32 %5, %0
%7 = add nuw nsw i32 %3, 1
br i1 %6, label %2, label %8
8: ; preds = %2
ret i32 %3
}
void _Jv_ThrowNullPointerException() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_ThrowNullPointerException() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ link_failure();
void tabort(void) {
  abort();
  link_failure();
}


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

x86 assembly (clang, -O2):
<tabort>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @tabort() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @tabort() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int int8_t;
typedef int int16_t;

/* Variables and functions */
void st_i16_be(void *x, int16_t i) {
  ((((int8_t *)x)[0]) = ((i) >> 8) % 256, (((uint8_t *)x)[1]) = ((i) % 256));
}


x86 assembly (clang, -O0):
<st_i16_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    %edx,(%rax)
mov    -0xc(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    %edx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_i16_be>:
mov    %esi,%eax
sar    $0x8,%eax
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
sub    %ecx,%eax
lea    0xff(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
mov    %eax,(%rdi)
and    $0xffffff00,%ecx
sub    %ecx,%esi
mov    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @st_i16_be(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = srem i32 %6, 256
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 %7, i32* %10
%11 = load i32, i32* %4
%12 = srem i32 %11, 256
%13 = load i8*, i8** %3
%14 = bitcast i8* %13 to i32*
%15 = getelementptr inbounds i32, i32* %14, i64 1
store i32 %12, i32* %15
ret void
}

LLVM IR (-O2):
define void @st_i16_be(i8* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
%4 = srem i32 %3, 256
%5 = bitcast i8* %0 to i32*
store i32 %4, i32* %5
%6 = srem i32 %1, 256
%7 = getelementptr inbounds i8, i8* %0, i64 4
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int rand();
int random(int n) { return rand() % n; }


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @random(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
void *generate_raw(unsigned char *len_str, int *len_p) {
  unsigned char len = len_str[0] + 1;
  unsigned char *str = malloc(sizeof(unsigned char[len]));
  memcpy(str, len_str + 1, len);
  *len_p = len;
  return str;
}


x86 assembly (clang, -O0):
<generate_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x1,%eax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
movzbl -0x11(%rbp),%eax
mov    %eax,%edx
call   1030 <memcpy@plt>
movzbl -0x11(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_raw>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%al
add    $0x1,%al
movzbl %al,%r15d
mov    %r15,%rdi
call   1040 <malloc@plt>
mov    %rax,%r12
add    $0x1,%rbx
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %r15d,(%r14)
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @generate_raw(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = add i8 %3, 1
%5 = zext i8 %4 to i64
%6 = tail call i8* @malloc(i64 %5)
%7 = getelementptr inbounds i8, i8* %0, i64 1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %6, i8* align 1 %7, i64 %5, i1 false)
%8 = zext i8 %4 to i32
store i32 %8, i32* %1
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_token(char *tok) {
  if (tok)
    free(tok);
}


x86 assembly (clang, -O0):
<free_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <free_token+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @free_token(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @free_token(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int16_t littleEndian16(unsigned char b0, unsigned char b1) {
  return (int16_t)b0 | ((int16_t)b1 << 8);
}


x86 assembly (clang, -O0):
<littleEndian16>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<littleEndian16>:
shl    $0x8,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @littleEndian16(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @littleEndian16(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = or i32 %5, %3
ret i32 %6
}