xunge/DecIR huggingface dataset:
void argv_free(char **argv) {
  char **tmp = argv;
  for (; argv && *argv; argv++)
    free(*argv);
  free(tmp);
}


x86 assembly (clang, -O0):
<argv_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1142 <argv_free+0x32>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1152 <argv_free+0x42>
jmp    116f <argv_free+0x5f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <argv_free+0x14>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argv_free>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rdi,%rdi
je     1141 <argv_free+0x31>
mov    (%r14),%rdi
test   %rdi,%rdi
je     1141 <argv_free+0x31>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <argv_free+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @argv_free(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %12, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %10, %6 ], [ %4, %3 ]
%8 = phi i8** [ %9, %6 ], [ %0, %3 ]
tail call void @free(i8* %7)
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %6
12: ; preds = %6, %3, %1
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
void wake_up_servers(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_toolbar_get_nth_item() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I_Error(char *, char const *);
int R_CheckTextureNumForName(char const *);
int R_TextureNumForName(const char *name) {
  int i = R_CheckTextureNumForName(name);
  if (i == -1)
    I_Error("R_TextureNumForName: %.8s not found", name);
  return i;
}


x86 assembly (clang, -O0):
<R_TextureNumForName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <R_CheckTextureNumForName@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1152 <R_TextureNumForName+0x32>
mov    -0x8(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <I_Error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_TextureNumForName>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <R_CheckTextureNumForName@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    1141 <R_TextureNumForName+0x21>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <I_Error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"R_TextureNumForName: %.8s not found\00"
define i32 @R_TextureNumForName(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @R_CheckTextureNumForName(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @I_Error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [36 x i8] c"R_TextureNumForName: %.8s not found\00"
define i32 @R_TextureNumForName(i8* %0) {
%2 = tail call i32 @R_CheckTextureNumForName(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @I_Error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
unsigned long aes_rotword(unsigned long w) {
  return ((w & 0x000000ff) << 24) | ((w & 0x0000ff00) >> 8) |
         ((w & 0x00ff0000) >> 8) | ((w & 0xff000000) >> 8);
}


x86 assembly (clang, -O0):
<aes_rotword>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff0000,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
movabs $0xff000000,%rcx
and    -0x8(%rbp),%rcx
shr    $0x8,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_rotword>:
mov    %edi,%eax
shl    $0x18,%eax
shr    $0x8,%rdi
movzbl %dil,%ecx
or     %rax,%rcx
mov    %edi,%eax
and    $0xff00,%eax
or     %rcx,%rax
and    $0xff0000,%edi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @aes_rotword(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 255
%5 = shl i64 %4, 24
%6 = load i64, i64* %2
%7 = and i64 %6, 65280
%8 = lshr i64 %7, 8
%9 = or i64 %5, %8
%10 = load i64, i64* %2
%11 = and i64 %10, 16711680
%12 = lshr i64 %11, 8
%13 = or i64 %9, %12
%14 = load i64, i64* %2
%15 = and i64 %14, 4278190080
%16 = lshr i64 %15, 8
%17 = or i64 %13, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @aes_rotword(i64 %0) {
%2 = shl i64 %0, 24
%3 = and i64 %2, 4278190080
%4 = lshr i64 %0, 8
%5 = and i64 %4, 255
%6 = or i64 %3, %5
%7 = and i64 %4, 65280
%8 = or i64 %6, %7
%9 = and i64 %4, 16711680
%10 = or i64 %8, %9
ret i64 %10
}
/* Type definitions */
struct stat {
  scalar_t__ st_ino;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int md_get_file_id(char *fname) {
  struct stat sbuf;
  if (stat(fname, &sbuf)) {
    return (-1);
  }
  return ((int)sbuf.st_ino);
}


x86 assembly (clang, -O0):
<md_get_file_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <md_get_file_id+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1146 <md_get_file_id+0x36>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_get_file_id>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %rax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i64 }
define i32 @md_get_file_id(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = select i1 %5, i32 %8, i32 -1
ret i32 %9
}
int get_sequence_header_length(int length) {
  if (length > 0xFFFF) {
    return 2048;
  } else if (length > 0xFF) {
    return 4;
  } else if (length > 0x7F) {
    return 3;
  } else {
    return 2;
  }
}


x86 assembly (clang, -O0):
<get_sequence_header_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffff,-0x8(%rbp)
jle    1120 <get_sequence_header_length+0x20>
movl   $0x800,-0x4(%rbp)
jmp    1156 <get_sequence_header_length+0x56>
cmpl   $0xff,-0x8(%rbp)
jle    1139 <get_sequence_header_length+0x39>
movl   $0x4,-0x4(%rbp)
jmp    1156 <get_sequence_header_length+0x56>
cmpl   $0x7f,-0x8(%rbp)
jle    114f <get_sequence_header_length+0x4f>
movl   $0x3,-0x4(%rbp)
jmp    1156 <get_sequence_header_length+0x56>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sequence_header_length>:
mov    $0x800,%eax
cmp    $0xffff,%edi
jg     1125 <get_sequence_header_length+0x25>
mov    $0x4,%eax
cmp    $0xff,%edi
jg     1125 <get_sequence_header_length+0x25>
xor    %eax,%eax
cmp    $0x7f,%edi
setg   %al
or     $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @get_sequence_header_length(i32 %0) {
%2 = icmp sgt i32 %0, 65535
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 255
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = icmp sgt i32 %0, 127
%7 = select i1 %6, i32 3, i32 2
br label %8
8: ; preds = %5, %3, %1
%9 = phi i32 [ 2048, %1 ], [ 4, %3 ], [ %7, %5 ]
ret i32 %9
}
/* Variables and functions */
double log(double);
double hmmtop_log(double q) {
  double p;
  if (q > 1e-20)
    p = log(q);
  else
    p = -1000;
  return (p);
}


x86 assembly (clang, -O0):
<hmmtop_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1148 <hmmtop_log+0x38>
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1155 <hmmtop_log+0x45>
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmmtop_log>:
ucomisd 0xee8(%rip),%xmm0
jbe    111f <hmmtop_log+0xf>
jmp    1030 <log@plt>
movsd  0xee1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @hmmtop_log(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp ogt double %4, 0x3BC79CA10C924223
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %2
%8 = call double @log(double %7)
store double %8, double* %3
br label %10
9: ; preds = %1
store double -1.000000e+03, double* %3
br label %10
10: ; preds = %9, %6
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
define double @hmmtop_log(double %0) {
%2 = fcmp ogt double %0, 0x3BC79CA10C924223
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call double @log(double %0)
br label %5
5: ; preds = %1, %3
%6 = phi double [ %4, %3 ], [ -1.000000e+03, %1 ]
ret double %6
}
int cdrom_reinit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cdrom_reinit() {
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_standard_Laurent_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(780, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<copy_standard_Laurent_container_to_target_system>:
mov    $0x30c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @copy_standard_Laurent_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 780, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ping(char *);
int main() { ping("172.16.201.245"); }


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"172.16.201.245\00"
define i32 @main() {
%1 = tail call i32 @ping(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned int add(unsigned int llvm_cbe_a, unsigned int llvm_cbe_b) {
  unsigned int llvm_cbe_tmp__2;
  unsigned int llvm_cbe_tmp__3;
  unsigned int llvm_cbe_tmp__4;
  unsigned int llvm_cbe_tmp__5;
  *(&llvm_cbe_tmp__2) = llvm_cbe_a;
  *(&llvm_cbe_tmp__3) = llvm_cbe_b;
  llvm_cbe_tmp__4 = *(&llvm_cbe_tmp__2);
  llvm_cbe_tmp__5 = *(&llvm_cbe_tmp__3);
  return (((unsigned int)(((unsigned int)llvm_cbe_tmp__4) +
                          ((unsigned int)llvm_cbe_tmp__5))));
}


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

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

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/
passphrase_explicit_memset________________(char *, int /*<<< orphan*/,
                                           int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
__attribute__((optimize("-O0"))) void passphrase_wipe1(char *ptr) {
  passphrase_explicit_memset________________(ptr, 0, strlen(ptr));
}


x86 assembly (clang, -O0):
<passphrase_wipe1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1040 <passphrase_explicit_memset________________@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<passphrase_wipe1>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <passphrase_explicit_memset________________@plt>

LLVM IR (-O0):
define void @passphrase_wipe1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @passphrase_explicit_memset________________(i8* %3, i32 0, i32 %5)
ret void
}

LLVM IR (-O2):
define void @passphrase_wipe1(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @passphrase_explicit_memset________________(i8* %0, i32 0, i32 %2)
ret void
}
void closefont(void) { return; }


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

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

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

LLVM IR (-O2):
define void @closefont() {
ret void
}
char *dcgettext(const char *domainname, const char *msgid, int category) {
  return (char *)msgid;
}


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

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

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

LLVM IR (-O2):
define i8* @dcgettext(i8* nocapture readnone %0, i8* readnone returned %1, i32 %2) {
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void prompt() { printf("\n==> "); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"\0A==> \00"
define void @prompt() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int hash_f(const char *restrict s) {
  int c;
  unsigned int hash = 5381;
  while ((c = (unsigned char)*s++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash_f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1141 <hash_f+0x41>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    110f <hash_f+0xf>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hash_f(i8* noalias nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
void foo713() {}


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

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

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

LLVM IR (-O2):
define void @foo713() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteSLUErrorMessage(char *);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ sprintf_s(char *, int, char *, char *);
void superlu_free(void *addr) {
  if (addr == 0 && 0) {
    char msg[256];
    sprintf_s(msg, 256, "WARNING: %s", "tried to free memory at ptr=0");
    WriteSLUErrorMessage(msg);
  };
  free(addr);
}


x86 assembly (clang, -O0):
<superlu_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1184 <superlu_free+0x54>
xor    %eax,%eax
test   $0x1,%al
jne    1159 <superlu_free+0x29>
jmp    1184 <superlu_free+0x54>
lea    -0x110(%rbp),%rdi
mov    $0x100,%esi
lea    0xe94(%rip),%rdx
lea    0xe99(%rip),%rcx
call   1040 <sprintf_s@plt>
lea    -0x110(%rbp),%rdi
call   1050 <WriteSLUErrorMessage@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<superlu_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"WARNING: %s\00"
@.str.1 = [30 x i8] c"tried to free memory at ptr=0\00"
define void @superlu_free(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %1
br i1 false, label %7, label %12
7: ; preds = %6
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%9 = call i32 @sprintf_s(i8* %8, i32 256, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%11 = call i32 @WriteSLUErrorMessage(i8* %10)
br label %12
12: ; preds = %7, %6, %1
%13 = load i8*, i8** %2
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
define void @superlu_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void handle_SAK(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_SAK(i32 %0) {
ret void
}
/* Type definitions */
struct ibv_pd {
  int dummy;
};

/* Variables and functions */
int _dealloc_pd(struct ibv_pd *);
int /*<<< orphan*/ dmtcp_plugin_disable_ckpt();
int /*<<< orphan*/ dmtcp_plugin_enable_ckpt();
int ibv_dealloc_pd(struct ibv_pd *pd) {
  dmtcp_plugin_disable_ckpt();
  int rslt = _dealloc_pd(pd);
  dmtcp_plugin_enable_ckpt();
  return rslt;
}


x86 assembly (clang, -O0):
<ibv_dealloc_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_dealloc_pd@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibv_dealloc_pd>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    %rbx,%rdi
call   1030 <_dealloc_pd@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ibv_pd = type { i32 }
define i32 @ibv_dealloc_pd(%struct.ibv_pd* %0) {
%2 = alloca %struct.ibv_pd*
%3 = alloca i32
store %struct.ibv_pd* %0, %struct.ibv_pd** %2
%4 = call i32 (...) @dmtcp_plugin_disable_ckpt()
%5 = load %struct.ibv_pd*, %struct.ibv_pd** %2
%6 = call i32 @_dealloc_pd(%struct.ibv_pd* %5)
store i32 %6, i32* %3
%7 = call i32 (...) @dmtcp_plugin_enable_ckpt()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.ibv_pd = type { i32 }
define i32 @ibv_dealloc_pd(%struct.ibv_pd* %0) {
%2 = tail call i32 (...) @dmtcp_plugin_disable_ckpt()
%3 = tail call i32 @_dealloc_pd(%struct.ibv_pd* %0)
%4 = tail call i32 (...) @dmtcp_plugin_enable_ckpt()
ret i32 %3
}
int hash31(char *s) {
  unsigned value = 0;
  for (; (*s) != '\0'; s++)
    value = (value << 5) - (value + (*s));
  return value % 500;
}


x86 assembly (clang, -O0):
<hash31>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1147 <hash31+0x47>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rdx
movsbl (%rdx),%edx
add    %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash31+0xf>
mov    -0xc(%rbp),%eax
mov    $0x1f4,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash31>:
mov    (%rdi),%cl
test   %cl,%cl
je     113f <hash31+0x3f>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
sub    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash31+0x10>
mov    %eax,%ecx
imul   $0x10624dd3,%rcx,%rcx
shr    $0x25,%rcx
imul   $0x1f4,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash31(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = sub i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 500
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
struct sk_buff *noop_dequeue(struct Qdisc *qdisc) {
  {
    return ((struct sk_buff *)((void *)0));
  }
}


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

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

LLVM IR (-O0):
%struct.sk_buff = type opaque
%struct.Qdisc = type opaque
define %struct.sk_buff* @noop_dequeue(%struct.Qdisc* %0) {
%2 = alloca %struct.Qdisc*
store %struct.Qdisc* %0, %struct.Qdisc** %2
ret %struct.sk_buff* null
}

LLVM IR (-O2):
%struct.sk_buff = type opaque
%struct.Qdisc = type opaque
define noalias %struct.sk_buff* @noop_dequeue(%struct.Qdisc* nocapture readnone %0) {
ret %struct.sk_buff* null
}
/* Variables and functions */
char const *strong_n2();
const char *__attribute__((section(".test.b"))) sibcall_strong_n2(void) {
  return strong_n2();
}


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

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

LLVM IR (-O0):
define i8* @sibcall_strong_n2() section ".test.b" {
%1 = call i8* (...) @strong_n2()
ret i8* %1
}

LLVM IR (-O2):
define i8* @sibcall_strong_n2() section ".test.b" {
%1 = tail call i8* (...) @strong_n2()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *parent_base_name(char const *);
int /*<<< orphan*/ strcmp(char *, char const *);
int parent_base_name_is(const char *path, const char *str) {
  char *parent_base;
  int result;
  parent_base = parent_base_name(path);
  if (!parent_base)
    return 0;
  result = !strcmp(parent_base, str);
  free(parent_base);
  return result;
}


x86 assembly (clang, -O0):
<parent_base_name_is>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <parent_base_name@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1164 <parent_base_name_is+0x34>
movl   $0x0,-0x4(%rbp)
jmp    1190 <parent_base_name_is+0x60>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent_base_name_is>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbp
call   1050 <parent_base_name@plt>
test   %rax,%rax
je     1160 <parent_base_name_is+0x30>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1040 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
sete   %bpl
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    1162 <parent_base_name_is+0x32>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @parent_base_name_is(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call i8* @parent_base_name(i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 0, i32* %3
br label %23
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = load i8*, i8** %5
%16 = call i32 @strcmp(i8* %14, i8* %15)
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
store i32 %19, i32* %7
%20 = load i8*, i8** %6
%21 = call i32 @free(i8* %20)
%22 = load i32, i32* %7
store i32 %22, i32* %3
br label %23
23: ; preds = %13, %12
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @parent_base_name_is(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @parent_base_name(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* %3, i8* dereferenceable(1) %1)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @free(i8* %3)
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %8, %5 ], [ 0, %2 ]
ret i32 %11
}
void kgsl_mmu_setstate(struct kgsl_device *device,
                       struct kgsl_pagetable *pagetable) {}


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

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

LLVM IR (-O0):
%struct.kgsl_device = type opaque
%struct.kgsl_pagetable = type opaque
define void @kgsl_mmu_setstate(%struct.kgsl_device* %0, %struct.kgsl_pagetable* %1) {
%3 = alloca %struct.kgsl_device*
%4 = alloca %struct.kgsl_pagetable*
store %struct.kgsl_device* %0, %struct.kgsl_device** %3
store %struct.kgsl_pagetable* %1, %struct.kgsl_pagetable** %4
ret void
}

LLVM IR (-O2):
%struct.kgsl_device = type opaque
%struct.kgsl_pagetable = type opaque
define void @kgsl_mmu_setstate(%struct.kgsl_device* nocapture %0, %struct.kgsl_pagetable* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int sigemptyset(sigset_t *set) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sigemptyset(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  unsigned long val = 1;
  if (val > (unsigned long)~0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jbe    1149 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
void setString(int *entry, int *identifier) { *(entry + 1) = (int)identifier; }


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

x86 assembly (clang, -O2):
<setString>:
mov    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @setString(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = ptrtoint i32* %5 to i32
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @setString(i32* nocapture writeonly %0, i32* %1) {
%3 = ptrtoint i32* %1 to i64
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %5
ret void
}
int div(int var1, int var2) { return (var1 / var2); }


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

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @div(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *qe_mallocz_bytes(size_t size) {
  void *p = malloc(size);
  if (p)
    memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<qe_mallocz_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <qe_mallocz_bytes+0x33>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qe_mallocz_bytes>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <qe_mallocz_bytes+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @qe_mallocz_bytes(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int createQueryURL(char const *, int, char const *, char *, int, char const **,
                   char const **, char **);
int createUrlForLS(const char *host, int nnPort, const char *path,
                   const char *user, char **url) {
  const char *userPara = "user.name";
  return createQueryURL(host, nnPort, path, "LISTSTATUS", 1, &userPara, &user,
                        url);
}


x86 assembly (clang, -O0):
<createUrlForLS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rax
lea    0xebe(%rip),%rcx
mov    $0x1,%r8d
lea    -0x30(%rbp),%r9
lea    -0x20(%rbp),%r10
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <createQueryURL@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createUrlForLS>:
sub    $0x18,%rsp
mov    %r8,%rax
mov    %rcx,0x10(%rsp)
lea    0xedd(%rip),%rcx
mov    %rcx,0x8(%rsp)
lea    0x10(%rsp),%r10
lea    0xed6(%rip),%rcx
lea    0x8(%rsp),%r9
mov    $0x1,%r8d
push   %rax
push   %r10
call   1030 <createQueryURL@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"user.name\00"
@.str.1 = [11 x i8] c"LISTSTATUS\00"
define i32 @createUrlForLS(i8* %0, i32 %1, i8* %2, i8* %3, i8** %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8**
%11 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8** %4, i8*** %10
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %11
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i8**, i8*** %10
%16 = call i32 @createQueryURL(i8* %12, i32 %13, i8* %14, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1, i8** %11, i8** %9, i8** %15)
ret i32 %16
}

LLVM IR (-O2):
@.str = [10 x i8] c"user.name\00"
@.str.1 = [11 x i8] c"LISTSTATUS\00"
define i32 @createUrlForLS(i8* %0, i32 %1, i8* %2, i8* %3, i8** %4) {
%6 = alloca i8*
%7 = alloca i8*
store i8* %3, i8** %6
%8 = bitcast i8** %7 to i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %7
%9 = call i32 @createQueryURL(i8* %0, i32 %1, i8* %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1, i8** %7, i8** %6, i8** %4)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void Assert(int assertion, char *error) {
  if (!assertion) {
    printf("Assertion Failed: %s\n", error);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<Assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1153 <Assert+0x33>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Assert>:
test   %edi,%edi
je     1125 <Assert+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Assertion Failed: %s\0A\00"
define void @Assert(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Assertion Failed: %s\0A\00"
define void @Assert(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %2
ret void
}
int test_imm_FFuint16_reg(unsigned short val) {
  return ((val) & (0xFF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FFuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%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_FFuint16_reg>:
test   %dil,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FFuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 255
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int sgx_omaplfb_set(unsigned int fbix, struct sgx_omaplfb_config *data) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sgx_omaplfb_config = type opaque
define i32 @sgx_omaplfb_set(i32 %0, %struct.sgx_omaplfb_config* %1) {
%3 = alloca i32
%4 = alloca %struct.sgx_omaplfb_config*
store i32 %0, i32* %3
store %struct.sgx_omaplfb_config* %1, %struct.sgx_omaplfb_config** %4
ret i32 0
}

LLVM IR (-O2):
%struct.sgx_omaplfb_config = type opaque
define i32 @sgx_omaplfb_set(i32 %0, %struct.sgx_omaplfb_config* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputc(int, char);
int print_chr(int fd, int c) {
  fputc(fd, (char)(c & 0xFF));
  return 1;
}


x86 assembly (clang, -O0):
<print_chr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%eax
and    $0xff,%eax
movsbl %al,%esi
call   1030 <fputc@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_chr>:
push   %rax
movsbl %sil,%esi
call   1030 <fputc@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @print_chr(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 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = call i32 @fputc(i32 %5, i8 signext %8)
ret i32 1
}

LLVM IR (-O2):
define i32 @print_chr(i32 %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = tail call i32 @fputc(i32 %0, i8 signext %3)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ add_client(int);
int /*<<< orphan*/ close(int);
scalar_t__ init_sf_source(int);
void new_client(int fd) {
  if (init_sf_source(fd) < 0)
    close(fd);
  else
    add_client(fd);
}


x86 assembly (clang, -O0):
<new_client>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <init_sf_source@plt>
cmp    $0x0,%rax
jge    115a <new_client+0x2a>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
jmp    1162 <new_client+0x32>
mov    -0x4(%rbp),%edi
call   1050 <add_client@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_client>:
push   %rbx
mov    %edi,%ebx
call   1030 <init_sf_source@plt>
mov    %ebx,%edi
test   %rax,%rax
js     1145 <new_client+0x15>
pop    %rbx
jmp    1050 <add_client@plt>
pop    %rbx
jmp    1040 <close@plt>

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

LLVM IR (-O2):
define void @new_client(i32 %0) {
%2 = tail call i64 @init_sf_source(i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @close(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @add_client(i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
int fun942() { return 942; }


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

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

LLVM IR (-O0):
define i32 @fun942() {
ret i32 942
}

LLVM IR (-O2):
define i32 @fun942() {
ret i32 942
}
int simple_rand() {
  static unsigned long seed = 404264294;
  return (((seed = seed * 214013L + 2531011L) >> 16) & 0x7fff);
}


x86 assembly (clang, -O0):
<simple_rand>:
push   %rbp
mov    %rsp,%rbp
imul   $0x343fd,0x2f11(%rip),%rax
add    $0x269ec3,%rax
mov    %rax,0x2f04(%rip)
shr    $0x10,%rax
and    $0x7fff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_rand>:
imul   $0x343fd,0x2f15(%rip),%rax
add    $0x269ec3,%rax
mov    %rax,0x2f08(%rip)
shr    $0x10,%eax
and    $0x7fff,%eax
ret

LLVM IR (-O0):
@simple_rand.seed = internal global i64 404264294
define i32 @simple_rand() {
%1 = load i64, i64* @simple_rand.seed
%2 = mul i64 %1, 214013
%3 = add i64 %2, 2531011
store i64 %3, i64* @simple_rand.seed
%4 = lshr i64 %3, 16
%5 = and i64 %4, 32767
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@simple_rand.seed = internal unnamed_addr global i64 404264294
define i32 @simple_rand() {
%1 = load i64, i64* @simple_rand.seed
%2 = mul i64 %1, 214013
%3 = add i64 %2, 2531011
store i64 %3, i64* @simple_rand.seed
%4 = trunc i64 %3 to i32
%5 = lshr i32 %4, 16
%6 = and i32 %5, 32767
ret i32 %6
}
/* Variables and functions */
int min(unsigned int const, unsigned int const);
unsigned min3(unsigned const a, unsigned const b, unsigned const c) {
  return min(min(a, b), c);
}


x86 assembly (clang, -O0):
<min3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <min@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min3>:
push   %rbx
mov    %edx,%ebx
call   1030 <min@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <min@plt>

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

LLVM IR (-O2):
define i32 @min3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @min(i32 %0, i32 %1)
%5 = tail call i32 @min(i32 %4, i32 %2)
ret i32 %5
}