// File: /workspace/github_cpp_makefile_star2_O2/adamiaonr[P]rid-analytics/src/rid-analytics.cpp
// Function: RID_Analytics::build_network(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int RID_Analytics::build_network(std::string nw_filename) {

    // read .scn file, structured as an xml file
    pugi::xml_document nw_doc;
    if (!(nw_doc.load_file(nw_filename.c_str()))) {

        std::cerr << "RID_Analytics::get_network() : [ERROR] .scn file (" 
            << nw_filename << ") not found." << std::endl;

        return -1;
    }

    pugi::xml_node topology = nw_doc.child("topology");

    // ***
    // *** extract the fwd table size (a unique table size for the complete topology)
    // ***
    std::cout << "RID_Analytics::build_network() : [INFO] table size: ";
    pugi::xml_node ts = topology.child("fwd_table_size");
    uint64_t table_size = ts.text().as_uint();
    std::cout << "\n\tSIZE = " << ts.text().as_uint() << " (" << table_size << ")" << std::endl;

    // ***
    // *** extract the ttl
    // ***
    std::cout << "RID_Analytics::build_network() : [INFO] ttl: ";
    pugi::xml_node ttl_block = topology.child("ttl");
    this->ttl = ttl_block.text().as_int();
    std::cout << "\n\tTTL = " << ttl_block.text().as_int() << " (" << ttl << ")" << std::endl;

    // ***
    // *** start building the topology by reading the info for each router
    // ***
    for (pugi::xml_node router = topology.child("router"); 
        router; 
        router = router.next_sibling("router")) {

        std::string router_id = std::string(router.attribute("id").value());
        std::cout << "RID_Analytics::build_network() : [INFO] installing router " << router_id << std::endl;

        // ***
        // *** extract iface nr. & entry distr. per iface
        // ***
        std::cout << "RID_Analytics::build_network() : [INFO] \% of entries per iface: ";
        // extract the nr. of ifaces by counting the number of fwd_dist xml nodes
        int iface_num = 0;
        // extract iface <-> map
        std::map<int, __float080> fwd_dist;
        for (pugi::xml_node dist = router.child("fwd_dist"); 
            dist; 
            dist = dist.next_sibling("fwd_dist")) {

            fwd_dist[(int) dist.attribute("iface").as_int()] = ((__float080) dist.text().as_double());
            // increment the number of ifaces here
            iface_num++;

            std::cout << "\n\tIFACE = " << dist.attribute("iface").as_int()
                << ", DISTR. = " << (__float080) dist.text().as_double() 
                    << " (" << fwd_dist[(int) dist.attribute("iface").as_int()] << ")";
        }
        std::cout << std::endl;

        std::cout << "RID_Analytics::build_network() : [INFO] iface_num = " << (int) iface_num << std::endl;

        // ***
        // *** create or initialize new RID router
        // ***
        RID_Router * new_router = NULL;
        RID_RouterMap::iterator rit;
        if ((rit = this->routers.find(router_id)) != this->routers.end()) {

            new_router = (*rit).second;
            new_router->init(
                router_id,
                table_size,                 // nr. of table entries for router
                iface_num,                  // nr. of ifaces (i.e. nr. of adjacent routers)
                this->request_size,         // max. request & forwarding entry size
                this->bf_size,              // BF size (of both requests and entries, in bit)
                this->mode);                // modes for multiple matches and error resolution

        } else {

            new_router = 
                new RID_Router(
                    router_id,
                    table_size,
                    (uint8_t) iface_num,
                    this->request_size,
                    this->bf_size,
                    this->mode);

            // add the router to the router map
            this->routers[router_id] = new_router;

            std::cout << "RID_Analytics::build_network() : [INFO] added new router : "
                << router_id << std::endl;
        }

        // ***
        // *** initialize router ifaces & add fwd entries
        // ***
        for (pugi::xml_node link = router.child("link"); 
            link; 
            link = link.next_sibling("link")) {

            // ***
            // *** extract fwd entry size distributions
            // ***
            std::map<int, __float080> size_dist;
            for (pugi::xml_node s_dist = link.child("fwd_size_dist"); 
                s_dist; 
                s_dist = s_dist.next_sibling("fwd_size_dist")) {

                size_dist[s_dist.attribute("size").as_uint()] = s_dist.text().as_double();
            }

            // ***
            // *** extract the tree bitmask : a bitmask which indicates which
            // *** sources are reachable from this iface 
            // ***
            std::map<int, std::vector<uint8_t> > tree_bitmasks;

            for (pugi::xml_node tree_bitmask_block = link.child("tree_bitmask"); 
                tree_bitmask_block; 
                tree_bitmask_block = tree_bitmask_block.next_sibling("tree_bitmask")) {

                std::string tree_bitmask_str = std::string(tree_bitmask_block.text().as_string());
                std::vector<uint8_t> tree_bitmask;

                for (unsigned int i = 0; i < tree_bitmask_str.size(); ) {

                    uint8_t higher_bits = (uint8_t) ((tree_bitmask_str[i] >= 'a') ? (tree_bitmask_str[i] - 'a' + 10) : (tree_bitmask_str[i] - '0'));
                    // std::cout << "RID_Analytics::build_network() : [INFO] tree_bitmask["
                    //     << router_id << "][" << link.attribute("local").as_int() << "] : "
                    //     << "\n\tstr (H4): " << tree_bitmask_str[i]
                    //     << "\n\tint (H4): " << (int) higher_bits << std::endl;

                    i++;

                    uint8_t lower_bits = (uint8_t) ((tree_bitmask_str[i] >= 'a') ? (tree_bitmask_str[i] - 'a' + 10) : (tree_bitmask_str[i] - '0'));
                    // std::cout << "RID_Analytics::build_network() : [INFO] tree_bitmask["
                    //     << router_id << "][" << link.attribute("local").as_int() << "] : "
                    //     << "\n\tstr (L4): " << tree_bitmask_str[i]
                    //     << "\n\tint (L4): " << (int) lower_bits
                    //     << "\n\tint (H4L4): " << (int) (((higher_bits << 4) & 0xF0) | (lower_bits & 0x0F)) << std::endl;

                    i++;

                    tree_bitmask.push_back(((higher_bits << 4) & 0xF0) | (lower_bits & 0x0F));
                }

                unsigned int tb_size = tree_bitmask_block.attribute("size").as_uint();
                tree_bitmasks[tb_size] = tree_bitmask;

                std::cout << "RID_Analytics::build_network() : [INFO] tree_bitmask["
                    << router_id << "][" << link.attribute("local").as_int() << "] : ";
                for (unsigned int i = 0; i < tree_bitmasks[tb_size].size(); i++)
                    std::cout << "[" << (int) tree_bitmasks[tb_size][i] << "] ";
                std::cout << std::endl;
            }
            
            std::string adjacent_router_id = std::string(link.attribute("rrouter").value());

            // if adjacent_router is already in the router map, fetch its 
            // pointer. otherwise, create a new RID_Router object.
            RID_Router * adjacent_router = NULL;
            RID_RouterMap::iterator rtr_map_it;       
            if ((rtr_map_it = this->routers.find(adjacent_router_id)) != this->routers.end()) {

                adjacent_router = (*rtr_map_it).second;

            } else {

                adjacent_router = new RID_Router();
                // add adj. router to the router map
                this->routers[adjacent_router_id] = adjacent_router;

                std::cout << "RID_Analytics::build_network() : [INFO] added new router : "
                    << adjacent_router_id << std::endl;
            }

            new_router->add_fwd_table_entry(
                link.attribute("local").as_int(),
                fwd_dist[link.attribute("local").as_uint()],
                &size_dist,
                &tree_bitmasks,
                adjacent_router, 
                link.attribute("remote").as_int());
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rsi, %rbx
movq %rdi, 0x50(%rsp)
leaq 0x1d8(%rsp), %r14
movq %r14, %rdi
callq 0x949c
movq (%rbx), %rdx
leaq 0xd8(%rsp), %rdi
pushq $0x74
popq %rcx
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x9e8a
leaq 0xd8(%rsp), %rdi
callq 0x9474
testb %al, %al
je 0x1eea1
leaq 0xcc3a(%rip), %rsi      # 0x2b028
leaq 0x1d8(%rsp), %rdi
callq 0x5544
movq %rax, 0x98(%rsp)
movq 0x1cba6(%rip), %rdi     # 0x3afb0
leaq 0xcc66(%rip), %rsi      # 0x2b077
callq 0x43a0
leaq 0xcc8f(%rip), %rsi      # 0x2b0ac
leaq 0x98(%rsp), %rdi
callq 0x5544
leaq 0x160(%rsp), %rdi
movq %rax, (%rdi)
callq 0x58b2
leaq 0xd8(%rsp), %rdi
movq %rax, (%rdi)
xorl %esi, %esi
callq 0x8cf4
movl %eax, %ebx
movq 0x1cb5b(%rip), %rdi     # 0x3afb0
leaq 0xcc5f(%rip), %rsi      # 0x2b0bb
callq 0x43a0
movq %rax, %r14
leaq 0x160(%rsp), %rdi
callq 0x58b2
leaq 0xd8(%rsp), %rdi
movq %rax, (%rdi)
xorl %esi, %esi
callq 0x8cf4
movl %eax, %esi
movq %r14, %rdi
callq 0x42c0
leaq 0xcb84(%rip), %rsi      # 0x2b018
movq %rax, %rdi
callq 0x43a0
movl %ebx, %esi
movq %rax, %rdi
movq %rsi, 0x108(%rsp)
callq 0x42c0
leaq 0xab1f(%rip), %rsi      # 0x28fd4
movq %rax, %rdi
callq 0x43a0
movq %rax, %rdi
callq 0x41e0
movq 0x1cae4(%rip), %rdi     # 0x3afb0
leaq 0xcbf2(%rip), %rsi      # 0x2b0c5
callq 0x43a0
leaq 0xcc14(%rip), %rsi      # 0x2b0f3
leaq 0x98(%rsp), %rdi
callq 0x5544
leaq 0x158(%rsp), %rdi
movq %rax, (%rdi)
callq 0x58b2
leaq 0xd8(%rsp), %rdi
movq %rax, (%rdi)
xorl %esi, %esi
callq 0x8cd4
movq 0x50(%rsp), %rcx
movl %eax, 0x90(%rcx)
movq 0x1ca90(%rip), %rdi     # 0x3afb0
leaq 0xcbd0(%rip), %rsi      # 0x2b0f7
callq 0x43a0
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x58b2
leaq 0xd8(%rsp), %rdi
movq %rax, (%rdi)
xorl %esi, %esi
callq 0x8cd4
movq %rbx, %rdi
movl %eax, %esi
callq 0x46d0
leaq 0xcab9(%rip), %rsi      # 0x2b018
movq %rax, %rdi
callq 0x43a0
movq 0x50(%rsp), %rcx
movl 0x90(%rcx), %esi
movq %rax, %rdi
callq 0x46d0
leaq 0xaa53(%rip), %rsi      # 0x28fd4
movq %rax, %rdi
callq 0x43a0
movq %rax, %rdi
callq 0x41e0
leaq 0xbf01(%rip), %rsi      # 0x2a499
leaq 0x98(%rsp), %rdi
callq 0x5544
movq 0x50(%rsp), %rcx
leaq 0x50(%rcx), %rdx
movq %rdx, 0x60(%rsp)
addq $0x58, %rcx
movq %rcx, 0x110(%rsp)
leaq 0x58(%rsp), %rbx
leaq 0x118(%rsp), %r15
leaq 0x168(%rsp), %rbp
leaq 0x20(%rsp), %r14
movq %rax, 0x58(%rsp)
movq %rbx, %rdi
callq 0x549a
testq %rax, %rax
je 0x1eefa
leaq 0x58(%rsp), %rdi
leaq 0xcc8f(%rip), %rsi      # 0x2b28a
callq 0x5680
movq %rax, 0xd8(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x4cde
leaq 0x120(%rsp), %rdi
movq %rax, %rsi
leaq 0xa8(%rsp), %rdx
callq 0x16c66
movq 0x1c97c(%rip), %rdi     # 0x3afb0
leaq 0xcac5(%rip), %rsi      # 0x2b100
callq 0x43a0
movq %rax, %rdi
leaq 0x120(%rsp), %rsi
callq 0x4360
movq %rax, %rdi
callq 0x41e0
movq 0x1c951(%rip), %rdi     # 0x3afb0
leaq 0xcad5(%rip), %rsi      # 0x2b13b
callq 0x43a0
andl $0x0, 0xe0(%rsp)
andq $0x0, 0xe8(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq %rax, 0xf8(%rsp)
andq $0x0, 0x100(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0xcad3(%rip), %rsi      # 0x2b17c
callq 0x5544
xorl %r12d, %r12d
leaq 0xa8(%rsp), %rbx
movq %rax, 0xa8(%rsp)
movq %rbx, %rdi
callq 0x549a
testq %rax, %rax
je 0x1e862
leaq 0xa8(%rsp), %rdi
callq 0x58b2
movq %rax, 0x168(%rsp)
xorps %xmm0, %xmm0
movq %rbp, %rdi
callq 0x8d14
movsd %xmm0, 0x150(%rsp)
fldl 0x150(%rsp)
fstpt 0x6c(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0xc95c(%rip), %rsi      # 0x2b071
callq 0x5680
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x4bb4
movl %eax, 0x30(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x18e4e
fldt 0x6c(%rsp)
fstpt (%rax)
movq 0x1c862(%rip), %rdi     # 0x3afb0
leaq 0xca30(%rip), %rsi      # 0x2b185
callq 0x43a0
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
leaq 0xc905(%rip), %rsi      # 0x2b071
callq 0x5680
movq %rax, 0x168(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
callq 0x4bb4
movq %rbx, %rdi
movl %eax, %esi
callq 0x46d0
movq %rax, %rdi
leaq 0xc9f9(%rip), %rsi      # 0x2b190
callq 0x43a0
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x58b2
movq %rax, 0x78(%rsp)
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rdi
callq 0x8d14
movsd %xmm0, 0x148(%rsp)
fldl 0x148(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4220
movq %rax, %rdi
leaq 0xc835(%rip), %rsi      # 0x2b018
callq 0x43a0
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
leaq 0xc877(%rip), %rsi      # 0x2b071
callq 0x5680
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x4bb4
movl %eax, 0x118(%rsp)
leaq 0xd8(%rsp), %rdi
movq %r15, %rsi
callq 0x18e4e
fldt (%rax)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4220
movq %rax, %rdi
leaq 0xa796(%rip), %rsi      # 0x28fd4
callq 0x43a0
incl %r12d
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
leaq 0xc924(%rip), %rsi      # 0x2b17c
callq 0x56c4
jmp 0x1e6b9
movq 0x1c747(%rip), %rdi     # 0x3afb0
callq 0x41e0
movq 0x1c73b(%rip), %rdi     # 0x3afb0
leaq 0xc920(%rip), %rsi      # 0x2b19c
callq 0x43a0
movq %rax, %rdi
movl %r12d, %esi
callq 0x46d0
movq %rax, %rdi
callq 0x41e0
movq 0x60(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x2297c
cmpq 0x110(%rsp), %rax
je 0x1e910
movq 0x40(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x4510
movq 0x50(%rsp), %rax
movzbl (%rax), %r8d
movzwl 0x2(%rax), %r9d
movl 0x4(%rax), %eax
movl %eax, (%rsp)
movzbl %r12b, %ecx
movq 0x28(%rsp), %rdi
leaq 0x198(%rsp), %rbx
movq %rbx, %rsi
movq 0x108(%rsp), %rdx
callq 0x17a58
movq %rbx, %rdi
callq 0x41c0
jmp 0x1e9b1
movl $0xa8, %edi
callq 0x43c0
movq %rax, 0x28(%rsp)
leaq 0x1b8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x120(%rsp), %rsi
callq 0x4510
movq 0x50(%rsp), %rax
movzbl (%rax), %r8d
movzwl 0x2(%rax), %r9d
movl 0x4(%rax), %eax
movl %eax, (%rsp)
movzbl %r12b, %ecx
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq 0x108(%rsp), %rdx
callq 0x17c02
movq %rbx, %rdi
callq 0x41c0
movq 0x60(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x2167c
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movq 0x1c623(%rip), %rdi     # 0x3afb0
leaq 0xc83d(%rip), %rsi      # 0x2b1d1
callq 0x43a0
movq %rax, %rdi
leaq 0x120(%rsp), %rsi
callq 0x4360
movq %rax, %rdi
callq 0x41e0
leaq 0x58(%rsp), %rdi
leaq 0xc850(%rip), %rsi      # 0x2b20d
callq 0x5544
movq %rax, 0x118(%rsp)
movq %r15, %rdi
callq 0x549a
testq %rax, %rax
je 0x1ee6e
andl $0x0, 0xb0(%rsp)
andq $0x0, 0xb8(%rsp)
leaq 0xb0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
andq $0x0, 0xd0(%rsp)
movq %r15, %rdi
leaq 0xc7fb(%rip), %rsi      # 0x2b212
callq 0x5544
movq %rax, 0x168(%rsp)
movq %rbp, %rdi
callq 0x549a
testq %rax, %rax
je 0x1eaaf
movq %rbp, %rdi
callq 0x58b2
movq %rax, 0x78(%rsp)
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rdi
callq 0x8d14
movsd %xmm0, 0x140(%rsp)
fldl 0x140(%rsp)
fstpt 0x6c(%rsp)
movq %rbp, %rdi
leaq 0xb8aa(%rip), %rsi      # 0x2a313
callq 0x5680
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x4bd8
movl %eax, 0x18(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x18e4e
fldt 0x6c(%rsp)
fstpt (%rax)
movq %rbp, %rdi
leaq 0xc76d(%rip), %rsi      # 0x2b212
callq 0x56c4
jmp 0x1ea1c
andl $0x0, 0x170(%rsp)
andq $0x0, 0x178(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0x180(%rsp)
movq %rax, 0x188(%rsp)
andq $0x0, 0x190(%rsp)
movq %r15, %rdi
leaq 0xc735(%rip), %rsi      # 0x2b220
callq 0x5544
leaq 0x18(%rsp), %rbx
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0x549a
testq %rax, %rax
je 0x1ecf6
leaq 0x18(%rsp), %rdi
callq 0x58b2
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0xbb71(%rip), %rsi      # 0x2a697
callq 0x8cb8
leaq 0x78(%rsp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x16c66
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
pushq $0x1
popq %rax
movl %eax, %ebx
leal -0x1(%rbx), %eax
cmpq %rax, 0x80(%rsp)
jbe 0x1eba3
movq 0x78(%rsp), %rdx
movb (%rdx,%rax), %cl
pushq $0x9
popq %rax
cmpb $0x61, %cl
jge 0x1eb6e
pushq $0x60
popq %rax
movl %ebx, %esi
movb (%rdx,%rsi), %sil
pushq $0x9
popq %rdx
cmpb $0x61, %sil
jge 0x1eb80
pushq $0x60
popq %rdx
addb %cl, %al
addb %sil, %dl
shlb $0x4, %al
andb $0xf, %dl
orb %al, %dl
movb %dl, 0x20(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x229ba
addl $0x2, %ebx
jmp 0x1eb4e
leaq 0x18(%rsp), %rdi
leaq 0xb764(%rip), %rsi      # 0x2a313
callq 0x5680
movq %rax, 0x20(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x4bd8
movl %eax, %ebx
movl %eax, 0x20(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2199a
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x21892
movq %r15, %r12
movq 0x1c3c5(%rip), %rdi     # 0x3afb0
leaq 0xc63b(%rip), %rsi      # 0x2b22d
callq 0x43a0
movq %rax, %rdi
leaq 0x120(%rsp), %rsi
callq 0x4360
movq %rax, %rdi
leaq 0xc652(%rip), %rsi      # 0x2b263
callq 0x43a0
movq %rax, %r13
movq %r12, %rdi
leaq 0xc643(%rip), %rsi      # 0x2b266
callq 0x5680
movq %rax, 0x20(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x4bb4
movq %r13, %rdi
movl %eax, %esi
callq 0x46d0
movq %rax, %rdi
leaq 0xc621(%rip), %rsi      # 0x2b26c
callq 0x43a0
xorl %r15d, %r15d
movl %ebx, 0x20(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2199a
movl %r15d, %r15d
movq 0x8(%rax), %rcx
subq (%rax), %rcx
cmpq %r15, %rcx
jbe 0x1ecba
movq 0x1c338(%rip), %rdi     # 0x3afb0
leaq 0xc8c4(%rip), %rsi      # 0x2b543
callq 0x43a0
movq %rax, %r13
movl %ebx, 0x20(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2199a
movq (%rax), %rax
movzbl (%rax,%r15), %esi
movq %r13, %rdi
callq 0x46d0
movq %rax, %rdi
leaq 0xc6fd(%rip), %rsi      # 0x2b3ad
callq 0x43a0
incl %r15d
jmp 0x1ec53
movq 0x1c2ef(%rip), %rdi     # 0x3afb0
callq 0x41e0
leaq 0x30(%rsp), %rdi
callq 0x19a7c
leaq 0x78(%rsp), %rdi
callq 0x41c0
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
leaq 0xc537(%rip), %rsi      # 0x2b220
callq 0x56c4
movq %r12, %r15
jmp 0x1eaf5
movq %r15, %rdi
leaq 0xc571(%rip), %rsi      # 0x2b271
callq 0x5680
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x4cde
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
leaq 0x18(%rsp), %rdx
callq 0x16c66
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x2297c
cmpq 0x110(%rsp), %rax
je 0x1ed46
movq 0x40(%rax), %r12
jmp 0x1ed95
movl $0xa8, %edi
callq 0x43c0
movq %rax, %r12
movq %rax, %rdi
callq 0x219e8
movq 0x60(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2167c
movq %r12, (%rax)
movq 0x1c23c(%rip), %rdi     # 0x3afb0
leaq 0xc456(%rip), %rsi      # 0x2b1d1
callq 0x43a0
movq %rax, %rdi
leaq 0x78(%rsp), %rsi
callq 0x4360
movq %rax, %rdi
callq 0x41e0
movq %r15, %rdi
leaq 0xc4c7(%rip), %rsi      # 0x2b266
callq 0x5680
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x4bb4
movl %eax, %ebx
movq %r15, %rdi
leaq 0xc4a5(%rip), %rsi      # 0x2b266
callq 0x5680
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x4bd8
movl %eax, 0xa4(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0xa4(%rsp), %rsi
callq 0x18e4e
fldt (%rax)
fstpt 0x6c(%rsp)
movq %r15, %rdi
leaq 0xc476(%rip), %rsi      # 0x2b279
callq 0x5680
movq %rax, 0x20(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x4bb4
fldt 0x6c(%rsp)
fstpt (%rsp)
movq 0x28(%rsp), %rdi
movl %ebx, %esi
leaq 0xa8(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
movl %eax, %r9d
callq 0x17d4c
leaq 0x78(%rsp), %rdi
callq 0x41c0
movq %rbp, %rdi
callq 0x19b64
leaq 0xa8(%rsp), %rdi
callq 0x21cd2
movq %r15, %rdi
leaq 0xc3a9(%rip), %rsi      # 0x2b20d
callq 0x56c4
jmp 0x1e9c2
leaq 0xd8(%rsp), %rdi
callq 0x21cd2
leaq 0x120(%rsp), %rdi
callq 0x41c0
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
leaq 0xb602(%rip), %rsi      # 0x2a499
callq 0x56c4
jmp 0x1e5d9
movq 0x1c148(%rip), %rdi     # 0x3aff0
leaq 0xc139(%rip), %rsi      # 0x2afe8
callq 0x43a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4360
leaq 0xc155(%rip), %rsi      # 0x2b01b
movq %rax, %rdi
callq 0x43a0
movq %rax, %rdi
callq 0x41e0
pushq $-0x1
popq %rbx
leaq 0x1d8(%rsp), %rdi
callq 0x9526
movl %ebx, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x1eed9
jmp 0x1ef5e
jmp 0x1ef5e
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x41c0
jmp 0x1ef17
movq %rax, %rbx
movl $0xa8, %esi
movq 0x28(%rsp), %rdi
callq 0x43d0
jmp 0x1eff1
jmp 0x1ef5e
jmp 0x1ef5e
jmp 0x1ef5e
jmp 0x1ef5e
jmp 0x1ef5e
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x41c0
jmp 0x1eff1
jmp 0x1ef5e
jmp 0x1ef5e
jmp 0x1ef5e
jmp 0x1ef97
jmp 0x1ef97
jmp 0x1ef5e
jmp 0x1ef97
jmp 0x1ef5e
jmp 0x1ef5e
jmp 0x1ef5e
movq %rax, %rbx
jmp 0x1f00b
jmp 0x1ef97
jmp 0x1ef97
movq %rax, %rbx
jmp 0x1effe
jmp 0x1ef97
jmp 0x1ef8c
jmp 0x1efaa
jmp 0x1efaa
jmp 0x1efb1
jmp 0x1ef97
jmp 0x1ef97
jmp 0x1ef8c
jmp 0x1efaa
jmp 0x1ef8c
jmp 0x1ef97
jmp 0x1ef97
jmp 0x1ef8c
movq %rax, %rbx
jmp 0x1efcd
jmp 0x1ef97
jmp 0x1ef97
jmp 0x1ef97
movq %rax, %rbx
jmp 0x1eff1
jmp 0x1efaa
jmp 0x1efaa
jmp 0x1efb1
jmp 0x1efaa
jmp 0x1efb1
jmp 0x1efc0
jmp 0x1efc0
movq %rax, %rbx
jmp 0x1efd7
jmp 0x1efb1
movq %rax, %rbx
jmp 0x1efe4
jmp 0x1efc0
jmp 0x1efc0
jmp 0x1efc0
jmp 0x1efc0
jmp 0x1efc0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x19a7c
leaq 0x78(%rsp), %rdi
callq 0x41c0
leaq 0x168(%rsp), %rdi
callq 0x19b64
leaq 0xa8(%rsp), %rdi
callq 0x21cd2
leaq 0xd8(%rsp), %rdi
callq 0x21cd2
leaq 0x120(%rsp), %rdi
callq 0x41c0
leaq 0x1d8(%rsp), %rdi
callq 0x9526
movq %rbx, %rdi
callq 0x4700