xunge/DecIR huggingface dataset:
/* Variables and functions */
int htoi(char *);
int /*<<< orphan*/ printf(char *, int);
main() {
  char s[] = "0xF1F1F1";
  printf("%d\n", htoi(s));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x9(%rbp)
mov    0xecf(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x9(%rbp),%rdi
call   1040 <htoi@plt>
mov    %eax,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x3146314631467830,%rax
31 46 31
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <htoi@plt>
lea    0xec0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [9 x i8] c"0xF1F1F1\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = bitcast [9 x i8]* %1 to i8*
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = call i32 @htoi(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [9 x i8] c"0xF1F1F1\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%3 = call i32 @htoi(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ prebuilt_func_F();
int /*<<< orphan*/ static_func_F();
void F() {
  static_func_F();
  prebuilt_func_F();
}


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

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

LLVM IR (-O0):
define void @F() {
%1 = call i32 (...) @static_func_F()
%2 = call i32 (...) @prebuilt_func_F()
ret void
}

LLVM IR (-O2):
define void @F() {
%1 = tail call i32 (...) @static_func_F()
%2 = tail call i32 (...) @prebuilt_func_F()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int iClamp(const int value, const int min, const int max) {
  assert(min <= max);
  if (value < min) {
    return min;
  }
  if (value > max) {
    return max;
  }
  return value;
}


x86 assembly (clang, -O0):
<iClamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114b <iClamp+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <iClamp+0x58>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1162 <iClamp+0x52>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <iClamp+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iClamp>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %edi,%edi
cmp    %edx,%esi
setle  %dil
call   1030 <assert@plt>
cmp    %ebx,%ebp
cmovle %ebp,%ebx
cmp    %r14d,%ebp
cmovl  %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @iClamp(i32 %0, i32 %1, i32 %2) {
%4 = icmp sle i32 %1, %2
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp slt i32 %0, %1
%8 = icmp sgt i32 %0, %2
%9 = select i1 %8, i32 %2, i32 %0
%10 = select i1 %7, i32 %1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ bwb_getvarname(char *, char *, int *);
int exp_getvfname(char *source, char *destination) {
  int position = 0;
  bwb_getvarname(source, destination, &position);
  return -1;
}


x86 assembly (clang, -O0):
<exp_getvfname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <bwb_getvarname@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_getvfname>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <bwb_getvarname@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @exp_getvfname(i8* %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @bwb_getvarname(i8* %0, i8* %1, i32* %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void foo(void) {
  int a;
  printf("%d\n", a);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @foo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
ret void
}
/* Type definitions */
struct servent {
  int dummy;
};

/* Variables and functions */
struct servent *getservbyname(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
struct servent *getservbyport(int port, char *proto) {
  char buf[32];
  snprintf(buf, sizeof buf, "%d", port);
  return getservbyname(buf, proto);
}


x86 assembly (clang, -O0):
<getservbyport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x20,%esi
lea    0xebe(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <getservbyname@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getservbyport>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %edi,%ecx
lea    0xecd(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <getservbyname@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.servent = type { i32 }
@.str = [3 x i8] c"%d\00"
define %struct.servent* @getservbyport(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [32 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = call i32 @snprintf(i8* %6, i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = call %struct.servent* @getservbyname(i8* %9, i8* %10)
ret %struct.servent* %11
}

LLVM IR (-O2):
%struct.servent = type { i32 }
@.str = [3 x i8] c"%d\00"
define %struct.servent* @getservbyport(i32 %0, i8* %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = call %struct.servent* @getservbyname(i8* %4, i8* %1)
ret %struct.servent* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int print_insn_powerpc(unsigned long insn, unsigned long memaddr) {
  printf("%.8lx", insn);
  return 0;
}


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

x86 assembly (clang, -O2):
<print_insn_powerpc>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.8lx\00"
define i32 @print_insn_powerpc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.8lx\00"
define i32 @print_insn_powerpc(i64 %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_case(int);
void op_upcase() { set_case(1); }


x86 assembly (clang, -O0):
<op_upcase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <set_case@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_upcase>:
mov    $0x1,%edi
jmp    1030 <set_case@plt>

LLVM IR (-O0):
define void @op_upcase() {
%1 = call i32 @set_case(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_upcase() {
%1 = tail call i32 @set_case(i32 1)
ret void
}
struct bwb_line *bwb_LSET(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  return dio_lrset(l, 0);
}


x86 assembly (clang, -O0):
<bwb_LSET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <bwx_DEBUG@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <dio_lrset@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_LSET>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <bwx_DEBUG@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <dio_lrset@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_LSET = [9 x i8] c"bwb_LSET\00"
define %struct.bwb_line* @bwb_LSET(%struct.bwb_line* %0) {
%2 = alloca %struct.bwb_line*
store %struct.bwb_line* %0, %struct.bwb_line** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.bwb_LSET, i64 0, i64 0))
%4 = load %struct.bwb_line*, %struct.bwb_line** %2
%5 = call i32 (%struct.bwb_line*, i32, ...) bitcast (i32 (...)* @dio_lrset to i32 (%struct.bwb_line*, i32, ...)*)(%struct.bwb_line* %4, i32 0)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.bwb_line*
ret %struct.bwb_line* %7
}

LLVM IR (-O2):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_LSET = [9 x i8] c"bwb_LSET\00"
define %struct.bwb_line* @bwb_LSET(%struct.bwb_line* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.bwb_LSET, i64 0, i64 0))
%3 = tail call i32 (%struct.bwb_line*, i32, ...) bitcast (i32 (...)* @dio_lrset to i32 (%struct.bwb_line*, i32, ...)*)(%struct.bwb_line* %0, i32 0)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.bwb_line*
ret %struct.bwb_line* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_22() {
  Assert_real((isqrt(22) == 4),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              115, ("Integer square root of 22 should be 4"));
}


x86 assembly (clang, -O0):
<t_sqrt_22>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
call   1030 <isqrt@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x73,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_22>:
push   %rax
mov    $0x16,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x73,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 22 should be 4\00"
define void @t_sqrt_22() {
%1 = call i32 @isqrt(i32 22)
%2 = icmp eq i32 %1, 4
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 22 should be 4\00"
define void @t_sqrt_22() {
%1 = tail call i32 @isqrt(i32 22)
%2 = icmp eq i32 %1, 4
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
char *cvspath(char const *, char const *, int);
int /*<<< orphan*/ free(char *);
char *atticpath(const char *prefix, const char *file) {
  char *path;
  path = cvspath(prefix, file, 0);
  if (access(path, F_OK) != 0) {
    free(path);
    path = cvspath(prefix, file, 1);
  }
  return (path);
}


x86 assembly (clang, -O0):
<atticpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1050 <cvspath@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
call   1040 <access@plt>
cmp    $0x0,%rax
je     118e <atticpath+0x5e>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1050 <cvspath@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atticpath>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edx,%edx
call   1050 <cvspath@plt>
mov    %rax,%rbx
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <access@plt>
test   %rax,%rax
je     1178 <atticpath+0x48>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <cvspath@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i8* @atticpath(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @cvspath(i8* %6, i8* %7, i32 0)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i32, i32* @F_OK
%11 = call i64 @access(i8* %9, i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = call i32 @free(i8* %14)
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = call i8* @cvspath(i8* %16, i8* %17, i32 1)
store i8* %18, i8** %5
br label %19
19: ; preds = %13, %2
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
@F_OK = global i32 0
define i8* @atticpath(i8* %0, i8* %1) {
%3 = tail call i8* @cvspath(i8* %0, i8* %1, i32 0)
%4 = load i32, i32* @F_OK
%5 = tail call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 @free(i8* %3)
%9 = tail call i8* @cvspath(i8* %0, i8* %1, i32 1)
br label %10
10: ; preds = %7, %2
%11 = phi i8* [ %9, %7 ], [ %3, %2 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_version() {
  printf("The Sleuth Kit ver %s\n", 0);
  return;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"The Sleuth Kit ver %s\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"The Sleuth Kit ver %s\0A\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, unsigned int const);
void _free(void *ptr) {
  unsigned *p = ptr;
  const unsigned len = *(--p);
  ;
  munmap((void *)p, len);
}


x86 assembly (clang, -O0):
<_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
mov    -0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <munmap@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_free>:
mov    -0x4(%rdi),%esi
add    $0xfffffffffffffffc,%rdi
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @_free(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -4
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @munmap(i8* %2, i32 %4)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t is_num(char c) { return ((c >= '0') && (c <= '9')); }


x86 assembly (clang, -O0):
<is_num>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <is_num+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_num>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_num(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int HalCC2430RadioP$StdOut$print(const char *str) {
  int result;
  result = StdOutM$StdOut$print(str);
  return result;
}


x86 assembly (clang, -O0):
<HalCC2430RadioP$StdOut$print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <StdOutM$StdOut$print@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HalCC2430RadioP$StdOut$print>:
xor    %eax,%eax
jmp    1030 <StdOutM$StdOut$print@plt>

LLVM IR (-O0):
define i32 @"HalCC2430RadioP$StdOut$print"(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @"StdOutM$StdOut$print" to i32 (i8*, ...)*)(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @"HalCC2430RadioP$StdOut$print"(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @"StdOutM$StdOut$print" to i32 (i8*, ...)*)(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
char fn_test2(int ia) {
  printf("fn_test2: %d\n", ia);
  return 'B';
}


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

x86 assembly (clang, -O2):
<fn_test2>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x42,%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"fn_test2: %d\0A\00"
define signext i8 @fn_test2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8 66
}

LLVM IR (-O2):
@.str = [14 x i8] c"fn_test2: %d\0A\00"
define signext i8 @fn_test2(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8 66
}
void ballisticTrajectory(double lX, double lY, double dX, double dY) {}


x86 assembly (clang, -O0):
<ballisticTrajectory>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ballisticTrajectory(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
ret void
}

LLVM IR (-O2):
define void @ballisticTrajectory(double %0, double %1, double %2, double %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("  -r x    Repeat send and receive x times (default: 1)\r\n");
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c" -r x Repeat send and receive x times (default: 1)\0D\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [56 x i8] c" -r x Repeat send and receive x times (default: 1)\0D\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, size_t, int, int /*<<< orphan*/ *);
void flush_buffer(FILE *f, char *buffer, size_t *buf_idx_ptr) {
  fwrite(buffer, *buf_idx_ptr, 1, f);
  *buf_idx_ptr = 0;
}


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

x86 assembly (clang, -O2):
<flush_buffer>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%rax
mov    %rdi,%rcx
mov    (%rdx),%rsi
mov    %rax,%rdi
mov    $0x1,%edx
call   1030 <fwrite@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @flush_buffer(i32* nocapture %0, i8* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = tail call i32 @fwrite(i8* %1, i64 %4, i32 1, i32* %0)
store i64 0, i64* %2
ret void
}
long double ll_to_ld(long long n) { return n; }


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

x86 assembly (clang, -O2):
<ll_to_ld>:
mov    %rdi,-0x8(%rsp)
fildll -0x8(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @ll_to_ld(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @ll_to_ld(i64 %0) {
%2 = sitofp i64 %0 to x86_fp80
ret x86_fp80 %2
}
/* Variables and functions */
int get_multiplicity(double **, double **, int const *, int const, double const,
                     double const);
int spgat_get_multiplicity(double lattice[3][3], double position[][3],
                           const int types[], const int num_atom,
                           const double symprec, const double angle_tolerance) {
  return get_multiplicity(lattice, position, types, num_atom, symprec,
                          angle_tolerance);
}


x86 assembly (clang, -O0):
<spgat_get_multiplicity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1030 <get_multiplicity@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spgat_get_multiplicity>:
jmp    1030 <get_multiplicity@plt>

LLVM IR (-O0):
define i32 @spgat_get_multiplicity([3 x double]* %0, [3 x double]* %1, i32* %2, i32 %3, double %4, double %5) {
%7 = alloca [3 x double]*
%8 = alloca [3 x double]*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca double
%12 = alloca double
store [3 x double]* %0, [3 x double]** %7
store [3 x double]* %1, [3 x double]** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store double %4, double* %11
store double %5, double* %12
%13 = load [3 x double]*, [3 x double]** %7
%14 = bitcast [3 x double]* %13 to double**
%15 = load [3 x double]*, [3 x double]** %8
%16 = bitcast [3 x double]* %15 to double**
%17 = load i32*, i32** %9
%18 = load i32, i32* %10
%19 = load double, double* %11
%20 = load double, double* %12
%21 = call i32 @get_multiplicity(double** %14, double** %16, i32* %17, i32 %18, double %19, double %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @spgat_get_multiplicity([3 x double]* %0, [3 x double]* %1, i32* %2, i32 %3, double %4, double %5) {
%7 = bitcast [3 x double]* %0 to double**
%8 = bitcast [3 x double]* %1 to double**
%9 = tail call i32 @get_multiplicity(double** %7, double** %8, i32* %2, i32 %3, double %4, double %5)
ret i32 %9
}
/* Variables and functions */
void *realloc(void *, unsigned int);
void *yajl_internal_realloc(void *ctx, void *previous, unsigned int sz) {
  return realloc(previous, sz);
}


x86 assembly (clang, -O0):
<yajl_internal_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <realloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yajl_internal_realloc>:
mov    %rsi,%rdi
mov    %edx,%esi
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define i8* @yajl_internal_realloc(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i8* @realloc(i8* %1, i32 %2)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ cc_uci_system_shell(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
int32_t cc_uci_pppoe_set(char *username, char *passwd) {
  char comm[64];
  snprintf(comm, 64, "/etc/network_event.sh pppoe %s %s", username, passwd);
  return cc_uci_system_shell(comm);
}


x86 assembly (clang, -O0):
<cc_uci_pppoe_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    $0x40,%esi
lea    0xeb8(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x50(%rbp),%rdi
call   1040 <cc_uci_system_shell@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_uci_pppoe_set>:
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <cc_uci_system_shell@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"/etc/network_event.sh pppoe %s %s\00"
define i32 @cc_uci_pppoe_set(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [64 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @snprintf(i8* %6, i32 64, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%11 = call i32 @cc_uci_system_shell(i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [34 x i8] c"/etc/network_event.sh pppoe %s %s\00"
define i32 @cc_uci_pppoe_set(i8* %0, i8* %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 64, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @cc_uci_system_shell(i8* %4)
ret i32 %6
}
void foo134(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo134(i32 %0) {
ret void
}
/* Variables and functions */
int ftruncate(int const, int /*<<< orphan*/);
int truncate(char const *, int /*<<< orphan*/);
void stress_dir_truncate(const char *path, const int dir_fd) {
  int ret;
  if (dir_fd >= 0) {
    ret = ftruncate(dir_fd, 0);
    (void)ret;
  }
  ret = truncate(path, 0);
  (void)ret;
}


x86 assembly (clang, -O0):
<stress_dir_truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1146 <stress_dir_truncate+0x26>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1030 <ftruncate@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <truncate@plt>
mov    %eax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_dir_truncate>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
js     1131 <stress_dir_truncate+0x11>
mov    %esi,%edi
xor    %esi,%esi
call   1030 <ftruncate@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <truncate@plt>

LLVM IR (-O0):
define void @stress_dir_truncate(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 = icmp sge i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @ftruncate(i32 %9, i32 0)
store i32 %10, i32* %5
%11 = load i32, i32* %5
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %3
%14 = call i32 @truncate(i8* %13, i32 0)
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret void
}

LLVM IR (-O2):
define void @stress_dir_truncate(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @ftruncate(i32 %1, i32 0)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @truncate(i8* %0, i32 0)
ret void
}
/* Type definitions */
struct man {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ man_mparse(struct man const *);
int /*<<< orphan*/ mparse_getkeep(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void man_man(void *arg, const struct man *man) {
  fputs(mparse_getkeep(man_mparse(man)), stdout);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<man_man>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <man_mparse@plt>
mov    %eax,%edi
call   1050 <mparse_getkeep@plt>
mov    %eax,%edi
mov    0x2e77(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<man_man>:
push   %rbx
mov    %rsi,%rdi
call   1040 <man_mparse@plt>
mov    %eax,%edi
call   1050 <mparse_getkeep@plt>
mov    0x2e89(%rip),%rbx
mov    (%rbx),%esi
mov    %eax,%edi
call   1030 <fputs@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1060 <fflush@plt>

LLVM IR (-O0):
%struct.man = type { i32 }
@stdout = global i32 0
define void @man_man(i8* %0, %struct.man* %1) {
%3 = alloca i8*
%4 = alloca %struct.man*
store i8* %0, i8** %3
store %struct.man* %1, %struct.man** %4
%5 = load %struct.man*, %struct.man** %4
%6 = call i32 @man_mparse(%struct.man* %5)
%7 = call i32 @mparse_getkeep(i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i32 %7, i32 %8)
%10 = load i32, i32* @stdout
%11 = call i32 @fflush(i32 %10)
ret void
}

LLVM IR (-O2):
%struct.man = type { i32 }
@stdout = global i32 0
define void @man_man(i8* nocapture readnone %0, %struct.man* %1) {
%3 = tail call i32 @man_mparse(%struct.man* %1)
%4 = tail call i32 @mparse_getkeep(i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i32 %4, i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fflush(i32 %7)
ret void
}
/* Variables and functions */
int chop_recursive(int, int *, int /*<<< orphan*/, size_t);
int chop(int target, int *array, size_t size) {
  return chop_recursive(target, array, 0, size - 1);
}


x86 assembly (clang, -O0):
<chop>:
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),%rcx
sub    $0x1,%rcx
xor    %edx,%edx
call   1030 <chop_recursive@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chop>:
lea    -0x1(%rdx),%rcx
xor    %edx,%edx
jmp    1030 <chop_recursive@plt>

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

LLVM IR (-O2):
define i32 @chop(i32 %0, i32* %1, i64 %2) {
%4 = add i64 %2, -1
%5 = tail call i32 @chop_recursive(i32 %0, i32* %1, i32 0, i64 %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long fsize(FILE *f) {
  long size;
  long temp = ftell(f);
  fseek(f, 0, SEEK_END);
  size = ftell(f);
  fseek(f, temp, SEEK_SET);
  return size;
}


x86 assembly (clang, -O0):
<fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %4
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %3
%12 = load i32*, i32** %2
%13 = load i64, i64* %4
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void sniffer_trace(char *message) {
  printf("\n  %s", message);
  fflush(stdout);
}


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

x86 assembly (clang, -O2):
<sniffer_trace>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0A %s\00"
@stdout = global i32 0
define void @sniffer_trace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A %s\00"
@stdout = global i32 0
define void @sniffer_trace(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
size_t wcsrtombs(char *, int /*<<< orphan*/ const **, size_t,
                 int /*<<< orphan*/ *);
size_t wcsrtombs_l(char *__restrict s, const wchar_t **__restrict pwcs,
                   size_t n, mbstate_t *__restrict ps, locale_t loc) {
  return wcsrtombs(s, pwcs, n, ps);
}


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

x86 assembly (clang, -O2):
<wcsrtombs_l>:
jmp    1030 <wcsrtombs@plt>

LLVM IR (-O0):
define i64 @wcsrtombs_l(i8* noalias %0, i32** noalias %1, i64 %2, i32* noalias %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32**
%8 = alloca i64
%9 = alloca i32*
%10 = alloca i32
store i8* %0, i8** %6
store i32** %1, i32*** %7
store i64 %2, i64* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32**, i32*** %7
%13 = load i64, i64* %8
%14 = load i32*, i32** %9
%15 = call i64 @wcsrtombs(i8* %11, i32** %12, i64 %13, i32* %14)
ret i64 %15
}

LLVM IR (-O2):
define i64 @wcsrtombs_l(i8* noalias %0, i32** noalias %1, i64 %2, i32* noalias %3, i32 %4) {
%6 = tail call i64 @wcsrtombs(i8* %0, i32** %1, i64 %2, i32* %3)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int pause(void) {
  fprintf(stderr, " pause() function not available \n");
  return -1;
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c" pause() function not available \0A\00"
define i32 @pause() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c" pause() function not available \0A\00"
define i32 @pause() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
double B1(double t) {
  double tmp = 1.0 - t;
  return 3 * t * tmp * tmp;
}


x86 assembly (clang, -O0):
<B1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xedd(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<B1>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @B1(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double 1.000000e+00, %4
store double %5, double* %3
%6 = load double, double* %2
%7 = fmul double 3.000000e+00, %6
%8 = load double, double* %3
%9 = fmul double %7, %8
%10 = load double, double* %3
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @B1(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fmul double %0, 3.000000e+00
%4 = fmul double %3, %2
%5 = fmul double %2, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int fls(int /*<<< orphan*/);
__attribute__((const)) int __ilog2_u32(uint32_t n) { return fls(n) - 1; }


x86 assembly (clang, -O0):
<__ilog2_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fls@plt>
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ilog2_u32>:
push   %rax
call   1030 <fls@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @__ilog2_u32(i32 %0) {
%2 = tail call i32 @fls(i32 %0)
%3 = add nsw i32 %2, -1
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rotr(int, int);
uint32_t S0(uint32_t x) { return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); }


x86 assembly (clang, -O0):
<S0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <rotr@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xd,%esi
call   1030 <rotr@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x16,%esi
call   1030 <rotr@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S0>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x2,%esi
call   1030 <rotr@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0xd,%esi
call   1030 <rotr@plt>
mov    %eax,%ebp
xor    %r14d,%ebp
mov    %ebx,%edi
mov    $0x16,%esi
call   1030 <rotr@plt>
xor    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @S0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotr(i32 %3, i32 2)
%5 = load i32, i32* %2
%6 = call i32 @rotr(i32 %5, i32 13)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = call i32 @rotr(i32 %8, i32 22)
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @S0(i32 %0) {
%2 = tail call i32 @rotr(i32 %0, i32 2)
%3 = tail call i32 @rotr(i32 %0, i32 13)
%4 = xor i32 %3, %2
%5 = tail call i32 @rotr(i32 %0, i32 22)
%6 = xor i32 %4, %5
ret i32 %6
}
int multiplier(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @multiplier() {
ret i32 2
}

LLVM IR (-O2):
define i32 @multiplier() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, size_t);
void rtv_to_buf_len(unsigned char **pp, unsigned char *b, size_t l) {
  unsigned char *p;
  p = *pp;
  memcpy(b, p, l);
  p += l;
  *pp = p;
}


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

x86 assembly (clang, -O2):
<rtv_to_buf_len>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%r15
mov    (%rdi),%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,(%r15)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @rtv_to_buf_len(i8** %0, i8* %1, i64 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
store i8* %9, i8** %7
%10 = load i8*, i8** %5
%11 = load i8*, i8** %7
%12 = load i64, i64* %6
%13 = call i32 @memcpy(i8* %10, i8* %11, i64 %12)
%14 = load i64, i64* %6
%15 = load i8*, i8** %7
%16 = getelementptr inbounds i8, i8* %15, i64 %14
store i8* %16, i8** %7
%17 = load i8*, i8** %7
%18 = load i8**, i8*** %4
store i8* %17, i8** %18
ret void
}

LLVM IR (-O2):
define void @rtv_to_buf_len(i8** nocapture %0, i8* %1, i64 %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @memcpy(i8* %1, i8* %4, i64 %2)
%6 = getelementptr inbounds i8, i8* %4, i64 %2
store i8* %6, i8** %0
ret void
}