LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/renbozqin[P]blocking_queue/blocking_queue.cpp
// Function: BlockingQueue<float>::Take()
T BlockingQueue<T>::Take(){
	std::unique_lock<std::mutex> lock(mtx);
	empty_.wait(lock, [this]{return !queue_.empty();} );
	assert(!queue_.empty());
	T front(queue_.front());
	queue_.pop();
	full_.notify_all();
	return front;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3cc2
movb $0x1, 0x8(%r14)
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
jne 0x34b2
leaq 0x58(%rbx), %r14
leaq -0x30(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
je 0x3497
movq 0x98(%rbx), %rax
cmpq %rax, 0xb8(%rbx)
je 0x34fc
leaq 0x88(%rbx), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
callq 0x4320
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x21f0
leaq -0x30(%rbp), %rdi
callq 0x2f04
movss -0x1c(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c74(%rip), %rdi      # 0x5177
leaq 0x1c28(%rip), %rsi      # 0x5132
leaq 0x1d22(%rip), %rcx      # 0x5233
movl $0x10, %edx
callq 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/renbozqin[P]blocking_queue/blocking_queue.cpp
// Function: BlockingQueue<float>::Front()
T BlockingQueue<T>::Front(){
	std::unique_lock<std::mutex> lock(mtx);
	empty_.wait(lock, [this]{return !queue_.empty();} );
	assert(!queue_.empty());
	T front(queue_.front());
	return front;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3cc2
movb $0x1, 0x8(%r14)
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
jne 0x3578
leaq 0x58(%rbx), %r14
leaq -0x30(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
je 0x355d
movq 0x98(%rbx), %rax
cmpq %rax, 0xb8(%rbx)
je 0x35aa
movss (%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2f04
movss -0x1c(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bc6(%rip), %rdi      # 0x5177
leaq 0x1b7a(%rip), %rsi      # 0x5132
leaq 0x1c9f(%rip), %rcx      # 0x525e
movl $0x21, %edx
callq 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/renbozqin[P]blocking_queue/blocking_queue.cpp
// Function: BlockingQueue<float>::Back()
T BlockingQueue<T>::Back(){
	std::unique_lock<std::mutex> lock(mtx);
	empty_.wait(lock, [this]{return !queue_.empty();} );
	assert(!queue_.empty());
	T back(queue_.back());
	return back;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3cc2
movb $0x1, 0x8(%r14)
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
jne 0x3626
leaq 0x58(%rbx), %r14
leaq -0x30(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
je 0x360b
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
je 0x3672
cmpq 0xc0(%rbx), %rax
jne 0x364f
movq 0xd0(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movss -0x4(%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2f04
movss -0x1c(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1afe(%rip), %rdi      # 0x5177
leaq 0x1ab2(%rip), %rsi      # 0x5132
leaq 0x1c03(%rip), %rcx      # 0x528a
movl $0x2a, %edx
callq 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]fastahack/Fasta.cpp
// Function: FastaIndexEntry::clear()
void FastaIndexEntry::clear(void)
{
    name = "";
    length = 0;
    offset = -1;  // no real offset will ever be below 0, so this allows us to
                  // check if we have already recorded a real offset
    line_blen = 0;
    line_len = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdx
leaq 0x5893(%rip), %rcx      # 0x9006
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x33f0
movl $0x0, 0x20(%rbx)
movq $-0x1, 0x28(%rbx)
movq $0x0, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]fastahack/Fasta.cpp
// Function: operator<<(std::ostream&, FastaIndexEntry const&)
ostream& operator<<(ostream& output, const FastaIndexEntry& e) {
    // just write the first component of the name, for compliance with other tools
    output << split(e.name, ' ').at(0) << "\t" << e.length << "\t" << e.offset << "\t" <<
        e.line_blen << "\t" << e.line_len;
    return output;  // for multiple << operators.
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x20, %edx
callq 0x886a
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x3891
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x3320
movq %rax, %r15
leaq 0x580d(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movl 0x20(%r14), %esi
movq %r15, %rdi
callq 0x3470
movq %rax, %r15
leaq 0x57ea(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x57c7(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movl 0x30(%r14), %esi
movq %r15, %rdi
callq 0x3470
movq %rax, %r15
leaq 0x57a4(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movl 0x34(%r14), %esi
movq %r15, %rdi
callq 0x3470
leaq 0x8(%rsp), %rdi
callq 0x521e
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x592f(%rip), %rdi      # 0x91c7
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x33d0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x521e
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]fastahack/Fasta.cpp
// Function: operator<<(std::ostream&, FastaIndex&)
ostream& operator<<(ostream& output, FastaIndex& fastaIndex) {
    vector<FastaIndexEntry> sortedIndex;
    for(vector<string>::const_iterator it = fastaIndex.sequenceNames.begin(); it != fastaIndex.sequenceNames.end(); ++it)
    {
        sortedIndex.push_back(fastaIndex[*it]);
    }
    sort(sortedIndex.begin(), sortedIndex.end(), fastaIndexEntryCompare);
    for( vector<FastaIndexEntry>::iterator fit = sortedIndex.begin(); fit != sortedIndex.end(); ++fit) {
        output << *fit << endl;
    }
    return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x30(%rsi), %r15
cmpq 0x38(%rsi), %r15
je 0x3eb5
movq %rsi, %r14
movq %rsp, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x534c
movq %r12, %rdi
movq %rax, %rsi
callq 0x52ee
addq $0x20, %r15
cmpq 0x38(%r14), %r15
jne 0x3e95
movq (%rsp), %r14
movq 0x8(%rsp), %r15
cmpq %r15, %r14
je 0x3f0c
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rcx
bsrq %rcx, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x94(%rip), %rcx       # 0x3e5b
movq %r14, %rdi
movq %r15, %rsi
callq 0x614d
leaq -0xa6(%rip), %rdx       # 0x3e5b
movq %r14, %rdi
movq %r15, %rsi
callq 0x623f
movq (%rsp), %r14
cmpq 0x8(%rsp), %r14
je 0x3f4f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37b1
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31d0
addq $0x38, %r14
jmp 0x3f10
movq %rsp, %rdi
callq 0x53c8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3f6a
jmp 0x3f6a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x53c8
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]fastahack/Fasta.cpp
// Function: getlineCounting(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&)
bool getlineCounting(istream& in, string& line, int& bytes) {
    bytes = 0;
    line.clear();
    for(int got = in.get(); got != EOF; got = in.get()) {
        bytes++;
        if (got == '\n') {
            // Line is over, but we read something (the '\n')
            return true;
        } else if (got != '\r') {
            // Anything other than a '\r' is real data.
            line.push_back((char)got);
        }
        // '\r' is skipped, but still counted in bytes
    }
    return !line.empty();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl $0x0, (%rdx)
movq $0x0, 0x8(%rsi)
movq (%rsi), %rax
movb $0x0, (%rax)
callq 0x3350
cmpl $-0x1, %eax
setne %cl
je 0x3fc9
incl (%r14)
cmpl $0xd, %eax
je 0x3fc4
cmpl $0xa, %eax
je 0x3fc9
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3240
movq %r15, %rdi
jmp 0x3f9f
cmpq $0x0, 0x8(%rbx)
setne %al
orb %cl, %al
andb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]fastahack/Fasta.cpp
// Function: FastaIndex::writeIndexFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void FastaIndex::writeIndexFile(string fname) {
    //cerr << "writing fasta index file " << fname << endl;
    ofstream file;
    file.open(fname.c_str()); 
    if (file.is_open()) {
        file << *this;
    } else { 
        cerr << "could not open index file " << fname << " for writing!" << endl;
        exit(1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x3460
movq (%rbx), %rsi
movq %r15, %rdi
movl $0x10, %edx
callq 0x3060
leaq 0x70(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0x4716
movq %rsp, %rdi
movq %r14, %rsi
callq 0x3e67
movq 0x88d9(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0x3230
leaq 0xf8(%rsp), %rdi
callq 0x3100
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
movq 0x88d3(%rip), %rdi      # 0xcff0
leaq 0x492c(%rip), %rsi      # 0x9050
movl $0x1a, %edx
callq 0x3320
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x88b4(%rip), %rdi      # 0xcff0
callq 0x3320
movq %rax, %rbx
leaq 0x49cf(%rip), %rsi      # 0x911a
movl $0xd, %edx
movq %rax, %rdi
callq 0x3320
movq %rbx, %rdi
callq 0x3150
movl $0x1, %edi
callq 0x3360
movq %rax, %rbx
movq %rsp, %rdi
callq 0x33b0
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]fastahack/Fasta.cpp
// Function: FastaIndex::entry(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
FastaIndexEntry FastaIndex::entry(string name) {
    FastaIndex::iterator e = this->find(name);
    if (e == this->end()) {
        cerr << "unable to find FASTA index entry for '" << name << "'" << endl;
        exit(1);
    } else {
        return e->second;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x71b6
addq $0x8, %r12
cmpq %r12, %rax
je 0x4824
movq %rax, %r15
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x55ac
movq 0x70(%r15), %rax
movq %rax, 0x30(%rbx)
movups 0x60(%r15), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x87c5(%rip), %rdi      # 0xcff0
leaq 0x48f6(%rip), %rsi      # 0x9128
callq 0x32a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3260
leaq 0x4904(%rip), %rsi      # 0x914d
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3150
movl $0x1, %edi
callq 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]fastahack/Fasta.cpp
// Function: FastaReference::~FastaReference()
FastaReference::~FastaReference(void) {
    if (file != NULL)
      fclose(file);
    if (index != NULL)
      delete index;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x4bbb
callq 0x32b0
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x4bd9
movq %r14, %rdi
callq 0x477e
movl $0x280, %esi            # imm = 0x280
movq %r14, %rdi
callq 0x32d0
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x4bf8
movq (%rbx), %rsi
incq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32d0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x55ac
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x47c2
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c5f
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 0x4d44
leaq (%r14,%r12), %rsi
movb $0x0, (%r14,%r12)
leaq 0xf(%rsp), %rdx
movb $0xd, (%rdx)
movq %r14, %rdi
callq 0x71fc
leaq 0xf(%rsp), %rdx
movb $0xa, (%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x71fc
leaq 0xf(%rsp), %rdx
movb $0x0, (%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x71fc
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 0x4d5f
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 0x4d81
jmp 0x4d81
jmp 0x4d81
movq %rax, %r14
movq 0x10(%rsp), %rdi
jmp 0x4da1
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x4d98
movq (%r13), %rsi
incq %rsi
callq 0x32d0
leaq 0x40(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x4db2
movq (%r13), %rsi
incq %rsi
callq 0x32d0
movq %r14, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O1/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 0x534c
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x55ac
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x4e5c
movq %r14, %rdi
callq 0x3130
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x81dc(%rip), %rdi      # 0xcff0
movq %rax, %rsi
callq 0x32a0
movq %rax, %r14
leaq 0x4355(%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 0x5423
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4ed6
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 0x55ac
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 0x4f56
movq (%rsp), %rdi
jmp 0x4f09
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 0x55ac
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4c00
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x4f1a
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 0x4f3c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4f4d
movq (%r13), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O1/t0mm4rx[P]piscine_cpp/day06/ex01/main.cpp
// Function: serialize()
void	*serialize(void)
{
	const char	alph[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
	char		*res = new char[16 + sizeof(int)];

	for (int i = 0; i < 8; i++)
		res[i] = alph[std::rand() % 62];
	*reinterpret_cast<int*>(res + 8) = std::rand();
	for (int i = 8 + sizeof(int); (unsigned int)i < 16 + sizeof(int); i++)
		res[i] = alph[std::rand() % 62];
	return ((void*)res);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x14, %edi
callq 0x1030
movq %rax, %rbx
xorl %r15d, %r15d
leaq 0xd83(%rip), %r14       # 0x2010
callq 0x1050
cltq
imulq $-0x7bdef7bd, %rax, %rcx # imm = 0x84210843
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x6, %edx
addl %ecx, %ecx
subl %edx, %ecx
addl %eax, %ecx
movslq %ecx, %rax
movb (%rax,%r14), %al
movb %al, (%rbx,%r15)
incq %r15
cmpq $0x8, %r15
jne 0x128d
callq 0x1050
movl %eax, 0x8(%rbx)
movl $0xc, %r15d
callq 0x1050
cltq
imulq $-0x7bdef7bd, %rax, %rcx # imm = 0x84210843
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x6, %edx
addl %ecx, %ecx
subl %edx, %ecx
addl %eax, %ecx
movslq %ecx, %rax
movb (%rax,%r14), %al
movb %al, (%rbx,%r15)
incq %r15
cmpq $0x14, %r15
jne 0x12d8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/t0mm4rx[P]piscine_cpp/day06/ex01/main.cpp
// Function: deserialize(void*)
Data 	*deserialize(void *addr)
{
	Data	*data = new Data;
	char	*raw = reinterpret_cast<char*>(addr);

	data->s1 = std::string(raw, 8);
	data->s2 = std::string(raw + 8 + sizeof(int), 8);
	data->n = *reinterpret_cast<int *>(raw + 8);
	return (data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x48, %edi
callq 0x10c0
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
xorl %eax, %eax
movq %rax, 0x8(%r14)
movb %al, 0x10(%r14)
leaq 0x38(%r14), %rcx
movq %rcx, 0x28(%r14)
movq %rax, 0x30(%r14)
movb %al, 0x38(%r14)
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
testq %rbx, %rbx
je 0x140d
movq %r14, %r15
addq $0x28, %r15
movq (%rbx), %rax
leaq -0x48(%rbp), %r12
movq %rax, 0x10(%r12)
movq $0x8, 0x8(%r12)
movb $0x0, 0x18(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x10f0
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x13b8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x10d0
movq %r13, (%r12)
movq 0xc(%rbx), %rax
movq %rax, 0x10(%r12)
movq $0x8, 0x8(%r12)
movb $0x0, 0x18(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x10f0
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x13f4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x10d0
movl 0x8(%rbx), %eax
movl %eax, 0x20(%r14)
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc4a(%rip), %rdi       # 0x205e
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O1/t0mm4rx[P]piscine_cpp/day06/ex01/main.cpp
// Function: main
int		main(void)
{
	void	*addr = serialize();
	Data	*data = deserialize(addr);

	std::srand(time(0));
	std::cout << "s1: " << data->s1 << std::endl;
	std::cout << "s2: " << data->s2 << std::endl;
	std::cout << "n : " << data->n << std::endl;

	delete []reinterpret_cast<char*>(addr);
	delete data;
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x126c
movq %rax, %r15
movq %rax, %rdi
callq 0x1323
movq %rax, %r14
movq %rax, %rbx
xorl %edi, %edi
callq 0x1090
movl %eax, %edi
callq 0x10a0
movq 0x2b86(%rip), %r12      # 0x3fd8
leaq 0xbf6(%rip), %rsi       # 0x204f
movl $0x4, %edx
movq %r12, %rdi
callq 0x10e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x10e0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x1040
movq %rax, %rdi
callq 0x1060
leaq 0xbae(%rip), %rsi       # 0x2054
movl $0x4, %edx
movq %r12, %rdi
callq 0x10e0
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rdx
movq %r12, %rdi
callq 0x10e0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x1040
movq %rax, %rdi
callq 0x1060
leaq 0xb65(%rip), %rsi       # 0x2059
movl $0x4, %edx
movq %r12, %rdi
callq 0x10e0
movl 0x20(%r14), %esi
movq %r12, %rdi
callq 0x1120
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1040
movq %rax, %rdi
callq 0x1060
movq %r15, %rdi
callq 0x1100
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rax
cmpq %rax, %rdi
je 0x1557
movq (%rax), %rsi
incq %rsi
callq 0x10d0
movq (%rbx), %rdi
addq $0x10, %r14
cmpq %r14, %rdi
je 0x156e
movq (%r14), %rsi
incq %rsi
callq 0x10d0
movl $0x48, %esi
movq %rbx, %rdi
callq 0x10d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ikatanic[P]lcskpp/./utils.h
// Function: product_fits_in_63bits(unsigned long, unsigned long, unsigned long*)
bool product_fits_in_63bits(uint64_t a, uint64_t b, uint64_t* c) {
  if (a <= LLONG_MAX / b) {
    *c = a * b;
    return true;
  }
  return false;
}

// Assembly:
movq %rdx, %rcx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rsi
cmpq %rdi, %rax
jb 0x242a
imulq %rdi, %rsi
movq %rsi, (%rcx)
cmpq %rdi, %rax
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
sete %r8b
je 0x2474
movq %rdx, %rcx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rdi
movq (%rcx), %rdx
cmpq %rdx, %rax
jb 0x2474
decq %rsi
imulq %rdi, %rdx
subq $0x1, %rsi
setb %r8b
jb 0x2471
cmpq %rdx, %rax
jae 0x245e
movq %rdx, (%rcx)
movl %r8d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3b20
xorl %eax, %eax
cmpq $0x2, %r14
jb 0x24e6
xorl %eax, %eax
movq %r14, %rcx
incl %eax
shrq $0x9, %rcx
cmpq $0x3ff, %r14            # imm = 0x3FF
movq %rcx, %r14
ja 0x24d4
testl %eax, %eax
je 0x260d
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %rcx
movq (%rbx), %rsi
movq 0x8(%rbx), %r13
movq %rbx, 0x28(%rsp)
movq 0x10(%rbx), %rdi
movq 0x20(%rsp), %rdx
movl %eax, %eax
movq %rax, 0x30(%rsp)
xorl %ebx, %ebx
leaq 0x5c43(%rip), %r14      # 0x8160
movq %rbp, %r15
movq %r13, %r12
movq %rsi, %rbp
movq %rdi, %r13
movq %rcx, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movl $0x804, %edx            # imm = 0x804
movq %r14, %rdi
xorl %esi, %esi
callq 0x20c0
cmpq %r12, %rbp
je 0x2568
leaq (%rbx,%rbx,8), %rcx
movq %rbp, %rax
movq (%rax), %rdx
shrq %cl, %rdx
andl $0x1ff, %edx            # imm = 0x1FF
incl 0x4(%r14,%rdx,4)
addq $0x10, %rax
cmpq %r12, %rax
jne 0x254e
movl 0x5bf2(%rip), %eax      # 0x8160
xorl %ecx, %ecx
addl 0x4(%r14,%rcx,4), %eax
movl %eax, 0x4(%r14,%rcx,4)
leaq 0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq $0x200, %rdx            # imm = 0x200
jne 0x2570
cmpq %r12, %rbp
je 0x25ca
leaq (%rbx,%rbx,8), %rcx
movq %rbp, %rax
movq (%rax), %rdx
movq %rdx, %rsi
shrq %cl, %rsi
andl $0x1ff, %esi            # imm = 0x1FF
movslq (%r14,%rsi,4), %rdi
leal 0x1(%rdi), %r8d
movl %r8d, (%r14,%rsi,4)
shlq $0x4, %rdi
movq %rdx, (%r15,%rdi)
movl 0x8(%rax), %edx
movl %edx, 0x8(%r15,%rdi)
addq $0x10, %rax
cmpq %r12, %rax
jne 0x2596
incq %rbx
movq %r13, %r8
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %rsi
cmpq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r13
movq 0x40(%rsp), %rdi
jne 0x251d
movq 0x28(%rsp), %rax
movq %rdi, 0x10(%rax)
movq %r15, (%rax)
movq %r12, 0x18(%rsp)
movq %r13, 0x8(%rax)
movq %r8, 0x20(%rsp)
movq %rbp, 0x10(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x261c
callq 0x2130
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3ba0
movq %r14, %rdi
callq 0x2489
testl %eax, %eax
jle 0x27a1
movq 0x18(%rsp), %r10
movq 0x20(%rsp), %rsi
movq (%rbx), %rcx
movq 0x8(%rbx), %rdi
movq %rbx, 0x30(%rsp)
movq 0x10(%rbx), %r8
xorl %ebp, %ebp
movq 0x28(%rsp), %rdx
leaq 0x62df(%rip), %r14      # 0x8970
movq %r10, %r12
movq %rdi, %rbx
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
cmpl $0x9, %eax
movl $0x9, %r15d
movl %eax, 0x14(%rsp)
cmovll %eax, %r15d
movl $0x1, %r13d
movl %r15d, %ecx
shll %cl, %r13d
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
leal -0x1(%r13), %eax
movl %eax, 0x10(%rsp)
movl $0x4, %edx
shll %cl, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20c0
movq 0x38(%rsp), %r10
movl %ebp, %ecx
movslq 0x10(%rsp), %rax
cmpq %rbx, %r10
je 0x270c
movq %r10, %rdx
movq (%rdx), %rsi
shrq %cl, %rsi
andq %rax, %rsi
incl 0x4(%r14,%rsi,4)
addq $0x8, %rdx
cmpq %rbx, %rdx
jne 0x26f5
movl %r13d, %edx
movl 0x625b(%rip), %esi      # 0x8970
xorl %edi, %edi
addl 0x4(%r14,%rdi,4), %esi
movl %esi, 0x4(%r14,%rdi,4)
leaq 0x1(%rdi), %r8
movq %r8, %rdi
cmpq %r8, %rdx
jne 0x2717
cmpq %rbx, %r10
je 0x275a
movq %r10, %rdx
movq (%rdx), %rsi
movq %rsi, %rdi
shrq %cl, %rdi
andq %rax, %rdi
movslq (%r14,%rdi,4), %r8
leal 0x1(%r8), %r9d
movl %r9d, (%r14,%rdi,4)
movq %rsi, (%r12,%r8,8)
addq $0x8, %rdx
cmpq %rbx, %rdx
jne 0x2735
addl %r15d, %ebp
movq 0x40(%rsp), %r9
movq %r9, %rdx
movq %rbx, %rsi
movq %r12, %rcx
movl 0x14(%rsp), %eax
subl %r15d, %eax
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %r8
jg 0x2691
movq 0x30(%rsp), %rax
movq %r8, 0x10(%rax)
movq %r12, (%rax)
movq %rbx, 0x20(%rsp)
movq %rdi, 0x8(%rax)
movq %r9, 0x28(%rsp)
movq %r10, 0x18(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x27b0
callq 0x2130
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ee50(%rip), %rsi     # 0x34024
leaq 0x1ee4d(%rip), %rdx     # 0x34028
leaq -0x68(%rbp), %rdi
callq 0x181ba
leaq -0x8228(%rbp), %rdi
movl $0x8000, %edx           # imm = 0x8000
xorl %esi, %esi
callq 0xb280
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 0x16284
leaq -0x228(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xb370
movq -0x88(%rbp), %rdi
movq -0x68(%rbp), %rsi
leaq -0x8228(%rbp), %rdx
callq 0xb9a0
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %rax, %rsi
callq 0x16246
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x15282
movq -0x48(%rbp), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
andb $-0x2, %sil
cmpb $0x2e, %sil
jne 0x1527a
movb $0x78, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x15268
movq -0x60(%rbp), %rdx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
movq $-0x1, %rcx
callq 0xb7f0
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x152b2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xb0e0
leaq 0x310b7(%rip), %rax     # 0x46370
leaq -0x190(%rbp), %r14
movq %rax, -0x98(%r14)
leaq 0x310ca(%rip), %rax     # 0x46398
movq %rax, (%r14)
movq $0x0, -0x90(%r14)
leaq -0x218(%rbp), %rdi
callq 0x167e2
movq %r14, %rdi
callq 0xb560
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x15308
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1531d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xb0e0
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 0x15353
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xb0e0
jmp 0x15353
jmp 0x15350
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x163ae
jmp 0x15364
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x1537c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x15391
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq %rbx, %rdi
callq 0xb4d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xb2b0
leaq -0x460(%rbp), %rdx
leaq -0x28(%rbp), %r15
movl $0x400, %ecx            # imm = 0x400
movl %eax, %edi
movq %r14, %rsi
movq %r15, %r8
callq 0xb570
movq (%r15), %rax
movq 0x20(%rax), %rsi
leaq -0x19(%rbp), %rdx
movq %rbx, %rdi
callq 0x16246
movq %rbx, %rax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x15399
leaq -0x98(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x18120
leaq -0x38(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x156af
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xb0e0
leaq -0x48(%rbp), %rdi
movq %r14, (%rdi)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
callq 0x18120
leaq 0x1e964(%rip), %rsi     # 0x34037
leaq -0x48(%rbp), %rdi
callq 0xb740
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0xb380
cmpl $0x1, -0x68(%rbp)
ja 0x156fc
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0xb890
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x18120
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x18120
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xb930
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x1575f
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xb0e0
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0xb380
cmpl $0x1, -0x88(%rbp)
ja 0x15785
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0xb890
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x1579a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x157af
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x157ca
movq -0x98(%rbp), %rsi
incq %rsi
callq 0xb0e0
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 0x1581b
movq -0x78(%rbp), %rsi
incq %rsi
callq 0xb0e0
jmp 0x1581b
jmp 0x15818
jmp 0x15832
movq %rax, %rbx
jmp 0x1584a
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15865
movq -0x38(%rbp), %rsi
jmp 0x1585d
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x15835
movq -0x58(%rbp), %rsi
incq %rsi
callq 0xb0e0
jmp 0x15835
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x1584a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x15865
movq -0x98(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq %rbx, %rdi
callq 0xb4d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18120
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xb380
cmpl $0x2, -0x38(%rbp)
jb 0x15998
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
xorl %edx, %edx
callq 0xb380
cmpl $0x2, -0x38(%rbp)
jne 0x15998
movq 0x3271d(%rip), %rdi     # 0x47ff0
leaq 0x1e787(%rip), %rsi     # 0x34061
movl $0x9, %edx
callq 0xb7a0
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x18120
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x151ad
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x326d5(%rip), %rdi     # 0x47ff0
callq 0xb7a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb850
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb410
movq %rax, %rdi
callq 0xb3c0
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15963
movq -0x28(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x15978
movq -0x48(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x1598d
movq -0x68(%rbp), %rsi
incq %rsi
callq 0xb0e0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x32651(%rip), %rdi     # 0x47ff0
leaq 0x1e697(%rip), %rsi     # 0x3403d
movl $0x23, %edx
callq 0xb7a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x32632(%rip), %rdi     # 0x47ff0
callq 0xb7a0
movq %rax, %rdi
callq 0xb800
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0xb4f0
movq %rax, %rbx
jmp 0x159f8
jmp 0x15a0f
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x159f8
movq -0x28(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x15a12
movq -0x48(%rbp), %rsi
incq %rsi
callq 0xb0e0
jmp 0x15a12
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x15a27
movq -0x68(%rbp), %rsi
incq %rsi
callq 0xb0e0
movq %rbx, %rdi
callq 0xb4d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16284
movl $0x60, %edi
callq 0xb130
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x302b6
movq %r15, -0x20(%rbp)
leaq -0x1c0(%rbp), %rsi
movq %r15, %rdi
callq 0xb050
movq -0x20(%rbp), %rsi
movq %rbx, %rdi
callq 0x21c1c
movq 0x32563(%rip), %rbx     # 0x47ff0
leaq 0x1e5d7(%rip), %rsi     # 0x3406b
movl $0xe, %edx
movq %rbx, %rdi
callq 0xb7a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb850
movsbl %al, %esi
movq 0x32531(%rip), %rdi     # 0x47ff0
callq 0xb410
movq %rax, %rdi
callq 0xb3c0
leaq -0x20(%rbp), %rdi
callq 0x163f2
leaq 0x30894(%rip), %rax     # 0x46370
leaq -0x128(%rbp), %rbx
movq %rax, -0x98(%rbx)
leaq 0x308a7(%rip), %rax     # 0x46398
movq %rax, (%rbx)
movq $0x0, -0x90(%rbx)
leaq -0x1b0(%rbp), %rdi
callq 0x167e2
movq %rbx, %rdi
callq 0xb560
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 0xb0e0
jmp 0x15b55
movq %rdx, %r14
movq %rax, %rbx
jmp 0x15b55
movq %rdx, %r14
movq %rax, %rbx
jmp 0x15b61
movq %rdx, %r14
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x163f2
leaq -0x1c0(%rbp), %rdi
callq 0x163ae
cmpl $0x1, %r14d
jne 0x15bbc
movq %rbx, %rdi
callq 0xb060
movq %rax, %rbx
movq 0x32477(%rip), %rdi     # 0x47ff0
leaq 0x1e4fa(%rip), %rsi     # 0x3407a
movl $0xb, %edx
callq 0xb7a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x32456(%rip), %rdi     # 0x47ff0
movq %rax, %rsi
callq 0xb430
movq %rax, %rdi
callq 0xb800
callq 0xb5e0
jmp 0x15b13
movq %rax, %rbx
callq 0xb5e0
movq %rbx, %rdi
callq 0xb4d0
movq %rax, %rdi
callq 0x16237
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16426
movl $0x60, %edi
callq 0xb130
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x302b6
movq %r15, -0x20(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21a18
movq -0x20(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0xb880
movq 0x323c6(%rip), %rbx     # 0x47ff0
leaq 0x1e455(%rip), %rsi     # 0x34086
movl $0xc, %edx
movq %rbx, %rdi
callq 0xb7a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb850
movsbl %al, %esi
movq 0x32394(%rip), %rdi     # 0x47ff0
callq 0xb410
movq %rax, %rdi
callq 0xb3c0
leaq -0x20(%rbp), %rdi
callq 0x163f2
leaq -0x1b0(%rbp), %rdi
callq 0x177ca
leaq -0x128(%rbp), %rdi
callq 0xb560
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 0xb0e0
jmp 0x15ccc
movq %rdx, %r14
movq %rax, %rbx
jmp 0x15ccc
movq %rdx, %r14
movq %rax, %rbx
jmp 0x15ce4
movq %rdx, %r14
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x163f2
leaq -0x1b0(%rbp), %rdi
callq 0x177ca
leaq -0x128(%rbp), %rdi
callq 0xb560
cmpl $0x1, %r14d
jne 0x15d3f
movq %rbx, %rdi
callq 0xb060
movq %rax, %rbx
movq 0x322f4(%rip), %rdi     # 0x47ff0
leaq 0x1e377(%rip), %rsi     # 0x3407a
movl $0xb, %edx
callq 0xb7a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x322d3(%rip), %rdi     # 0x47ff0
movq %rax, %rsi
callq 0xb430
movq %rax, %rdi
callq 0xb800
callq 0xb5e0
jmp 0x15c8a
movq %rax, %rbx
callq 0xb5e0
movq %rbx, %rdi
callq 0xb4d0
movq %rax, %rdi
callq 0x16237
// File: /workspace/github_cpp_makefile_star2_O1/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 0x217f2
cmpb $0x40, %al
jae 0x18dee
movzbl %al, %ecx
andb $0x30, %al
testb $0x1, 0x29(%rbx)
movzbl %al, %eax
cmovel %ecx, %eax
movzbl %al, %eax
leaq 0x1bebc(%rip), %rcx     # 0x34ca0
movl (%rcx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1bfab(%rip), %rdi     # 0x34da0
leaq 0x1bfe0(%rip), %rsi     # 0x34ddc
leaq 0x1bfe1(%rip), %rcx     # 0x34de4
movl $0x3a, %edx
callq 0xb160
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18e74
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 0x217f2
testb $0x1, 0x29(%rbx)
movl $0x3f, %ecx
movl $0x30, %edx
cmovel %ecx, %edx
andb %al, %dl
movzbl %dl, %eax
leaq 0x1be36(%rip), %rcx     # 0x34ca0
movl (%rcx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1bf8a(%rip), %rdi     # 0x34e05
leaq 0x1bf5a(%rip), %rsi     # 0x34ddc
leaq 0x1bf95(%rip), %rcx     # 0x34e1e
movl $0x45, %edx
callq 0xb160
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %eax
movl %eax, %ecx
notl %ecx
testl $0x7000, %ecx           # imm = 0x7000
jne 0x18f03
movl %eax, %ecx
andl $0x8fff, %ecx           # imm = 0x8FFF
movw %cx, 0x138(%rdi)
shrl $0x5, %eax
andl $0x1f, %eax
cmpl $0x1f, %eax
je 0x18eff
cmpl $0x1d, %eax
jne 0x18f0a
xorl $0x800, %ecx            # imm = 0x800
movw %cx, 0x138(%rdi)
xorl %eax, %eax
jmp 0x18f13
addl $0x1000, %eax           # imm = 0x1000
jmp 0x18f23
movzwl %ax, %eax
shll $0x5, %eax
addl $0x20, %eax
movl $0xfffffc1f, %ecx       # imm = 0xFFFFFC1F
andl 0x138(%rdi), %ecx
movzwl %ax, %eax
orl %ecx, %eax
movw %ax, 0x138(%rdi)
popq %rbp
retq