xunge/DecIR huggingface dataset:
void gtk_paned_get_child1() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paned_get_child1() {
ret void
}
/* Variables and functions */
int DLLPROC(int, char **);
int main(int ac, char **av) { return (DLLPROC(ac, av)); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @DLLPROC(i32 %0, i8** %1)
ret i32 %3
}
int is_valid(int x, int y, int dim) {
  return x >= 0 && x < dim && y >= 0 && y < dim;
}


x86 assembly (clang, -O0):
<is_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jl     1148 <is_valid+0x48>
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
jge    1148 <is_valid+0x48>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     1148 <is_valid+0x48>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid>:
xor    %eax,%eax
test   %edi,%edi
js     1115 <is_valid+0x15>
test   %esi,%esi
js     1115 <is_valid+0x15>
cmp    %edx,%edi
jge    1115 <is_valid+0x15>
xor    %eax,%eax
cmp    %edx,%esi
setl   %al
ret

LLVM IR (-O0):
define i32 @is_valid(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 = icmp sge i32 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %3
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %20
13: ; preds = %9
%14 = load i32, i32* %5
%15 = icmp sge i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
br label %20
20: ; preds = %16, %13, %9, %3
%21 = phi i1 [ false, %13 ], [ false, %9 ], [ false, %3 ], [ %19, %16 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_valid(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, -1
br i1 %4, label %5, label %12
5: ; preds = %3
%6 = icmp slt i32 %0, %2
%7 = icmp sgt i32 %1, -1
%8 = and i1 %7, %6
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = icmp slt i32 %1, %2
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %9, %5, %3
%13 = phi i32 [ 0, %5 ], [ 0, %3 ], [ %11, %9 ]
ret i32 %13
}
/* Type definitions */
struct qnode {
  int dummy;
};

/* Variables and functions */
struct qnode *enqueue(struct qnode *, int);
struct qnode *push(struct qnode *head, int x) {
  head = enqueue(head, x);
  return head;
}


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

x86 assembly (clang, -O2):
<push>:
jmp    1030 <enqueue@plt>

LLVM IR (-O0):
%struct.qnode = type { i32 }
define %struct.qnode* @push(%struct.qnode* %0, i32 %1) {
%3 = alloca %struct.qnode*
%4 = alloca i32
store %struct.qnode* %0, %struct.qnode** %3
store i32 %1, i32* %4
%5 = load %struct.qnode*, %struct.qnode** %3
%6 = load i32, i32* %4
%7 = call %struct.qnode* @enqueue(%struct.qnode* %5, i32 %6)
store %struct.qnode* %7, %struct.qnode** %3
%8 = load %struct.qnode*, %struct.qnode** %3
ret %struct.qnode* %8
}

LLVM IR (-O2):
%struct.qnode = type { i32 }
define %struct.qnode* @push(%struct.qnode* %0, i32 %1) {
%3 = tail call %struct.qnode* @enqueue(%struct.qnode* %0, i32 %1)
ret %struct.qnode* %3
}
void olpc_capture_open(struct snd_ac97 *ac97) {}


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

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

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

LLVM IR (-O2):
%struct.snd_ac97 = type opaque
define void @olpc_capture_open(%struct.snd_ac97* nocapture %0) {
ret void
}
/* Variables and functions */
double sqrt(double);
double radius_effective(int mode, double rg) {
  switch (mode) {
  default:
  case 1:
    return rg;
  case 2:
    return 2.0 * rg;
  case 3:
    return 3.0 * rg;
  case 4:
    return sqrt(5.0 / 3.0) * rg;
  }
}


x86 assembly (clang, -O0):
<radius_effective>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x3,%eax
ja     1149 <radius_effective+0x39>
mov    -0x20(%rbp),%rax
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    114e <radius_effective+0x3e>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a2 <radius_effective+0x92>
movsd  0xeab(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a2 <radius_effective+0x92>
movsd  0xe8c(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a2 <radius_effective+0x92>
movsd  0xe6d(%rip),%xmm0
call   1030 <sqrt@plt>
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radius_effective>:
cmp    $0x4,%edi
je     1114 <radius_effective+0x14>
cmp    $0x3,%edi
je     111d <radius_effective+0x1d>
cmp    $0x2,%edi
jne    111c <radius_effective+0x1c>
addsd  %xmm0,%xmm0
ret
mulsd  0xeec(%rip),%xmm0
ret
mulsd  0xedb(%rip),%xmm0
ret

LLVM IR (-O0):
define double @radius_effective(i32 %0, double %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %4
store double %1, double* %5
%6 = load i32, i32* %4
switch i32 %6, label %7 [
i32 1, label %8
i32 2, label %10
i32 3, label %13
i32 4, label %16
]
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = load double, double* %5
store double %9, double* %3
br label %20
10: ; preds = %2
%11 = load double, double* %5
%12 = fmul double 2.000000e+00, %11
store double %12, double* %3
br label %20
13: ; preds = %2
%14 = load double, double* %5
%15 = fmul double 3.000000e+00, %14
store double %15, double* %3
br label %20
16: ; preds = %2
%17 = call double @sqrt(double 0x3FFAAAAAAAAAAAAB)
%18 = load double, double* %5
%19 = fmul double %17, %18
store double %19, double* %3
br label %20
20: ; preds = %16, %13, %10, %8
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @radius_effective(i32 %0, double %1) {
switch i32 %0, label %9 [
i32 4, label %7
i32 2, label %3
i32 3, label %5
]
3: ; preds = %2
%4 = fmul double %1, 2.000000e+00
br label %9
5: ; preds = %2
%6 = fmul double %1, 3.000000e+00
br label %9
7: ; preds = %2
%8 = fmul double %1, 0x3FF4A7E9CB8A3491
br label %9
9: ; preds = %2, %7, %5, %3
%10 = phi double [ %6, %5 ], [ %4, %3 ], [ %8, %7 ], [ %1, %2 ]
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_TIME;

/* Variables and functions */
int /*<<< orphan*/ *X509_time_adj(int /*<<< orphan*/ *, long,
                                  int /*<<< orphan*/ *);
ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj) {
  return X509_time_adj(s, adj, NULL);
}


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

x86 assembly (clang, -O2):
<X509_gmtime_adj>:
xor    %edx,%edx
jmp    1030 <X509_time_adj@plt>

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

LLVM IR (-O2):
define i32* @X509_gmtime_adj(i32* %0, i64 %1) {
%3 = tail call i32* @X509_time_adj(i32* %0, i64 %1, i32* null)
ret i32* %3
}
/* Variables and functions */
int getOutputOfCmd(char *, char **, char *, int);
int /*<<< orphan*/ trimwhitespace(char *);
int getDate(char *buff) {
  char *cmd = "date +%H:%M:%S";
  char *cmdv[2];
  int buffLen = 10;
  int nbytes = getOutputOfCmd(cmd, cmdv, buff, buffLen);
  trimwhitespace(buff);
  return nbytes;
}


x86 assembly (clang, -O0):
<getDate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0xa,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1040 <getOutputOfCmd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <trimwhitespace@plt>
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDate>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
lea    0xed0(%rip),%rdi
mov    %rsp,%rsi
mov    %rbx,%rdx
mov    $0xa,%ecx
call   1040 <getOutputOfCmd@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <trimwhitespace@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"date +%H:%M:%S\00"
define i32 @getDate(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [2 x i8*]
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %3
store i32 10, i32* %5
%7 = load i8*, i8** %3
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = load i32, i32* %5
%11 = call i32 @getOutputOfCmd(i8* %7, i8** %8, i8* %9, i32 %10)
store i32 %11, i32* %6
%12 = load i8*, i8** %2
%13 = call i32 @trimwhitespace(i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
@.str = [15 x i8] c"date +%H:%M:%S\00"
define i32 @getDate(i8* %0) {
%2 = alloca [2 x i8*]
%3 = bitcast [2 x i8*]* %2 to i8*
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%5 = call i32 @getOutputOfCmd(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %4, i8* %0, i32 10)
%6 = call i32 @trimwhitespace(i8* %0)
ret i32 %5
}
void WcAllowDuplicateRegistration(ignored) int ignored;
{ return; }


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

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

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

LLVM IR (-O2):
define void @WcAllowDuplicateRegistration(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(char *);
char *hcharplus(char *x) {
  *x += 24;
  if (!*x)
    foo(x);
  return x;
}


x86 assembly (clang, -O0):
<hcharplus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x18,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    113e <hcharplus+0x2e>
mov    -0x8(%rbp),%rdi
call   1030 <foo@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hcharplus>:
push   %rbx
mov    %rdi,%rbx
addb   $0x18,(%rdi)
jne    1121 <hcharplus+0x11>
mov    %rbx,%rdi
call   1030 <foo@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @hcharplus(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = add nsw i32 %5, 24
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @foo(i8* %12)
br label %14
14: ; preds = %11, %1
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @hcharplus(i8* returned %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, 24
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @foo(i8* %0)
br label %7
7: ; preds = %5, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void mergeSort(int *data, int low, int high) {
  if (low < high) {
    int mid = (low + high) / 2;
    mergeSort(data, low, mid);
    mergeSort(data, mid + 1, high);
    merge(data, low, mid, high);
  }
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <mergeSort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
cmp    %edx,%esi
jge    1172 <mergeSort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mergeSort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

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

LLVM IR (-O2):
define void @mergeSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @mergeSort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @mergeSort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void errQuit(const char *msg) {
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<errQuit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errQuit>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @errQuit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @errQuit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int lshift_s_s(int left, int right) {
  if ((left < 0) || (right < 0) || (right >= sizeof(int) * 8) ||
      (left > (2147483647 >> right))) {
    return left;
  }
  return left << right;
}


x86 assembly (clang, -O0):
<lshift_s_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1143 <lshift_s_s+0x43>
cmpl   $0x0,-0xc(%rbp)
jl     1143 <lshift_s_s+0x43>
movslq -0xc(%rbp),%rax
cmp    $0x20,%rax
jae    1143 <lshift_s_s+0x43>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x7fffffff,%edx
sar    %cl,%edx
mov    %edx,%ecx
cmp    %ecx,%eax
jle    114e <lshift_s_s+0x4e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <lshift_s_s+0x59>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lshift_s_s>:
mov    %esi,%ecx
mov    %edi,%eax
mov    $0x7fffffff,%edx
shr    %cl,%edx
xor    %esi,%esi
cmp    %edi,%edx
mov    %ecx,%edx
cmovl  %esi,%edx
mov    %ecx,%edi
or     %eax,%edi
cmovs  %esi,%edx
cmp    $0x20,%ecx
cmovae %esi,%edx
mov    %edx,%ecx
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @lshift_s_s(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp slt i32 %3, 0
%5 = icmp ugt i32 %1, 31
%6 = or i1 %5, %4
%7 = lshr i32 2147483647, %1
%8 = icmp slt i32 %7, %0
%9 = select i1 %6, i1 true, i1 %8
%10 = select i1 %9, i32 0, i32 %1
%11 = shl i32 %0, %10
ret i32 %11
}
int fsort_compare(const void *a, const void *b) {
  return (*((int *)a)) - (*((int *)b));
}


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

x86 assembly (clang, -O2):
<fsort_compare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @fsort_compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @fsort_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ init(int, char **);
int /*<<< orphan*/ interpret();
int /*<<< orphan*/ output(int, char **);
int main(int argc, char *argv[]) {
  init(argc, argv);
  interpret();
  output(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <interpret@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <output@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <interpret@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <output@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @init(i32 %0, i8** %1)
%4 = tail call i32 (...) @interpret()
%5 = tail call i32 @output(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_ivector(int *v, long nl, long nh) { free((char *)(v + nl)); }


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

x86 assembly (clang, -O2):
<free_ivector>:
lea    (%rdi,%rsi,4),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ivector(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i32, i32* %7, i64 %8
%10 = bitcast i32* %9 to i8*
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
define void @free_ivector(i32* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 @free(i8* %5)
ret void
}
double DegToRad(double deg) { return deg * 3.14159265358979323846 / 180.; }


x86 assembly (clang, -O0):
<DegToRad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @DegToRad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x400921FB54442D18
%5 = fdiv double %4, 1.800000e+02
ret double %5
}

LLVM IR (-O2):
define double @DegToRad(double %0) {
%2 = fmul double %0, 0x400921FB54442D18
%3 = fdiv double %2, 1.800000e+02
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ AddMessage(int /*<<< orphan*/, char *);
int /*<<< orphan*/ Save();
void Start(const char file, const char name) {
  Save();
  AddMessage(0, "New Player Created");
}


x86 assembly (clang, -O0):
<Start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1040 <Save@plt>
xor    %edi,%edi
lea    0xebc(%rip),%rsi
call   1030 <AddMessage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Start>:
push   %rax
xor    %eax,%eax
call   1040 <Save@plt>
lea    0xed1(%rip),%rsi
xor    %edi,%edi
pop    %rax
jmp    1030 <AddMessage@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"New Player Created\00"
define void @Start(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 (...) @Save()
%6 = call i32 @AddMessage(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"New Player Created\00"
define void @Start(i8 signext %0, i8 signext %1) {
%3 = tail call i32 (...) @Save()
%4 = tail call i32 @AddMessage(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
int loop4(int m) {
  int i = 0;
  while (*&i < m) {
    (*&i)++;
  }
  return i;
}


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

x86 assembly (clang, -O2):
<loop4>:
xor    %eax,%eax
test   %edi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @loop4(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 0)
ret i32 %2
}
int read_temp(struct stats_pwr_temp *st_pwr_temp, int nr_alloc) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.stats_pwr_temp = type opaque
define i32 @read_temp(%struct.stats_pwr_temp* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_vc2();
int /*<<< orphan*/ take_struct_vc2(int /*<<< orphan*/);
void test_struct_vc2() { take_struct_vc2(return_struct_vc2()); }


x86 assembly (clang, -O0):
<test_struct_vc2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <return_struct_vc2@plt>
mov    %eax,%edi
call   1030 <take_struct_vc2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_struct_vc2>:
push   %rax
xor    %eax,%eax
call   1040 <return_struct_vc2@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <take_struct_vc2@plt>

LLVM IR (-O0):
define void @test_struct_vc2() {
%1 = call i32 (...) @return_struct_vc2()
%2 = call i32 @take_struct_vc2(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_vc2() {
%1 = tail call i32 (...) @return_struct_vc2()
%2 = tail call i32 @take_struct_vc2(i32 %1)
ret void
}
/* Variables and functions */
size_t cpu_count(void) { return 1; }


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

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

LLVM IR (-O0):
define i64 @cpu_count() {
ret i64 1
}

LLVM IR (-O2):
define i64 @cpu_count() {
ret i64 1
}
void swapI(int *a, int *b) {
  int temp = *a;
  *a = *b;
  *b = temp;
}


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

x86 assembly (clang, -O2):
<swapI>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

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

/* Variables and functions */
int omp_get_wtime();
uint64_t CycleTime() { return ((uint64_t)(1e9 * omp_get_wtime())); }


x86 assembly (clang, -O0):
<CycleTime>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omp_get_wtime@plt>
cvtsi2sd %eax,%xmm1
movsd  0xed9(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CycleTime>:
push   %rax
xor    %eax,%eax
call   1030 <omp_get_wtime@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xedc(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CycleTime() {
%1 = call i32 (...) @omp_get_wtime()
%2 = sitofp i32 %1 to double
%3 = fmul double 1.000000e+09, %2
%4 = fptosi double %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @CycleTime() {
%1 = tail call i32 (...) @omp_get_wtime()
%2 = sitofp i32 %1 to double
%3 = fmul double %2, 1.000000e+09
%4 = fptosi double %3 to i32
ret i32 %4
}
int do_396() { return 396; }


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

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

LLVM IR (-O0):
define i32 @do_396() {
ret i32 396
}

LLVM IR (-O2):
define i32 @do_396() {
ret i32 396
}
/* Variables and functions */
int /*<<< orphan*/ fibonacci(long long);
int /*<<< orphan*/ printf(char *);
long long strtoul(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("Program expects the value of N");
    return -1;
  }
  long long n = strtoul(argv[1], NULL, 10);
  fibonacci(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1168 <main+0x38>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1192 <main+0x62>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <fibonacci@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jg     1149 <main+0x19>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%ebx
jmp    1163 <main+0x33>
mov    0x8(%rsi),%rdi
xor    %ebx,%ebx
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
mov    %rax,%rdi
call   1040 <fibonacci@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Program expects the value of N\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %18
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @strtoul(i8* %14, i32* null, i32 10)
store i64 %15, i64* %6
%16 = load i64, i64* %6
%17 = call i32 @fibonacci(i64 %16)
store i32 0, i32* %3
br label %18
18: ; preds = %11, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [31 x i8] c"Program expects the value of N\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strtoul(i8* nocapture %8, i32* null, i32 10)
%10 = tail call i32 @fibonacci(i64 %9)
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int amatch(char *);
int swallow(char *lit) { return (amatch(lit)); }


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

x86 assembly (clang, -O2):
<swallow>:
jmp    1030 <amatch@plt>

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

LLVM IR (-O2):
define i32 @swallow(i8* %0) {
%2 = tail call i32 @amatch(i8* %0)
ret i32 %2
}
void ProcessPendingEvents(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ProcessPendingEvents() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ LogVfprintf(int /*<<< orphan*/ *, char *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void LogCritical(FILE *prFP, char *pcFmt, va_list rVArgList) {
  fprintf(prFP, "CRITICAL ERROR: ");
  LogVfprintf(prFP, pcFmt, rVArgList);
}


x86 assembly (clang, -O0):
<LogCritical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <LogVfprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LogCritical>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xecc(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1040 <fwrite@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <LogVfprintf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"CRITICAL ERROR: \00"
define void @LogCritical(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32*, i32** %4
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @LogVfprintf(i32* %9, i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"CRITICAL ERROR: \00"
define void @LogCritical(i32* %0, i8* %1, i32 %2) {
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 16, i64 1, i32* %0)
%5 = tail call i32 @LogVfprintf(i32* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ psort_2();
int main() {
  psort_2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <psort_2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @psort_2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @psort_2()
ret i32 0
}
/* Variables and functions */
int __infer_nondet_int();
int munmap(void *addr, size_t len) {
  int ret;
  if (addr == 0)
    while (1)
      ;
  ret = __infer_nondet_int();
  if (ret < -1 || ret > 0)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1135 <munmap+0x25>
jmp    1130 <munmap+0x20>
jmp    1130 <munmap+0x20>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jl     1153 <munmap+0x43>
cmpl   $0x0,-0x14(%rbp)
jle    115d <munmap+0x4d>
jmp    1158 <munmap+0x48>
jmp    1158 <munmap+0x48>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<munmap>:
test   %rdi,%rdi
je     1140 <munmap+0x30>
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
lea    -0x1(%rax),%ecx
cmp    $0xfffffffd,%ecx
lea    0x8(%rsp),%rsp
ja     1142 <munmap+0x32>
nopw   0x0(%rax,%rax,1)
jmp    1130 <munmap+0x20>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1140 <munmap+0x30>
ret

LLVM IR (-O0):
define i32 @munmap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
br label %9
9: ; preds = %8, %9
br label %9
10: ; preds = %2
%11 = call i32 (...) @__infer_nondet_int()
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, -1
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = load i32, i32* %5
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14, %10
br label %18
18: ; preds = %17, %18
br label %18
19: ; preds = %14
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @munmap(i8* readnone %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %5
4: ; preds = %2, %4
br label %4
5: ; preds = %2
%6 = tail call i32 (...) @__infer_nondet_int()
%7 = add i32 %6, -1
%8 = icmp ult i32 %7, -2
br i1 %8, label %9, label %10
9: ; preds = %5, %9
br label %9
10: ; preds = %5
ret i32 %6
}
/* Type definitions */
struct pollfd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
int poll(struct pollfd *, unsigned long, int);
int Poll(struct pollfd *fds, unsigned long nfds, int timeout) {
  int nready;
  if ((nready = poll(fds, nfds, timeout)) < 0)
    err_sys("poll error");
  return nready;
}


x86 assembly (clang, -O0):
<Poll>:
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
mov    -0x14(%rbp),%edx
call   1040 <poll@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    115b <Poll+0x3b>
lea    0xeaa(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Poll>:
push   %rbx
call   1040 <poll@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Poll+0x18>
lea    0xecd(%rip),%rdi
call   1030 <err_sys@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pollfd = type { i32 }
@.str = [11 x i8] c"poll error\00"
define i32 @Poll(%struct.pollfd* %0, i64 %1, i32 %2) {
%4 = alloca %struct.pollfd*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store %struct.pollfd* %0, %struct.pollfd** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load %struct.pollfd*, %struct.pollfd** %4
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = call i32 @poll(%struct.pollfd* %8, i64 %9, i32 %10)
store i32 %11, i32* %7
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @err_sys(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
@.str = [11 x i8] c"poll error\00"
define i32 @Poll(%struct.pollfd* %0, i64 %1, i32 %2) {
%4 = tail call i32 @poll(%struct.pollfd* %0, i64 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err_sys(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Type definitions */
struct Graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ addEdge(struct Graph *, int /*<<< orphan*/, int);
struct Graph *createGraph(int);
int /*<<< orphan*/ printGraph(struct Graph *);
int main() {
  int V = 5;
  struct Graph *graph = createGraph(V);
  addEdge(graph, 0, 1);
  printGraph(graph);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <createGraph@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <addEdge@plt>
mov    -0x10(%rbp),%rdi
call   1050 <printGraph@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%edi
call   1040 <createGraph@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
call   1050 <printGraph@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Graph = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.Graph*
store i32 0, i32* %1
store i32 5, i32* %2
%4 = load i32, i32* %2
%5 = call %struct.Graph* @createGraph(i32 %4)
store %struct.Graph* %5, %struct.Graph** %3
%6 = load %struct.Graph*, %struct.Graph** %3
%7 = call i32 @addEdge(%struct.Graph* %6, i32 0, i32 1)
%8 = load %struct.Graph*, %struct.Graph** %3
%9 = call i32 @printGraph(%struct.Graph* %8)
ret i32 0
}

LLVM IR (-O2):
%struct.Graph = type { i32 }
define i32 @main() {
%1 = tail call %struct.Graph* @createGraph(i32 5)
%2 = tail call i32 @addEdge(%struct.Graph* %1, i32 0, i32 1)
%3 = tail call i32 @printGraph(%struct.Graph* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ viewEcho();
void handleResize(int signal) {
  clear();
  viewEcho();
}


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

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

LLVM IR (-O0):
define void @handleResize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @clear()
%4 = call i32 (...) @viewEcho()
ret void
}

LLVM IR (-O2):
define void @handleResize(i32 %0) {
%2 = tail call i32 (...) @clear()
%3 = tail call i32 (...) @viewEcho()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ functionB();
int test(void) {
  functionB();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @test() {
%1 = call i32 (...) @functionB()
ret i32 0
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @functionB()
ret i32 0
}
void eachResult(char *out, struct sockaddr_in *addr) {}


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

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

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

LLVM IR (-O2):
%struct.sockaddr_in = type opaque
define void @eachResult(i8* nocapture %0, %struct.sockaddr_in* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int LZ4_free(void *ctx) {
  free(ctx);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @LZ4_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
int f374(int *);
int f375(int *p) { return f374(p); }


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

x86 assembly (clang, -O2):
<f375>:
jmp    1030 <f374@plt>

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

LLVM IR (-O2):
define i32 @f375(i32* %0) {
%2 = tail call i32 @f374(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ A_BOLD;
int /*<<< orphan*/ wattroff(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wattron(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wprintw(int /*<<< orphan*/ *, char *, char *);
void heading(WINDOW *win, char *label) {
  wattron(win, A_BOLD);
  wprintw(win, "%s", label);
  wattroff(win, A_BOLD);
}


x86 assembly (clang, -O0):
<heading>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1050 <wattron@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe9f(%rip),%rsi
call   1030 <wprintw@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e6f(%rip),%rax
mov    (%rax),%esi
call   1040 <wattroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heading>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e9e(%rip),%r15
mov    (%r15),%esi
call   1050 <wattron@plt>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <wprintw@plt>
mov    (%r15),%esi
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <wattroff@plt>

LLVM IR (-O0):
@A_BOLD = global i32 0
@.str = [3 x i8] c"%s\00"
define void @heading(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 = load i32, i32* @A_BOLD
%7 = call i32 @wattron(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = load i8*, i8** %4
%10 = call i32 @wprintw(i32* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %3
%12 = load i32, i32* @A_BOLD
%13 = call i32 @wattroff(i32* %11, i32 %12)
ret void
}

LLVM IR (-O2):
@A_BOLD = global i32 0
@.str = [3 x i8] c"%s\00"
define void @heading(i32* %0, i8* %1) {
%3 = load i32, i32* @A_BOLD
%4 = tail call i32 @wattron(i32* %0, i32 %3)
%5 = tail call i32 @wprintw(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = load i32, i32* @A_BOLD
%7 = tail call i32 @wattroff(i32* %0, i32 %6)
ret void
}