// File: iPapatsoris[P]Maximum-Independent-Set/src/Graph.cpp
// Function: Graph::Graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool const&)
Graph::Graph(const string &inputFile, const bool &checkIndependentSet) : mapping(false), idToPos(NULL), posToId(NULL) {
    /* Open graph input file */
    FILE *f;
    f = fopen(inputFile.c_str(), "r");
    if (f == NULL) {
        cerr << "Error in opening input file " << inputFile << endl;
        exit(EXIT_FAILURE);
    }
    char buf[MAXLINE];

    /* Skip info lines */
    for (int i = 0 ; i < 3 ; i++) {
        if (fgets(buf, MAXLINE, f) == NULL) {
            cerr << "Error in parsing input file " << inputFile << endl;
            exit(EXIT_FAILURE);
        }
    }

    /* Get total node and edge numbers */
    char *ptr = strstr(buf, "Nodes:");
    uint32_t nodes = atoi(ptr + 7);
    ptr = strstr(buf, "Edges:");
    uint32_t edges = atoi(ptr + 7);
    if (fgets(buf, MAXLINE, f) == NULL) {
        cerr << "Error in parsing input file " << inputFile << endl;
        exit(EXIT_FAILURE);
    }

    try {
        nodeIndex.reserve(nodes);
    }
    catch (const length_error &le) {
        cerr << "NodeIndex length error: " << le.what() << endl;
        exit(EXIT_FAILURE);
    }

    edgeBuffer = new vector<uint32_t>();
    try {
        edgeBuffer->reserve(edges * 2);
    }
    catch (const length_error &le) {
        cerr << "EdgeBuffer length error: " << le.what() << endl;
        exit(EXIT_FAILURE);
    }

    /* Hold reverse direction edges temporarily */
    vector<vector<uint32_t> > reverseEdges(nodes);

    /* Build graph with both edge directions, keep them sorted */
    uint32_t sourceNode, targetNode, previousNode, straightEdges, offset;
    previousNode = NONE;
    straightEdges = 0;
    offset = 0;
    while(fgets(buf, MAXLINE, f) != NULL) {
        parseNodeIDs(buf, &sourceNode, &targetNode);
        if (sourceNode >= nodes || targetNode >= nodes) {
            cerr << "Error: received a node id equal or larger than the total nodes number specified at the beginning of the file" << endl;
            exit(EXIT_FAILURE);
        }
        /* Add smaller nodes than first source node */
        if (previousNode == NONE && sourceNode) {
            this->fill(sourceNode, checkIndependentSet);
        }
        if (previousNode != sourceNode && previousNode != NONE) {
            /* At new source node, add previous nodes' (including those who don't appear as source nodes) smaller neighbors */
            for (uint32_t node = previousNode + 1 ; node <= sourceNode ; node++) {
                uint32_t previousEdges = straightEdges + reverseEdges[node - 1].size();
                nodeIndex.push_back(Graph::NodeInfo(offset, previousEdges));
                if (!previousEdges && !checkIndependentSet) {
                    zeroDegreeNodes.push_back(nodeIndex.size()-1);
                    nodeIndex[nodeIndex.size()-1].removed = true;
                }
                offset += previousEdges;
                edgeBuffer->insert(edgeBuffer->end(), reverseEdges[node].begin(), reverseEdges[node].end());
                straightEdges = 0;
                if (node < sourceNode) {
                    //cout << "in between missing node " << node << endl;
                }
            }
        }
        /* Add source node's bigger neighbors */
        edgeBuffer->push_back(targetNode);
        straightEdges++;
        reverseEdges[targetNode].push_back(sourceNode);
        previousNode = sourceNode;
    }
    /* Add final source node's info */
    uint32_t previousEdges = straightEdges + reverseEdges[previousNode].size();
    nodeIndex.push_back(Graph::NodeInfo(offset, previousEdges));
    if (!previousEdges && !checkIndependentSet) {
        zeroDegreeNodes.push_back(nodeIndex.size()-1);
        nodeIndex[nodeIndex.size()-1].removed = true;
    }
    offset += previousEdges;
    /* Add smaller neighbors of the nodes left that don't appear as source nodes */
    for (uint32_t missingNode = nodeIndex.size() ; missingNode < nodes ; missingNode++) {
        //cout << "end missing node " << missingNode << endl;
        previousEdges = reverseEdges[missingNode].size();
        nodeIndex.push_back(Graph::NodeInfo(offset, previousEdges));
        if (!previousEdges && !checkIndependentSet) {
            zeroDegreeNodes.push_back(nodeIndex.size()-1);
            nodeIndex[nodeIndex.size()-1].removed = true;
        }
        offset += previousEdges;
        edgeBuffer->insert(edgeBuffer->end(), reverseEdges[missingNode].begin(), reverseEdges[missingNode].end());
    }
    nextUnusedId = nodeIndex.size();
    fclose(f);
}

// Assembly:
subq $0x648, %rsp            # imm = 0x648
movq %rdi, 0x640(%rsp)
movq %rsi, 0x638(%rsp)
movq %rdx, 0x630(%rsp)
movq 0x640(%rsp), %rdi
movq %rdi, 0x118(%rsp)
movq %rdi, %rax
movq %rax, 0x108(%rsp)
callq 0x17e50
movq 0x118(%rsp), %rdi
addq $0x20, %rdi
movq %rdi, 0x110(%rsp)
callq 0x17e60
movq 0x118(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq $0x0, 0x40(%rax)
movq $0x0, 0x48(%rax)
movq 0x638(%rsp), %rdi
callq 0x20b0
movq %rax, %rdi
leaq 0x373b9(%rip), %rsi     # 0x465c4
callq 0x2200
movq %rax, 0x120(%rsp)
jmp 0xf21a
movq 0x120(%rsp), %rax
movq %rax, 0x628(%rsp)
cmpq $0x0, 0x628(%rsp)
jne 0xf2aa
movq 0x4edb4(%rip), %rdi     # 0x5dff0
leaq 0x37383(%rip), %rsi     # 0x465c6
callq 0x2190
movq %rax, 0x100(%rsp)
jmp 0xf252
movq 0x100(%rsp), %rdi
movq 0x638(%rsp), %rsi
callq 0x2170
movq %rax, 0xf8(%rsp)
jmp 0xf271
movq 0xf8(%rsp), %rdi
movq 0x4ed38(%rip), %rsi     # 0x5dfb8
callq 0x21d0
jmp 0xf287
movl $0x1, %edi
callq 0x2210
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0xfdd2
movl $0x0, 0x20c(%rsp)
cmpl $0x3, 0x20c(%rsp)
jge 0xf369
movq 0x628(%rsp), %rdx
leaq 0x210(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x22e0
movq %rax, 0xf0(%rsp)
jmp 0xf2e7
movq 0xf0(%rsp), %rax
cmpq $0x0, %rax
jne 0xf351
movq 0x4ecf4(%rip), %rdi     # 0x5dff0
leaq 0x372e0(%rip), %rsi     # 0x465e3
callq 0x2190
movq %rax, 0xe8(%rsp)
jmp 0xf312
movq 0xe8(%rsp), %rdi
movq 0x638(%rsp), %rsi
callq 0x2170
movq %rax, 0xe0(%rsp)
jmp 0xf331
movq 0xe0(%rsp), %rdi
movq 0x4ec78(%rip), %rsi     # 0x5dfb8
callq 0x21d0
jmp 0xf347
movl $0x1, %edi
callq 0x2210
jmp 0xf353
movl 0x20c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20c(%rsp)
jmp 0xf2b5
leaq 0x37290(%rip), %rsi     # 0x46600
leaq 0x210(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x2050
movq %rax, 0x200(%rsp)
movq 0x200(%rsp), %rdi
addq $0x7, %rdi
callq 0x22d0
movq 0xd0(%rsp), %rdi
movl %eax, 0x1fc(%rsp)
leaq 0x37253(%rip), %rsi     # 0x46607
callq 0x2050
movq %rax, 0x200(%rsp)
movq 0x200(%rsp), %rdi
addq $0x7, %rdi
callq 0x22d0
movq 0xd0(%rsp), %rdi
movl %eax, 0x1f8(%rsp)
movq 0x628(%rsp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x22e0
movq %rax, 0xd8(%rsp)
jmp 0xf3fd
movq 0xd8(%rsp), %rax
cmpq $0x0, %rax
jne 0xf467
movq 0x4ebde(%rip), %rdi     # 0x5dff0
leaq 0x371ca(%rip), %rsi     # 0x465e3
callq 0x2190
movq %rax, 0xc8(%rsp)
jmp 0xf428
movq 0xc8(%rsp), %rdi
movq 0x638(%rsp), %rsi
callq 0x2170
movq %rax, 0xc0(%rsp)
jmp 0xf447
movq 0xc0(%rsp), %rdi
movq 0x4eb62(%rip), %rsi     # 0x5dfb8
callq 0x21d0
jmp 0xf45d
movl $0x1, %edi
callq 0x2210
movq 0x108(%rsp), %rdi
movl 0x1fc(%rsp), %eax
movl %eax, %esi
callq 0x18e20
jmp 0xf47f
jmp 0xf549
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
movl 0x61c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xfdd2
movq 0x620(%rsp), %rdi
callq 0x20a0
movq %rax, 0x1f0(%rsp)
movq 0x4eb28(%rip), %rdi     # 0x5dff0
leaq 0x3713f(%rip), %rsi     # 0x4660e
callq 0x2190
movq %rax, 0xb8(%rsp)
jmp 0xf4de
movq 0x1f0(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0xb8(%rsp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, 0xb0(%rsp)
jmp 0xf509
movq 0xb0(%rsp), %rdi
movq 0x4eaa0(%rip), %rsi     # 0x5dfb8
callq 0x21d0
jmp 0xf51f
movl $0x1, %edi
callq 0x2210
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
callq 0x2300
jmp 0xf544
jmp 0xfdd2
movl $0x18, %edi
callq 0x21b0
movq %rax, 0xa8(%rsp)
jmp 0xf55d
movq 0xa8(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x17e60
movq 0xa8(%rsp), %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rax), %rdi
movl 0x1f8(%rsp), %eax
addl %eax, %eax
movl %eax, %esi
callq 0x18f30
jmp 0xf5a2
jmp 0xf66c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
movl 0x61c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xfdd2
movq 0x620(%rsp), %rdi
callq 0x20a0
movq %rax, 0x1e8(%rsp)
movq 0x4ea05(%rip), %rdi     # 0x5dff0
leaq 0x37035(%rip), %rsi     # 0x46627
callq 0x2190
movq %rax, 0xa0(%rsp)
jmp 0xf601
movq 0x1e8(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0xa0(%rsp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, 0x98(%rsp)
jmp 0xf62c
movq 0x98(%rsp), %rdi
movq 0x4e97d(%rip), %rsi     # 0x5dfb8
callq 0x21d0
jmp 0xf642
movl $0x1, %edi
callq 0x2210
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
callq 0x2300
jmp 0xf667
jmp 0xfdd2
movl 0x1fc(%rsp), %eax
movq %rax, 0x88(%rsp)
leaq 0x1cf(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x1b7b0
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0x1d0(%rsp), %rdi
callq 0x1b7c0
jmp 0xf6af
leaq 0x1cf(%rsp), %rdi
callq 0x1b840
movl $0xffffffff, 0x1c0(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x1bc(%rsp)
movl $0x0, 0x1b8(%rsp)
movq 0x628(%rsp), %rdx
leaq 0x210(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x22e0
movq %rax, 0x80(%rsp)
jmp 0xf701
movq 0x80(%rsp), %rax
cmpq $0x0, %rax
je 0xfaad
leaq 0x210(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x1c4(%rsp), %rdx
callq 0xfe10
jmp 0xf732
movl 0x1c8(%rsp), %eax
cmpl 0x1fc(%rsp), %eax
jae 0xf756
movl 0x1c4(%rsp), %eax
cmpl 0x1fc(%rsp), %eax
jb 0xf7d9
movq 0x4e893(%rip), %rdi     # 0x5dff0
leaq 0x36edd(%rip), %rsi     # 0x46641
callq 0x2190
movq %rax, 0x78(%rsp)
jmp 0xf770
movq 0x78(%rsp), %rdi
movq 0x4e83c(%rip), %rsi     # 0x5dfb8
callq 0x21d0
jmp 0xf783
movl $0x1, %edi
callq 0x2210
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x1cf(%rsp), %rdi
callq 0x1b840
jmp 0xfdd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0x1b8a0
jmp 0xfdd2
cmpl $-0x1, 0x1c0(%rsp)
jne 0xf80e
cmpl $0x0, 0x1c8(%rsp)
je 0xf80e
movq 0x108(%rsp), %rdi
movq 0x630(%rsp), %rdx
leaq 0x1c8(%rsp), %rsi
callq 0xff30
jmp 0xf80c
jmp 0xf80e
movl 0x1c0(%rsp), %eax
cmpl 0x1c8(%rsp), %eax
je 0xfa47
cmpl $-0x1, 0x1c0(%rsp)
je 0xfa47
movl 0x1c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1b4(%rsp)
movl 0x1b4(%rsp), %eax
cmpl 0x1c8(%rsp), %eax
ja 0xfa45
movl 0x1bc(%rsp), %eax
movl %eax, 0x6c(%rsp)
movl 0x1b4(%rsp), %eax
decl %eax
movl %eax, %esi
leaq 0x1d0(%rsp), %rdi
callq 0x1b850
movq %rax, %rdi
callq 0x188e0
movl 0x6c(%rsp), %ecx
movq %rax, %rdx
movq 0x108(%rsp), %rax
addl %edx, %ecx
movl %ecx, 0x1b0(%rsp)
movq %rax, 0x70(%rsp)
leaq 0x1a4(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
leaq 0x1b0(%rsp), %rdx
callq 0x19190
jmp 0xf8bc
movq 0x70(%rsp), %rdi
leaq 0x1a4(%rsp), %rsi
callq 0x19160
jmp 0xf8d0
cmpl $0x0, 0x1b0(%rsp)
jne 0xf942
movq 0x630(%rsp), %rax
testb $0x1, (%rax)
jne 0xf942
movq 0x108(%rsp), %rdi
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x60(%rsp)
callq 0x18830
movq 0x60(%rsp), %rdi
decl %eax
movl %eax, 0x1a0(%rsp)
leaq 0x1a0(%rsp), %rsi
callq 0x1b870
jmp 0xf91d
movq 0x108(%rsp), %rdi
callq 0x18830
movq 0x108(%rsp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x19050
movb $0x1, 0x8(%rax)
movq 0x108(%rsp), %rax
movl 0x1b0(%rsp), %edx
movl 0x1b8(%rsp), %ecx
addl %edx, %ecx
movl %ecx, 0x1b8(%rsp)
movq 0x18(%rax), %rdi
movq %rdi, 0x50(%rsp)
callq 0x1a0e0
movq %rax, 0x190(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1aa60
movl 0x1b4(%rsp), %eax
movl %eax, %esi
leaq 0x1d0(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x1b850
movq %rax, %rdi
callq 0x19b50
movq 0x48(%rsp), %rdi
movq %rax, 0x188(%rsp)
movl 0x1b4(%rsp), %eax
movl %eax, %esi
callq 0x1b850
movq %rax, %rdi
callq 0x1a0e0
movq 0x50(%rsp), %rdi
movq %rax, 0x180(%rsp)
movq 0x198(%rsp), %rsi
movq 0x188(%rsp), %rdx
movq 0x180(%rsp), %rcx
callq 0x1a9a0
movq %rax, 0x58(%rsp)
jmp 0xfa03
movq 0x58(%rsp), %rax
movq %rax, 0x178(%rsp)
movl $0x0, 0x1bc(%rsp)
movl 0x1b4(%rsp), %eax
cmpl 0x1c8(%rsp), %eax
jae 0xfa2d
jmp 0xfa2d
jmp 0xfa2f
movl 0x1b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1b4(%rsp)
jmp 0xf841
jmp 0xfa47
movq 0x108(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x1c4(%rsp), %rsi
callq 0x19070
jmp 0xfa62
movl 0x1bc(%rsp), %eax
incl %eax
movl %eax, 0x1bc(%rsp)
movl 0x1c4(%rsp), %eax
movl %eax, %esi
leaq 0x1d0(%rsp), %rdi
callq 0x1b850
movq %rax, %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x19070
jmp 0xfa9a
movl 0x1c8(%rsp), %eax
movl %eax, 0x1c0(%rsp)
jmp 0xf6dd
movl 0x1bc(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x1c0(%rsp), %eax
movl %eax, %esi
leaq 0x1d0(%rsp), %rdi
callq 0x1b850
movq %rax, %rdi
callq 0x188e0
movl 0x3c(%rsp), %ecx
movq %rax, %rdx
movq 0x108(%rsp), %rax
addl %edx, %ecx
movl %ecx, 0x174(%rsp)
movq %rax, 0x40(%rsp)
leaq 0x168(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
leaq 0x174(%rsp), %rdx
callq 0x19190
jmp 0xfb12
movq 0x40(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x19160
jmp 0xfb26
cmpl $0x0, 0x174(%rsp)
jne 0xfb98
movq 0x630(%rsp), %rax
testb $0x1, (%rax)
jne 0xfb98
movq 0x108(%rsp), %rdi
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x30(%rsp)
callq 0x18830
movq 0x30(%rsp), %rdi
decl %eax
movl %eax, 0x164(%rsp)
leaq 0x164(%rsp), %rsi
callq 0x1b870
jmp 0xfb73
movq 0x108(%rsp), %rdi
callq 0x18830
movq 0x108(%rsp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x19050
movb $0x1, 0x8(%rax)
movq 0x108(%rsp), %rdi
movl 0x174(%rsp), %eax
addl 0x1b8(%rsp), %eax
movl %eax, 0x1b8(%rsp)
callq 0x18830
movl %eax, 0x160(%rsp)
movl 0x160(%rsp), %eax
cmpl 0x1fc(%rsp), %eax
jae 0xfd93
movl 0x160(%rsp), %eax
movl %eax, %esi
leaq 0x1d0(%rsp), %rdi
callq 0x1b850
movq %rax, %rdi
callq 0x188e0
movq %rax, %rcx
movq 0x108(%rsp), %rax
movl %ecx, 0x174(%rsp)
movq %rax, 0x28(%rsp)
leaq 0x154(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
leaq 0x174(%rsp), %rdx
callq 0x19190
jmp 0xfc29
movq 0x28(%rsp), %rdi
leaq 0x154(%rsp), %rsi
callq 0x19160
jmp 0xfc3d
cmpl $0x0, 0x174(%rsp)
jne 0xfcaf
movq 0x630(%rsp), %rax
testb $0x1, (%rax)
jne 0xfcaf
movq 0x108(%rsp), %rdi
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x20(%rsp)
callq 0x18830
movq 0x20(%rsp), %rdi
decl %eax
movl %eax, 0x150(%rsp)
leaq 0x150(%rsp), %rsi
callq 0x1b870
jmp 0xfc8a
movq 0x108(%rsp), %rdi
callq 0x18830
movq 0x108(%rsp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x19050
movb $0x1, 0x8(%rax)
movq 0x108(%rsp), %rax
movl 0x174(%rsp), %edx
movl 0x1b8(%rsp), %ecx
addl %edx, %ecx
movl %ecx, 0x1b8(%rsp)
movq 0x18(%rax), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1a0e0
movq %rax, 0x140(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x1aa60
movl 0x160(%rsp), %eax
movl %eax, %esi
leaq 0x1d0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1b850
movq %rax, %rdi
callq 0x19b50
movq 0x8(%rsp), %rdi
movq %rax, 0x138(%rsp)
movl 0x160(%rsp), %eax
movl %eax, %esi
callq 0x1b850
movq %rax, %rdi
callq 0x1a0e0
movq 0x10(%rsp), %rdi
movq %rax, 0x130(%rsp)
movq 0x148(%rsp), %rsi
movq 0x138(%rsp), %rdx
movq 0x130(%rsp), %rcx
callq 0x1a9a0
movq %rax, 0x18(%rsp)
jmp 0xfd70
movq 0x18(%rsp), %rax
movq %rax, 0x128(%rsp)
movl 0x160(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x160(%rsp)
jmp 0xfbc1
movq 0x108(%rsp), %rdi
callq 0x18830
movq %rax, %rcx
movq 0x108(%rsp), %rax
movl %ecx, 0x38(%rax)
movq 0x628(%rsp), %rdi
callq 0x21a0
jmp 0xfdbd
leaq 0x1d0(%rsp), %rdi
callq 0x1b8a0
addq $0x648, %rsp            # imm = 0x648
retq
movq 0x110(%rsp), %rdi
callq 0x18520
movq 0x118(%rsp), %rdi
callq 0x18580
movq 0x620(%rsp), %rdi
callq 0x2310
movq %rax, %rdi
callq 0x1b7a0
nopw %cs:(%rax,%rax)