xunge/DecIR huggingface dataset:
/* Variables and functions */
char *getpass(char *);
char *stralloc(char *);
int strlen(char *);
char *pw_input(void) {
  char *cp = getpass("");
  int i = strlen(cp);
  char *acp = stralloc(cp);
  while (i)
    cp[i--] = 0;
  return acp;
}


x86 assembly (clang, -O0):
<pw_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1050 <getpass@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <stralloc@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1186 <pw_input+0x56>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0xffffffff,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1161 <pw_input+0x31>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pw_input>:
push   %r15
push   %r14
push   %rbx
lea    0xeb4(%rip),%rdi
call   1060 <getpass@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1030 <stralloc@plt>
mov    %rax,%r14
test   %r15d,%r15d
je     1189 <pw_input+0x49>
movslq %r15d,%rax
lea    -0x1(%r15),%ecx
sub    %rcx,%rax
add    %rax,%rbx
mov    %r15d,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @pw_input() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i8*
%4 = call i8* @getpass(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %2
%7 = load i8*, i8** %1
%8 = call i8* @stralloc(i8* %7)
store i8* %8, i8** %3
br label %9
9: ; preds = %12, %0
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i8*, i8** %1
%14 = load i32, i32* %2
%15 = add nsw i32 %14, -1
store i32 %15, i32* %2
%16 = sext i32 %14 to i64
%17 = getelementptr inbounds i8, i8* %13, i64 %16
store i8 0, i8* %17
br label %9
18: ; preds = %9
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @pw_input() {
%1 = tail call i8* @getpass(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @strlen(i8* %1)
%3 = tail call i8* @stralloc(i8* %1)
%4 = icmp eq i32 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %0
%6 = sext i32 %2 to i64
%7 = add i32 %2, -1
%8 = zext i32 %7 to i64
%9 = sub nsw i64 %6, %8
%10 = getelementptr i8, i8* %1, i64 %9
%11 = zext i32 %2 to i64
br label %12
12: ; preds = %5, %0
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ cribleEratosthene(int);
int /*<<< orphan*/ printf(char *, ...);
void primeNumber(int n) {
  printf("Prime numbers (https://oeis.org/A000040) less than %d\n", n);
  printf("A number n is prime if it is greater than 1 and has no positive "
         "divisors except 1 and n.\n");
  cribleEratosthene(n);
}


x86 assembly (clang, -O0):
<primeNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <cribleEratosthene@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primeNumber>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <cribleEratosthene@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Prime numbers (https://oeis.org/A000040) less than %d\0A\00"
@.str.1 = [90 x i8] c"A number n is prime if it is greater than 1 and has no positive divisors except 1 and n.\0A\00"
define void @primeNumber(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @cribleEratosthene(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Prime numbers (https://oeis.org/A000040) less than %d\0A\00"
@str = [89 x i8] c"A number n is prime if it is greater than 1 and has no positive divisors except 1 and n.\00"
define void @primeNumber(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @cribleEratosthene(i32 %0)
ret void
}
/* Variables and functions */
bool nrf52_errata_154(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf52_errata_154() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf52_errata_154() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_error(char *);
void out_of_memory() { set_error("OUT OF MEMORY"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"OUT OF MEMORY\00"
define void @out_of_memory() {
%1 = call i32 @set_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"OUT OF MEMORY\00"
define void @out_of_memory() {
%1 = tail call i32 @set_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rangeIntersection(int, int, int, int);
int positiveRangeIntersection(int start1, int end1, int start2, int end2) {
  int ret = rangeIntersection(start1, end1, start2, end2);
  if (ret < 0)
    ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<positiveRangeIntersection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <rangeIntersection@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1149 <positiveRangeIntersection+0x39>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @positiveRangeIntersection(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @rangeIntersection(i32 %0, i32 %1, i32 %2, i32 %3)
%6 = icmp sgt i32 %5, 0
%7 = select i1 %6, i32 %5, i32 0
ret i32 %7
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int INT_MIN;
int32_t pn_decode_sign_rotated_value(uint32_t value) {
  if ((value & 1) == 0) {
    return value >> 1;
  }
  if (value != 1) {
    return -(value >> 1);
  } else {
    return INT_MIN;
  }
}


x86 assembly (clang, -O0):
<pn_decode_sign_rotated_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1124 <pn_decode_sign_rotated_value+0x24>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <pn_decode_sign_rotated_value+0x4c>
cmpl   $0x1,-0x8(%rbp)
je     1140 <pn_decode_sign_rotated_value+0x40>
mov    -0x8(%rbp),%ecx
sar    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <pn_decode_sign_rotated_value+0x4c>
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pn_decode_sign_rotated_value>:
mov    %edi,%eax
test   $0x1,%al
jne    1109 <pn_decode_sign_rotated_value+0x9>
sar    %eax
ret
cmp    $0x1,%eax
jne    1118 <pn_decode_sign_rotated_value+0x18>
mov    0x2ed3(%rip),%rax
mov    (%rax),%eax
ret
sar    %eax
neg    %eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @pn_decode_sign_rotated_value(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = ashr i32 %8, 1
store i32 %9, i32* %2
br label %19
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 1
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = ashr i32 %14, 1
%16 = sub nsw i32 0, %15
store i32 %16, i32* %2
br label %19
17: ; preds = %10
%18 = load i32, i32* @INT_MIN
store i32 %18, i32* %2
br label %19
19: ; preds = %17, %13, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @pn_decode_sign_rotated_value(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = ashr i32 %0, 1
br label %13
6: ; preds = %1
%7 = icmp eq i32 %0, 1
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = ashr i32 %0, 1
%10 = sub nsw i32 0, %9
br label %13
11: ; preds = %6
%12 = load i32, i32* @INT_MIN
br label %13
13: ; preds = %11, %8, %4
%14 = phi i32 [ %5, %4 ], [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
void document_close_stream(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void document_close(void) { return document_close_stream(stdout); }


x86 assembly (clang, -O0):
<document_close>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <document_close_stream@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<document_close>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <document_close_stream@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @document_close() {
%1 = load i32, i32* @stdout
tail call void @document_close_stream(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdin;
void uninitvar_fgets(void) {
  FILE *fp;
  char buf[10];
  char *str;
  int n;
  fgets(buf, 10, stdin);
  fgets(str, 10, stdin);
  fgets(buf, 10, fp);
  fgets(buf, n, stdin);
}


x86 assembly (clang, -O0):
<uninitvar_fgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x12(%rbp),%rdi
mov    0x2ec5(%rip),%rax
mov    (%rax),%rdx
mov    $0xa,%esi
call   1030 <fgets@plt>
mov    -0x20(%rbp),%rdi
mov    0x2ead(%rip),%rax
mov    (%rax),%rdx
mov    $0xa,%esi
call   1030 <fgets@plt>
lea    -0x12(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0xa,%esi
call   1030 <fgets@plt>
lea    -0x12(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    0x2e80(%rip),%rax
mov    (%rax),%rdx
call   1030 <fgets@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_fgets>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    0x2eca(%rip),%r14
mov    (%r14),%rdx
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <fgets@plt>
mov    (%r14),%rdx
mov    $0xa,%esi
call   1030 <fgets@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <fgets@plt>
mov    (%r14),%rdx
mov    %rbx,%rdi
call   1030 <fgets@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32* null
define void @uninitvar_fgets() {
%1 = alloca i32*
%2 = alloca [10 x i8]
%3 = alloca i8*
%4 = alloca i32
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = load i32*, i32** @stdin
%7 = call i32 @fgets(i8* %5, i32 10, i32* %6)
%8 = load i8*, i8** %3
%9 = load i32*, i32** @stdin
%10 = call i32 @fgets(i8* %8, i32 10, i32* %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%12 = load i32*, i32** %1
%13 = call i32 @fgets(i8* %11, i32 10, i32* %12)
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%15 = load i32, i32* %4
%16 = load i32*, i32** @stdin
%17 = call i32 @fgets(i8* %14, i32 %15, i32* %16)
ret void
}

LLVM IR (-O2):
@stdin = global i32* null
define void @uninitvar_fgets() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = load i32*, i32** @stdin
%4 = call i32 @fgets(i8* %2, i32 10, i32* %3)
%5 = load i32*, i32** @stdin
%6 = call i32 @fgets(i8* undef, i32 10, i32* %5)
%7 = call i32 @fgets(i8* %2, i32 10, i32* undef)
%8 = load i32*, i32** @stdin
%9 = call i32 @fgets(i8* %2, i32 undef, i32* %8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int /*<<< orphan*/ *do_b2i(unsigned char const **, long, int);
EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length) {
  return do_b2i(in, length, 1);
}


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

x86 assembly (clang, -O2):
<b2i_PublicKey>:
mov    $0x1,%edx
jmp    1030 <do_b2i@plt>

LLVM IR (-O0):
define i32* @b2i_PublicKey(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 = load i64, i64* %4
%7 = call i32* @do_b2i(i8** %5, i64 %6, i32 1)
ret i32* %7
}

LLVM IR (-O2):
define i32* @b2i_PublicKey(i8** %0, i64 %1) {
%3 = tail call i32* @do_b2i(i8** %0, i64 %1, i32 1)
ret i32* %3
}
/* Variables and functions */
int strlen(char *);
void strcatchar(char *str, char c) {
  int len = strlen(str);
  str[len++] = c;
  str[len] = '\0';
}


x86 assembly (clang, -O0):
<strcatchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x10(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcatchar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
mov    %bpl,(%rbx,%rax,1)
movb   $0x0,0x1(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @strcatchar(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8, i8* %4
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
store i32 %11, i32* %5
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
store i8 %8, i8* %13
%14 = load i8*, i8** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
ret void
}

LLVM IR (-O2):
define void @strcatchar(i8* %0, i8 signext %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, 1
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %1, i8* %6
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %8
ret void
}
/* Type definitions */
struct RNAdistance_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
RNAdistance_cmdline_parser_release(struct RNAdistance_args_info *);
void RNAdistance_cmdline_parser_free(struct RNAdistance_args_info *args_info) {
  RNAdistance_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<RNAdistance_cmdline_parser_free>:
jmp    1030 <RNAdistance_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.RNAdistance_args_info = type { i32 }
define void @RNAdistance_cmdline_parser_free(%struct.RNAdistance_args_info* %0) {
%2 = alloca %struct.RNAdistance_args_info*
store %struct.RNAdistance_args_info* %0, %struct.RNAdistance_args_info** %2
%3 = load %struct.RNAdistance_args_info*, %struct.RNAdistance_args_info** %2
%4 = call i32 @RNAdistance_cmdline_parser_release(%struct.RNAdistance_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.RNAdistance_args_info = type { i32 }
define void @RNAdistance_cmdline_parser_free(%struct.RNAdistance_args_info* %0) {
%2 = tail call i32 @RNAdistance_cmdline_parser_release(%struct.RNAdistance_args_info* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void vfatal(const char *fmt, va_list ap) {
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<vfatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vfprintf@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<vfatal>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ea3(%rip),%rbx
mov    (%rbx),%edi
call   1040 <vfprintf@plt>
mov    (%rbx),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@EXIT_FAILURE = global i32 0
define void @vfatal(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@EXIT_FAILURE = global i32 0
define void @vfatal(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
/* Variables and functions */
int rom_present(char *);
int gd5446_stb_available(void) {
  return rom_present(L"roms/video/cirruslogic/stb nitro64v.BIN");
}


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

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

LLVM IR (-O0):
@.str = [40 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 99, i32 105, i32 114, i32 114, i32 117, i32 115, i32 108, i32 111, i32 103, i32 105, i32 99, i32 47, i32 115, i32 116, i32 98, i32 32, i32 110, i32 105, i32 116, i32 114, i32 111, i32 54, i32 52, i32 118, i32 46, i32 66, i32 73, i32 78, i32 0]
define i32 @gd5446_stb_available() {
%1 = call i32 @rom_present(i8* bitcast ([40 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [40 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 99, i32 105, i32 114, i32 114, i32 117, i32 115, i32 108, i32 111, i32 103, i32 105, i32 99, i32 47, i32 115, i32 116, i32 98, i32 32, i32 110, i32 105, i32 116, i32 114, i32 111, i32 54, i32 52, i32 118, i32 46, i32 66, i32 73, i32 78, i32 0]
define i32 @gd5446_stb_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([40 x i32]* @.str to i8*))
ret i32 %1
}
/* Variables and functions */
int EOF;
int getch();
int /*<<< orphan*/ putchar(int);
int /*<<< orphan*/ ungetch(char);
int main() {
  int c;
  ungetch(EOF);
  ungetch('x');
  while ((c = getch()) != EOF)
    putchar(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
movsbl %al,%edi
call   1040 <ungetch@plt>
mov    $0x78,%edi
call   1040 <ungetch@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e7d(%rip),%rcx
cmp    (%rcx),%eax
je     1180 <main+0x50>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    115a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb0(%rip),%rbx
movsbl (%rbx),%edi
call   1040 <ungetch@plt>
mov    $0x78,%edi
call   1040 <ungetch@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getch@plt>
cmp    (%rbx),%eax
je     1164 <main+0x34>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @EOF
%4 = trunc i32 %3 to i8
%5 = call i32 @ungetch(i8 signext %4)
%6 = call i32 @ungetch(i8 signext 120)
br label %7
7: ; preds = %11, %0
%8 = call i32 (...) @getch()
store i32 %8, i32* %2
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call i32 @putchar(i32 %12)
br label %7
14: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = trunc i32 %1 to i8
%3 = tail call i32 @ungetch(i8 signext %2)
%4 = tail call i32 @ungetch(i8 signext 120)
%5 = tail call i32 (...) @getch()
%6 = load i32, i32* @EOF
%7 = icmp eq i32 %5, %6
br i1 %7, label %14, label %8
8: ; preds = %0, %8
%9 = phi i32 [ %11, %8 ], [ %5, %0 ]
%10 = tail call i32 @putchar(i32 %9)
%11 = tail call i32 (...) @getch()
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %8
14: ; preds = %8, %0
ret i32 0
}
/* Variables and functions */
int do_send(int, char *, char const *);
int irc_whois(int fd, const char *nick) {
  return do_send(fd, "WHOIS %s", nick);
}


x86 assembly (clang, -O0):
<irc_whois>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <do_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_whois>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <do_send@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"WHOIS %s\00"
define i32 @irc_whois(i32 %0, i8* %1) {
%3 = tail call i32 @do_send(i32 %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char buffer[489];
  int g;
  gets(buffer);
  if (g == 0x44864486) {
    printf("Just a little bit harder. But not as hard as all of the research "
           "you have to do. Level Cleared!\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1f0(%rbp),%rdi
call   1040 <gets@plt>
cmpl   $0x44864486,-0x1f4(%rbp)
44 86 44
jne    115a <main+0x3a>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1f8,%rsp
mov    %rsp,%rdi
call   1030 <gets@plt>
xor    %eax,%eax
add    $0x1f8,%rsp
ret

LLVM IR (-O0):
@.str = [97 x i8] c"Just a little bit harder. But not as hard as all of the research you have to do. Level Cleared!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [489 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [489 x i8], [489 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1149650054
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [489 x i8]
%2 = getelementptr inbounds [489 x i8], [489 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
ret i32 0
}
int tup_restore_privs(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @tup_restore_privs() {
ret i32 0
}

LLVM IR (-O2):
define i32 @tup_restore_privs() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dropbear_close(char *);
char *getpass(char *);
int /*<<< orphan*/ *strchr(char *, char);
char *getpass_or_cancel(char *prompt) {
  char *password = NULL;
  password = getpass(prompt);
  if (password == NULL || strchr(password, '\3') != NULL) {
    dropbear_close("Interrupted.");
  }
  return password;
}


x86 assembly (clang, -O0):
<getpass_or_cancel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <getpass@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1174 <getpass_or_cancel+0x44>
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1180 <getpass_or_cancel+0x50>
lea    0xe85(%rip),%rdi
call   1040 <dropbear_close@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpass_or_cancel>:
push   %rbx
call   1050 <getpass@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1150 <getpass_or_cancel+0x20>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     115c <getpass_or_cancel+0x2c>
lea    0xea9(%rip),%rdi
call   1040 <dropbear_close@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Interrupted.\00"
define i8* @getpass_or_cancel(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = call i8* @getpass(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32* @strchr(i8* %9, i8 signext 3)
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %14
12: ; preds = %8, %1
%13 = call i32 @dropbear_close(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [13 x i8] c"Interrupted.\00"
define i8* @getpass_or_cancel(i8* %0) {
%2 = tail call i8* @getpass(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32* @strchr(i8* %2, i8 signext 3)
%6 = icmp eq i32* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4, %1
%8 = tail call i32 @dropbear_close(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret i8* %2
}
unsigned long hash_gd1(char *uri) {
  unsigned long hash = 0;
  int c;
  while ((c = *uri++))
    hash = c + (hash << 6) + (hash << 16) - hash;
  return hash;
}


x86 assembly (clang, -O0):
<hash_gd1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1155 <hash_gd1+0x55>
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_gd1+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_gd1>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <hash_gd1+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbq %cl,%rcx
imul   $0x1003f,%rax,%rax
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_gd1+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_gd1(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = sext i8 %5 to i64
%10 = mul i64 %7, 65599
%11 = add i64 %10, %9
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %11, %4 ]
ret i64 %15
}
void gendsllv() {}


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

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

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

LLVM IR (-O2):
define void @gendsllv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writeDirectReg(int, int);
void powerDown() {
  writeDirectReg(8, 0x02);
  writeDirectReg(11, 0x33);
  writeDirectReg(64, 0x00);
  writeDirectReg(14, 0x10);
}


x86 assembly (clang, -O0):
<powerDown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x2,%esi
call   1030 <writeDirectReg@plt>
mov    $0xb,%edi
mov    $0x33,%esi
call   1030 <writeDirectReg@plt>
mov    $0x40,%edi
xor    %esi,%esi
call   1030 <writeDirectReg@plt>
mov    $0xe,%edi
mov    $0x10,%esi
call   1030 <writeDirectReg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<powerDown>:
push   %rax
mov    $0x8,%edi
mov    $0x2,%esi
call   1030 <writeDirectReg@plt>
mov    $0xb,%edi
mov    $0x33,%esi
call   1030 <writeDirectReg@plt>
mov    $0x40,%edi
xor    %esi,%esi
call   1030 <writeDirectReg@plt>
mov    $0xe,%edi
mov    $0x10,%esi
pop    %rax
jmp    1030 <writeDirectReg@plt>

LLVM IR (-O0):
define void @powerDown() {
%1 = call i32 @writeDirectReg(i32 8, i32 2)
%2 = call i32 @writeDirectReg(i32 11, i32 51)
%3 = call i32 @writeDirectReg(i32 64, i32 0)
%4 = call i32 @writeDirectReg(i32 14, i32 16)
ret void
}

LLVM IR (-O2):
define void @powerDown() {
%1 = tail call i32 @writeDirectReg(i32 8, i32 2)
%2 = tail call i32 @writeDirectReg(i32 11, i32 51)
%3 = tail call i32 @writeDirectReg(i32 64, i32 0)
%4 = tail call i32 @writeDirectReg(i32 14, i32 16)
ret void
}
void check_malloc_return(void *p) {
  void out_of_memory(void);
  if (!p)
    out_of_memory();
}


x86 assembly (clang, -O0):
<check_malloc_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <check_malloc_return+0x1c>
call   1030 <out_of_memory@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_malloc_return>:
test   %rdi,%rdi
je     1116 <check_malloc_return+0x6>
ret
jmp    1030 <out_of_memory@plt>

LLVM IR (-O0):
define void @check_malloc_return(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @check_malloc_return(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @out_of_memory()
br label %4
4: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;
typedef int u_char;

/* Variables and functions */
u_int32_t ntohl(u_int32_t x) {
  u_char *s = (u_char *)&x;
  return (u_int32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]);
}


x86 assembly (clang, -O0):
<ntohl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ntohl(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
store i32* %2, i32** %3
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = shl i32 %6, 24
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = shl i32 %10, 16
%12 = or i32 %7, %11
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = or i32 %12, %16
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 3
%20 = load i32, i32* %19
%21 = or i32 %17, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @ntohl(i32 %0) {
ret i32 poison
}
/* Variables and functions */
scalar_t__ is_path_delim(char const);
char as_path_delim(char const c) { return is_path_delim(c) ? c : '/'; }


x86 assembly (clang, -O0):
<as_path_delim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_path_delim@plt>
cmp    $0x0,%rax
je     113d <as_path_delim+0x2d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    114a <as_path_delim+0x3a>
mov    $0x2f,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <as_path_delim+0x3a>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<as_path_delim>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_path_delim@plt>
test   %rax,%rax
mov    $0x2f,%eax
cmovne %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @as_path_delim(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_path_delim(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi i32 [ %8, %6 ], [ 47, %9 ]
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @as_path_delim(i8 signext %0) {
%2 = tail call i64 @is_path_delim(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8 47, i8 %0
ret i8 %4
}
void arch_irq_enable(void) {}


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

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

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

LLVM IR (-O2):
define void @arch_irq_enable() {
ret void
}
int do_910() { return 910; }


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

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

LLVM IR (-O0):
define i32 @do_910() {
ret i32 910
}

LLVM IR (-O2):
define i32 @do_910() {
ret i32 910
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int main() {
  int a, b;
  float c, d;
  a = 13;
  b = 5;
  c = a / b;
  d = (float)a / (float)b;
  printf("[integers]\t a = %d\t b = %d\n", a, b);
  printf("[floats]\t c = %f\t d = %f\n", c, d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xd,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movss  0xee0(%rip),%xmm0
movss  0xedc(%rip),%xmm1
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
movss  0xecc(%rip),%xmm0
movss  0xec8(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"[integers]\09 a = %d\09 b = %d\0A\00"
@.str.1 = [26 x i8] c"[floats]\09 c = %f\09 d = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store i32 13, i32* %1
store i32 5, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = sdiv i32 %5, %6
%8 = sitofp i32 %7 to float
store float %8, float* %3
%9 = load i32, i32* %1
%10 = sitofp i32 %9 to float
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to float
%13 = fdiv float %10, %12
store float %13, float* %4
%14 = load i32, i32* %1
%15 = sitofp i32 %14 to float
%16 = load i32, i32* %2
%17 = sitofp i32 %16 to float
%18 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float %15, float %17)
%19 = load float, float* %3
%20 = load float, float* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), float %19, float %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"[integers]\09 a = %d\09 b = %d\0A\00"
@.str.1 = [26 x i8] c"[floats]\09 c = %f\09 d = %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float 1.300000e+01, float 5.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), float 2.000000e+00, float 0x4004CCCCC0000000)
ret i32 0
}
/* Variables and functions */
size_t strlen(char const *);
scalar_t__ strncmp(char const *, char const *, size_t);
int xstrmatch(const char *ctx, const char *arg) {
  size_t len = strlen(ctx);
  return (strlen(arg) == len && strncmp(arg, ctx, len) == 0);
}


x86 assembly (clang, -O0):
<xstrmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x19(%rbp)
jne    1173 <xstrmatch+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrmatch>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
jne    115e <xstrmatch+0x3e>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @xstrmatch(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = load i64, i64* %5
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = load i64, i64* %5
%16 = call i64 @strncmp(i8* %13, i8* %14, i64 %15)
%17 = icmp eq i64 %16, 0
br label %18
18: ; preds = %12, %2
%19 = phi i1 [ false, %2 ], [ %17, %12 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @xstrmatch(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp eq i64 %4, %3
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %1, i8* %0, i64 %3)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ 0, %2 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int read_inst8051(char *);
int main(int argc, char *argv[]) {
  if (argc < 2)
    return 1;
  printf("0x%06X\n", read_inst8051(argv[1]));
  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)
cmpl   $0x2,-0x8(%rbp)
jge    114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    116e <main+0x4e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <read_inst8051@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     1148 <main+0x28>
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <read_inst8051@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"0x%06X\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @read_inst8051(i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %10
}
/* Type definitions */
struct kmem_cache {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree(void *);
void kmem_cache_free(struct kmem_cache *cache, void *mem) { kfree(mem); }


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

x86 assembly (clang, -O2):
<kmem_cache_free>:
mov    %rsi,%rdi
jmp    1030 <kfree@plt>

LLVM IR (-O0):
%struct.kmem_cache = type { i32 }
define void @kmem_cache_free(%struct.kmem_cache* %0, i8* %1) {
%3 = alloca %struct.kmem_cache*
%4 = alloca i8*
store %struct.kmem_cache* %0, %struct.kmem_cache** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @kfree(i8* %5)
ret void
}

LLVM IR (-O2):
%struct.kmem_cache = type { i32 }
define void @kmem_cache_free(%struct.kmem_cache* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @kfree(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("Hello World.\n Good to see you here.");
  puts("I wonder if I can use ’ curly commas in here.");
  puts("\t tabbing!");
  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)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"Hello World.\0A Good to see you here.\00"
@.str.1 = [48 x i8] c"I wonder if I can use \E2\80\99 curly commas in here.\00"
@.str.2 = [11 x i8] c"\09 tabbing!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Hello World.\0A Good to see you here.\00"
@.str.1 = [48 x i8] c"I wonder if I can use \E2\80\99 curly commas in here.\00"
@.str.2 = [11 x i8] c"\09 tabbing!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}