xunge/DecIR huggingface dataset:
void test_tabstops_4() {
  ;
  { return; };
}


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

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

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

LLVM IR (-O2):
define void @test_tabstops_4() {
ret void
}
/* Type definitions */
struct pp_instance {
  int dummy;
};
struct pp_globals {
  int dummy;
};

/* Variables and functions */
struct pp_instance *INST(struct pp_globals *, int /*<<< orphan*/);
struct pp_instance *pp_sim_get_master(struct pp_globals *ppg) {
  return INST(ppg, 0);
}


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

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

LLVM IR (-O0):
%struct.pp_instance = type { i32 }
%struct.pp_globals = type { i32 }
define %struct.pp_instance* @pp_sim_get_master(%struct.pp_globals* %0) {
%2 = alloca %struct.pp_globals*
store %struct.pp_globals* %0, %struct.pp_globals** %2
%3 = load %struct.pp_globals*, %struct.pp_globals** %2
%4 = call %struct.pp_instance* @INST(%struct.pp_globals* %3, i32 0)
ret %struct.pp_instance* %4
}

LLVM IR (-O2):
%struct.pp_instance = type { i32 }
%struct.pp_globals = type { i32 }
define %struct.pp_instance* @pp_sim_get_master(%struct.pp_globals* %0) {
%2 = tail call %struct.pp_instance* @INST(%struct.pp_globals* %0, i32 0)
ret %struct.pp_instance* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char const *, char *);
void print_usage(char *exe_name) {
  const char *usage_message_format =
      "usage: ./%s [input_path(s)] <output_file>\n";
  printf(usage_message_format, exe_name);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"usage: ./%s [input_path(s)] <output_file>\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"usage: ./%s [input_path(s)] <output_file>\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ TIOCSPGRP;
int ioctl(int, int /*<<< orphan*/, int *);
int tcsetpgrp(int fd, pid_t pid) {
  int p = (int)pid;
  return ioctl(fd, TIOCSPGRP, &p);
}


x86 assembly (clang, -O0):
<tcsetpgrp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    -0x14(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcsetpgrp>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@TIOCSPGRP = global i32 0
define i32 @tcsetpgrp(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i32, i32* @TIOCSPGRP
%10 = call i32 @ioctl(i32 %8, i32 %9, i32* %5)
ret i32 %10
}

LLVM IR (-O2):
@TIOCSPGRP = global i32 0
define i32 @tcsetpgrp(i32 %0, i64 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = trunc i64 %1 to i32
store i32 %5, i32* %3
%6 = load i32, i32* @TIOCSPGRP
%7 = call i32 @ioctl(i32 %0, i32 %6, i32* %3)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ callee(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ getpid();
main() {
  int pid;
  int v = 5;
  pid = fork();
  if (pid == 0) {
    v++;
    callee(getpid());
  } else {
    v--;
    callee(getpid());
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0xc(%rbp)
mov    $0x0,%al
call   1060 <fork@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1186 <main+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
call   1040 <callee@plt>
jmp    119d <main+0x5d>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
call   1040 <callee@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <fork@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
call   1040 <callee@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %3
%4 = call i32 (...) @fork()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = call i32 (...) @getpid()
%11 = call i32 @callee(i32 %10)
br label %17
12: ; preds = %0
%13 = load i32, i32* %3
%14 = add nsw i32 %13, -1
store i32 %14, i32* %3
%15 = call i32 (...) @getpid()
%16 = call i32 @callee(i32 %15)
br label %17
17: ; preds = %12, %7
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 @callee(i32 %2)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int linemode_set(int bit, int on) {
  (void)bit;
  (void)on;
  printf("?Need to have LINEMODE option enabled first.\n");
  printf("'mode ?' for help.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"?Need to have LINEMODE option enabled first.\0A\00"
@.str.1 = [20 x i8] c"'mode ?' for help.\0A\00"
define i32 @linemode_set(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [45 x i8] c"?Need to have LINEMODE option enabled first.\00"
@str.2 = [19 x i8] c"'mode ?' for help.\00"
define i32 @linemode_set(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int getLength(int ship) {
  switch (ship) {
  case 1:
    return 5;
    break;
  case 2:
    return 4;
    break;
  case 3:
    return 3;
    break;
  case 4:
    return 3;
    break;
  case 5:
    return 2;
    break;
    break;
  }
}


x86 assembly (clang, -O0):
<getLength>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4,%eax
ja     1167 <getLength+0x67>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x5,-0x4(%rbp)
jmp    1167 <getLength+0x67>
movl   $0x4,-0x4(%rbp)
jmp    1167 <getLength+0x67>
movl   $0x3,-0x4(%rbp)
jmp    1167 <getLength+0x67>
movl   $0x3,-0x4(%rbp)
jmp    1167 <getLength+0x67>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLength>:
add    $0xfffffffe,%edi
mov    $0x5,%eax
cmp    $0x3,%edi
ja     111a <getLength+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @getLength(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 5, label %9
]
5: ; preds = %1
store i32 5, i32* %2
br label %10
6: ; preds = %1
store i32 4, i32* %2
br label %10
7: ; preds = %1
store i32 3, i32* %2
br label %10
8: ; preds = %1
store i32 3, i32* %2
br label %10
9: ; preds = %1
store i32 2, i32* %2
br label %10
10: ; preds = %5, %6, %7, %8, %9, %1
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@switch.table.getLength = [4 x i32] [i32 4, i32 3, i32 3, i32 2]
define i32 @getLength(i32 %0) {
%2 = add i32 %0, -2
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.getLength, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 5, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(char *, char *, int);
void int2tag(char *tag, uint32_t value) {
  uint32_t network = htonl(value);
  memcpy(tag, (char *)(&network), 4);
}


x86 assembly (clang, -O0):
<int2tag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2tag>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htonl@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @int2tag(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @htonl(i32 %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = bitcast i32* %5 to i8*
%10 = call i32 @memcpy(i8* %8, i8* %9, i32 4)
ret void
}

LLVM IR (-O2):
define void @int2tag(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @htonl(i32 %1)
store i32 %5, i32* %3
%6 = call i32 @memcpy(i8* %0, i8* %4, i32 4)
ret void
}
double Sqr(double x) { return x * x; }


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

x86 assembly (clang, -O2):
<Sqr>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @Sqr(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @Sqr(double %0) {
%2 = fmul double %0, %0
ret double %2
}
int byte_col_uhc_2(int byte) {
  if (byte >= 0x41 && byte < 0x5b)
    return byte - 0x41;
  else if (byte >= 0x61 && byte < 0x7b)
    return byte - 0x47;
  else if (byte >= 0x81 && byte < 0xa1)
    return byte - 0x4d;
  else
    return -1;
}


x86 assembly (clang, -O0):
<byte_col_uhc_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1129 <byte_col_uhc_2+0x29>
cmpl   $0x5b,-0x8(%rbp)
jge    1129 <byte_col_uhc_2+0x29>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <byte_col_uhc_2+0x7a>
cmpl   $0x61,-0x8(%rbp)
jl     114b <byte_col_uhc_2+0x4b>
cmpl   $0x7b,-0x8(%rbp)
jge    114b <byte_col_uhc_2+0x4b>
mov    -0x8(%rbp),%eax
sub    $0x47,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <byte_col_uhc_2+0x7a>
cmpl   $0x81,-0x8(%rbp)
jl     1173 <byte_col_uhc_2+0x73>
cmpl   $0xa1,-0x8(%rbp)
jge    1173 <byte_col_uhc_2+0x73>
mov    -0x8(%rbp),%eax
sub    $0x4d,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <byte_col_uhc_2+0x7a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_col_uhc_2>:
lea    -0x41(%rdi),%eax
cmp    $0x1a,%eax
jb     112a <byte_col_uhc_2+0x2a>
lea    -0x61(%rdi),%eax
cmp    $0x19,%eax
ja     1116 <byte_col_uhc_2+0x16>
add    $0xffffffb9,%edi
mov    %edi,%eax
ret
lea    -0x81(%rdi),%eax
add    $0xffffffb3,%edi
cmp    $0x20,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @byte_col_uhc_2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 91
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 65
store i32 %11, i32* %2
br label %31
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 123
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 71
store i32 %20, i32* %2
br label %31
21: ; preds = %15, %12
%22 = load i32, i32* %3
%23 = icmp sge i32 %22, 129
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp slt i32 %25, 161
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %3
%29 = sub nsw i32 %28, 77
store i32 %29, i32* %2
br label %31
30: ; preds = %24, %21
store i32 -1, i32* %2
br label %31
31: ; preds = %30, %27, %18, %9
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @byte_col_uhc_2(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -97
%6 = icmp ult i32 %5, 26
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -71
br label %14
9: ; preds = %4
%10 = add i32 %0, -129
%11 = icmp ult i32 %10, 32
%12 = add nsw i32 %0, -77
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
/* Variables and functions */
int f1(int);
int f2(int);
int main(int argc, char **argv) { return f1(argc) + f2(argc); }


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)
mov    -0x8(%rbp),%edi
call   1040 <f1@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <f2@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <f1@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <f2@plt>
add    %ebp,%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 = call i32 @f1(i32 %6)
%8 = load i32, i32* %4
%9 = call i32 @f2(i32 %8)
%10 = add nsw i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @f1(i32 %0)
%4 = tail call i32 @f2(i32 %0)
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, unsigned long);
int cli_memcpy(void *target, const void *source, unsigned long size) {
  int ret = 0;
  memcpy(target, source, size);
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @cli_memcpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ HMAC_CTX;

/* Variables and functions */
int /*<<< orphan*/ HMAC_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ *);
void HMAC_CTX_free(HMAC_CTX *ctx) {
  if (ctx != NULL) {
    HMAC_CTX_cleanup(ctx);
    OPENSSL_free(ctx);
  }
}


x86 assembly (clang, -O0):
<HMAC_CTX_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <HMAC_CTX_free+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <HMAC_CTX_cleanup@plt>
mov    -0x8(%rbp),%rdi
call   1040 <OPENSSL_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMAC_CTX_free>:
test   %rdi,%rdi
je     1137 <HMAC_CTX_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1030 <HMAC_CTX_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <OPENSSL_free@plt>
ret

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

LLVM IR (-O2):
define void @HMAC_CTX_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @HMAC_CTX_cleanup(i32* %0)
%5 = tail call i32 @OPENSSL_free(i32* %0)
br label %6
6: ; preds = %3, %1
ret void
}
__attribute__((always_)) void prefetchw(const void *x) {
  asm volatile("661:\n\t"
               "prefetcht0 (%1)"
               "\n662:\n"
               ".section .altinstructions,\"a\"\n"
               " "
               ".balign 8"
               " "
               "\n"
               " "
               ".quad"
               " "
               "661b\n"
               " "
               ".quad"
               " "
               "663f\n"
               "	 .byte "
               "(1*32+31)"
               "\n"
               "	 .byte 662b-661b\n"
               "	 .byte 664f-663f\n"
               ".previous\n"
               ".section .altinstr_replacement, \"ax\"\n"
               "663:\n\t"
               "prefetchw (%1)"
               "\n664:\n"
               ".previous"
               :
               : "i"(0), "r"(x));
}


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

x86 assembly (clang, -O2):
<prefetchw>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetchw(i8* %0) {
tail call void asm sideeffect "661:\0A\09prefetcht0 ($1)\0A662:\0A.section .altinstructions,\22a\22\0A .balign 8 \0A .quad 661b\0A .quad 663f\0A\09 .byte (1*32+31)\0A\09 .byte 662b-661b\0A\09 .byte 664f-663f\0A.previous\0A.section .altinstr_replacement, \22ax\22\0A663:\0A\09prefetchw ($1)\0A664:\0A.previous", "i,r,~{dirflag},~{fpsr},~{flags}"(i32 0, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int sigsetmask(int mask) {
  int n;
  union {
    int the_mask;
    sigset_t the_sigset;
  } in, out;
  n = sigprocmask(SIG_SETMASK, &in.the_sigset, &out.the_sigset);
  if (n)
    return n;
  return out.the_mask;
}


x86 assembly (clang, -O0):
<sigsetmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1149 <sigsetmask+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <sigsetmask+0x3f>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigsetmask>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <sigprocmask@plt>
test   %eax,%eax
jne    1134 <sigsetmask+0x24>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%union.anon = type { i32 }
@SIG_SETMASK = global i32 0
define i32 @sigsetmask(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %union.anon
%6 = alloca %union.anon
store i32 %0, i32* %3
%7 = load i32, i32* @SIG_SETMASK
%8 = bitcast %union.anon* %5 to i32*
%9 = bitcast %union.anon* %6 to i32*
%10 = call i32 @sigprocmask(i32 %7, i32* %8, i32* %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %18
15: ; preds = %1
%16 = bitcast %union.anon* %6 to i32*
%17 = load i32, i32* %16
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %13
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
%union.anon = type { i32 }
@SIG_SETMASK = global i32 0
define i32 @sigsetmask(i32 %0) {
%2 = alloca %union.anon
%3 = alloca %union.anon
%4 = bitcast %union.anon* %2 to i8*
%5 = bitcast %union.anon* %3 to i8*
%6 = load i32, i32* @SIG_SETMASK
%7 = getelementptr inbounds %union.anon, %union.anon* %2, i64 0, i32 0
%8 = getelementptr inbounds %union.anon, %union.anon* %3, i64 0, i32 0
%9 = call i32 @sigprocmask(i32 %6, i32* %7, i32* %8)
%10 = icmp eq i32 %9, 0
%11 = load i32, i32* %8
%12 = select i1 %10, i32 %11, i32 %9
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Cartridge_Remove();
void GenericInterface_RemoveCartridge(void) { Cartridge_Remove(); }


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

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

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

LLVM IR (-O2):
define void @GenericInterface_RemoveCartridge() {
%1 = tail call i32 (...) @Cartridge_Remove()
ret void
}
/* Variables and functions */
unsigned int __gcd(int, int);
int /*<<< orphan*/ printf(char *, int, int, unsigned int);
int main() {
  unsigned int result;
  result = __gcd(12468, 2448);
  printf("greatest common divisor of %d and %d is %d\n", 12468, 2448, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x30b4,%edi
mov    $0x990,%esi
call   1040 <__gcd@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
lea    0xeb5(%rip),%rdi
mov    $0x30b4,%esi
mov    $0x990,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x30b4,%edi
mov    $0x990,%esi
call   1040 <__gcd@plt>
lea    0xec9(%rip),%rdi
mov    $0x30b4,%esi
mov    $0x990,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"greatest common divisor of %d and %d is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @__gcd(i32 12468, i32 2448)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 12468, i32 2448, i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"greatest common divisor of %d and %d is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @__gcd(i32 12468, i32 2448)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 12468, i32 2448, i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int exeoc_stdselect(char **, char *, int *, int /*<<< orphan*/ *, int,
                    int /*<<< orphan*/ *);
int exeoc_stdall(char *exeargv[], char documentfinishedbuf[],
                 int *documentfinishedbufsize, pid_t *ret) {
  return exeoc_stdselect(exeargv, documentfinishedbuf, documentfinishedbufsize,
                         ret, 1, NULL);
}


x86 assembly (clang, -O0):
<exeoc_stdall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%r8d
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <exeoc_stdselect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exeoc_stdall>:
mov    $0x1,%r8d
xor    %r9d,%r9d
jmp    1030 <exeoc_stdselect@plt>

LLVM IR (-O0):
define i32 @exeoc_stdall(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 = call i32 @exeoc_stdselect(i8** %9, i8* %10, i32* %11, i32* %12, i32 1, i32* null)
ret i32 %13
}

LLVM IR (-O2):
define i32 @exeoc_stdall(i8** %0, i8* %1, i32* %2, i32* %3) {
%5 = tail call i32 @exeoc_stdselect(i8** %0, i8* %1, i32* %2, i32* %3, i32 1, i32* null)
ret i32 %5
}
void commonfun(void) {}


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

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

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

LLVM IR (-O2):
define void @commonfun() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exec(char *);
int Login() { exec("login /dev/tty0"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"login /dev/tty0\00"
define i32 @Login() {
%1 = alloca i32
%2 = call i32 @exec(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [16 x i8] c"login /dev/tty0\00"
define i32 @Login() {
%1 = tail call i32 @exec(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
float bounceEaseOutf(int);
float bounceEaseInf(float p) { return 1 - bounceEaseOutf(1 - p); }


x86 assembly (clang, -O0):
<bounceEaseInf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%edi
call   1030 <bounceEaseOutf@plt>
movaps %xmm0,%xmm1
movss  0xec2(%rip),%xmm0
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bounceEaseInf>:
push   %rax
movss  0xee7(%rip),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%edi
call   1030 <bounceEaseOutf@plt>
movss  0xed2(%rip),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bounceEaseInf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float 1.000000e+00, %3
%5 = fptosi float %4 to i32
%6 = call float @bounceEaseOutf(i32 %5)
%7 = fsub float 1.000000e+00, %6
ret float %7
}

LLVM IR (-O2):
define float @bounceEaseInf(float %0) {
%2 = fsub float 1.000000e+00, %0
%3 = fptosi float %2 to i32
%4 = tail call float @bounceEaseOutf(i32 %3)
%5 = fsub float 1.000000e+00, %4
ret float %5
}
/* Variables and functions */
int checkString(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc > 1)
    return (checkString(argv[1]));
  printf("Not enougth arguments\n");
  return (1);
}


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)
cmpl   $0x1,-0x8(%rbp)
jle    1155 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <checkString@plt>
mov    %eax,-0x4(%rbp)
jmp    1168 <main+0x48>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1130 <main+0x10>
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1040 <checkString@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Not enougth arguments\0A\00"
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 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @checkString(i8* %11)
store i32 %12, i32* %3
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %15
15: ; preds = %13, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@str = [22 x i8] c"Not enougth arguments\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @checkString(i8* %6)
br label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ %7, %4 ], [ 1, %8 ]
ret i32 %11
}
__attribute__((const)) int av_tolower(int c) {
  if (c >= 'A' && c <= 'Z')
    c ^= 0x20;
  return c;
}


x86 assembly (clang, -O0):
<av_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1124 <av_tolower+0x24>
cmpl   $0x5a,-0x4(%rbp)
jg     1124 <av_tolower+0x24>
mov    -0x4(%rbp),%eax
xor    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_tolower>:
lea    -0x41(%rdi),%ecx
mov    %edi,%eax
xor    $0x20,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @av_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = xor i32 %9, 32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @av_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = xor i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_TEMPLATE;

/* Variables and functions */
int asn1_template_ex_i2d(int /*<<< orphan*/ **, unsigned char **,
                         int /*<<< orphan*/ const *, int, int /*<<< orphan*/);
int ASN1_template_i2d(ASN1_VALUE **pval, unsigned char **out,
                      const ASN1_TEMPLATE *tt) {
  return asn1_template_ex_i2d(pval, out, tt, -1, 0);
}


x86 assembly (clang, -O0):
<ASN1_template_i2d>:
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),%rsi
mov    -0x18(%rbp),%rdx
mov    $0xffffffff,%ecx
xor    %r8d,%r8d
call   1030 <asn1_template_ex_i2d@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_template_i2d>:
mov    $0xffffffff,%ecx
xor    %r8d,%r8d
jmp    1030 <asn1_template_ex_i2d@plt>

LLVM IR (-O0):
define i32 @ASN1_template_i2d(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 = load i8**, i8*** %5
%9 = load i32*, i32** %6
%10 = call i32 @asn1_template_ex_i2d(i32** %7, i8** %8, i32* %9, i32 -1, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ASN1_template_i2d(i32** %0, i8** %1, i32* %2) {
%4 = tail call i32 @asn1_template_ex_i2d(i32** %0, i8** %1, i32* %2, i32 -1, i32 0)
ret i32 %4
}
nation_news(name, city) char *name;
int city;
{ ; }


x86 assembly (clang, -O0):
<nation_news>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nation_news(i8* nocapture readnone %0, i32 %1) {
ret i32 undef
}
void XtLastTimestampProcessed() {}


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

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

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

LLVM IR (-O2):
define void @XtLastTimestampProcessed() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_db();
int /*<<< orphan*/ print_footer();
int /*<<< orphan*/ print_header();
int /*<<< orphan*/ print_table_footer();
int /*<<< orphan*/ print_table_header();
int main(int argc, char **argv) {
  print_header();
  print_table_header();
  print_db();
  print_table_footer();
  print_footer();
  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    $0x0,%al
call   1050 <print_header@plt>
mov    $0x0,%al
call   1060 <print_table_header@plt>
mov    $0x0,%al
call   1030 <print_db@plt>
mov    $0x0,%al
call   1070 <print_table_footer@plt>
mov    $0x0,%al
call   1040 <print_footer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <print_header@plt>
xor    %eax,%eax
call   1060 <print_table_header@plt>
xor    %eax,%eax
call   1030 <print_db@plt>
xor    %eax,%eax
call   1070 <print_table_footer@plt>
xor    %eax,%eax
call   1040 <print_footer@plt>
xor    %eax,%eax
pop    %rcx
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 = call i32 (...) @print_header()
%7 = call i32 (...) @print_table_header()
%8 = call i32 (...) @print_db()
%9 = call i32 (...) @print_table_footer()
%10 = call i32 (...) @print_footer()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @print_header()
%4 = tail call i32 (...) @print_table_header()
%5 = tail call i32 (...) @print_db()
%6 = tail call i32 (...) @print_table_footer()
%7 = tail call i32 (...) @print_footer()
ret i32 0
}
int __attribute__((no, noclone)) i(int a) {
  return (2 * a) * (0x7fffffff / 2 + 1);
}


x86 assembly (clang, -O0):
<i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
shl    $0x1e,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i>:
mov    %edi,%eax
shl    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @i(i32 %0) {
%2 = shl i32 %0, 31
ret i32 %2
}
/* Variables and functions */
int SecMain();
int main() {
  int ReturnValue;
  ReturnValue = SecMain();
  return ReturnValue;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SecMain()
ret i32 %1
}
/* Variables and functions */
int linear_search_rec_helper(int *, int /*<<< orphan*/, int, int);
int linear_search_rec(int *arr, int n, int value) {
  return linear_search_rec_helper(arr, 0, n, value);
}


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

x86 assembly (clang, -O2):
<linear_search_rec>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <linear_search_rec_helper@plt>

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

LLVM IR (-O2):
define i32 @linear_search_rec(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @linear_search_rec_helper(i32* %0, i32 0, i32 %1, i32 %2)
ret i32 %4
}
void nseel_asm_stack_pop_fast_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_stack_pop_fast_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void IndentFirstLine(int weekday) {
  int i;
  for (i = 0; i < weekday; i++) {
    printf("   ");
  }
}


x86 assembly (clang, -O0):
<IndentFirstLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <IndentFirstLine+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <IndentFirstLine+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IndentFirstLine>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <IndentFirstLine+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <IndentFirstLine+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c" \00"
define void @IndentFirstLine(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WscMsgQVerifyTimeouts(int);
int WscMsgQRemoveAll(void) {
  WscMsgQVerifyTimeouts(30);
  return 0;
}


x86 assembly (clang, -O0):
<WscMsgQRemoveAll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e,%edi
call   1030 <WscMsgQVerifyTimeouts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<WscMsgQRemoveAll>:
push   %rax
mov    $0x1e,%edi
call   1030 <WscMsgQVerifyTimeouts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @WscMsgQRemoveAll() {
%1 = call i32 @WscMsgQVerifyTimeouts(i32 30)
ret i32 0
}

LLVM IR (-O2):
define i32 @WscMsgQRemoveAll() {
%1 = tail call i32 @WscMsgQVerifyTimeouts(i32 30)
ret i32 0
}
void coprocessor_error() {
  __asm__ __volatile__("cli");
  SetTextColor(0x04 | 0x08, 0x00);
  kprintf("\nERROR: coprocessor_error\n");
  do {
    __asm__ __volatile__("cli  \n\t"
                         "hlt");
  } while (1 == 1);
}


x86 assembly (clang, -O0):
<coprocessor_error>:
push   %rbp
mov    %rsp,%rbp
cli
mov    $0xc,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <SetTextColor@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <kprintf@plt>
cli
hlt
mov    $0x1,%al
test   $0x1,%al
jne    1141 <coprocessor_error+0x21>
jmp    1152 <coprocessor_error+0x32>
pop    %rbp
ret

x86 assembly (clang, -O2):
<coprocessor_error>:
push   %rax
cli
mov    $0xc,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <SetTextColor@plt>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <kprintf@plt>
xchg   %ax,%ax
cli
hlt
jmp    1140 <coprocessor_error+0x20>

LLVM IR (-O0):
@.str = [27 x i8] c"\0AERROR: coprocessor_error\0A\00"
define void @coprocessor_error() {
%1 = call i32 (i32, i32, ...) bitcast (i32 (...)* @SetTextColor to i32 (i32, i32, ...)*)(i32 12, i32 0)
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %4, %0
br label %4
4: ; preds = %3
br i1 true, label %3, label %5
5: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0AERROR: coprocessor_error\0A\00"
define void @coprocessor_error() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @SetTextColor to i32 (i32, i32, ...)*)(i32 12, i32 0)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
tail call void asm sideeffect "cli \0A\09hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void GreeterSayHiTo(int value) { printf("Hello %d from greeter!! \n", value); }


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

x86 assembly (clang, -O2):
<GreeterSayHiTo>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Hello %d from greeter!! \0A\00"
define void @GreeterSayHiTo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Hello %d from greeter!! \0A\00"
define void @GreeterSayHiTo(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
char test17(void) { return '\t'; }


x86 assembly (clang, -O0):
<test17>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test17>:
mov    $0x9,%al
ret

LLVM IR (-O0):
define signext i8 @test17() {
ret i8 9
}

LLVM IR (-O2):
define signext i8 @test17() {
ret i8 9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void myhandler(int signo __attribute__((unused))) {
  printf("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet "
         "returned.\n",
         2);
  exit(1);
}


x86 assembly (clang, -O0):
<myhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<myhandler>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\0A\00"
define void @myhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [79 x i8] c"Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\0A\00"
define void @myhandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void rdu_read_lock(struct rdu *p) {}


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

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

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

LLVM IR (-O2):
%struct.rdu = type opaque
define void @rdu_read_lock(%struct.rdu* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, float);
char *strdup(char *);
char *num_to_string(float f) {
  static char s[40];
  sprintf(s, "%g", f);
  return strdup(s);
}


x86 assembly (clang, -O0):
<num_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0x2f07(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ef4(%rip),%rdi
call   1040 <strdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_to_string>:
push   %rbx
lea    0x2f18(%rip),%rbx
lea    0xed1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strdup@plt>

LLVM IR (-O0):
@num_to_string.s = internal global [40 x i8] zeroinitializer
@.str = [3 x i8] c"%g\00"
define i8* @num_to_string(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @num_to_string.s, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %3)
%5 = call i8* @strdup(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @num_to_string.s, i64 0, i64 0))
ret i8* %5
}

LLVM IR (-O2):
@num_to_string.s = internal global [40 x i8] zeroinitializer
@.str = [3 x i8] c"%g\00"
define noalias i8* @num_to_string(float %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @num_to_string.s, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %0)
%3 = tail call i8* @strdup(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @num_to_string.s, i64 0, i64 0))
ret i8* %3
}