// File: sun98[P]Mini-DFS/namenode.cpp
// Function: NameServer::operator()()
void NameServer::operator()()
{
    while (true)
    {
        std::vector<std::string> parameters = parse_cmd();
        std::vector<int> idx;
        std::ifstream is;
        char *buf = nullptr;
        // md5 checksum for replicate chunks;
        MD5 md5;
        if (parameters.empty())
        {
            std::cerr << "input a blank line" << std::endl;
            continue;
        }
        if (parameters[0] == "quit" || parameters[0] == "exit")
        {
            exit(0);
        }
        // list all the files in name server.
        else if (parameters[0] == "ls")
        {
            if (parameters.size() != 1)
            {
                std::cerr << "Usage: "
                          << "ls (list all files in name server)" << std::endl;
            }
            else
            {
                std::cout << "File ID\tChunk Num\tFile Name" << std::endl;
                fileTree_.list(meta);
            }
            continue;
        }
        // upload file to miniDFS
        else if (parameters[0] == "up")
        {
            if (parameters.size() != 3)
            {
                std::cerr << "Usage: "
                          << "up src dest" << std::endl;
                continue;
            }
            is.open(parameters[1], std::ifstream::ate | std::ifstream::binary);
            if (!is)
            {
                std::cerr << "Failed in opening src file: file " << parameters[1] << std::endl;
                continue;
            }
            else if (!fileTree_.insert_node(parameters[2], true))
            {
                std::cerr << "Failed in creating dest file.\nPlease ensure File: " << parameters[2] << " does not exist" << std::endl;
                continue;
            }
            else
            {
                int totalSize = is.tellg();
                buf = new char[totalSize];
                is.seekg(0, is.beg);
                is.read(buf, totalSize);
                std::vector<double> serverSize;
                for (const auto &server : dataServers_)
                    serverSize.push_back(server->size());
                idx = argsort<double>(serverSize);
                // std::cout << "total size " << totalSize << std::endl;
                ++idCnt_;
                for (int i = 0; i < numReplicate_; ++i)
                {
                    std::unique_lock<std::mutex> lk(dataServers_[idx[i]]->mtx);
                    meta[parameters[2]] = std::make_pair(idCnt_, totalSize);
                    dataServers_[idx[i]]->cmd = "up";
                    dataServers_[idx[i]]->fid = idCnt_;
                    dataServers_[idx[i]]->bufSize = totalSize;
                    dataServers_[idx[i]]->buf = buf;
                    dataServers_[idx[i]]->finish = false;
                    lk.unlock();
                    dataServers_[idx[i]]->cv.notify_all();
                }
            }
        }
        // fetch file from miniDFS
        else if (parameters[0] == "down" || parameters[0] == "down_id")
        {
            if (parameters.size() != 3 && parameters.size() != 4)
            {
                std::cerr << "Usage: "
                          << "down src dest" << std::endl;
                std::cerr << "Usage: "
                          << "down_id file_id offset dest" << std::endl;
                continue;
            }
            else
            {
                if (parameters[0] == "down" && meta.find(parameters[1]) == meta.end())
                {
                    std::cerr << "Error: no such file in MiniDFS." << std::endl;
                    continue;
                }
                for (int i = 0; i < 4; ++i)
                {
                    std::unique_lock<std::mutex> lk(dataServers_[i]->mtx);
                    dataServers_[i]->cmd = parameters[0];
                    if (parameters[0] == "down")
                    {
                        std::pair<int, int> metaData = meta[parameters[1]];
                        dataServers_[i]->fid = metaData.first;
                        dataServers_[i]->bufSize = metaData.second;
                    }
                    else
                    {
                        dataServers_[i]->fid = std::stoi(parameters[1]);
                        dataServers_[i]->offset = std::stoi(parameters[2]);
                    }
                    dataServers_[i]->finish = false;
                    lk.unlock();
                    dataServers_[i]->cv.notify_all();
                }
            }
        }
        // locate the data server given file ID and Offset.
        else if (parameters[0] == "loc")
        {
            if (parameters.size() != 3)
            {
                std::cerr << "Usage: "
                          << "loc file_id offset" << std::endl;
                continue;
            }
            else
            {
                for (int i = 0; i < 4; ++i)
                {
                    std::unique_lock<std::mutex> lk(dataServers_[i]->mtx);
                    dataServers_[i]->cmd = "loc";
                    dataServers_[i]->fid = std::stoi(parameters[1]);
                    dataServers_[i]->offset = std::stoi(parameters[2]);
                    dataServers_[i]->finish = false;
                    lk.unlock();
                    dataServers_[i]->cv.notify_all();
                }
            }
        }
        else
            std::cerr << "Unknown command." << std::endl;

        // waiting for the finish of data server.
        for (const auto &server : dataServers_)
        {
            std::unique_lock<std::mutex> lk(server->mtx);
            (server->cv).wait(lk, [&]() { return server->finish; });
            lk.unlock();
            (server->cv).notify_all();
        }

        // work after processing of data server
        if (parameters[0] == "down" || parameters[0] == "down_id")
        {
            std::string md5_checksum, pre_checksum;
            for (int i = 0; i < 4; ++i)
            {
                if (dataServers_[i]->bufSize)
                {
                    std::ofstream os;
                    if (parameters[0] == "down")
                        os.open(parameters[2]);
                    else if (parameters[0] == "down_id")
                        os.open(parameters[3]);
                    if (!os)
                        std::cerr << "Failed in creating file.\nPlease ensure dest directory exists." << std::endl;
                    else
                    {
                        os.write(dataServers_[i]->buf, dataServers_[i]->bufSize);
                        os.close();
                        md5.update(dataServers_[i]->buf, dataServers_[i]->bufSize);
                        md5.finalize();
                        md5_checksum = md5.toString();
                        if (!pre_checksum.empty() && pre_checksum != md5_checksum)
                        {
                            std::cerr << "Error: inconsistent checksum for files from different data servers. File may be corrupted." << std::endl;
                        }
                        else if (!pre_checksum.empty() && pre_checksum == md5_checksum)
                        {
                            std::cout << "MD5 checksum passed." << std::endl;
                        }
                        pre_checksum = md5_checksum;
                    }
                    delete[] dataServers_[i]->buf;
                }
            }
        }
        else if (parameters[0] == "up")
        {
            std::cout << "Upload success. File ID is " << idCnt_ << std::endl;
        }
        else if (parameters[0] == "loc" || parameters[0] == "ls")
        {
            bool notFound = true;
            for (int i = 0; i < 4; ++i)
            {
                if (dataServers_[i]->bufSize)
                {
                    notFound = false;
                    std::cout << "Found File ID=" << parameters[1] << ", offset=" << parameters[2] << " at " << dataServers_[i]->get_name() << std::endl;
                }
            }
            if (notFound)
                std::cout << "Error, File ID=" << parameters[1] << ", offset=" << parameters[2] << " not found." << std::endl;
        }
        delete[] buf;
        is.close();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x8b0, %rsp            # imm = 0x8B0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x670(%rbp)
movq -0x670(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x9d90
leaq -0x38(%rbp), %rdi
callq 0xba00
leaq -0x240(%rbp), %rdi
callq 0x3350
jmp 0x9f71
movq $0x0, -0x258(%rbp)
leaq -0x2c4(%rbp), %rdi
callq 0x6ee0
jmp 0x9f8a
leaq -0x20(%rbp), %rdi
callq 0xba20
testb $0x1, %al
jne 0x9f99
jmp 0xa007
movq 0xd050(%rip), %rdi      # 0x16ff0
leaq 0x6248(%rip), %rsi      # 0x101ef
callq 0x3300
movq %rax, -0x678(%rbp)
jmp 0x9fb5
movq -0x678(%rbp), %rdi
movq 0xcfe5(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0x9fca
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
jmp 0xb82e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
jmp 0xb822
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x61e4(%rip), %rsi      # 0x10202
callq 0x49c0
movb %al, -0x679(%rbp)
jmp 0xa02b
movb -0x679(%rbp), %al
testb $0x1, %al
jne 0xa067
jmp 0xa037
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x61b9(%rip), %rsi      # 0x10207
callq 0x49c0
movb %al, -0x67a(%rbp)
jmp 0xa05b
movb -0x67a(%rbp), %al
testb $0x1, %al
jne 0xa067
jmp 0xa06e
xorl %edi, %edi
callq 0x3360
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x6187(%rip), %rsi      # 0x1020c
callq 0x49c0
movb %al, -0x67b(%rbp)
jmp 0xa092
movb -0x67b(%rbp), %al
testb $0x1, %al
jne 0xa0a1
jmp 0xa15a
leaq -0x20(%rbp), %rdi
callq 0x8840
cmpq $0x1, %rax
je 0xa0ff
movq 0xcf39(%rip), %rdi      # 0x16ff0
leaq 0x6151(%rip), %rsi      # 0x1020f
callq 0x3300
movq %rax, -0x688(%rbp)
jmp 0xa0cc
movq -0x688(%rbp), %rdi
leaq 0x613d(%rip), %rsi      # 0x10217
callq 0x3300
movq %rax, -0x690(%rbp)
jmp 0xa0e8
movq -0x690(%rbp), %rdi
movq 0xceb2(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xa0fd
jmp 0xa14b
movq 0xceba(%rip), %rdi      # 0x16fc0
leaq 0x612d(%rip), %rsi      # 0x1023a
callq 0x3300
movq %rax, -0x698(%rbp)
jmp 0xa11b
movq -0x698(%rbp), %rdi
movq 0xce7f(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xa130
movq -0x670(%rbp), %rsi
movq %rsi, %rdi
addq $0x18, %rdi
addq $0x28, %rsi
callq 0x54e0
jmp 0xa149
jmp 0xa14b
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x5ea9(%rip), %rsi      # 0x1001a
callq 0x49c0
movb %al, -0x699(%rbp)
jmp 0xa17e
movb -0x699(%rbp), %al
testb $0x1, %al
jne 0xa18d
jmp 0xa7f9
leaq -0x20(%rbp), %rdi
callq 0x8840
cmpq $0x3, %rax
je 0xa1f8
movq 0xce4d(%rip), %rdi      # 0x16ff0
leaq 0x6065(%rip), %rsi      # 0x1020f
callq 0x3300
movq %rax, -0x6a8(%rbp)
jmp 0xa1b8
movq -0x6a8(%rbp), %rdi
leaq 0x6090(%rip), %rsi      # 0x10256
callq 0x3300
movq %rax, -0x6b0(%rbp)
jmp 0xa1d4
movq -0x6b0(%rbp), %rdi
movq 0xcdc6(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xa1e9
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq %rax, -0x6c0(%rbp)
movl $0x2, %edi
movl $0x4, %esi
callq 0x8230
movl %eax, -0x6b4(%rbp)
jmp 0xa224
movl -0x6b4(%rbp), %edx
movq -0x6c0(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0x32b0
jmp 0xa23f
movq -0x240(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x240(%rbp,%rax), %rdi
callq 0x3190
movb %al, -0x6c1(%rbp)
jmp 0xa25f
movb -0x6c1(%rbp), %al
testb $0x1, %al
jne 0xa26b
jmp 0xa2d1
movq 0xcd7e(%rip), %rdi      # 0x16ff0
leaq 0x5fe9(%rip), %rsi      # 0x10262
callq 0x3300
movq %rax, -0x6d0(%rbp)
jmp 0xa287
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq -0x6d0(%rbp), %rdi
movq %rax, %rsi
callq 0x32d0
movq %rax, -0x6d8(%rbp)
jmp 0xa2ad
movq -0x6d8(%rbp), %rdi
movq 0xcced(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xa2c2
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
movq -0x670(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x6e8(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq -0x6e8(%rbp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x5170
movb %al, -0x6d9(%rbp)
jmp 0xa30d
movb -0x6d9(%rbp), %al
testb $0x1, %al
jne 0xa39f
jmp 0xa31d
movq 0xcccc(%rip), %rdi      # 0x16ff0
leaq 0x5f59(%rip), %rsi      # 0x10284
callq 0x3300
movq %rax, -0x6f0(%rbp)
jmp 0xa339
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq -0x6f0(%rbp), %rdi
movq %rax, %rsi
callq 0x32d0
movq %rax, -0x6f8(%rbp)
jmp 0xa35f
movq -0x6f8(%rbp), %rdi
leaq 0x5f4a(%rip), %rsi      # 0x102b7
callq 0x3300
movq %rax, -0x700(%rbp)
jmp 0xa37b
movq -0x700(%rbp), %rdi
movq 0xcc1f(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xa390
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
leaq -0x240(%rbp), %rdi
callq 0x3540
movq %rdx, -0x710(%rbp)
movq %rax, -0x708(%rbp)
jmp 0xa3bb
movq -0x710(%rbp), %rax
movq -0x708(%rbp), %rcx
movq %rcx, -0x2e0(%rbp)
movq %rax, -0x2d8(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x4d80
movq %rax, -0x718(%rbp)
jmp 0xa3ec
movq -0x718(%rbp), %rax
movl %eax, -0x2cc(%rbp)
movslq -0x2cc(%rbp), %rdi
testq %rdi, %rdi
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x3030
movq %rax, -0x720(%rbp)
jmp 0xa41c
movq -0x720(%rbp), %rax
movq %rax, -0x258(%rbp)
xorl %edx, %edx
movl %edx, %esi
leaq -0x240(%rbp), %rdi
callq 0x33e0
jmp 0xa43c
movq -0x258(%rbp), %rsi
movslq -0x2cc(%rbp), %rdx
leaq -0x240(%rbp), %rdi
callq 0x3390
jmp 0xa458
leaq -0x2f8(%rbp), %rdi
callq 0xba80
movq -0x670(%rbp), %rax
movq %rax, -0x300(%rbp)
movq -0x300(%rbp), %rdi
callq 0xbaa0
movq %rax, -0x308(%rbp)
movq -0x300(%rbp), %rdi
callq 0xbad0
movq %rax, -0x310(%rbp)
leaq -0x308(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0xbb00
testb $0x1, %al
jne 0xa4b1
jmp 0xa529
leaq -0x308(%rbp), %rdi
callq 0xbb40
movq %rax, -0x318(%rbp)
movq -0x318(%rbp), %rax
movq (%rax), %rdi
callq 0xbb90
movsd %xmm0, -0x728(%rbp)
jmp 0xa4dd
movsd -0x728(%rbp), %xmm0
movsd %xmm0, -0x320(%rbp)
leaq -0x2f8(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0xbb60
jmp 0xa502
jmp 0xa504
leaq -0x308(%rbp), %rdi
callq 0xbbb0
jmp 0xa498
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
jmp 0xa7e1
leaq -0x338(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0xbbd0
jmp 0xa53e
leaq -0x38(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0xbcb0
leaq -0x338(%rbp), %rdi
callq 0xbce0
movq -0x670(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%rax)
movl $0x0, -0x33c(%rbp)
movq -0x670(%rbp), %rcx
movl -0x33c(%rbp), %eax
cmpl 0x20(%rcx), %eax
jge 0xa7d3
movslq -0x33c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xbd60
movq -0x670(%rbp), %rdi
movslq (%rax), %rsi
callq 0xbd40
movq (%rax), %rsi
addq $0x28, %rsi
leaq -0x350(%rbp), %rdi
callq 0x4980
jmp 0xa5be
movq -0x670(%rbp), %rdi
addq $0x24, %rdi
leaq -0x2cc(%rbp), %rsi
callq 0xbd80
movq %rax, -0x730(%rbp)
jmp 0xa5de
movq -0x670(%rbp), %rax
movq -0x730(%rbp), %rcx
movq %rcx, -0x358(%rbp)
addq $0x28, %rax
movq %rax, -0x740(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq -0x740(%rbp), %rdi
movq %rax, %rsi
callq 0x56e0
movq %rax, -0x738(%rbp)
jmp 0xa624
movq -0x738(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0xbdb0
movslq -0x33c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xbd60
movq -0x670(%rbp), %rdi
movslq (%rax), %rsi
callq 0xbd40
movq (%rax), %rdi
subq $-0x80, %rdi
leaq 0x59b6(%rip), %rsi      # 0x1001a
callq 0x33f0
jmp 0xa66b
movq -0x670(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x758(%rbp)
movslq -0x33c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x748(%rbp)
callq 0xbd60
movq -0x670(%rbp), %rdi
movslq (%rax), %rsi
callq 0xbd40
movl -0x758(%rbp), %ecx
movq -0x748(%rbp), %rdi
movq (%rax), %rax
movl %ecx, 0xa0(%rax)
movl -0x2cc(%rbp), %eax
movl %eax, -0x754(%rbp)
movslq -0x33c(%rbp), %rsi
callq 0xbd60
movq -0x670(%rbp), %rdi
movslq (%rax), %rsi
callq 0xbd40
movl -0x754(%rbp), %ecx
movq -0x748(%rbp), %rdi
movq (%rax), %rax
movl %ecx, 0xa4(%rax)
movq -0x258(%rbp), %rax
movq %rax, -0x750(%rbp)
movslq -0x33c(%rbp), %rsi
callq 0xbd60
movq -0x670(%rbp), %rdi
movslq (%rax), %rsi
callq 0xbd40
movq -0x750(%rbp), %rcx
movq -0x748(%rbp), %rdi
movq (%rax), %rax
movq %rcx, 0xb0(%rax)
movslq -0x33c(%rbp), %rsi
callq 0xbd60
movq -0x670(%rbp), %rdi
movslq (%rax), %rsi
callq 0xbd40
movq (%rax), %rax
movb $0x0, 0xb8(%rax)
leaq -0x350(%rbp), %rdi
callq 0x49f0
jmp 0xa768
movslq -0x33c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xbd60
movq -0x670(%rbp), %rdi
movslq (%rax), %rsi
callq 0xbd40
movq (%rax), %rdi
addq $0x50, %rdi
callq 0x3510
leaq -0x350(%rbp), %rdi
callq 0x4a40
movl -0x33c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x33c(%rbp)
jmp 0xa574
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x4a40
jmp 0xa7e1
leaq -0x2f8(%rbp), %rdi
callq 0xbde0
jmp 0xa7f2
leaq -0x2f8(%rbp), %rdi
callq 0xbde0
jmp 0xb822
jmp 0xa7f4
jmp 0xaf03
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x580d(%rip), %rsi      # 0x1001d
callq 0x49c0
movb %al, -0x759(%rbp)
jmp 0xa81d
movb -0x759(%rbp), %al
testb $0x1, %al
jne 0xa85c
jmp 0xa829
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x57e6(%rip), %rsi      # 0x10026
callq 0x49c0
movb %al, -0x75a(%rbp)
jmp 0xa84d
movb -0x75a(%rbp), %al
testb $0x1, %al
jne 0xa85c
jmp 0xaca4
leaq -0x20(%rbp), %rdi
callq 0x8840
cmpq $0x3, %rax
je 0xa92b
leaq -0x20(%rbp), %rdi
callq 0x8840
cmpq $0x4, %rax
je 0xa92b
movq 0xc767(%rip), %rdi      # 0x16ff0
leaq 0x597f(%rip), %rsi      # 0x1020f
callq 0x3300
movq %rax, -0x768(%rbp)
jmp 0xa89e
movq -0x768(%rbp), %rdi
leaq 0x5a1b(%rip), %rsi      # 0x102c7
callq 0x3300
movq %rax, -0x770(%rbp)
jmp 0xa8ba
movq -0x770(%rbp), %rdi
movq 0xc6e0(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xa8cf
movq 0xc71a(%rip), %rdi      # 0x16ff0
leaq 0x5932(%rip), %rsi      # 0x1020f
callq 0x3300
movq %rax, -0x778(%rbp)
jmp 0xa8eb
movq -0x778(%rbp), %rdi
leaq 0x59dc(%rip), %rsi      # 0x102d5
callq 0x3300
movq %rax, -0x780(%rbp)
jmp 0xa907
movq -0x780(%rbp), %rdi
movq 0xc693(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xa91c
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x56db(%rip), %rsi      # 0x1001d
callq 0x49c0
movb %al, -0x781(%rbp)
jmp 0xa94f
movb -0x781(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x782(%rbp)
jne 0xa964
jmp 0xa9da
movq -0x670(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x798(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq -0x798(%rbp), %rdi
movq %rax, %rsi
callq 0xbe40
movq %rax, -0x790(%rbp)
jmp 0xa99c
movq -0x670(%rbp), %rdi
movq -0x790(%rbp), %rax
movq %rax, -0x360(%rbp)
addq $0x28, %rdi
callq 0x5b30
movq %rax, -0x368(%rbp)
leaq -0x360(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x5b00
movb %al, -0x782(%rbp)
movb -0x782(%rbp), %al
testb $0x1, %al
jne 0xa9e6
jmp 0xaa26
movq 0xc603(%rip), %rdi      # 0x16ff0
leaq 0x58fd(%rip), %rsi      # 0x102f1
callq 0x3300
movq %rax, -0x7a0(%rbp)
jmp 0xaa02
movq -0x7a0(%rbp), %rdi
movq 0xc598(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xaa17
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
movl $0x0, -0x36c(%rbp)
cmpl $0x4, -0x36c(%rbp)
jge 0xac9d
movq -0x670(%rbp), %rdi
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rsi
addq $0x28, %rsi
leaq -0x380(%rbp), %rdi
callq 0x4980
jmp 0xaa65
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq -0x670(%rbp), %rdi
movq %rax, -0x7a8(%rbp)
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movq -0x7a8(%rbp), %rsi
movq (%rax), %rdi
subq $-0x80, %rdi
callq 0x3060
jmp 0xaaa1
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x5565(%rip), %rsi      # 0x1001d
callq 0x49c0
movb %al, -0x7a9(%rbp)
jmp 0xaac5
movb -0x7a9(%rbp), %al
testb $0x1, %al
jne 0xaad4
jmp 0xaba1
movq -0x670(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x7c0(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq -0x7c0(%rbp), %rdi
movq %rax, %rsi
callq 0x56e0
movq %rax, -0x7b8(%rbp)
jmp 0xab0c
movq -0x670(%rbp), %rdi
movq -0x7b8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x388(%rbp)
movl -0x388(%rbp), %eax
movl %eax, -0x7c8(%rbp)
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movl -0x7c8(%rbp), %ecx
movq -0x670(%rbp), %rdi
movq (%rax), %rax
movl %ecx, 0xa0(%rax)
movl -0x384(%rbp), %eax
movl %eax, -0x7c4(%rbp)
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movl -0x7c4(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0xa4(%rax)
jmp 0xac33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x4a40
jmp 0xb822
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xbe70
movl %eax, -0x7cc(%rbp)
jmp 0xabc8
movq -0x670(%rbp), %rdi
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movl -0x7cc(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0xa0(%rax)
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xbe70
movl %eax, -0x7d0(%rbp)
jmp 0xac11
movq -0x670(%rbp), %rdi
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movl -0x7d0(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0xa8(%rax)
movq -0x670(%rbp), %rdi
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rax
movb $0x0, 0xb8(%rax)
leaq -0x380(%rbp), %rdi
callq 0x49f0
jmp 0xac5e
movq -0x670(%rbp), %rdi
movslq -0x36c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rdi
addq $0x50, %rdi
callq 0x3510
leaq -0x380(%rbp), %rdi
callq 0x4a40
movl -0x36c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x36c(%rbp)
jmp 0xaa30
jmp 0xac9f
jmp 0xaf01
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x5367(%rip), %rsi      # 0x10022
callq 0x49c0
movb %al, -0x7d1(%rbp)
jmp 0xacc8
movb -0x7d1(%rbp), %al
testb $0x1, %al
jne 0xacd7
jmp 0xaecc
leaq -0x20(%rbp), %rdi
callq 0x8840
cmpq $0x3, %rax
je 0xad42
movq 0xc303(%rip), %rdi      # 0x16ff0
leaq 0x551b(%rip), %rsi      # 0x1020f
callq 0x3300
movq %rax, -0x7e0(%rbp)
jmp 0xad02
movq -0x7e0(%rbp), %rdi
leaq 0x5601(%rip), %rsi      # 0x10311
callq 0x3300
movq %rax, -0x7e8(%rbp)
jmp 0xad1e
movq -0x7e8(%rbp), %rdi
movq 0xc27c(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xad33
movl $0x2, -0x2c8(%rbp)
jmp 0xb7ee
movl $0x0, -0x38c(%rbp)
cmpl $0x4, -0x38c(%rbp)
jge 0xaec8
movq -0x670(%rbp), %rdi
movslq -0x38c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rsi
addq $0x28, %rsi
leaq -0x3a0(%rbp), %rdi
callq 0x4980
jmp 0xad81
movq -0x670(%rbp), %rdi
movslq -0x38c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rdi
subq $-0x80, %rdi
leaq 0x5280(%rip), %rsi      # 0x10022
callq 0x33f0
jmp 0xada9
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xbe70
movl %eax, -0x7ec(%rbp)
jmp 0xadd0
movq -0x670(%rbp), %rdi
movslq -0x38c(%rbp), %rsi
callq 0xbd40
movl -0x7ec(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0xa0(%rax)
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xbe70
movl %eax, -0x7f0(%rbp)
jmp 0xae19
movq -0x670(%rbp), %rdi
movslq -0x38c(%rbp), %rsi
callq 0xbd40
movl -0x7f0(%rbp), %ecx
movq -0x670(%rbp), %rdi
movq (%rax), %rax
movl %ecx, 0xa8(%rax)
movslq -0x38c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rax
movb $0x0, 0xb8(%rax)
leaq -0x3a0(%rbp), %rdi
callq 0x49f0
jmp 0xae66
movq -0x670(%rbp), %rdi
movslq -0x38c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rdi
addq $0x50, %rdi
callq 0x3510
leaq -0x3a0(%rbp), %rdi
callq 0x4a40
movl -0x38c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38c(%rbp)
jmp 0xad4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x4a40
jmp 0xb822
jmp 0xaeca
jmp 0xaeff
movq 0xc11d(%rip), %rdi      # 0x16ff0
leaq 0x544a(%rip), %rsi      # 0x10324
callq 0x3300
movq %rax, -0x7f8(%rbp)
jmp 0xaee8
movq -0x7f8(%rbp), %rdi
movq 0xc0b2(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xaefd
jmp 0xaeff
jmp 0xaf01
jmp 0xaf03
jmp 0xaf05
jmp 0xaf07
movq -0x670(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movq -0x3a8(%rbp), %rdi
callq 0xbaa0
movq %rax, -0x3b0(%rbp)
movq -0x3a8(%rbp), %rdi
callq 0xbad0
movq %rax, -0x3b8(%rbp)
leaq -0x3b0(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0xbb00
testb $0x1, %al
jne 0xaf57
jmp 0xb011
leaq -0x3b0(%rbp), %rdi
callq 0xbb40
movq %rax, -0x3c0(%rbp)
movq -0x3c0(%rbp), %rax
movq (%rax), %rsi
addq $0x28, %rsi
leaq -0x3d0(%rbp), %rdi
callq 0x4980
jmp 0xaf86
movq -0x3c0(%rbp), %rax
movq (%rax), %rdi
addq $0x50, %rdi
movq %rax, -0x3d8(%rbp)
movq -0x3d8(%rbp), %rdx
leaq -0x3d0(%rbp), %rsi
callq 0xb850
jmp 0xafb0
leaq -0x3d0(%rbp), %rdi
callq 0x49f0
jmp 0xafbe
movq -0x3c0(%rbp), %rax
movq (%rax), %rdi
addq $0x50, %rdi
callq 0x3510
leaq -0x3d0(%rbp), %rdi
callq 0x4a40
leaq -0x3b0(%rbp), %rdi
callq 0xbbb0
jmp 0xaf3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x3d0(%rbp), %rdi
callq 0x4a40
jmp 0xb822
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x4ff5(%rip), %rsi      # 0x1001d
callq 0x49c0
movb %al, -0x7f9(%rbp)
jmp 0xb035
movb -0x7f9(%rbp), %al
testb $0x1, %al
jne 0xb074
jmp 0xb041
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x4fce(%rip), %rsi      # 0x10026
callq 0x49c0
movb %al, -0x7fa(%rbp)
jmp 0xb065
movb -0x7fa(%rbp), %al
testb $0x1, %al
jne 0xb074
jmp 0xb480
leaq -0x3f8(%rbp), %rdi
callq 0x3410
leaq -0x418(%rbp), %rdi
callq 0x3410
movl $0x0, -0x41c(%rbp)
cmpl $0x4, -0x41c(%rbp)
jge 0xb446
movq -0x670(%rbp), %rdi
movslq -0x41c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rax
cmpl $0x0, 0xa4(%rax)
je 0xb430
leaq -0x620(%rbp), %rdi
callq 0x3500
jmp 0xb0d4
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x4f32(%rip), %rsi      # 0x1001d
callq 0x49c0
movb %al, -0x7fb(%rbp)
jmp 0xb0f8
movb -0x7fb(%rbp), %al
testb $0x1, %al
jne 0xb104
jmp 0xb167
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq %rax, %rsi
leaq -0x620(%rbp), %rdi
movl $0x10, %edx
callq 0x31b0
jmp 0xb128
jmp 0xb1bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
jmp 0xb463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x620(%rbp), %rdi
callq 0x3470
jmp 0xb463
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x4ea8(%rip), %rsi      # 0x10026
callq 0x49c0
movb %al, -0x7fc(%rbp)
jmp 0xb18b
movb -0x7fc(%rbp), %al
testb $0x1, %al
jne 0xb197
jmp 0xb1bd
leaq -0x20(%rbp), %rdi
movl $0x3, %esi
callq 0xba60
movq %rax, %rsi
leaq -0x620(%rbp), %rdi
movl $0x10, %edx
callq 0x31b0
jmp 0xb1bb
jmp 0xb1bd
jmp 0xb1bf
movq -0x620(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x620(%rbp,%rax), %rdi
callq 0x3190
movb %al, -0x7fd(%rbp)
jmp 0xb1df
movb -0x7fd(%rbp), %al
testb $0x1, %al
jne 0xb1eb
jmp 0xb221
movq 0xbdfe(%rip), %rdi      # 0x16ff0
leaq 0x513c(%rip), %rsi      # 0x10335
callq 0x3300
movq %rax, -0x808(%rbp)
jmp 0xb207
movq -0x808(%rbp), %rdi
movq 0xbd93(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xb21c
jmp 0xb3ee
movq -0x670(%rbp), %rdi
movslq -0x41c(%rbp), %rsi
callq 0xbd40
movq -0x670(%rbp), %rdi
movq (%rax), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x810(%rbp)
movslq -0x41c(%rbp), %rsi
callq 0xbd40
movq -0x810(%rbp), %rsi
movq (%rax), %rax
movslq 0xa4(%rax), %rdx
leaq -0x620(%rbp), %rdi
callq 0x33d0
jmp 0xb277
leaq -0x620(%rbp), %rdi
callq 0x3430
jmp 0xb285
movq -0x670(%rbp), %rdi
movslq -0x41c(%rbp), %rsi
callq 0xbd40
movq -0x670(%rbp), %rdi
movq (%rax), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x818(%rbp)
movslq -0x41c(%rbp), %rsi
callq 0xbd40
movq -0x818(%rbp), %rsi
movq (%rax), %rax
movslq 0xa4(%rax), %rdx
leaq -0x2c4(%rbp), %rdi
callq 0x7f60
jmp 0xb2db
leaq -0x2c4(%rbp), %rdi
callq 0x7f90
jmp 0xb2e9
leaq -0x640(%rbp), %rdi
leaq -0x2c4(%rbp), %rsi
callq 0x8070
jmp 0xb2fe
leaq -0x3f8(%rbp), %rdi
leaq -0x640(%rbp), %rsi
callq 0x3370
leaq -0x640(%rbp), %rdi
callq 0x3210
leaq -0x418(%rbp), %rdi
callq 0x34f0
testb $0x1, %al
jne 0xb379
leaq -0x418(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x5690
testb $0x1, %al
jne 0xb346
jmp 0xb379
movq 0xbca3(%rip), %rdi      # 0x16ff0
leaq 0x501f(%rip), %rsi      # 0x10373
callq 0x3300
movq %rax, -0x820(%rbp)
jmp 0xb362
movq -0x820(%rbp), %rdi
movq 0xbc38(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xb377
jmp 0xb3d7
leaq -0x418(%rbp), %rdi
callq 0x34f0
testb $0x1, %al
jne 0xb3d5
leaq -0x418(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x59f0
testb $0x1, %al
jne 0xb3a2
jmp 0xb3d5
movq 0xbc17(%rip), %rdi      # 0x16fc0
leaq 0x501e(%rip), %rsi      # 0x103ce
callq 0x3300
movq %rax, -0x828(%rbp)
jmp 0xb3be
movq -0x828(%rbp), %rdi
movq 0xbbdc(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xb3d3
jmp 0xb3d5
jmp 0xb3d7
leaq -0x418(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x3060
jmp 0xb3ec
jmp 0xb3ee
movq -0x670(%rbp), %rdi
movslq -0x41c(%rbp), %rsi
callq 0xbd40
movq (%rax), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x830(%rbp)
cmpq $0x0, %rax
je 0xb424
movq -0x830(%rbp), %rdi
callq 0x33b0
leaq -0x620(%rbp), %rdi
callq 0x3470
jmp 0xb432
movl -0x41c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x41c(%rbp)
jmp 0xb096
leaq -0x418(%rbp), %rdi
callq 0x3210
leaq -0x3f8(%rbp), %rdi
callq 0x3210
jmp 0xb7b6
leaq -0x418(%rbp), %rdi
callq 0x3210
leaq -0x3f8(%rbp), %rdi
callq 0x3210
jmp 0xb822
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x4b83(%rip), %rsi      # 0x1001a
callq 0x49c0
movb %al, -0x831(%rbp)
jmp 0xb4a4
movb -0x831(%rbp), %al
testb $0x1, %al
jne 0xb4b0
jmp 0xb505
movq 0xbb09(%rip), %rdi      # 0x16fc0
leaq 0x4f25(%rip), %rsi      # 0x103e3
callq 0x3300
movq %rax, -0x840(%rbp)
jmp 0xb4cc
movq -0x840(%rbp), %rdi
movq -0x670(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x3530
movq %rax, -0x848(%rbp)
jmp 0xb4eb
movq -0x848(%rbp), %rdi
movq 0xbaaf(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xb500
jmp 0xb7b4
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x4b06(%rip), %rsi      # 0x10022
callq 0x49c0
movb %al, -0x849(%rbp)
jmp 0xb529
movb -0x849(%rbp), %al
testb $0x1, %al
jne 0xb568
jmp 0xb535
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0xba60
movq %rax, %rdi
leaq 0x4cc0(%rip), %rsi      # 0x1020c
callq 0x49c0
movb %al, -0x84a(%rbp)
jmp 0xb559
movb -0x84a(%rbp), %al
testb $0x1, %al
jne 0xb568
jmp 0xb7b2
movb $0x1, -0x641(%rbp)
movl $0x0, -0x648(%rbp)
cmpl $0x4, -0x648(%rbp)
jge 0xb6ec
movq -0x670(%rbp), %rdi
movslq -0x648(%rbp), %rsi
callq 0xbd40
movq (%rax), %rax
cmpl $0x0, 0xa4(%rax)
je 0xb6d6
movb $0x0, -0x641(%rbp)
movq 0xba09(%rip), %rdi      # 0x16fc0
leaq 0x4e41(%rip), %rsi      # 0x103ff
callq 0x3300
movq %rax, -0x858(%rbp)
jmp 0xb5cc
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq -0x858(%rbp), %rdi
movq %rax, %rsi
callq 0x32d0
movq %rax, -0x860(%rbp)
jmp 0xb5f2
movq -0x860(%rbp), %rdi
leaq 0x4e0e(%rip), %rsi      # 0x1040e
callq 0x3300
movq %rax, -0x868(%rbp)
jmp 0xb60e
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq -0x868(%rbp), %rdi
movq %rax, %rsi
callq 0x32d0
movq %rax, -0x870(%rbp)
jmp 0xb634
movq -0x870(%rbp), %rdi
leaq 0x4dd6(%rip), %rsi      # 0x10418
callq 0x3300
movq %rax, -0x878(%rbp)
jmp 0xb650
movq -0x670(%rbp), %rdi
movslq -0x648(%rbp), %rsi
callq 0xbd40
movq (%rax), %rsi
leaq -0x668(%rbp), %rdi
callq 0x4770
jmp 0xb674
movq -0x878(%rbp), %rdi
leaq -0x668(%rbp), %rsi
callq 0x32d0
movq %rax, -0x880(%rbp)
jmp 0xb690
movq -0x880(%rbp), %rdi
movq 0xb90a(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xb6a5
leaq -0x668(%rbp), %rdi
callq 0x3210
jmp 0xb6d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x668(%rbp), %rdi
callq 0x3210
jmp 0xb822
jmp 0xb6d8
movl -0x648(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x648(%rbp)
jmp 0xb579
testb $0x1, -0x641(%rbp)
je 0xb7b0
movq 0xb8c0(%rip), %rdi      # 0x16fc0
leaq 0x4d16(%rip), %rsi      # 0x1041d
callq 0x3300
movq %rax, -0x888(%rbp)
jmp 0xb715
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0xba60
movq -0x888(%rbp), %rdi
movq %rax, %rsi
callq 0x32d0
movq %rax, -0x890(%rbp)
jmp 0xb73b
movq -0x890(%rbp), %rdi
leaq 0x4cc5(%rip), %rsi      # 0x1040e
callq 0x3300
movq %rax, -0x898(%rbp)
jmp 0xb757
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xba60
movq -0x898(%rbp), %rdi
movq %rax, %rsi
callq 0x32d0
movq %rax, -0x8a0(%rbp)
jmp 0xb77d
movq -0x8a0(%rbp), %rdi
leaq 0x4ca2(%rip), %rsi      # 0x1042d
callq 0x3300
movq %rax, -0x8a8(%rbp)
jmp 0xb799
movq -0x8a8(%rbp), %rdi
movq 0xb801(%rip), %rsi      # 0x16fa8
callq 0x3330
jmp 0xb7ae
jmp 0xb7b0
jmp 0xb7b2
jmp 0xb7b4
jmp 0xb7b6
movq -0x258(%rbp), %rax
movq %rax, -0x8b0(%rbp)
cmpq $0x0, %rax
je 0xb7d6
movq -0x8b0(%rbp), %rdi
callq 0x33b0
leaq -0x240(%rbp), %rdi
callq 0x30d0
jmp 0xb7e4
movl $0x0, -0x2c8(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x30e0
leaq -0x38(%rbp), %rdi
callq 0xbce0
leaq -0x20(%rbp), %rdi
callq 0x5570
movl -0x2c8(%rbp), %eax
testl %eax, %eax
je 0xb81d
jmp 0xb818
jmp 0x9f4a
jmp 0x9f4a
leaq -0x240(%rbp), %rdi
callq 0x30e0
leaq -0x38(%rbp), %rdi
callq 0xbce0
leaq -0x20(%rbp), %rdi
callq 0x5570
movq -0x248(%rbp), %rdi
callq 0x3560
nopl (%rax)