LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/ekg[P]fastahack/Fasta.cpp
// Function: FastaReference::getSequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string FastaReference::getSequence(string seqname) {
    FastaIndexEntry entry = index->entry(seqname);
    int bytes_per_newline = entry.line_len - entry.line_blen;
    int newline_bytes_in_sequence = entry.length / entry.line_blen * bytes_per_newline;
    int seqlen = newline_bytes_in_sequence + entry.length;
    char* seq = (char*) calloc (seqlen + 1, sizeof(char));
    fseek64(file, entry.offset, SEEK_SET);
    string s;
    if (fread(seq, sizeof(char), seqlen, file)) {
        seq[seqlen] = '\0';
        char* pbegin = seq;
        char* pend = seq + (seqlen/sizeof(char));
        pend = remove(pbegin, pend, '\r');
        pend = remove(pbegin, pend, '\n');
        pend = remove(pbegin, pend, '\0');
        s = seq;
        free(seq);
        s.resize((pend - pbegin)/sizeof(char));
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x40(%rsi), %r14
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x558a
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4794
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c31
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
movl 0x64(%rsp), %esi
movl 0x50(%rsp), %ecx
movl 0x60(%rsp), %edi
subl %edi, %esi
movl %ecx, %eax
cltd
idivl %edi
imull %esi, %eax
leal (%rax,%rcx), %ebp
addl %ecx, %eax
incl %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x31c0
movq %rax, %r14
movq 0x28(%r15), %rdi
movq 0x58(%rsp), %rsi
xorl %edx, %edx
callq 0x31a0
leaq 0x10(%rbx), %r13
movq %r13, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movslq %ebp, %r12
movq 0x28(%r15), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x33c0
testq %rax, %rax
je 0x4d16
leaq (%r14,%r12), %rsi
movb $0x0, (%r14,%r12)
leaq 0xf(%rsp), %rdx
movb $0xd, (%rdx)
movq %r14, %rdi
callq 0x71c6
leaq 0xf(%rsp), %rdx
movb $0xa, (%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x71c6
leaq 0xf(%rsp), %rdx
movb $0x0, (%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x71c6
movq %rax, %r15
movq 0x8(%rbx), %r12
movq %r14, %rdi
callq 0x3140
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x33f0
movq %r14, %rdi
callq 0x3340
subq %r14, %r15
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x30e0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d31
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4d53
jmp 0x4d53
jmp 0x4d53
movq %rax, %r14
movq 0x10(%rsp), %rdi
jmp 0x4d73
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x4d6a
movq (%r13), %rsi
incq %rsi
callq 0x32d0
leaq 0x40(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x4d84
movq (%r13), %rsi
incq %rsi
callq 0x32d0
movq %r14, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O3/ekg[P]fastahack/Fasta.cpp
// Function: FastaReference::sequenceNameStartingWith(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string FastaReference::sequenceNameStartingWith(string seqnameStart) {
    try {
        return (*index)[seqnameStart].name;
    } catch (exception& e) {
        cerr << e.what() << ": unable to find index entry for " << seqnameStart << endl;
        exit(1);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x40(%rsi), %rdi
movq %rdx, %rsi
callq 0x5326
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x558a
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x4e2e
movq %r14, %rdi
callq 0x3130
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x820a(%rip), %rdi      # 0xcff0
movq %rax, %rsi
callq 0x32a0
movq %rax, %r14
leaq 0x4383(%rip), %rsi      # 0x917b
movl $0x21, %edx
movq %rax, %rdi
callq 0x3320
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x3320
movq %rax, %rdi
callq 0x3150
movl $0x1, %edi
callq 0x3360
movq %rax, %r14
callq 0x3440
movq %r14, %rdi
callq 0x3490
movq %rax, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/ekg[P]fastahack/Fasta.cpp
// Function: FastaReference::getTargetSubSequence[abi:cxx11](FastaRegion&)
string FastaReference::getTargetSubSequence(FastaRegion& target) {
    if (target.startPos == -1) {
        return getSequence(target.startSeq);
    } else {
        return getSubSequence(target.startSeq, target.startPos - 1, target.length());
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpl $-0x1, 0x20(%rdx)
je 0x4ea8
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rsp, %r12
movq %r12, %rdi
callq 0x558a
movl 0x20(%r15), %ecx
movl 0x24(%r15), %eax
movl %eax, %edx
subl %ecx, %edx
decl %ecx
incl %edx
testl %eax, %eax
movl $0x1, %r8d
cmovgl %edx, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4f28
movq (%rsp), %rdi
jmp 0x4edb
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x558a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4bd2
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x4eec
movq (%r13), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
jmp 0x4f0e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4f1f
movq (%r13), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O3/ikatanic[P]lcskpp/./utils.h
// Function: power_fits_in_63bits(unsigned long, unsigned long, unsigned long*)
bool power_fits_in_63bits(uint64_t a, uint64_t b, uint64_t* c) {
  *c = 1;
  while (b > 0) {
    if (!product_fits_in_63bits(*c, a, c)) return false;
    b--;
  }
  return true;
}

// Assembly:
movq $0x1, (%rdx)
testq %rsi, %rsi
je 0x246b
movq %rdx, %rcx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rdi
movl $0x1, %r8d
cmpq %r8, %rax
setae %dl
jb 0x246d
imulq %rdi, %r8
movq %r8, (%rcx)
decq %rsi
jne 0x2455
jmp 0x246d
movb $0x1, %dl
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/ikatanic[P]lcskpp/./utils.h
// Function: radix_sort(std::vector<std::pair<unsigned long, int>, std::allocator<std::pair<unsigned long, int>>>&, unsigned long)
void radix_sort(vector<pair<uint64_t, int>> &v, uint64_t maks) {
  const int len = 9;
  const int sz = 1 << len;
  const int mask = sz - 1;
  static int pos[sz + 1];

  vector<pair<uint64_t, int>> w(v.size());

  int n_blocks = 0;
  while (maks > 1) {
    n_blocks++;
    maks >>= len;
  }

  for (int block = 0; block < n_blocks; ++block) {
    memset(pos, 0, sizeof pos);

    for (auto &x : v)
      ++pos[((x.first >> (block * len)) & mask) + 1];

    for (int i = 0; i < sz; ++i)
      pos[i + 1] += pos[i];

    for (auto &x : v)
      w[pos[(x.first >> (block * len)) & mask]++] = x;

    v.swap(w);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x4, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3ae0
cmpq $0x2, %r14
jb 0x25f8
xorl %r12d, %r12d
movq %r14, %rax
shrq $0x9, %rax
incq %r12
cmpq $0x3ff, %r14            # imm = 0x3FF
movq %rax, %r14
ja 0x24cd
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %rax
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
movq %rbx, 0x28(%rsp)
movq 0x10(%rbx), %rdi
movq 0x20(%rsp), %rcx
xorl %ebx, %ebx
leaq 0x5c58(%rip), %r15      # 0x8160
movq %rbp, %r14
movq %rsi, %r13
movq %rdx, %rbp
movq %rdi, 0x30(%rsp)
movq %rax, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movl $0x804, %edx            # imm = 0x804
movq %r15, %rdi
xorl %esi, %esi
callq 0x20c0
cmpq %r13, %rbp
je 0x2555
leaq (%rbx,%rbx,8), %rcx
movq %rbp, %rax
movq (%rax), %rdx
shrq %cl, %rdx
andl $0x1ff, %edx            # imm = 0x1FF
incl 0x4(%r15,%rdx,4)
addq $0x10, %rax
cmpq %r13, %rax
jne 0x253b
xorl %eax, %eax
xorl %ecx, %ecx
addl 0x4(%r15,%rcx,4), %eax
movl %eax, 0x4(%r15,%rcx,4)
leaq 0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq $0x200, %rdx            # imm = 0x200
jne 0x2559
cmpq %r13, %rbp
je 0x25b3
leaq (%rbx,%rbx,8), %rcx
movq %rbp, %rax
movq (%rax), %rdx
movq %rdx, %rsi
shrq %cl, %rsi
andl $0x1ff, %esi            # imm = 0x1FF
movslq (%r15,%rsi,4), %rdi
leal 0x1(%rdi), %r8d
movl %r8d, (%r15,%rsi,4)
shlq $0x4, %rdi
movq %rdx, (%r14,%rdi)
movl 0x8(%rax), %edx
movl %edx, 0x8(%r14,%rdi)
addq $0x10, %rax
cmpq %r13, %rax
jne 0x257f
incq %rbx
movq 0x30(%rsp), %r8
movq %r8, %rcx
movq %r13, %rax
movq %r14, %rdx
cmpq %rbx, %r12
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdi
jne 0x2508
movq 0x28(%rsp), %rax
movq %rdi, 0x10(%rax)
movq %r14, (%rax)
movq %r13, 0x18(%rsp)
movq %rsi, 0x8(%rax)
movq %r8, 0x20(%rsp)
movq %rbp, 0x10(%rsp)
jmp 0x25fd
movq 0x10(%rsp), %rbp
testq %rbp, %rbp
je 0x260a
movq %rbp, %rdi
callq 0x2130
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ikatanic[P]lcskpp/./utils.h
// Function: radix_sort(std::vector<unsigned long, std::allocator<unsigned long>>&, unsigned long)
void radix_sort(vector<uint64_t> &v, uint64_t maks) {
  const int max_len = 9;
  static int pos[(1 << max_len) + 1];

  vector<uint64_t> w(v.size());

  int n_bits = log2(maks);

  int shift = 0;
  while (n_bits > 0) {
    int len = min(max_len, n_bits);
    int sz = 1 << len;
    int mask = sz - 1;

    memset(pos, 0, sz * sizeof(int));

    for (auto &x : v)
      ++pos[((x >> shift) & mask) + 1];

    for (int i = 0; i < sz; ++i)
      pos[i + 1] += pos[i];

    for (auto &x : v)
      w[pos[(x >> shift) & mask]++] = x;
    shift += len;
    n_bits -= len;

    v.swap(w);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x3b62
cmpq $0x2, %r14
setb %al
bsrq %r14, %rsi
xorq $0x3f, %rsi
cmpq $0x3f, %rsi
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x266e
movq 0x10(%rsp), %rdi
jmp 0x27a9
xorl $0x3f, %esi
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
movq %rbx, 0x28(%rsp)
movq 0x10(%rbx), %r9
xorl %ebp, %ebp
movq 0x20(%rsp), %rdx
leaq 0x62d7(%rip), %r15      # 0x8970
movq %rdi, %r14
movq %r8, %rbx
movq %rcx, 0x30(%rsp)
movq %r9, 0x38(%rsp)
cmpl $0x9, %esi
movl $0x9, %ecx
movq %rsi, 0x50(%rsp)
cmovbl %esi, %ecx
movl $0x1, %r13d
shll %cl, %r13d
movq %rax, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
leal -0x1(%r13), %r12d
movl $0x4, %edx
movl %ecx, 0xc(%rsp)
shll %cl, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x20c0
movq 0x30(%rsp), %rdi
movl %ebp, %ecx
movl %r12d, %eax
cmpq %rbx, %rdi
je 0x270d
movq %rdi, %rdx
movq (%rdx), %rsi
shrq %cl, %rsi
andl %eax, %esi
incl 0x4(%r15,%rsi,4)
addq $0x8, %rdx
cmpq %rbx, %rdx
jne 0x26f7
movl %r13d, %edx
movl 0x625a(%rip), %esi      # 0x8970
xorl %r9d, %r9d
addl 0x4(%r15,%r9,4), %esi
movl %esi, 0x4(%r15,%r9,4)
leaq 0x1(%r9), %r8
movq %r8, %r9
cmpq %r8, %rdx
jne 0x2719
cmpq %rbx, %rdi
je 0x275c
movq %rdi, %rdx
movq (%rdx), %rsi
movq %rsi, %r10
shrq %cl, %r10
andl %eax, %r10d
movslq (%r15,%r10,4), %r8
leal 0x1(%r8), %r9d
movl %r9d, (%r15,%r10,4)
movq %rsi, (%r14,%r8,8)
addq $0x8, %rdx
cmpq %rbx, %rdx
jne 0x2737
movl 0xc(%rsp), %r8d
addl %r8d, %ebp
movq 0x38(%rsp), %r10
movq %r10, %rdx
movq %rbx, %rax
movq %r14, %rcx
movq 0x50(%rsp), %rsi
subl %r8d, %esi
movq 0x48(%rsp), %r8
movq 0x40(%rsp), %r9
jg 0x2699
movq 0x28(%rsp), %rax
movq %r9, 0x10(%rax)
movq %r14, (%rax)
movq %rbx, 0x18(%rsp)
movq %r8, 0x8(%rax)
movq %r10, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
testq %rdi, %rdi
je 0x27b3
callq 0x2130
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/bin/save.pb.cc
// Function: Rnes::MmcState_MmcNoneState::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
const char* MmcState_MmcNoneState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq -0x28(%rbp), %r15
movq %rsi, (%r15)
addq $0x8, %r14
movl 0x5c(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31b9c
movq -0x28(%rbp), %rdi
testb %al, %al
jne 0xad34
movzbl (%rdi), %r12d
leaq 0x1(%rdi), %rax
testb %r12b, %r12b
jns 0xaccf
movzbl (%rax), %eax
movl %eax, %ecx
shll $0x7, %ecx
addl %ecx, %r12d
addl $-0x80, %r12d
testb %al, %al
js 0xad0d
addq $0x2, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
testl %r12d, %r12d
je 0xad39
movl %r12d, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
je 0xad39
movq (%r14), %rsi
testb $0x1, %sil
je 0xad23
andq $-0x2, %rsi
addq $0x8, %rsi
movl %r12d, %edi
movq %rax, %rdx
movq %rbx, %rcx
callq 0xa2d0
movq %rax, -0x28(%rbp)
testq %rax, %rax
jne 0xac8e
jmp 0xad4d
movl %r12d, %esi
callq 0xa1e0
movq %rax, -0x28(%rbp)
testq %rax, %rax
je 0xad4d
movl %edx, %r12d
jmp 0xacd3
movq %r14, %rdi
callq 0x31c54
movq %rax, %rsi
movq -0x28(%rbp), %rax
jmp 0xacf4
movq %rdi, %rax
jmp 0xad40
decl %r12d
movl %r12d, 0x50(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0xad40
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/main.cpp
// Function: Rnes::md5OfFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string md5OfFile(std::string file) {
  std::string salt = "$1$$";
  struct crypt_data data = {0};
  std::string contents;

  using namespace std;
  namespace io = boost::iostreams;

  io::stream<io::mapped_file_source> stream(file);
  stream >> contents;

  auto ret = std::string(crypt_r(contents.c_str(), salt.c_str(), &data));
  for_each(begin(ret), end(ret), [](char &c) {
    if (c == '/' or c == '.') {
      c = 'x';
    }
  });
  return ret.substr(salt.size());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8210, %rsp           # imm = 0x8210
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1eda0(%rip), %rsi     # 0x33024
leaq 0x1ed9d(%rip), %rdx     # 0x33028
leaq -0x68(%rbp), %rdi
callq 0x17200
leaq -0x8228(%rbp), %rdi
movl $0x8000, %edx           # imm = 0x8000
xorl %esi, %esi
callq 0xa280
leaq -0x78(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0x228(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x15338
leaq -0x228(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xa370
movq -0x88(%rbp), %rdi
movq -0x68(%rbp), %rsi
leaq -0x8228(%rbp), %rdx
callq 0xa9a0
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %rax, %rsi
callq 0x152fa
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x14332
movq -0x48(%rbp), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
andb $-0x2, %sil
cmpb $0x2e, %sil
jne 0x1432a
movb $0x78, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x14318
movq -0x60(%rbp), %rdx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
movq $-0x1, %rcx
callq 0xa7f0
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14362
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xa0e0
leaq 0x31147(%rip), %rax     # 0x454b0
leaq -0x190(%rbp), %r14
movq %rax, -0x98(%r14)
leaq 0x3115a(%rip), %rax     # 0x454d8
movq %rax, (%r14)
movq $0x0, -0x90(%r14)
leaq -0x218(%rbp), %rdi
callq 0x15896
movq %r14, %rdi
callq 0xa560
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x143b8
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x143cd
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq %rbx, %rax
addq $0x8210, %rsp           # imm = 0x8210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14403
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xa0e0
jmp 0x14403
jmp 0x14400
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x15462
jmp 0x14414
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x1442c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x14441
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq %rbx, %rdi
callq 0xa4d0
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/main.cpp
// Function: Rnes::getUserHomeDir[abi:cxx11]()
std::string getUserHomeDir() {
  struct passwd pwd = {0};
  struct passwd *pwdRet;
  char buf[1024];

  getpwuid_r(getuid(), &pwd, buf, sizeof(buf), &pwdRet);

  using namespace std;
  string homeDir(pwdRet->pw_dir);
  return homeDir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r14
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
callq 0xa2b0
leaq -0x460(%rbp), %rdx
leaq -0x28(%rbp), %r15
movl $0x400, %ecx            # imm = 0x400
movl %eax, %edi
movq %r14, %rsi
movq %r15, %r8
callq 0xa570
movq (%r15), %rax
movq 0x20(%rax), %rsi
leaq -0x19(%rbp), %rdx
movq %rbx, %rdi
callq 0x152fa
movq %rbx, %rax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/main.cpp
// Function: Rnes::setupDirectories(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void setupDirectories(std::string romMd5) {
  namespace fs = boost::filesystem;

  fs::path homeDir(getUserHomeDir());
  fs::path rnesDir(homeDir);
  rnesDir /= ".rnes";

  if (not fs::exists(rnesDir)) {
    fs::create_directories(rnesDir);
  }

  fs::path gamePath(rnesDir);
  gamePath /= fs::path(romMd5);
  if (not fs::exists(gamePath)) {
    fs::create_directories(gamePath);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x14449
leaq -0x98(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x17162
leaq -0x38(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x1475f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xa0e0
leaq -0x48(%rbp), %rdi
movq %r14, (%rdi)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
callq 0x17162
leaq 0x1e8b4(%rip), %rsi     # 0x33037
leaq -0x48(%rbp), %rdi
callq 0xa740
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0xa380
cmpl $0x1, -0x68(%rbp)
ja 0x147ac
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0xa890
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x17162
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x17162
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xa930
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x1480f
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xa0e0
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0xa380
cmpl $0x1, -0x88(%rbp)
ja 0x14835
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0xa890
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x1484a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x1485f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1487a
movq -0x98(%rbp), %rsi
incq %rsi
callq 0xa0e0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x148cb
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xa0e0
jmp 0x148cb
jmp 0x148c8
jmp 0x148e2
movq %rax, %rbx
jmp 0x148fa
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14915
movq -0x38(%rbp), %rsi
jmp 0x1490d
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x148e5
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xa0e0
jmp 0x148e5
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x148fa
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x14915
movq -0x98(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq %rbx, %rdi
callq 0xa4d0
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/main.cpp
// Function: Rnes::verifyRomExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void verifyRomExists(std::string romFile) {
  namespace fs = boost::filesystem;
  using namespace std;

  fs::path path(romFile);
  if (not fs::exists(path) or not fs::is_regular_file(path)) {
    cerr << "specified rom file does not exist: " << romFile << endl;
    exit(-1);
  }
  cerr << "rom md5: " << md5OfFile(romFile) << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0x17162
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xa380
cmpl $0x2, -0x38(%rbp)
jb 0x14a48
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
xorl %edx, %edx
callq 0xa380
cmpl $0x2, -0x38(%rbp)
jne 0x14a48
movq 0x3266d(%rip), %rdi     # 0x46ff0
leaq 0x1e6d7(%rip), %rsi     # 0x33061
movl $0x9, %edx
callq 0xa7a0
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x17162
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x1425d
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x32625(%rip), %rdi     # 0x46ff0
callq 0xa7a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xa850
movsbl %al, %esi
movq %rbx, %rdi
callq 0xa410
movq %rax, %rdi
callq 0xa3c0
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14a13
movq -0x28(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x14a28
movq -0x48(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x14a3d
movq -0x68(%rbp), %rsi
incq %rsi
callq 0xa0e0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x325a1(%rip), %rdi     # 0x46ff0
leaq 0x1e5e7(%rip), %rsi     # 0x3303d
movl $0x23, %edx
callq 0xa7a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x32582(%rip), %rdi     # 0x46ff0
callq 0xa7a0
movq %rax, %rdi
callq 0xa800
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0xa4f0
movq %rax, %rbx
jmp 0x14aa8
jmp 0x14abf
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14aa8
movq -0x28(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x14ac2
movq -0x48(%rbp), %rsi
incq %rsi
callq 0xa0e0
jmp 0x14ac2
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x14ad7
movq -0x68(%rbp), %rsi
incq %rsi
callq 0xa0e0
movq %rbx, %rdi
callq 0xa4d0
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/main.cpp
// Function: Rnes::loadNesState(Rnes::Nes*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void loadNesState(Nes *nes, std::string saveFile) {
  namespace io = boost::iostreams;
  namespace fs = boost::filesystem;
  using namespace std;

  try {
    io::stream<io::mapped_file_source> stream(saveFile);
    unique_ptr<SaveState> gameState{new SaveState{}};

    // Read out state from save file.
    gameState->ParseFromIstream(&stream);

    // Restore nes state.
    nes->restore(*gameState.get());

    cerr << "State restored" << endl;
  } catch (const std::ios_base::failure &exception) {
    cerr << "Exception: " << exception.what() << endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq -0x1c0(%rbp), %rdi
xorl %edx, %edx
callq 0x15338
movl $0x60, %edi
callq 0xa130
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x2ef02
movq %r15, -0x20(%rbp)
leaq -0x1c0(%rbp), %rsi
movq %r15, %rdi
callq 0xa050
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20c4a
movq 0x324b4(%rip), %rbx     # 0x46ff0
leaq 0x1e528(%rip), %rsi     # 0x3306b
movl $0xe, %edx
movq %rbx, %rdi
callq 0xa7a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xa850
movsbl %al, %esi
movq 0x32482(%rip), %rdi     # 0x46ff0
callq 0xa410
movq %rax, %rdi
callq 0xa3c0
leaq -0x20(%rbp), %rdi
callq 0x154a6
leaq 0x30925(%rip), %rax     # 0x454b0
leaq -0x128(%rbp), %rbx
movq %rax, -0x98(%rbx)
leaq 0x30938(%rip), %rax     # 0x454d8
movq %rax, (%rbx)
movq $0x0, -0x90(%rbx)
leaq -0x1b0(%rbp), %rdi
callq 0x15896
movq %rbx, %rdi
callq 0xa560
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
movl $0x60, %esi
movq %r15, %rdi
callq 0xa0e0
jmp 0x14c04
movq %rdx, %r14
movq %rax, %rbx
jmp 0x14c04
movq %rdx, %r14
movq %rax, %rbx
jmp 0x14c10
movq %rdx, %r14
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x154a6
leaq -0x1c0(%rbp), %rdi
callq 0x15462
cmpl $0x1, %r14d
jne 0x14c6b
movq %rbx, %rdi
callq 0xa060
movq %rax, %rbx
movq 0x323c8(%rip), %rdi     # 0x46ff0
leaq 0x1e44b(%rip), %rsi     # 0x3307a
movl $0xb, %edx
callq 0xa7a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x323a7(%rip), %rdi     # 0x46ff0
movq %rax, %rsi
callq 0xa430
movq %rax, %rdi
callq 0xa800
callq 0xa5e0
jmp 0x14bc2
movq %rax, %rbx
callq 0xa5e0
movq %rbx, %rdi
callq 0xa4d0
movq %rax, %rdi
callq 0x152eb
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/main.cpp
// Function: Rnes::saveNesState(Rnes::Nes*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void saveNesState(Nes *nes, std::string saveFile) {
  namespace io = boost::iostreams;
  namespace fs = boost::filesystem;
  using namespace std;

  // Useless comment.

  try {
    io::stream<io::file_sink> stream(saveFile);
    unique_ptr<SaveState> gameState{new SaveState{}};

    // Save nes state.
    nes->save(*gameState.get());

    // Serialize save to file.
    gameState->SerializeToOstream(&stream);

    cerr << "state saved." << endl;
  } catch (const std::ios_base::failure &exception) {
    cerr << "Exception: " << exception.what() << endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq -0x1b8(%rbp), %rdi
xorl %edx, %edx
callq 0x154da
movl $0x60, %edi
callq 0xa130
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x2ef02
movq %r15, -0x20(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20a5a
leaq -0x1b8(%rbp), %rsi
movq %r15, %rdi
callq 0xa880
movq 0x32318(%rip), %rbx     # 0x46ff0
leaq 0x1e3a7(%rip), %rsi     # 0x33086
movl $0xc, %edx
movq %rbx, %rdi
callq 0xa7a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xa850
movsbl %al, %esi
movq 0x322e6(%rip), %rdi     # 0x46ff0
callq 0xa410
movq %rax, %rdi
callq 0xa3c0
leaq -0x20(%rbp), %rdi
callq 0x154a6
leaq -0x1b0(%rbp), %rdi
callq 0x16800
leaq -0x128(%rbp), %rdi
callq 0xa560
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
movl $0x60, %esi
movq %r15, %rdi
callq 0xa0e0
jmp 0x14d7a
movq %rdx, %r14
movq %rax, %rbx
jmp 0x14d7a
movq %rdx, %r14
movq %rax, %rbx
jmp 0x14d92
movq %rdx, %r14
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x154a6
leaq -0x1b0(%rbp), %rdi
callq 0x16800
leaq -0x128(%rbp), %rdi
callq 0xa560
cmpl $0x1, %r14d
jne 0x14ded
movq %rbx, %rdi
callq 0xa060
movq %rax, %rbx
movq 0x32246(%rip), %rdi     # 0x46ff0
leaq 0x1e2c9(%rip), %rsi     # 0x3307a
movl $0xb, %edx
callq 0xa7a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x32225(%rip), %rdi     # 0x46ff0
movq %rax, %rsi
callq 0xa430
movq %rax, %rdi
callq 0xa800
callq 0xa5e0
jmp 0x14d38
movq %rax, %rbx
callq 0xa5e0
movq %rbx, %rdi
callq 0xa4d0
movq %rax, %rdi
callq 0x152eb
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/ppu.cpp
// Function: Rnes::Ppu::getBgColor()
uint32_t Ppu::getBgColor() {
  uint8_t memColor = load(backColorAddr);
  assert(memColor < sizeof(nesPaletteLut) / sizeof(nesPaletteLut[0]));
  if (isMonochromeMode()) {
    memColor &= 0x30;
  } else {
    memColor &= 0x3f;
  }
  return nesPaletteLut[memColor];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movl $0x3f00, %esi           # imm = 0x3F00
callq 0x20852
cmpb $0x40, %al
jae 0x17e3a
movzbl %al, %ecx
andb $0x30, %al
testb $0x1, 0x29(%rbx)
movzbl %al, %eax
cmovel %ecx, %eax
movzbl %al, %eax
leaq 0x1be70(%rip), %rcx     # 0x33ca0
movl (%rcx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1bf5f(%rip), %rdi     # 0x33da0
leaq 0x1bf94(%rip), %rsi     # 0x33ddc
leaq 0x1bf95(%rip), %rcx     # 0x33de4
movl $0x3a, %edx
callq 0xa160
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/ppu.cpp
// Function: Rnes::Ppu::getColor(unsigned int, unsigned int, bool)
uint32_t Ppu::getColor(uint32_t palette, uint32_t color, bool sprite) {
  uint8_t memColor;
  assert(color >= 0 && color <= 3);
  if (color == 0) {
    memColor = load(backColorAddr);
  } else {
    uint16_t paletteOffset = sprite ? 0x10 : 0;
    memColor = load(backColorAddr + paletteOffset + 4 * palette + color);
  }
  if (isMonochromeMode()) {
    memColor &= 0x30;
  } else {
    memColor &= 0x3f;
  }
  assert(memColor < sizeof(nesPaletteLut) / sizeof(nesPaletteLut[0]));
  return nesPaletteLut[memColor];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x4, %edx
jae 0x17ec0
movq %rdi, %rbx
movzbl %cl, %eax
shll $0x4, %eax
leal (%rax,%rsi,4), %eax
movl $0x3f00, %ecx           # imm = 0x3F00
addl %edx, %eax
addl %ecx, %eax
testl %edx, %edx
cmovel %ecx, %eax
movq 0x8(%rdi), %rdi
movzwl %ax, %esi
callq 0x20852
testb $0x1, 0x29(%rbx)
movl $0x3f, %ecx
movl $0x30, %edx
cmovel %ecx, %edx
andb %al, %dl
movzbl %dl, %eax
leaq 0x1bdea(%rip), %rcx     # 0x33ca0
movl (%rcx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1bf3e(%rip), %rdi     # 0x33e05
leaq 0x1bf0e(%rip), %rsi     # 0x33ddc
leaq 0x1bf49(%rip), %rcx     # 0x33e1e
movl $0x45, %edx
callq 0xa160
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/ppu.cpp
// Function: Rnes::Ppu::vramYInc()
void Ppu::vramYInc() {
  if ((vramCurrentAddr & 0x7000) != 0x7000) {
    vramCurrentAddr += 0x1000;
  } else {
    vramCurrentAddr &= ~0x7000;
    int y = (vramCurrentAddr & 0x03e0) >> 5;
    if (y == 29) {
      y = 0;
      vramCurrentAddr ^= 0x0800;
    } else if (y == 31) {
      y = 0;
    } else {
      y += 1;
    }
    vramCurrentAddr = (vramCurrentAddr & ~0x03e0) | (y << 5);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x138(%rdi), %ecx
movl %ecx, %eax
notl %eax
testl $0x7000, %eax           # imm = 0x7000
jne 0x17f3e
movl %ecx, %eax
andl $0x8fff, %eax           # imm = 0x8FFF
shrl $0x5, %ecx
andl $0x1f, %ecx
cmpl $0x1f, %ecx
je 0x17f3a
cmpl $0x1d, %ecx
jne 0x17f46
xorl $0x800, %eax            # imm = 0x800
xorl %ecx, %ecx
jmp 0x17f4f
addl $0x1000, %ecx           # imm = 0x1000
jmp 0x17f59
movzwl %cx, %ecx
shll $0x5, %ecx
addl $0x20, %ecx
andl $0xfffffc1f, %eax       # imm = 0xFFFFFC1F
movzwl %cx, %ecx
orl %eax, %ecx
movw %cx, 0x138(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/ppu.cpp
// Function: Rnes::Ppu::loadPatternTile(unsigned short)
uint16_t Ppu::loadPatternTile(uint16_t addr) {
  uint16_t ret = 0;
  uint16_t a = load(addr);
  uint16_t b = load(addr + 8);
  for (uint32_t i = 0; i < 8; i++) {
    ret |= ((1u << i) & a) << i;
    ret |= ((1u << i) & b) << (i + 1);
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x20852
movl %eax, %r15d
addl $0x8, %ebx
movq 0x8(%r14), %rdi
movzwl %bx, %esi
callq 0x20852
movzbl %r15b, %edx
movzbl %al, %esi
xorl %ecx, %ecx
xorl %eax, %eax
movl $0x1, %edi
shll %cl, %edi
movl %edi, %r8d
andl %edx, %r8d
shll %cl, %r8d
andl %esi, %edi
incl %ecx
shll %cl, %edi
orl %r8d, %edi
orl %edi, %eax
cmpl $0x8, %ecx
jne 0x17fe7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/ppu.cpp
// Function: Rnes::Ppu::restore(Rnes::PpuState const&)
void Ppu::restore(const PpuState &pb) {
  cycle = pb.cycle();
  frame = pb.frame();

  for (int i = 0; i < pb.regs_size(); i++) {
    regs[i] = pb.regs(i);
  }

  for (int i = 0; i < pb.spriteram_size(); i++) {
    const PpuState_SpriteState &sprite = pb.spriteram(i);
    spriteRam[i].yCoordMinus1 = sprite.ycoordminus1();
    spriteRam[i].tileIndex = sprite.tileindex();
    spriteRam[i].attr = sprite.attr();
    spriteRam[i].xCoord = sprite.xcoord();
  }

  vramToggle = pb.vramtoggle();
  vramFineXScroll = pb.vramfinexscroll();
  vramCurrentAddr = pb.vramcurrentaddr();
  vramTempAddr = pb.vramtempaddr();
  vramMachineAddr = pb.vrammachineaddr();
  vramReadLatch = pb.vramreadlatch();
  scrollingMachineState = pb.scrollingmachinestate();
  xScrollOrigin = pb.xscrollorigin();
  yScrollOrigin = pb.yscrollorigin();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsi), %rax
movq %rax, 0x18(%rdi)
movq 0x48(%rsi), %rax
movq %rax, 0x20(%rdi)
cmpl $0x0, 0x18(%rsi)
jle 0x18205
leaq 0x18(%r14), %r15
xorl %r12d, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0xa720
movb (%rax), %al
movb %al, 0x28(%rbx,%r12)
incq %r12
movslq (%r15), %rax
cmpq %rax, %r12
jl 0x181e8
cmpl $0x0, 0x30(%r14)
jle 0x1824a
leaq 0x28(%r14), %r15
xorl %r12d, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x18cfc
movb 0x18(%rax), %cl
movb %cl, 0x30(%rbx,%r12,4)
movb 0x1c(%rax), %cl
movb %cl, 0x31(%rbx,%r12,4)
movb 0x20(%rax), %cl
movb %cl, 0x32(%rbx,%r12,4)
movb 0x24(%rax), %al
movb %al, 0x33(%rbx,%r12,4)
incq %r12
movslq 0x30(%r14), %rax
cmpq %rax, %r12
jl 0x18213
movl 0x50(%r14), %eax
movl %eax, 0x130(%rbx)
movl 0x54(%r14), %eax
movl %eax, 0x134(%rbx)
movzwl 0x58(%r14), %eax
movw %ax, 0x138(%rbx)
movzwl 0x5c(%r14), %eax
movw %ax, 0x13a(%rbx)
movzwl 0x60(%r14), %eax
movw %ax, 0x13c(%rbx)
movb 0x64(%r14), %al
movb %al, 0x13e(%rbx)
movl 0x68(%r14), %eax
movl %eax, 0x140(%rbx)
movb 0x6c(%r14), %al
movb %al, 0x144(%rbx)
movb 0x70(%r14), %al
movb %al, 0x145(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/ppu.cpp
// Function: Rnes::Ppu::readReg(unsigned int)
uint8_t Ppu::readReg(uint32_t reg) {
  uint8_t ret;
  switch (reg) {
  case CONTROL1_REG:
    assert(0);
    // GUESS: Write only registers.
    return regs[reg];
    break;
  case CONTROL2_REG:
    assert(0);
    // GUESS: Write only registers.
    return regs[reg];
    break;
  case STATUS_REG:
    ret = regs[reg];
    // vblank status bit is clear on read
    clearVblankFlag();
    // reset the scroll/vram machine flip flops
    vramToggle = 0;
    // and return the reg value
    return ret;
    break;
  case SPR_ADDR_REG:
  case SPR_DATA_REG:
    // Write only registers.
    assert(0);
    return 0;
    break;
  case VRAM_ADDR_REG1:
    // assert(0);
    // This is a guess, we aren't expecting reads here.
    return vramCurrentAddr;
    break;
  case VRAM_ADDR_REG2:
    assert(0);
    // This is a guess, we aren't expecting reads here.
    return vramTempAddr;
    break;
  case VRAM_DATA_REG:
    ret = vramReadLatch;
    vramReadLatch = nes->vidMemRead(vramCurrentAddr);
    vramCurrentAddr += getVramAddrInc();
    return ret;
    break;
  default:
    assert(0);
    break;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x7, %esi
ja 0x1876d
movq %rdi, %rbx
movl %esi, %eax
leaq 0x1b5f6(%rip), %rcx     # 0x33c80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x2a(%rbx), %r14b
movl %r14d, %eax
andb $0x7f, %al
movb %al, 0x2a(%rbx)
movl $0x0, 0x130(%rbx)
jmp 0x186e9
movb 0x138(%rbx), %r14b
jmp 0x186e9
movb 0x13e(%rbx), %r14b
movq 0x8(%rbx), %rdi
movzwl 0x138(%rbx), %esi
callq 0x20852
movb %al, 0x13e(%rbx)
testb $0x4, 0x28(%rbx)
movl $0x1, %eax
movl $0x20, %ecx
cmovel %eax, %ecx
addw %cx, 0x138(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1adac(%rip), %rdi     # 0x334a4
leaq 0x1b6dd(%rip), %rsi     # 0x33ddc
leaq 0x1b77b(%rip), %rcx     # 0x33e81
movl $0x11a, %edx            # imm = 0x11A
callq 0xa160
leaq 0x1ad8d(%rip), %rdi     # 0x334a4
leaq 0x1b6be(%rip), %rsi     # 0x33ddc
leaq 0x1b75c(%rip), %rcx     # 0x33e81
movl $0x105, %edx            # imm = 0x105
callq 0xa160
leaq 0x1ad6e(%rip), %rdi     # 0x334a4
leaq 0x1b69f(%rip), %rsi     # 0x33ddc
leaq 0x1b73d(%rip), %rcx     # 0x33e81
movl $0x10a, %edx            # imm = 0x10A
callq 0xa160
leaq 0x1ad4f(%rip), %rdi     # 0x334a4
leaq 0x1b680(%rip), %rsi     # 0x33ddc
leaq 0x1b71e(%rip), %rcx     # 0x33e81
movl $0x123, %edx            # imm = 0x123
callq 0xa160
leaq 0x1ad30(%rip), %rdi     # 0x334a4
leaq 0x1b661(%rip), %rsi     # 0x33ddc
leaq 0x1b6ff(%rip), %rcx     # 0x33e81
movl $0x12e, %edx            # imm = 0x12E
callq 0xa160
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/ppu.cpp
// Function: unsigned char Rnes::Ppu::getColorFromPatternTable<false>(unsigned short, int, unsigned int, unsigned int)
uint8_t Ppu::getColorFromPatternTable(uint16_t patternTable, int offset, uint32_t x, uint32_t y) {
  assert(x < 8);
  if (!is8x8) {
    assert(y < 16);
    if ((offset % 2) == 0) {
      patternTable = 0x0000;
    } else {
      patternTable = 0x1000;
      offset--;
    }
    if (y >= 8) {
      offset++;
      y -= 8;
    }
  } else {
    assert(y < 8);
  }
  x = 8 - 1 - x;
  uint16_t byteAddrLower = patternTable + 16 * offset + y;
  uint16_t byteAddrUpper = patternTable + 16 * offset + y + 8;
  uint8_t color = ((load(byteAddrLower) >> x) & 0x1) | (((load(byteAddrUpper) >> (x)) & 0x1) << 1);
  return color;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x8, %ecx
jae 0x18cbd
cmpl $0x10, %r8d
jae 0x18cdc
movl %ecx, %r14d
movq %rdi, %rbx
movl %edx, %eax
andl $0x8000ffe, %eax        # imm = 0x8000FFE
andl $0x1, %edx
shll $0xc, %edx
leal 0xfff8(%r8), %ecx
xorl %edi, %edi
cmpl $0x8, %r8d
setae %dil
cmovbl %r8d, %ecx
orl %eax, %edi
shll $0x4, %edi
addl %edx, %ecx
leal (%rdi,%rcx), %r15d
addl $0x8, %r15d
movl %ecx, %esi
addl %edi, %esi
movq 0x8(%rbx), %rdi
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
callq 0x20852
movzbl %al, %eax
movb $0x7, %cl
subb %r14b, %cl
movzbl %cl, %r14d
xorl %r13d, %r13d
btl %r14d, %eax
setb %r13b
movq 0x8(%rbx), %rdi
andl %r12d, %r15d
movl %r15d, %esi
callq 0x20852
movzbl %al, %eax
movl %r14d, %ecx
shrl %cl, %eax
andl $0x1, %eax
leal (%r13,%rax,2), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b259(%rip), %rdi     # 0x33f1d
leaq 0x1b111(%rip), %rsi     # 0x33ddc
leaq 0x1b2b5(%rip), %rcx     # 0x33f87
movl $0x136, %edx            # imm = 0x136
callq 0xa160
leaq 0x1b303(%rip), %rdi     # 0x33fe6
leaq 0x1b0f2(%rip), %rsi     # 0x33ddc
leaq 0x1b296(%rip), %rcx     # 0x33f87
movl $0x138, %edx            # imm = 0x138
callq 0xa160
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/apu.cpp
// Function: Rnes::Apu::clockLengthAndSweep()
void Apu::clockLengthAndSweep() {
  pulseA->clockLengthAndSweep();
  pulseB->clockLengthAndSweep();
  triangle->clockLength();
  noise->clockLength();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xe8(%rdi), %rdi
callq 0x1a536
movq 0xf0(%rbx), %rdi
callq 0x1a536
movq 0xf8(%rbx), %rdi
callq 0x1a66e
movq 0x100(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1a870
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/apu.cpp
// Function: Rnes::Apu::resetFrameCounter()
void Apu::resetFrameCounter() {
  frameDivider = 0;
  step = 0;
  if (!isFourStepFrame()) {
    stepAdvance();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq $0x0, 0x10(%rdi)
cmpb $0x0, 0xcf(%rdi)
js 0x18e63
popq %rbp
retq
popq %rbp
jmp 0x18e6a
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/apu.cpp
// Function: Rnes::Apu::stepAdvance()
void Apu::stepAdvance() {
  uint32_t frameSteps = isFourStepFrame() ? 4 : 5;

  if (isFourStepFrame()) {
    if (step % 2) {
      clockLengthAndSweep();
    }
    clockEnvAndTriangle();
    if ((step == 3) and isFrameIntEnabled()) {
      setRequestFrameIrq();
    }
  } else {
    if (step < 4) {
      clockEnvAndTriangle();
    }
    if (step == 0 or step == 2) {
      clockLengthAndSweep();
    }
  }
  step += 1;
  if (step == frameSteps) {
    step = 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0xcf(%rdi)
movl 0x14(%rdi), %eax
js 0x18eb9
testb $0x1, %al
je 0x18e8c
movq %rbx, %rdi
callq 0x18dd8
movq %rbx, %rdi
callq 0x18e18
movl 0x14(%rbx), %eax
movl $0x4, %r14d
cmpl $0x3, %eax
jne 0x18ee1
movl $0x3, %eax
testb $0x40, 0xcf(%rbx)
jne 0x18ee1
orb $0x40, 0xcd(%rbx)
jmp 0x18ee1
cmpl $0x3, %eax
ja 0x18ec9
movq %rbx, %rdi
callq 0x18e18
movl 0x14(%rbx), %eax
movl $0x5, %r14d
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jne 0x18ee1
movq %rbx, %rdi
callq 0x18dd8
movl 0x14(%rbx), %eax
incl %eax
xorl %ecx, %ecx
cmpl %r14d, %eax
cmovnel %eax, %ecx
movl %ecx, 0x14(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/apu.cpp
// Function: Rnes::Apu::tick()
void Apu::tick() {
  // Divider logic for frame
  if (frameDivider == 0) {
    stepAdvance();
  }
  frameDivider = (frameDivider + 1) % frameCycles;

  // Divider logic for timers
  stepFastTimers();
  if (halfTimerDivider == 0) {
    stepSlowTimers();
  }
  halfTimerDivider = !halfTimerDivider;

  // Compute output each cycle
  sampleOffset += 1;
  float sample =
      95.88f /
      ((8128.0f / (float(pulseA->getCurrentSample() + pulseB->getCurrentSample()))) + 100.0f);
  sample += 159.79f / (100.0f + (1.0f / ((float(triangle->getCurrentSample()) / 8227.0f) +
                                         float(noise->getCurrentSample()) / 12241.0f)));
  samples[sampleOffset % sampleBufferSize] = sample;

  // Determine when to sample, and sample if needed.
  nextSampleCountdown--;
  if (!nextSampleCountdown) {
    float prevSampleClk = currentSampleClk;
    currentSampleClk += clksPerSample;
    nextSampleCountdown = (uint32_t)currentSampleClk - (uint32_t)prevSampleClk;
    if (currentSampleClk >= float(cpuClk)) {
      currentSampleClk = 0.0f;
    }
    generateSample();
  }

  /*
  if (samplerDivider == 0) {
  }
  samplerDivider = (samplerDivider + 1) % uint32_t(cpuClk/ sampleRate);
  */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x10(%rdi), %eax
testl %eax, %eax
jne 0x1911e
movq %rbx, %rdi
callq 0x18e6a
movl 0x10(%rbx), %eax
incl %eax
movl $0x8c9dc80b, %ecx       # imm = 0x8C9DC80B
imulq %rax, %rcx
shrq $0x2c, %rcx
imull $0x1d21, %ecx, %ecx     # imm = 0x1D21
subl %ecx, %eax
movl %eax, 0x10(%rbx)
movq 0xf8(%rbx), %rdi
callq 0x1a6d2
xorl %eax, %eax
cmpl $0x0, 0x18(%rbx)
jne 0x1915d
movq %rbx, %rdi
callq 0x18f06
xorl %eax, %eax
cmpl $0x0, 0x18(%rbx)
sete %al
movl %eax, 0x18(%rbx)
incq 0xb0(%rbx)
movq 0xe8(%rbx), %rdi
callq 0x1a464
movzbl %al, %r14d
movq 0xf0(%rbx), %rdi
callq 0x1a464
movzbl %al, %eax
addl %r14d, %eax
cvtsi2ss %eax, %xmm0
movss 0x1ae7f(%rip), %xmm1    # 0x34014
divss %xmm0, %xmm1
addss 0x1ae77(%rip), %xmm1    # 0x34018
movss 0x1ae73(%rip), %xmm0    # 0x3401c
movq 0xf8(%rbx), %rax
movzbl 0x2b(%rax), %eax
cvtsi2ss %eax, %xmm2
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movq 0x100(%rbx), %rdi
divss 0x1ae50(%rip), %xmm2    # 0x34020
movss %xmm2, -0x14(%rbp)
callq 0x1a778
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1ae38(%rip), %xmm0    # 0x34024
addss -0x14(%rbp), %xmm0
movss 0x1ae2f(%rip), %xmm1    # 0x34028
divss %xmm0, %xmm1
addss 0x1ae13(%rip), %xmm1    # 0x34018
movss 0x1ae1f(%rip), %xmm0    # 0x3402c
divss %xmm1, %xmm0
addss -0x18(%rbp), %xmm0
movl 0xb0(%rbx), %eax
andl $0x1f, %eax
movss %xmm0, 0x2c(%rbx,%rax,4)
decl 0x28(%rbx)
je 0x19233
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movss 0x24(%rbx), %xmm0
movss 0x20(%rbx), %xmm1
addss %xmm0, %xmm1
cvttss2si %xmm1, %rax
movss %xmm1, 0x24(%rbx)
cvttss2si %xmm0, %rcx
subl %ecx, %eax
movl %eax, 0x28(%rbx)
ucomiss 0x1add4(%rip), %xmm1    # 0x34030
jb 0x19265
movl $0x0, 0x24(%rbx)
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x18f3a
nop
// File: /workspace/github_cpp_makefile_star2_O3/mindbeast[P]rnes/apu.cpp
// Function: Rnes::Apu::writeReg(unsigned int, unsigned char)
void Apu::writeReg(uint32_t reg, uint8_t val) {
  regs[reg] = val;
  if (reg == SOFTCLOCK) {
    resetFrameCounter();
  } else if (reg == CONTROL_STATUS) {
    clearRequestDmcIrq();
    // xx what to do with the upper bits here
    if (~val & STATUS_CHANNEL1_LENGTH) {
      pulseA->zeroLength();
    }
    if (~val & STATUS_CHANNEL2_LENGTH) {
      pulseB->zeroLength();
    }
    if (~val & STATUS_CHANNEL3_LENGTH) {
      triangle->zeroLength();
    }
    if (~val & STATUS_CHANNEL4_LENGTH) {
      noise->zeroLength();
    }
  } else if (reg == CHANNEL1_LENGTH) {
    pulseA->resetLength();
    pulseA->resetSequencer();
    pulseA->resetEnvelope();
  } else if (reg == CHANNEL2_LENGTH) {
    pulseB->resetLength();
    pulseB->resetSequencer();
    pulseB->resetEnvelope();
  } else if (reg == CHANNEL3_LENGTH) {
    triangle->resetLength();
    triangle->setHaltFlag();
  } else if (reg == CHANNEL4_LENGTH) {
    noise->resetLength();
    noise->resetEnvelope();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
movb %dl, 0xb8(%rdi,%rax)
addl $-0x3, %esi
rorl %esi
cmpl $0xa, %esi
ja 0x193a6
leaq 0x1ad7a(%rip), %rax     # 0x34034
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0xe8(%rdi), %rax
jmp 0x19316
movq 0xf8(%rdi), %rax
movq 0x20(%rax), %rcx
movzbl 0x3(%rcx), %ecx
shrl $0x3, %ecx
leaq 0x1ad7b(%rip), %rdx     # 0x34060
movb (%rcx,%rdx), %cl
movb %cl, 0x28(%rax)
movb $0x1, 0x29(%rax)
jmp 0x193a6
movq $0x0, 0x10(%rdi)
cmpb $0x0, 0xcf(%rdi)
jns 0x193a6
popq %rbp
jmp 0x18e6a
movq 0xf0(%rdi), %rax
movq 0x8(%rax), %rcx
movzbl 0x3(%rcx), %ecx
shrl $0x3, %ecx
leaq 0x1ad38(%rip), %rdx     # 0x34060
movb (%rcx,%rdx), %cl
movb %cl, 0x11(%rax)
movl $0x0, 0x1c(%rax)
movb $0x1, 0x14(%rax)
jmp 0x193a6
movq 0x100(%rdi), %rax
movq (%rax), %rcx
movzbl 0x3(%rcx), %ecx
shrl $0x3, %ecx
leaq 0x1ad0d(%rip), %rdx     # 0x34060
movb (%rcx,%rdx), %cl
movb %cl, 0x8(%rax)
movb $0x1, 0xe(%rax)
jmp 0x193a6
andb $0x7f, 0xcd(%rdi)
testb $0x1, %dl
jne 0x19376
movq 0xe8(%rdi), %rax
movb $0x0, 0x11(%rax)
testb $0x2, %dl
jne 0x19386
movq 0xf0(%rdi), %rax
movb $0x0, 0x11(%rax)
testb $0x4, %dl
jne 0x19396
movq 0xf8(%rdi), %rax
movb $0x0, 0x28(%rax)
testb $0x8, %dl
jne 0x193a6
movq 0x100(%rdi), %rax
movb $0x0, 0x8(%rax)
popq %rbp
retq