xunge/DecIR huggingface dataset:
void *rbtree_dblcpy(void *p) {
  double *copy = (double *)mm_malloc(sizeof(double));
  *copy = *((double *)p);
  return copy;
}


x86 assembly (clang, -O0):
<rbtree_dblcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8,%edi
mov    $0x0,%al
call   1030 <mm_malloc@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rbtree_dblcpy>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
xor    %eax,%eax
call   1030 <mm_malloc@plt>
cltq
movsd  (%rbx),%xmm0
movsd  %xmm0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @rbtree_dblcpy(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
store i8* %0, i8** %2
%4 = call i32 (i64, ...) bitcast (i32 (...)* @mm_malloc to i32 (i64, ...)*)(i64 8)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to double*
%9 = load double, double* %8
%10 = load double*, double** %3
store double %9, double* %10
%11 = load double*, double** %3
%12 = bitcast double* %11 to i8*
ret i8* %12
}

LLVM IR (-O2):
define i8* @rbtree_dblcpy(i8* nocapture %0) {
%2 = tail call i32 (i64, ...) bitcast (i32 (...)* @mm_malloc to i32 (i64, ...)*)(i64 8)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to double*
%5 = bitcast i8* %0 to double*
%6 = load double, double* %5
store double %6, double* %4
%7 = inttoptr i64 %3 to i8*
ret i8* %7
}
/* Variables and functions */
int _append_line(char const *);
int _append_one_line(const char *line) {
  int result = 0;
  result = _append_line(line);
  return result;
}


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

x86 assembly (clang, -O2):
<_append_one_line>:
jmp    1030 <_append_line@plt>

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

LLVM IR (-O2):
define i32 @_append_one_line(i8* %0) {
%2 = tail call i32 @_append_line(i8* %0)
ret i32 %2
}
char *hash_plugin_detailed(void) {
  return ("wpa - WPA-PSK plugin\n"
          "------------------------------------------------\n"
          "Use this module to crack WPA-PSK keys\n"
          "Input should be a pcap dump file specified with -f\n"
          "Known software that uses this password hashing method:\n"
          "Various 802.11 implementations.\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [292 x i8] c"wpa - WPA-PSK plugin\0A------------------------------------------------\0AUse this module to crack WPA-PSK keys\0AInput should be a pcap dump file specified with -f\0AKnown software that uses this password hashing method:\0AVarious 802.11 implementations.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([292 x i8], [292 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [292 x i8] c"wpa - WPA-PSK plugin\0A------------------------------------------------\0AUse this module to crack WPA-PSK keys\0AInput should be a pcap dump file specified with -f\0AKnown software that uses this password hashing method:\0AVarious 802.11 implementations.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([292 x i8], [292 x i8]* @.str, i64 0, i64 0)
}
char *_ircprot_skip_spaces(char *ptr) {
  if (*ptr && (*ptr == ' '))
    ptr++;
  return ptr;
}


x86 assembly (clang, -O0):
<_ircprot_skip_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1134 <_ircprot_skip_spaces+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1134 <_ircprot_skip_spaces+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ircprot_skip_spaces>:
xor    %eax,%eax
cmpb   $0x20,(%rdi)
sete   %al
add    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @_ircprot_skip_spaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 32
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %15
15: ; preds = %12, %7, %1
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define i8* @_ircprot_skip_spaces(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 32
%4 = zext i1 %3 to i64
%5 = getelementptr i8, i8* %0, i64 %4
ret i8* %5
}
void reverse_buffer(char *start, int len) {
  char *end = start + len - 1;
  char tmp;
  while (start < end) {
    tmp = *start;
    *start = *end;
    *end = tmp;
    ++start;
    --end;
  }
}


x86 assembly (clang, -O0):
<reverse_buffer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1167 <reverse_buffer+0x67>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    111e <reverse_buffer+0x1e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_buffer>:
movslq %esi,%rax
add    %rdi,%rax
add    $0xffffffffffffffff,%rax
cmp    %rdi,%rax
jbe    113c <reverse_buffer+0x3c>
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl -0x1(%rdi),%ecx
movzbl (%rax),%edx
mov    %dl,-0x1(%rdi)
mov    %cl,(%rax)
add    $0xffffffffffffffff,%rax
lea    0x1(%rdi),%rcx
cmp    %rax,%rdi
mov    %rcx,%rdi
jb     1120 <reverse_buffer+0x20>
ret

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

LLVM IR (-O2):
define void @reverse_buffer(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = icmp ugt i8* %5, %0
br i1 %6, label %7, label %15
7: ; preds = %2, %7
%8 = phi i8* [ %13, %7 ], [ %5, %2 ]
%9 = phi i8* [ %12, %7 ], [ %0, %2 ]
%10 = load i8, i8* %9
%11 = load i8, i8* %8
store i8 %11, i8* %9
store i8 %10, i8* %8
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 -1
%14 = icmp ult i8* %12, %13
br i1 %14, label %7, label %15
15: ; preds = %7, %2
ret void
}
double ***qdtrimat(nrl, nrh, ncl, nch, nzl, nzh)
int nrl, nrh, ncl, nch, nzl, nzh;
{ return (dtrimat(nrl, nrh, ncl, nch, nzl, nzh)); }


x86 assembly (clang, -O0):
<qdtrimat>:
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    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    $0x0,%al
call   1030 <dtrimat@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double*** @qdtrimat(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 (i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @dtrimat to i32 (i32, i32, i32, i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to double***
ret double*** %9
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_showfatal(char *, int /*<<< orphan*/,
                                     int /*<<< orphan*/, char const *, int,
                                     char const *);
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ getprogname();
int /*<<< orphan*/ getuid();
void OpenSSLDie(const char *file, int line, const char *assertion) {
  OPENSSL_showfatal(
      "uid %u cmd %s %s(%d): OpenSSL internal error, assertion failed: %s\n",
      getuid(), getprogname(), file, line, assertion);
  _exit(1);
}


x86 assembly (clang, -O0):
<OpenSSLDie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <getuid@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <getprogname@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x18(%rbp),%r9
lea    0xe84(%rip),%rdi
call   1060 <OPENSSL_showfatal@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<OpenSSLDie>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <getuid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <getprogname@plt>
lea    0xe99(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %rbx,%rcx
mov    %r15d,%r8d
mov    %r14,%r9
call   1060 <OPENSSL_showfatal@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [68 x i8] c"uid %u cmd %s %s(%d): OpenSSL internal error, assertion failed: %s\0A\00"
define void @OpenSSLDie(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = call i32 (...) @getuid()
%8 = call i32 (...) @getprogname()
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = call i32 @OPENSSL_showfatal(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i8* %9, i32 %10, i8* %11)
%13 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [68 x i8] c"uid %u cmd %s %s(%d): OpenSSL internal error, assertion failed: %s\0A\00"
define void @OpenSSLDie(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 (...) @getuid()
%5 = tail call i32 (...) @getprogname()
%6 = tail call i32 @OPENSSL_showfatal(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i8* %0, i32 %1, i8* %2)
%7 = tail call i32 @_exit(i32 1)
unreachable
}
void WIFI_GET_RX_PACKET_REPORT(unsigned int *ucastPkts,
                               unsigned int *mcastPkts) {}


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

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

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

LLVM IR (-O2):
define void @WIFI_GET_RX_PACKET_REPORT(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_uid;
};
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char *, struct stat *);
char *get_owner_name(char *path) {
  struct stat buffer;
  stat(path, &buffer);
  struct passwd *pw = getpwuid(buffer.st_uid);
  return pw->pw_name;
}


x86 assembly (clang, -O0):
<get_owner_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_owner_name>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.passwd = type { i8* }
define i8* @get_owner_name(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
%4 = alloca %struct.passwd*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %3)
%7 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call %struct.passwd* @getpwuid(i32 %8)
store %struct.passwd* %9, %struct.passwd** %4
%10 = load %struct.passwd*, %struct.passwd** %4
%11 = getelementptr inbounds %struct.passwd, %struct.passwd* %10, i32 0, i32 0
%12 = load i8*, i8** %11
ret i8* %12
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.passwd = type { i8* }
define i8* @get_owner_name(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call %struct.passwd* @getpwuid(i32 %6)
%8 = getelementptr inbounds %struct.passwd, %struct.passwd* %7, i64 0, i32 0
%9 = load i8*, i8** %8
ret i8* %9
}
/* Variables and functions */
scalar_t__ strcmp(void *, void *);
bool hamt_str_equals(void *a, void *b) {
  if (a == NULL || b == NULL)
    return a == b;
  return strcmp(a, b) == 0;
}


x86 assembly (clang, -O0):
<hamt_str_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <hamt_str_equals+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    114e <hamt_str_equals+0x3e>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    116a <hamt_str_equals+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hamt_str_equals>:
test   %rdi,%rdi
je     112e <hamt_str_equals+0x1e>
test   %rsi,%rsi
je     112e <hamt_str_equals+0x1e>
push   %rax
call   1030 <strcmp@plt>
test   %rax,%rax
sete   %al
add    $0x8,%rsp
movzbl %al,%eax
ret
cmp    %rsi,%rdi
sete   %al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @hamt_str_equals(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = icmp eq i8* %0, %1
br label %11
8: ; preds = %2
%9 = tail call i64 @strcmp(i8* %0, i8* %1)
%10 = icmp eq i64 %9, 0
br label %11
11: ; preds = %8, %6
%12 = phi i1 [ %7, %6 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
size_t gcd(size_t const, size_t const);
int size_gcd(size_t *z, const size_t x, const size_t y) {
  size_t cd;
  cd = gcd(x, y);
  if (z != NULL) {
    *z = cd;
  }
  return 0;
}


x86 assembly (clang, -O0):
<size_gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <gcd@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <size_gcd+0x3b>
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_gcd>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <gcd@plt>
test   %rbx,%rbx
je     1127 <size_gcd+0x17>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @size_gcd(i64* writeonly %0, i64 %1, i64 %2) {
%4 = tail call i64 @gcd(i64 %1, i64 %2)
%5 = icmp eq i64* %0, null
br i1 %5, label %7, label %6
6: ; preds = %3
store i64 %4, i64* %0
br label %7
7: ; preds = %6, %3
ret i32 0
}
/* Type definitions */
struct core_counter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ core_counter_add(struct core_counter *, int, int);
void core_counter_increment(struct core_counter *self, int counter) {
  core_counter_add(self, counter, 1);
}


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

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

LLVM IR (-O0):
%struct.core_counter = type { i32 }
define void @core_counter_increment(%struct.core_counter* %0, i32 %1) {
%3 = alloca %struct.core_counter*
%4 = alloca i32
store %struct.core_counter* %0, %struct.core_counter** %3
store i32 %1, i32* %4
%5 = load %struct.core_counter*, %struct.core_counter** %3
%6 = load i32, i32* %4
%7 = call i32 @core_counter_add(%struct.core_counter* %5, i32 %6, i32 1)
ret void
}

LLVM IR (-O2):
%struct.core_counter = type { i32 }
define void @core_counter_increment(%struct.core_counter* %0, i32 %1) {
%3 = tail call i32 @core_counter_add(%struct.core_counter* %0, i32 %1, i32 1)
ret void
}
int test_imm_39uint32_reg(unsigned int val) {
  return ((val) & (0x39 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_39uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x39,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_39uint32_reg>:
test   $0x39,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_39uint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 57
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_39uint32_reg(i32 %0) {
%2 = and i32 %0, 57
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int verifyLC(char *content, int size) {
  int i;
  for (i = 0; i < size; i++) {
    if (content[i] < 0x61 || content[i] > 0x7a) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<verifyLC>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1167 <verifyLC+0x67>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     1148 <verifyLC+0x48>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jle    1154 <verifyLC+0x54>
movl   $0x0,-0x4(%rbp)
jmp    116e <verifyLC+0x6e>
jmp    1159 <verifyLC+0x59>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <verifyLC+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verifyLC>:
mov    $0x1,%eax
test   %esi,%esi
jle    1125 <verifyLC+0x25>
mov    %esi,%esi
xor    %edx,%edx
nopl   (%rax)
movzbl (%rdi,%rdx,1),%ecx
add    $0x85,%cl
cmp    $0xe5,%cl
jbe    1126 <verifyLC+0x26>
add    $0x1,%rdx
cmp    %rdx,%rsi
jne    1110 <verifyLC+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @verifyLC(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %14, %5
br i1 %7, label %15, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %14, %6 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = add i8 %11, -123
%13 = icmp ult i8 %12, -26
%14 = add nuw nsw i64 %9, 1
br i1 %13, label %15, label %6
15: ; preds = %8, %6, %2
%16 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %16
}
struct lconv *localeconv(void) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.lconv = type opaque
define %struct.lconv* @localeconv() {
ret %struct.lconv* null
}

LLVM IR (-O2):
%struct.lconv = type opaque
define noalias %struct.lconv* @localeconv() {
ret %struct.lconv* null
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
pid_t getpgrp(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getpgrp() {
ret i32 0
}
int func(int arg) { return arg + 1; }


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

x86 assembly (clang, -O2):
<func>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @func(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int f65535(int x) {
  if (x & 65535)
    return 1;
  return x;
}


x86 assembly (clang, -O0):
<f65535>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
cmp    $0x0,%eax
je     1124 <f65535+0x24>
movl   $0x1,-0x4(%rbp)
jmp    112a <f65535+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f65535>:
test   %di,%di
mov    $0x1,%eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @f65535(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 65535
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %10
8: ; preds = %1
%9 = load i32, i32* %3
store i32 %9, i32* %2
br label %10
10: ; preds = %8, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @f65535(i32 %0) {
%2 = and i32 %0, 65535
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 %0, i32 1
ret i32 %4
}
/* Type definitions */
struct stat {
  size_t st_size;
};

/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char *);
int fstat(int, struct stat *);
size_t rangefinder(int fd) {
  struct stat st;
  if (fstat(fd, &st) == -1)
    err(1, "could not stat %s", "data100m");
  return (st.st_size);
}


x86 assembly (clang, -O0):
<rangefinder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <fstat@plt>
cmp    $0xffffffff,%eax
jne    1158 <rangefinder+0x38>
mov    $0x1,%edi
lea    0xeb4(%rip),%rsi
lea    0xebf(%rip),%rdx
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rangefinder>:
push   %rax
mov    %rsp,%rsi
call   1040 <fstat@plt>
cmp    $0xffffffff,%eax
jne    1146 <rangefinder+0x26>
lea    0xecb(%rip),%rsi
lea    0xed6(%rip),%rdx
mov    $0x1,%edi
call   1030 <err@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
@.str = [18 x i8] c"could not stat %s\00"
@.str.1 = [9 x i8] c"data100m\00"
define i64 @rangefinder(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.stat
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fstat(i32 %4, %struct.stat* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @err(i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%11 = load i64, i64* %10
ret i64 %11
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@.str = [18 x i8] c"could not stat %s\00"
@.str.1 = [9 x i8] c"data100m\00"
define i64 @rangefinder(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i64, i64* %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ ShiftByAmount(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char str[100];
  scanf("%s", str);
  int n;
  scanf("%d", &n);
  ShiftByAmount(str, n);
  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    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea8(%rip),%rdi
lea    -0x74(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x74(%rbp),%esi
call   1050 <ShiftByAmount@plt>
lea    -0x70(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xec2(%rip),%r14
lea    0x10(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1050 <ShiftByAmount@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @ShiftByAmount(i8* %7, i32 %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = bitcast i32* %2 to i8*
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = call i32 @ShiftByAmount(i8* %3, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
void ff_hevc_put_hevc_bi_qpel_h4_8_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ gc_pass(void *);
struct object *make_integer(void *, int /*<<< orphan*/);
struct object *prim_gc_pass(void *workspace, struct object *args) {
  return make_integer(workspace, gc_pass(workspace));
}


x86 assembly (clang, -O0):
<prim_gc_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <gc_pass@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <make_integer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prim_gc_pass>:
push   %rbx
mov    %rdi,%rbx
call   1040 <gc_pass@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <make_integer@plt>

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

LLVM IR (-O2):
%struct.object = type { i32 }
define %struct.object* @prim_gc_pass(i8* %0, %struct.object* nocapture readnone %1) {
%3 = tail call i32 @gc_pass(i8* %0)
%4 = tail call %struct.object* @make_integer(i8* %0, i32 %3)
ret %struct.object* %4
}
unsigned char is_zero(unsigned char val) {
  return ~((val & (1 << 7)) >> 7 | (val & (1 << 6)) >> 6 |
           (val & (1 << 5)) >> 5 | (val & (1 << 4)) >> 4 |
           (val & (1 << 3)) >> 3 | (val & (1 << 2)) >> 2 |
           (val & (1 << 1)) >> 1 | (val & 1)) &
         1;
}


x86 assembly (clang, -O0):
<is_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x80,%eax
sar    $0x7,%eax
movzbl -0x1(%rbp),%ecx
and    $0x40,%ecx
sar    $0x6,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x20,%ecx
sar    $0x5,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x10,%ecx
sar    $0x4,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x8,%ecx
sar    $0x3,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x4,%ecx
sar    $0x2,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x2,%ecx
sar    $0x1,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
xor    $0xffffffff,%eax
and    $0x1,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_zero>:
mov    %edi,%eax
shr    $0x7,%al
mov    %edi,%ecx
shr    $0x6,%cl
mov    %edi,%r8d
shr    $0x5,%r8b
mov    %edi,%esi
shr    $0x4,%sil
mov    %edi,%r9d
shr    $0x3,%r9b
mov    %edi,%edx
shr    $0x2,%dl
or     %r9b,%dl
or     %dil,%al
shr    %dil
or     %dil,%cl
or     %r8b,%cl
or     %dl,%al
or     %cl,%al
or     %sil,%al
not    %al
and    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i8 @is_zero(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 128
%6 = ashr i32 %5, 7
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 64
%10 = ashr i32 %9, 6
%11 = or i32 %6, %10
%12 = load i8, i8* %2
%13 = zext i8 %12 to i32
%14 = and i32 %13, 32
%15 = ashr i32 %14, 5
%16 = or i32 %11, %15
%17 = load i8, i8* %2
%18 = zext i8 %17 to i32
%19 = and i32 %18, 16
%20 = ashr i32 %19, 4
%21 = or i32 %16, %20
%22 = load i8, i8* %2
%23 = zext i8 %22 to i32
%24 = and i32 %23, 8
%25 = ashr i32 %24, 3
%26 = or i32 %21, %25
%27 = load i8, i8* %2
%28 = zext i8 %27 to i32
%29 = and i32 %28, 4
%30 = ashr i32 %29, 2
%31 = or i32 %26, %30
%32 = load i8, i8* %2
%33 = zext i8 %32 to i32
%34 = and i32 %33, 2
%35 = ashr i32 %34, 1
%36 = or i32 %31, %35
%37 = load i8, i8* %2
%38 = zext i8 %37 to i32
%39 = and i32 %38, 1
%40 = or i32 %36, %39
%41 = xor i32 %40, -1
%42 = and i32 %41, 1
%43 = trunc i32 %42 to i8
ret i8 %43
}

LLVM IR (-O2):
define zeroext i8 @is_zero(i8 zeroext %0) {
%2 = lshr i8 %0, 7
%3 = lshr i8 %0, 6
%4 = lshr i8 %0, 5
%5 = lshr i8 %0, 4
%6 = lshr i8 %0, 3
%7 = lshr i8 %0, 2
%8 = lshr i8 %0, 1
%9 = or i8 %2, %0
%10 = or i8 %9, %6
%11 = or i8 %10, %7
%12 = or i8 %11, %8
%13 = or i8 %12, %3
%14 = or i8 %13, %4
%15 = or i8 %14, %5
%16 = and i8 %15, 1
%17 = xor i8 %16, 1
ret i8 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_mul_epu32(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_mul_epu32(__m128i A, __m128i B) { return _mm_mul_epu32(A, B); }


x86 assembly (clang, -O0):
<test_mm_mul_epu32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_mul_epu32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_mul_epu32>:
jmp    1030 <_mm_mul_epu32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_mul_epu32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mul_epu32(i32 %0, i32 %1)
ret i32 %3
}
char _get_pixmap_element(int x, int y, int width, int height, char *pixmap) {
  if ((x < 0) || (y < 0) || (x > width - 1) || (y > height - 1))
    return (' ');
  else
    return (pixmap[y * width + x]);
}


x86 assembly (clang, -O0):
<_get_pixmap_element>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114a <_get_pixmap_element+0x4a>
cmpl   $0x0,-0xc(%rbp)
jl     114a <_get_pixmap_element+0x4a>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     114a <_get_pixmap_element+0x4a>
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jle    1153 <_get_pixmap_element+0x53>
movb   $0x20,-0x1(%rbp)
jmp    116a <_get_pixmap_element+0x6a>
mov    -0x20(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_pixmap_element>:
mov    %esi,%eax
or     %edi,%eax
mov    $0x20,%al
js     111c <_get_pixmap_element+0x1c>
cmp    %edi,%edx
jle    111c <_get_pixmap_element+0x1c>
cmp    %esi,%ecx
jle    111c <_get_pixmap_element+0x1c>
imul   %esi,%edx
add    %edi,%edx
movslq %edx,%rax
mov    (%r8,%rax,1),%al
ret

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

LLVM IR (-O2):
define signext i8 @_get_pixmap_element(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4) {
%6 = or i32 %1, %0
%7 = icmp sgt i32 %6, -1
%8 = icmp sgt i32 %2, %0
%9 = and i1 %7, %8
%10 = icmp sgt i32 %3, %1
%11 = and i1 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %5
%13 = mul nsw i32 %2, %1
%14 = add nsw i32 %13, %0
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %4, i64 %15
%17 = load i8, i8* %16
br label %18
18: ; preds = %5, %12
%19 = phi i8 [ %17, %12 ], [ 32, %5 ]
ret i8 %19
}
char *hash_plugin_detailed(void) {
  return ("wordpress - Wordpress hashes plugin\n"
          "------------------------\n"
          "Use this module to crack wordpress passwords\n"
          "Input should be in form: \'user:hash\' or just \'hash\'.\n"
          "Known software that uses this password hashing method:\n"
          "Wordpress\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [270 x i8] c"wordpress - Wordpress hashes plugin\0A------------------------\0AUse this module to crack wordpress passwords\0AInput should be in form: 'user:hash' or just 'hash'.\0AKnown software that uses this password hashing method:\0AWordpress\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([270 x i8], [270 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [270 x i8] c"wordpress - Wordpress hashes plugin\0A------------------------\0AUse this module to crack wordpress passwords\0AInput should be in form: 'user:hash' or just 'hash'.\0AKnown software that uses this password hashing method:\0AWordpress\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([270 x i8], [270 x i8]* @.str, i64 0, i64 0)
}
void tsv_byte_array_read(struct encode_context *ectxt,
                         struct decode_context *dctxt, const char *format) {}


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

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

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

LLVM IR (-O2):
%struct.encode_context = type opaque
%struct.decode_context = type opaque
define void @tsv_byte_array_read(%struct.encode_context* nocapture %0, %struct.decode_context* nocapture %1, i8* nocapture %2) {
ret void
}
__attribute__((always_)) double max_double(double a, double b) {
  return a > b ? a : b;
}


x86 assembly (clang, -O0):
<max_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <max_double+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <max_double+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_double>:
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max_double(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @max_double(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
struct fwsocket {
  int dummy;
};

/* Variables and functions */
struct fwsocket *_opensocket(int, int, int, char const *, char const *, void *,
                             int, int);
extern struct fwsocket *sockbind(int family, int stype, int proto,
                                 const char *ipaddr, const char *port,
                                 void *ssl, int backlog) {
  return (_opensocket(family, stype, proto, ipaddr, port, ssl, 1, backlog));
}


x86 assembly (clang, -O0):
<sockbind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%eax
movl   $0x1,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <_opensocket@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sockbind>:
push   %rax
mov    0x10(%rsp),%eax
push   %rax
push   $0x1
call   1030 <_opensocket@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.fwsocket = type { i32 }
define %struct.fwsocket* @sockbind(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4, i8* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i8*, i8** %11
%19 = load i8*, i8** %12
%20 = load i8*, i8** %13
%21 = load i32, i32* %14
%22 = call %struct.fwsocket* @_opensocket(i32 %15, i32 %16, i32 %17, i8* %18, i8* %19, i8* %20, i32 1, i32 %21)
ret %struct.fwsocket* %22
}

LLVM IR (-O2):
%struct.fwsocket = type { i32 }
define %struct.fwsocket* @sockbind(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4, i8* %5, i32 %6) {
%8 = tail call %struct.fwsocket* @_opensocket(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4, i8* %5, i32 1, i32 %6)
ret %struct.fwsocket* %8
}
/* Variables and functions */
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void smooth_init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_SMOOTH);
}


x86 assembly (clang, -O0):
<smooth_init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1030 <glClearColor@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <glShadeModel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smooth_init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1030 <glClearColor@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <glShadeModel@plt>

LLVM IR (-O0):
@GL_SMOOTH = global i32 0
define void @smooth_init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = call i32 @glShadeModel(i32 %2)
ret void
}

LLVM IR (-O2):
@GL_SMOOTH = global i32 0
define void @smooth_init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = tail call i32 @glShadeModel(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ player_stop();
void cmd_p_stop(char *arg) { player_stop(); }


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

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

LLVM IR (-O0):
define void @cmd_p_stop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @player_stop()
ret void
}

LLVM IR (-O2):
define void @cmd_p_stop(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @player_stop()
ret void
}