xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArr(int v[], int len) {
  int i;
  for (i = 0; i < len; i++)
    printf("%d ", v[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printArr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArr+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArr+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArr+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
void COMstop() {}


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

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

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

LLVM IR (-O2):
define void @COMstop() {
ret void
}
void AAS_DangerPQChange(int areaNum) {}


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

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

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

LLVM IR (-O2):
define void @AAS_DangerPQChange(i32 %0) {
ret void
}
int ft_intlen(int num) {
  long tmp;
  int i;
  i = 0;
  tmp = (long)num;
  if (tmp < 0) {
    tmp = tmp * -1;
    i++;
  }
  if (tmp == 0)
    return (1);
  while (tmp > 0) {
    tmp = tmp / 10;
    i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_intlen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1133 <ft_intlen+0x33>
imul   $0xffffffffffffffff,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114a <ft_intlen+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1180 <ft_intlen+0x80>
jmp    114f <ft_intlen+0x4f>
cmpq   $0x0,-0x10(%rbp)
jle    117a <ft_intlen+0x7a>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114f <ft_intlen+0x4f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_intlen>:
test   %edi,%edi
je     1139 <ft_intlen+0x39>
mov    %edi,%ecx
shr    $0x1f,%ecx
mov    %edi,%esi
neg    %esi
cmovs  %edi,%esi
movabs $0xcccccccccccccccd,%rdi
cc cc cc
nopw   0x0(%rax,%rax,1)
mov    %rsi,%rax
mul    %rdi
shr    $0x3,%rdx
add    $0x1,%ecx
cmp    $0x9,%rsi
mov    %rdx,%rsi
ja     1120 <ft_intlen+0x20>
mov    %ecx,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_intlen(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = lshr i32 %0, 31
%5 = tail call i32 @llvm.abs.i32(i32 %0, i1 false)
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %3, %7
%8 = phi i32 [ %11, %7 ], [ %4, %3 ]
%9 = phi i64 [ %10, %7 ], [ %6, %3 ]
%10 = udiv i64 %9, 10
%11 = add nuw nsw i32 %8, 1
%12 = icmp ult i64 %9, 10
br i1 %12, label %13, label %7
13: ; preds = %7, %1
%14 = phi i32 [ 1, %1 ], [ %11, %7 ]
ret i32 %14
}
unsigned long GET_BITS(unsigned long val, int bottombit, int topbit) {
  int total_nr_bits = topbit - bottombit;
  unsigned long mask = (1UL << total_nr_bits) - 1;
  val >>= bottombit;
  return val & mask;
}


x86 assembly (clang, -O0):
<GET_BITS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shr    %cl,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GET_BITS>:
mov    %edx,%ecx
sub    %esi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
not    %rax
mov    %esi,%ecx
shr    %cl,%rdi
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @GET_BITS(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = zext i32 %12 to i64
%14 = shl i64 1, %13
%15 = sub i64 %14, 1
store i64 %15, i64* %8
%16 = load i32, i32* %5
%17 = load i64, i64* %4
%18 = zext i32 %16 to i64
%19 = lshr i64 %17, %18
store i64 %19, i64* %4
%20 = load i64, i64* %4
%21 = load i64, i64* %8
%22 = and i64 %20, %21
ret i64 %22
}

LLVM IR (-O2):
define i64 @GET_BITS(i64 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = zext i32 %4 to i64
%6 = shl nsw i64 -1, %5
%7 = xor i64 %6, -1
%8 = zext i32 %1 to i64
%9 = lshr i64 %0, %8
%10 = and i64 %9, %7
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ __clear_user_asm(void *, unsigned long);
unsigned long clear_user(void *to, unsigned long n) {
  if ((1))
    n = ({ __clear_user_asm(to, n); });
  return n;
}


x86 assembly (clang, -O0):
<clear_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__clear_user_asm@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_user>:
push   %rax
call   1030 <__clear_user_asm@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @clear_user(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 = load i64, i64* %4
%8 = call i32 @__clear_user_asm(i8* %6, i64 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
store i64 %10, i64* %4
%11 = load i64, i64* %4
ret i64 %11
}

LLVM IR (-O2):
define i64 @clear_user(i8* %0, i64 %1) {
%3 = tail call i32 @__clear_user_asm(i8* %0, i64 %1)
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
scalar_t__ write(int, char const *, size_t);
void write_ignore_fail(int fd, const char *data, size_t count) {
  ssize_t written;
  while ((written = write(fd, data, count)) > 0) {
    data += written;
    count -= written;
  }
}


x86 assembly (clang, -O0):
<write_ignore_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jle    1161 <write_ignore_fail+0x51>
mov    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1123 <write_ignore_fail+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_ignore_fail>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
nopl   0x0(%rax)
call   1030 <write@plt>
test   %rax,%rax
jle    113a <write_ignore_fail+0x2a>
add    %rax,%rbx
sub    %rax,%r14
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
jmp    1120 <write_ignore_fail+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @write_ignore_fail(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %3, %6
%7 = phi i64 [ %12, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %1, %3 ]
%9 = phi i64 [ %11, %6 ], [ %2, %3 ]
%10 = getelementptr inbounds i8, i8* %8, i64 %7
%11 = sub i64 %9, %7
%12 = tail call i64 @write(i32 %0, i8* %10, i64 %11)
%13 = icmp sgt i64 %12, 0
br i1 %13, label %6, label %14
14: ; preds = %6, %3
ret void
}
/* Variables and functions */
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[1000];
  while ((len = getline(line, 1000)) > 0)
    if (len > 80)
      printf("%s\n", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1171 <main+0x51>
cmpl   $0x50,-0x8(%rbp)
jle    116c <main+0x4c>
lea    -0x3f0(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x51,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @getline(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
void macro_range(void) {
  int foo = 1;
  int x = 0;
  x = (1) <= (foo) && (foo) < (x);
}


x86 assembly (clang, -O0):
<macro_range>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
mov    $0x1,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x9(%rbp)
jg     1131 <macro_range+0x31>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @macro_range() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %1
%4 = icmp sle i32 1, %3
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br label %9
9: ; preds = %5, %0
%10 = phi i1 [ false, %0 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
store i32 %11, i32* %2
ret void
}

LLVM IR (-O2):
define void @macro_range() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ italic(char *);
int /*<<< orphan*/ printColor(int /*<<< orphan*/);
void cmItalic(char *str) { printColor(italic(str)); }


x86 assembly (clang, -O0):
<cmItalic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <italic@plt>
mov    %eax,%edi
call   1030 <printColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmItalic>:
push   %rax
call   1040 <italic@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <printColor@plt>

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

LLVM IR (-O2):
define void @cmItalic(i8* %0) {
%2 = tail call i32 @italic(i8* %0)
%3 = tail call i32 @printColor(i32 %2)
ret void
}
int fig_0_21(int figlen, int pd, int oe, int cn, unsigned char *fig) {
  return 0;
}


x86 assembly (clang, -O0):
<fig_0_21>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fig_0_21(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @fig_0_21(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
FILE *open_config_file(char *filename) {
  FILE *in;
  static int first = 1;
  if ((in = fopen(filename, "r")) == NULL) {
    if (first) {
      perror(filename);
      first = 0;
    }
    return NULL;
  }
  return in;
}


x86 assembly (clang, -O0):
<open_config_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1177 <open_config_file+0x57>
cmpl   $0x0,0x2edf(%rip)
je     116a <open_config_file+0x4a>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
movl   $0x0,0x2ec6(%rip)
movq   $0x0,-0x8(%rbp)
jmp    117f <open_config_file+0x5f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_config_file>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1144 <open_config_file+0x24>
cmpb   $0x0,0x2ef2(%rip)
je     114f <open_config_file+0x2f>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
call   1040 <perror@plt>
movb   $0x1,0x2ed6(%rip)
jmp    1144 <open_config_file+0x24>

LLVM IR (-O0):
@open_config_file.first = internal global i32 1
@.str = [2 x i8] c"r\00"
define i32* @open_config_file(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %15
8: ; preds = %1
%9 = load i32, i32* @open_config_file.first
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i8*, i8** %3
%13 = call i32 @perror(i8* %12)
store i32 0, i32* @open_config_file.first
br label %14
14: ; preds = %11, %8
store i32* null, i32** %2
br label %17
15: ; preds = %1
%16 = load i32*, i32** %4
store i32* %16, i32** %2
br label %17
17: ; preds = %15, %14
%18 = load i32*, i32** %2
ret i32* %18
}

LLVM IR (-O2):
@open_config_file.first = internal unnamed_addr global i1 false
@.str = [2 x i8] c"r\00"
define noalias i32* @open_config_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i1, i1* @open_config_file.first
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @perror(i8* %0)
store i1 true, i1* @open_config_file.first
br label %8
8: ; preds = %1, %4, %6
ret i32* %2
}
int do_804() { return 804; }


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

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

LLVM IR (-O0):
define i32 @do_804() {
ret i32 804
}

LLVM IR (-O2):
define i32 @do_804() {
ret i32 804
}
/* Variables and functions */
int /*<<< orphan*/ the_assert(char *, char *, char *, int, int);
void assert_true_(char *file, char *func, int line, bool val) {
  the_assert("Assert_true", file, func, line, !val);
}


x86 assembly (clang, -O0):
<assert_true_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
cmpl   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%r8d
lea    0xeb9(%rip),%rdi
call   1030 <the_assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_true_>:
mov    %edx,%eax
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %r8d,%r8d
test   %ecx,%ecx
sete   %r8b
lea    0xed8(%rip),%rdi
mov    %eax,%ecx
jmp    1030 <the_assert@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Assert_true\00"
define void @assert_true_(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
%16 = call i32 @the_assert(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i32 %11, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Assert_true\00"
define void @assert_true_(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @the_assert(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2, i32 %6)
ret void
}
int test_imm_E6int16_reg(short val) {
  return ((val) & (-0xE6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_E6int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -230
%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_E6int16_reg(i16 signext %0) {
%2 = and i16 %0, -230
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned long long xor64(unsigned long long input) {
  return input ^ 0x200000004ULL;
}


x86 assembly (clang, -O0):
<xor64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x200000004,%rax
xor    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor64>:
movabs $0x200000004,%rax
xor    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @xor64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, 8589934596
ret i64 %4
}

LLVM IR (-O2):
define i64 @xor64(i64 %0) {
%2 = xor i64 %0, 8589934596
ret i64 %2
}
void tegra_dvfs_core_unlock(void) { return; }


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

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

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

LLVM IR (-O2):
define void @tegra_dvfs_core_unlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Course:EG1302A - Spring 2014\n");
  printf("Name: Stevie Estrada\n");
  printf("Date Created: %d/%d/%d\n", 1, 28, 2014);
  printf("Assignment: Assignment05\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0x7de,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0x7de,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Course:EG1302A - Spring 2014\0A\00"
@.str.1 = [22 x i8] c"Name: Stevie Estrada\0A\00"
@.str.2 = [24 x i8] c"Date Created: %d/%d/%d\0A\00"
@.str.3 = [26 x i8] c"Assignment: Assignment05\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [24 x i8] c"Date Created: %d/%d/%d\0A\00"
@str = [29 x i8] c"Course:EG1302A - Spring 2014\00"
@str.4 = [21 x i8] c"Name: Stevie Estrada\00"
@str.5 = [25 x i8] c"Assignment: Assignment05\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
int OSCPaddedStrlen(const char *s) {
  int i;
  for (i = 0; *s != '\0'; s++, i++) {
  }
  return (i + 4) & 0xfffffffc;
}


x86 assembly (clang, -O0):
<OSCPaddedStrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113e <OSCPaddedStrlen+0x3e>
jmp    1124 <OSCPaddedStrlen+0x24>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <OSCPaddedStrlen+0xf>
mov    -0xc(%rbp),%eax
add    $0x4,%eax
and    $0xfffffffc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSCPaddedStrlen>:
cmpb   $0x0,(%rdi)
je     1123 <OSCPaddedStrlen+0x23>
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <OSCPaddedStrlen+0x10>
add    $0x3,%eax
and    $0x7ffffffc,%eax
ret
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @OSCPaddedStrlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %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 %15
9: ; preds = %4
br label %10
10: ; preds = %9
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 4
%18 = and i32 %17, -4
ret i32 %18
}

LLVM IR (-O2):
define i32 @OSCPaddedStrlen(i8* 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 i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = add nuw i32 %5, 5
%13 = and i32 %12, 2147483644
br label %14
14: ; preds = %11, %1
%15 = phi i32 [ 4, %1 ], [ %13, %11 ]
ret i32 %15
}
void parse_optional(void *arg, struct Source *src, struct Result *res) {}


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

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

LLVM IR (-O0):
%struct.Source = type opaque
%struct.Result = type opaque
define void @parse_optional(i8* %0, %struct.Source* %1, %struct.Result* %2) {
%4 = alloca i8*
%5 = alloca %struct.Source*
%6 = alloca %struct.Result*
store i8* %0, i8** %4
store %struct.Source* %1, %struct.Source** %5
store %struct.Result* %2, %struct.Result** %6
ret void
}

LLVM IR (-O2):
%struct.Source = type opaque
%struct.Result = type opaque
define void @parse_optional(i8* nocapture %0, %struct.Source* nocapture %1, %struct.Result* nocapture %2) {
ret void
}
_Bool QuietGreater(float f1, float f2) { return __builtin_isgreater(f1, f2); }


x86 assembly (clang, -O0):
<QuietGreater>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuietGreater>:
ucomiss %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @QuietGreater(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @QuietGreater(float %0, float %1) {
%3 = fcmp ogt float %0, %1
ret i1 %3
}
/* Variables and functions */
void abort();
void *malloc(int /*<<< orphan*/);
int /*<<< orphan*/ size_mul(size_t, size_t);
void *xmalloc(size_t nmemb, size_t size) {
  void *p = malloc(size_mul(nmemb, size));
  (p ? (void)0 : abort());
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <size_mul@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1168 <xmalloc+0x38>
jmp    116d <xmalloc+0x3d>
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <size_mul@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     1144 <xmalloc+0x14>
pop    %rcx
ret
call   1030 <abort@plt>

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

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0, i64 %1) {
%3 = tail call i32 @size_mul(i64 %0, i64 %1)
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %2
tail call void @abort()
unreachable
7: ; preds = %2
ret i8* %4
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int decode_atom_format_6_1(unsigned char const *, struct stream *);
int decode_atom_format_6_5(const unsigned char *pkt, struct stream *stream) {
  return decode_atom_format_6_1(pkt, stream);
}


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

x86 assembly (clang, -O2):
<decode_atom_format_6_5>:
jmp    1030 <decode_atom_format_6_1@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @decode_atom_format_6_5(i8* %0, %struct.stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.stream*
store i8* %0, i8** %3
store %struct.stream* %1, %struct.stream** %4
%5 = load i8*, i8** %3
%6 = load %struct.stream*, %struct.stream** %4
%7 = call i32 @decode_atom_format_6_1(i8* %5, %struct.stream* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_atom_format_6_5(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_atom_format_6_1(i8* %0, %struct.stream* %1)
ret i32 %3
}
int output_data(int i) { return i * i * i; }


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

x86 assembly (clang, -O2):
<output_data>:
mov    %edi,%eax
imul   %edi,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @output_data(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
ret i32 %3
}
int main(void) { return 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ isprint(int);
int isgraph(int c) { return isprint(c) && c != ' '; }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isprint@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     113f <isgraph+0x2f>
cmpl   $0x20,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
push   %rbx
mov    %edi,%ebx
call   1030 <isprint@plt>
test   %rax,%rax
setne  %al
cmp    $0x20,%ebx
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isprint(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 32
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = tail call i64 @isprint(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp ne i32 %0, 32
%5 = and i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
int returned(int a, int b) {
  if (a) {
    return a;
  } else
    return b;
  return a + b + a;
}


x86 assembly (clang, -O0):
<returned>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     111f <returned+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1125 <returned+0x25>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<returned>:
mov    %esi,%eax
test   %edi,%edi
cmovne %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @returned(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEif_icmpge(int, int /*<<< orphan*/ *);
void code_if_icmpge(int label) { appendCODE(makeCODEif_icmpge(label, NULL)); }


x86 assembly (clang, -O0):
<code_if_icmpge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <makeCODEif_icmpge@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_if_icmpge>:
push   %rax
xor    %esi,%esi
call   1040 <makeCODEif_icmpge@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <appendCODE@plt>

LLVM IR (-O0):
define void @code_if_icmpge(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @makeCODEif_icmpge(i32 %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_if_icmpge(i32 %0) {
%2 = tail call i32 @makeCODEif_icmpge(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
const char *Zip_Name(void) { return "Zip"; }


x86 assembly (clang, -O0):
<Zip_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Zip_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"Zip\00"
define i8* @Zip_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"Zip\00"
define i8* @Zip_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ togo_hash_test();
int /*<<< orphan*/ togo_pool_test();
int /*<<< orphan*/ togo_string_test();
void togo_test() {
  togo_pool_test();
  togo_hash_test();
  togo_string_test();
}


x86 assembly (clang, -O0):
<togo_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <togo_pool_test@plt>
mov    $0x0,%al
call   1030 <togo_hash_test@plt>
mov    $0x0,%al
call   1040 <togo_string_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<togo_test>:
push   %rax
xor    %eax,%eax
call   1050 <togo_pool_test@plt>
xor    %eax,%eax
call   1030 <togo_hash_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <togo_string_test@plt>

LLVM IR (-O0):
define void @togo_test() {
%1 = call i32 (...) @togo_pool_test()
%2 = call i32 (...) @togo_hash_test()
%3 = call i32 (...) @togo_string_test()
ret void
}

LLVM IR (-O2):
define void @togo_test() {
%1 = tail call i32 (...) @togo_pool_test()
%2 = tail call i32 (...) @togo_hash_test()
%3 = tail call i32 (...) @togo_string_test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void err_sys(const char *mesg) {
  perror(mesg);
  exit(errno);
}


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

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

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

LLVM IR (-O2):
@errno = global i32 0
define void @err_sys(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @errno
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void port_io_write_word(unsigned short port, unsigned short data) {
  __asm__("out %%ax, %%dx" : : "a"(data), "d"(port));
}


x86 assembly (clang, -O0):
<port_io_write_word>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
mov    -0x2(%rbp),%dx
out    %ax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_io_write_word>:
mov    %esi,%eax
mov    %edi,%edx
out    %ax,(%dx)
ret

LLVM IR (-O0):
define void @port_io_write_word(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @port_io_write_word(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "out %ax, %dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %1, i16 %0)
ret void
}
/* Variables and functions */
void *tmsort(void *sort, size_t count, size_t datasize,
             int (*cmp)(void *, void *)) {
  return (sort);
}


x86 assembly (clang, -O0):
<tmsort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @tmsort(i8* readnone returned %0, i64 %1, i64 %2, i32 (i8*, i8*)* nocapture readnone %3) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, int);
int isspace(int c) { return strchr(" \t\n\v\f\r", c) != NULL; }


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c" \09\0A\0B\0C\0D\00"
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [7 x i8] c" \09\0A\0B\0C\0D\00"
define i32 @isspace(i32 %0) {
%2 = tail call i32* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
void set_721(void *pnt, unsigned int i) {
  unsigned char *p = (unsigned char *)pnt;
  p[0] = i & 0xff;
  p[1] = (i >> 8) & 0xff;
}


x86 assembly (clang, -O0):
<set_721>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_721>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @set_721(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i32, i32* %4
%13 = lshr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
ret void
}

LLVM IR (-O2):
define void @set_721(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
void mpt_augmentInput(float *U, const float *Uprev) {
  int i;
  if ((0 == 1) || (0 > 0)) {
    for (i = 0; i < 1; i++) {
      U[i] = U[i] + Uprev[i];
    }
  }
}


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

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

LLVM IR (-O0):
define void @mpt_augmentInput(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i32
store float* %0, float** %3
store float* %1, float** %4
ret void
}

LLVM IR (-O2):
define void @mpt_augmentInput(float* nocapture %0, float* nocapture %1) {
ret void
}
/* Type definitions */
struct alloc_type {
  int dummy;
};

/* Variables and functions */
void *malloc(size_t);
void *mymalloc_hint(struct alloc_type *myalloc, void *hint, size_t size) {
  return malloc(size);
}


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

x86 assembly (clang, -O2):
<mymalloc_hint>:
mov    %rdx,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
%struct.alloc_type = type { i32 }
define noalias i8* @mymalloc_hint(%struct.alloc_type* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i8* @malloc(i64 %2)
ret i8* %4
}
/* Variables and functions */
int P_Random();
int P_SubRandom(void) {
  int r = P_Random();
  return r - P_Random();
}


x86 assembly (clang, -O0):
<P_SubRandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <P_Random@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <P_Random@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P_SubRandom>:
push   %rbx
xor    %eax,%eax
call   1030 <P_Random@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <P_Random@plt>
sub    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @P_SubRandom() {
%1 = alloca i32
%2 = call i32 (...) @P_Random()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 (...) @P_Random()
%5 = sub nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @P_SubRandom() {
%1 = tail call i32 (...) @P_Random()
%2 = tail call i32 (...) @P_Random()
%3 = sub nsw i32 %1, %2
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;
struct can_frame {
  scalar_t__ *data;
};

/* Variables and functions */
uint32_t data24(struct can_frame frame) {
  return (uint32_t)frame.data[6] << 16 | (uint32_t)frame.data[5] << 8 |
         (uint32_t)frame.data[4] << 0;
}


x86 assembly (clang, -O0):
<data24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rax
shl    $0x10,%eax
mov    -0x8(%rbp),%rcx
mov    0x28(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%rcx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<data24>:
mov    0x28(%rdi),%eax
mov    0x30(%rdi),%ecx
shl    $0x10,%ecx
shl    $0x8,%eax
or     %ecx,%eax
or     0x20(%rdi),%eax
ret

LLVM IR (-O0):
%struct.can_frame = type { i64* }
define i32 @data24(i64* %0) {
%2 = alloca %struct.can_frame
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
store i64* %0, i64** %3
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
%5 = load i64*, i64** %4
%6 = getelementptr inbounds i64, i64* %5, i64 6
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 16
%10 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
%11 = load i64*, i64** %10
%12 = getelementptr inbounds i64, i64* %11, i64 5
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 8
%16 = or i32 %9, %15
%17 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
%18 = load i64*, i64** %17
%19 = getelementptr inbounds i64, i64* %18, i64 4
%20 = load i64, i64* %19
%21 = trunc i64 %20 to i32
%22 = shl i32 %21, 0
%23 = or i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @data24(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 6
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 16
%6 = getelementptr inbounds i64, i64* %0, i64 5
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = or i32 %9, %5
%11 = getelementptr inbounds i64, i64* %0, i64 4
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = or i32 %10, %13
ret i32 %14
}