xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_gap(int n, FILE *fp) {
  int i;
  for (i = 1; i <= n; i++) {
    fprintf(fp, "\n");
  }
}


x86 assembly (clang, -O0):
<print_gap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1150 <print_gap+0x40>
mov    -0x10(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <print_gap+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_gap>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1132 <print_gap+0x22>
mov    %rsi,%rbx
mov    %edi,%ebp
nopl   0x0(%rax)
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
add    $0xffffffff,%ebp
jne    1120 <print_gap+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @print_gap(i32 %0, i32* nocapture %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 1, %2 ]
%6 = tail call i32 @fputc(i32 10, i32* %1)
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %5, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
void cygwin_premain1(int argc, char **argv) {}


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

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

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

LLVM IR (-O2):
define void @cygwin_premain1(i32 %0, i8** nocapture %1) {
ret void
}
unsigned int FNV_1a(unsigned int key) {
  unsigned char *bytes = (unsigned char *)&key;
  unsigned int hash = 2166136261U;
  hash = (16777619U * hash) ^ bytes[0];
  hash = (16777619U * hash) ^ bytes[1];
  hash = (16777619U * hash) ^ bytes[2];
  hash = (16777619U * hash) ^ bytes[3];
  return hash;
}


x86 assembly (clang, -O0):
<FNV_1a>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x811c9dc5,-0x14(%rbp)
imul   $0x1000193,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
imul   $0x1000193,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
imul   $0x1000193,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
imul   $0x1000193,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNV_1a>:
mov    %edi,%eax
mov    %edi,%ecx
movzbl %al,%edx
movzbl %ah,%esi
shr    $0x10,%eax
shr    $0x18,%ecx
xor    $0x50c5d1f,%edx
imul   $0x1000193,%edx,%edx
xor    %edx,%esi
imul   $0x1000193,%esi,%edx
movzbl %al,%eax
xor    %edx,%eax
imul   $0x1000193,%eax,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @FNV_1a(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 %0, i32* %2
%5 = bitcast i32* %2 to i8*
store i8* %5, i8** %3
store i32 -2128831035, i32* %4
%6 = load i32, i32* %4
%7 = mul i32 16777619, %6
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = xor i32 %7, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = mul i32 16777619, %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = xor i32 %14, %18
store i32 %19, i32* %4
%20 = load i32, i32* %4
%21 = mul i32 16777619, %20
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 2
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = xor i32 %21, %25
store i32 %26, i32* %4
%27 = load i32, i32* %4
%28 = mul i32 16777619, %27
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i64 3
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = xor i32 %28, %32
store i32 %33, i32* %4
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @FNV_1a(i32 %0) {
%2 = lshr i32 %0, 8
%3 = lshr i32 %0, 16
%4 = lshr i32 %0, 24
%5 = and i32 %0, 255
%6 = xor i32 %5, 84696351
%7 = mul i32 %6, 16777619
%8 = and i32 %2, 255
%9 = xor i32 %7, %8
%10 = mul i32 %9, 16777619
%11 = and i32 %3, 255
%12 = xor i32 %10, %11
%13 = mul i32 %12, 16777619
%14 = xor i32 %13, %4
ret i32 %14
}
void generic_fini(struct mm *mm) {}


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

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

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

LLVM IR (-O2):
%struct.mm = type opaque
define void @generic_fini(%struct.mm* nocapture %0) {
ret void
}
/* Variables and functions */
int access(char *, int /*<<< orphan*/);
int FileProxy_AccessFile(char *filename) { return (access(filename, 0)); }


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

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

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

LLVM IR (-O2):
define i32 @FileProxy_AccessFile(i8* nocapture %0) {
%2 = tail call i32 @access(i8* %0, i32 0)
ret i32 %2
}
void foo040() {}


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

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

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

LLVM IR (-O2):
define void @foo040() {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t _isatty(int32_t fd) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @_isatty(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str[100];
  int i, tam;
  scanf("%s", str);
  if (str[0] == 'a' || str[0] == 'A')
    printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x70(%rbp),%eax
cmp    $0x61,%eax
je     115c <main+0x3c>
movsbl -0x70(%rbp),%eax
cmp    $0x41,%eax
jne    116c <main+0x4c>
lea    -0x70(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%al
and    $0xdf,%al
cmp    $0x41,%al
jne    114b <main+0x2b>
lea    0xebd(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 97
br i1 %10, label %16, label %11
11: ; preds = %0
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 65
br i1 %15, label %16, label %19
16: ; preds = %11, %0
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %16, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = and i8 %4, -33
%6 = icmp eq i8 %5, 65
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %9
9: ; preds = %0, %7
ret i32 0
}
/* Variables and functions */
char *blue_line(int);
void blue_discard(int f) {
  char *line = blue_line(f);
  while (line)
    line = blue_line(f);
}


x86 assembly (clang, -O0):
<blue_discard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <blue_line@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1143 <blue_discard+0x33>
mov    -0x4(%rbp),%edi
call   1030 <blue_line@plt>
mov    %rax,-0x10(%rbp)
jmp    1127 <blue_discard+0x17>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blue_discard>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <blue_line@plt>
test   %rax,%rax
je     112e <blue_discard+0x1e>
mov    %ebx,%edi
jmp    1120 <blue_discard+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @blue_discard(i32 %0) {
%2 = tail call i8* @blue_line(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1, %4
%5 = tail call i8* @blue_line(i32 %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %4
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getenv(int /*<<< orphan*/);
int /*<<< orphan*/ luaL_check_string(int);
int /*<<< orphan*/ lua_pushstring(int /*<<< orphan*/);
void io_getenv(void) { lua_pushstring(getenv(luaL_check_string(1))); }


x86 assembly (clang, -O0):
<io_getenv>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <luaL_check_string@plt>
mov    %eax,%edi
call   1030 <getenv@plt>
mov    %eax,%edi
call   1050 <lua_pushstring@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_getenv>:
push   %rax
mov    $0x1,%edi
call   1040 <luaL_check_string@plt>
mov    %eax,%edi
call   1030 <getenv@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <lua_pushstring@plt>

LLVM IR (-O0):
define void @io_getenv() {
%1 = call i32 @luaL_check_string(i32 1)
%2 = call i32 @getenv(i32 %1)
%3 = call i32 @lua_pushstring(i32 %2)
ret void
}

LLVM IR (-O2):
define void @io_getenv() {
%1 = tail call i32 @luaL_check_string(i32 1)
%2 = tail call i32 @getenv(i32 %1)
%3 = tail call i32 @lua_pushstring(i32 %2)
ret void
}
unsigned int back_extdom_get_timeout(struct nss_ops_ctx *nss_context) {
  return (10 * 1000);
}


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

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

LLVM IR (-O0):
%struct.nss_ops_ctx = type opaque
define i32 @back_extdom_get_timeout(%struct.nss_ops_ctx* %0) {
%2 = alloca %struct.nss_ops_ctx*
store %struct.nss_ops_ctx* %0, %struct.nss_ops_ctx** %2
ret i32 10000
}

LLVM IR (-O2):
%struct.nss_ops_ctx = type opaque
define i32 @back_extdom_get_timeout(%struct.nss_ops_ctx* nocapture readnone %0) {
ret i32 10000
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ width;
};
typedef TYPE_1__ XImage;

/* Variables and functions */
int get_XImage_width(void *_p) { return (int)((XImage *)_p)->width; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XImage_width(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XImage_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void __print_sw_title(char *sw_name) {
  printf(" ----------- [%s] ----------- \n", sw_name);
  printf(" ::. Usage: %s <parameters>\n\n", sw_name);
}


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

x86 assembly (clang, -O2):
<__print_sw_title>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c" ----------- [%s] ----------- \0A\00"
@.str.1 = [30 x i8] c" ::. Usage: %s <parameters>\0A\0A\00"
define void @__print_sw_title(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c" ----------- [%s] ----------- \0A\00"
@.str.1 = [30 x i8] c" ::. Usage: %s <parameters>\0A\0A\00"
define void @__print_sw_title(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void release_file(void *data, unsigned long size __attribute__((unused))) {
  free(data);
}


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

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

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

LLVM IR (-O2):
define void @release_file(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_getaddrinfo(char *, char *);
int main(int argc, char *argv[]) {
  test_getaddrinfo(argv[1], argv[2]);
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <test_getaddrinfo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1030 <test_getaddrinfo@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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @test_getaddrinfo(i8* %8, i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @test_getaddrinfo(i8* %4, i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ import_array();
void rdkit_import_array() { import_array(); }


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

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

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

LLVM IR (-O2):
define void @rdkit_import_array() {
%1 = tail call i32 (...) @import_array()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
scalar_t__ getenv(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t current_time(void) {
  if (getenv("GPSBABEL_FREEZE_TIME")) {
    return 0;
  }
  return time(NULL);
}


x86 assembly (clang, -O0):
<current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
je     114a <current_time+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1156 <current_time+0x36>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<current_time>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1136 <current_time+0x16>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
pop    %rax
jmp    1040 <time@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"GPSBABEL_FREEZE_TIME\00"
define i32 @current_time() {
%1 = alloca i32
%2 = call i64 @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 0, i32* %1
br label %7
5: ; preds = %0
%6 = call i32 @time(i32* null)
store i32 %6, i32* %1
br label %7
7: ; preds = %5, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [21 x i8] c"GPSBABEL_FREEZE_TIME\00"
define i32 @current_time() {
%1 = tail call i64 @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @time(i32* null)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 0, %0 ]
ret i32 %6
}
int reverse(char *str, int start, int end) {
  char tmp;
  while (start < end) {
    tmp = str[start];
    str[start] = str[end];
    str[end] = tmp;
    end--;
    start++;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1163 <reverse+0x63>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x19(%rbp),%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110e <reverse+0xe>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %edx,%esi
jge    1131 <reverse+0x31>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
movzbl -0x1(%rdi,%rax,1),%esi
movzbl (%rdi,%rcx,1),%edx
mov    %dl,-0x1(%rdi,%rax,1)
mov    %sil,(%rdi,%rcx,1)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverse(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %15, %8 ]
%10 = phi i64 [ %6, %5 ], [ %16, %8 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 %9
%14 = load i8, i8* %13
store i8 %14, i8* %11
store i8 %12, i8* %13
%15 = add nsw i64 %9, -1
%16 = add nsw i64 %10, 1
%17 = icmp slt i64 %16, %15
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret i32 undef
}
/* Type definitions */
struct m_rand_t {
  int dummy;
};

/* Variables and functions */
scalar_t__ UINT32_MAX;
float m_rand_next(struct m_rand_t *);
float m_rand_f(struct m_rand_t *rand) {
  return m_rand_next(rand) / (float)UINT32_MAX;
}


x86 assembly (clang, -O0):
<m_rand_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <m_rand_next@plt>
mov    0x2ecc(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_rand_f>:
push   %rax
call   1030 <m_rand_next@plt>
mov    0x2edb(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.m_rand_t = type { i32 }
@UINT32_MAX = global i64 0
define float @m_rand_f(%struct.m_rand_t* %0) {
%2 = alloca %struct.m_rand_t*
store %struct.m_rand_t* %0, %struct.m_rand_t** %2
%3 = load %struct.m_rand_t*, %struct.m_rand_t** %2
%4 = call float @m_rand_next(%struct.m_rand_t* %3)
%5 = load i64, i64* @UINT32_MAX
%6 = sitofp i64 %5 to float
%7 = fdiv float %4, %6
ret float %7
}

LLVM IR (-O2):
%struct.m_rand_t = type { i32 }
@UINT32_MAX = global i64 0
define float @m_rand_f(%struct.m_rand_t* %0) {
%2 = tail call float @m_rand_next(%struct.m_rand_t* %0)
%3 = load i64, i64* @UINT32_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}
void vibro_shutdown() {}


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

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

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

LLVM IR (-O2):
define void @vibro_shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void pexit(const char *str) {
  perror(str);
  exit(EXIT_FAILURE);
}


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

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

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

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @pexit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
void *mandoc_malloc(size_t);
void *hash_alloc(size_t sz, void *arg) { return mandoc_malloc(sz); }


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

x86 assembly (clang, -O2):
<hash_alloc>:
jmp    1030 <mandoc_malloc@plt>

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

LLVM IR (-O2):
define i8* @hash_alloc(i64 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @mandoc_malloc(i64 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ ft_putendl_fd(char const *const, int);
int /*<<< orphan*/ perror(char const *const);
void ft_fatal(char const *const msg, int const flag) {
  if (flag == 0)
    ft_putendl_fd(msg, 2);
  else
    perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<ft_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    115c <ft_fatal+0x2c>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1050 <ft_putendl_fd@plt>
jmp    1165 <ft_fatal+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ft_fatal>:
push   %rax
test   %esi,%esi
je     1144 <ft_fatal+0x14>
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    $0x2,%esi
call   1050 <ft_putendl_fd@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @ft_fatal(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @ft_putendl_fd(i8* %8, i32 2)
br label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @perror(i8* %11)
br label %13
13: ; preds = %10, %7
%14 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @ft_fatal(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @ft_putendl_fd(i8* %0, i32 2)
br label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *strcat(char *, char *);
__attribute__((always_)) char *strcat_utf8(char *Dest, char *Sorc) {
  return strcat(Dest, Sorc);
}


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

x86 assembly (clang, -O2):
<strcat_utf8>:
jmp    1030 <strcat@plt>

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

LLVM IR (-O2):
define i8* @strcat_utf8(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
/* Variables and functions */
int errno;
int get_errno(void) { return (errno); }


x86 assembly (clang, -O0):
<get_errno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_errno>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @get_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @get_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ SaveCheckpoint(char *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void Quit(char *name, int count) {
  SaveCheckpoint(name, count);
  exit(0);
}


x86 assembly (clang, -O0):
<Quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <SaveCheckpoint@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @Quit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @SaveCheckpoint(i8* %5, i32 %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @Quit(i8* %0, i32 %1) {
%3 = tail call i32 @SaveCheckpoint(i8* %0, i32 %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _log_pop();
void _trace_destructor(bool *flag) {
  if (*flag)
    _log_pop();
}


x86 assembly (clang, -O0):
<_trace_destructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1130 <_trace_destructor+0x20>
mov    $0x0,%al
call   1030 <_log_pop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_trace_destructor>:
cmpl   $0x0,(%rdi)
je     111c <_trace_destructor+0xc>
xor    %eax,%eax
jmp    1030 <_log_pop@plt>
ret

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

LLVM IR (-O2):
define void @_trace_destructor(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @_log_pop()
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sljit_free_exec(void *);
void sljit_free_code(void *code, void *exec_allocator_data) {
  (void)exec_allocator_data;
  sljit_free_exec((code));
}


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

x86 assembly (clang, -O2):
<sljit_free_code>:
jmp    1030 <sljit_free_exec@plt>

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

LLVM IR (-O2):
define void @sljit_free_code(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @sljit_free_exec(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_mem(void *, int, uintptr_t, int);
void dump_u8(void *buf, int len, uintptr_t addr) {
  dump_mem(buf, len, addr, 1);
}


x86 assembly (clang, -O0):
<dump_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <dump_mem@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_u8>:
mov    $0x1,%ecx
jmp    1030 <dump_mem@plt>

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

LLVM IR (-O2):
define void @dump_u8(i8* %0, i32 %1, i64 %2) {
%4 = tail call i32 @dump_mem(i8* %0, i32 %1, i64 %2, i32 1)
ret void
}
/* Variables and functions */
unsigned char *hmac_tiger(unsigned char *, unsigned char const *, size_t,
                          unsigned char const *, size_t);
unsigned char *mac_hmac_tiger(unsigned char *out, const unsigned char *key,
                              size_t key_len, const unsigned char *msg,
                              size_t msg_len) {
  return hmac_tiger(out, key, key_len, msg, msg_len);
}


x86 assembly (clang, -O0):
<mac_hmac_tiger>:
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    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <hmac_tiger@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_hmac_tiger>:
jmp    1030 <hmac_tiger@plt>

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

LLVM IR (-O2):
define i8* @mac_hmac_tiger(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @hmac_tiger(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ch;

/* Variables and functions */
void sendfd_payload(char const *, int, int, char *, int);
void sendfd(const char *test, int sockfd, int sendfd) {
  char ch;
  return (sendfd_payload(test, sockfd, sendfd, &ch, sizeof(ch)));
}


x86 assembly (clang, -O0):
<sendfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x11(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <sendfd_payload@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendfd>:
push   %rax
lea    0x7(%rsp),%rcx
mov    $0x1,%r8d
call   1030 <sendfd_payload@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @sendfd(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t ckDynMemPhysicalToLogical(uint32_t address) {
  return address + 0x00100000 - 0x00900000;
}


x86 assembly (clang, -O0):
<ckDynMemPhysicalToLogical>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x100000,%rax
sub    $0x900000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckDynMemPhysicalToLogical>:
lea    -0x800000(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @ckDynMemPhysicalToLogical(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1048576
%5 = sub nsw i64 %4, 9437184
ret i64 %5
}

LLVM IR (-O2):
define i64 @ckDynMemPhysicalToLogical(i64 %0) {
%2 = add nsw i64 %0, -8388608
ret i64 %2
}
int eat_callback(int (*callback)(int, int)) { return callback(5, 2); }


x86 assembly (clang, -O0):
<eat_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5,%edi
mov    $0x2,%esi
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_callback>:
mov    %rdi,%rax
mov    $0x5,%edi
mov    $0x2,%esi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @eat_callback(i32 (i32, i32)* nocapture %0) {
%2 = tail call i32 %0(i32 5, i32 2)
ret i32 %2
}
/* Variables and functions */
int strlen(char *);
char *trunc_dirname(char *dir) {
  char *s = dir + strlen(dir);
  while (s != dir) {
    int c = *s;
    *s = 0;
    if (c == '/')
      break;
    s--;
  }
  return (dir);
}


x86 assembly (clang, -O0):
<trunc_dirname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     117c <trunc_dirname+0x6c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
cmpl   $0x2f,-0x14(%rbp)
jne    116b <trunc_dirname+0x5b>
jmp    117c <trunc_dirname+0x6c>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <trunc_dirname+0x2d>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunc_dirname>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
nopl   0x0(%rax,%rax,1)
test   %rax,%rax
je     1136 <trunc_dirname+0x26>
movzbl (%rbx,%rax,1),%ecx
movb   $0x0,(%rbx,%rax,1)
add    $0xffffffffffffffff,%rax
cmp    $0x2f,%cl
jne    1120 <trunc_dirname+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @trunc_dirname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
store i8* %9, i8** %3
br label %10
10: ; preds = %22, %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = icmp ne i8* %11, %12
br i1 %13, label %14, label %25
14: ; preds = %10
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
store i32 %17, i32* %4
%18 = load i8*, i8** %3
store i8 0, i8* %18
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 47
br i1 %20, label %21, label %22
21: ; preds = %14
br label %25
22: ; preds = %14
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i32 -1
store i8* %24, i8** %3
br label %10
25: ; preds = %21, %10
%26 = load i8*, i8** %2
ret i8* %26
}

LLVM IR (-O2):
define i8* @trunc_dirname(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %8, %1
%6 = phi i8* [ %4, %1 ], [ %11, %8 ]
%7 = icmp eq i8* %6, %0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = load i8, i8* %6
store i8 0, i8* %6
%10 = icmp eq i8 %9, 47
%11 = getelementptr inbounds i8, i8* %6, i64 -1
br i1 %10, label %12, label %5
12: ; preds = %8, %5
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void IPv6head(int osvers, int osrel, int ossub) {
  printf("in: dsc/s hder/s ader/s unkp/s ratim/s rfail/s "
         "out: dsc/s nrt/s_ipv6_");
}


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

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

LLVM IR (-O0):
@.str = [70 x i8] c"in: dsc/s hder/s ader/s unkp/s ratim/s rfail/s out: dsc/s nrt/s_ipv6_\00"
define void @IPv6head(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 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"in: dsc/s hder/s ader/s unkp/s ratim/s rfail/s out: dsc/s nrt/s_ipv6_\00"
define void @IPv6head(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int /*<<< orphan*/ AES_encrypt(unsigned char const *, unsigned char *,
                               int /*<<< orphan*/ *);
int /*<<< orphan*/ AES_set_encrypt_key(unsigned char const *, int,
                                       int /*<<< orphan*/ *);
void aes_block_encrypt(const unsigned char *key, const unsigned char *plain,
                       int blen, unsigned char *cipher) {
  AES_KEY key_ctx;
  AES_set_encrypt_key(key, blen * 8, &key_ctx);
  AES_encrypt(plain, cipher, &key_ctx);
}


x86 assembly (clang, -O0):
<aes_block_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
shl    $0x3,%esi
lea    -0x24(%rbp),%rdx
call   1030 <AES_set_encrypt_key@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%rdx
call   1040 <AES_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_block_encrypt>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r14
mov    %rsi,%rbx
lea    0x0(,%rdx,8),%esi
lea    0xc(%rsp),%r15
mov    %r15,%rdx
call   1030 <AES_set_encrypt_key@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <AES_encrypt@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @aes_block_encrypt(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %7
%12 = mul nsw i32 %11, 8
%13 = call i32 @AES_set_encrypt_key(i8* %10, i32 %12, i32* %9)
%14 = load i8*, i8** %6
%15 = load i8*, i8** %8
%16 = call i32 @AES_encrypt(i8* %14, i8* %15, i32* %9)
ret void
}

LLVM IR (-O2):
define void @aes_block_encrypt(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = shl nsw i32 %2, 3
%8 = call i32 @AES_set_encrypt_key(i8* %0, i32 %7, i32* %5)
%9 = call i32 @AES_encrypt(i8* %1, i8* %3, i32* %5)
ret void
}
void pskb_put(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<pskb_put>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pskb_put>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.pskb_put = [9 x i8] c"pskb_put\00"
define void @pskb_put() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.pskb_put, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.pskb_put = [9 x i8] c"pskb_put\00"
define void @pskb_put() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.pskb_put, i64 0, i64 0))
ret void
}
/* Variables and functions */
float cosh(float);
float f_cosh(float x) { return cosh(x); }


x86 assembly (clang, -O0):
<f_cosh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cosh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_cosh>:
jmp    1030 <cosh@plt>

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

LLVM IR (-O2):
define float @f_cosh(float %0) {
%2 = tail call float @cosh(float %0)
ret float %2
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int n = 0;
  while (getchar() != EOF)
    n++;
  printf("%d\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea4(%rip),%rcx
cmp    (%rcx),%rax
je     115b <main+0x3b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffff,%ebx
mov    0x2eb8(%rip),%r14
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%ebx
cmp    (%r14),%rax
jne    1130 <main+0x10>
lea    0xeba(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add nuw nsw i32 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
void myfunc(char to[], char from[]) {
  int i;
  i = 0;
  while ((to[i] = from[i]) != '\0')
    ++i;
}


x86 assembly (clang, -O0):
<myfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1143 <myfunc+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <myfunc+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfunc>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <myfunc+0x10>
ret

LLVM IR (-O0):
define void @myfunc(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
br label %6
6: ; preds = %18, %2
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 %11, i8* %15
%16 = sext i8 %11 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %6
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @myfunc(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret void
}