// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/channel.cc
// Function: PORE::findChannelsAndPockets(DIJKSTRA_NETWORK*, std::vector<bool, std::allocator<bool>>*, std::vector<PORE, std::allocator<PORE>>*)
void PORE::findChannelsAndPockets(DIJKSTRA_NETWORK *dnet, vector<bool> *infoStorage,
                                  vector<PORE> *pores)
{
    //Define three access types
    const int ACCESSIBLE   =  1;
    const int INACCESSIBLE =  0;
    const int UNKNOWN      = -1;
    
    vector<DELTA_POS> directions = vector<DELTA_POS> ();
    
    // Initialize the status of each node as UNKNOWN
    vector<int> accessStatuses = vector<int> (dnet->nodes.size(), UNKNOWN);
    unsigned int nodeIndex = 0;
    
    // Get and Print basic info
    int noAccDijkNodes = 0; // number of active Dijkstra nodes (ones with radius > 0)
    int noAccDijkNodesAssigned = 0; // number of active Dijkstra nodes already assigned to pores.
    for(unsigned int i = 0; i < dnet->nodes.size(); i++)
    {
        if(dnet->nodes.at(i).active == true) noAccDijkNodes++;
        
        //debug line
        //cout << "id,active " << i << "   " << dnet->nodes.at(i).active << endl;
    };
    cout << "\nFinding channels and pockets in Dijkstra network of " << dnet->nodes.size() << " node(s). " << noAccDijkNodes << " are expected to compose pores." << endl;
    
    // Iterate over all nodes
    while(nodeIndex != accessStatuses.size()){
        //Skip node if access status already determined
        if(accessStatuses.at(nodeIndex) != UNKNOWN){
            nodeIndex++;
            continue;
        }
        
        // Start out with 0-dimensional pore w/o any basis vectors
        int dim = 0;
        int basis [3][3] = {{0,0,0},
			{0,0,0},
			{0,0,0}};
        
        // Place starting node on stack with (0,0,0) displacement
        int accessStatus = UNKNOWN;
        DELTA_POS displacement = DELTA_POS(0,0,0);
        map<int,DELTA_POS> visitedNodeDisplacement;
        vector<pair<int,DELTA_POS> > stack;
        stack.push_back(pair<int,DELTA_POS> (nodeIndex,displacement));
        visitedNodeDisplacement.insert(pair<int,DELTA_POS>(nodeIndex, displacement));
        
        while(stack.size() != 0){
            // Remove top-most node
            pair<int,DELTA_POS> nodeInfo = stack.back();
            DIJKSTRA_NODE currentNode = dnet->nodes.at(nodeInfo.first);
            stack.pop_back();
            
            // Follow all edges leading to adjoining nodes
            vector<CONN>::iterator connIter = currentNode.connections.begin();
            while(connIter != currentNode.connections.end()){
                int to = connIter->to;
                DELTA_POS newDisplacement = nodeInfo.second + connIter->deltaPos;
                int localAccessStatus = accessStatuses.at(to);
                
                if(localAccessStatus == UNKNOWN){
                    map<int,DELTA_POS>::iterator visitedNode = visitedNodeDisplacement.find(to);
                    if(visitedNode != visitedNodeDisplacement.end()){
                        if(visitedNode->second.equals(newDisplacement)){
                            // Circling back to previous node
                            // Do nothing
                        }
                        else{
                            // Nodes are ACCESSIBLE b/c same node visited in different unit cell
                            accessStatus = ACCESSIBLE;
                            DELTA_POS direction = newDisplacement - visitedNode->second;
                            
                            
                            /******* Start of Michael's code ******/
                            if(dim == 0){
                                basis[0][0] = direction.x;
                                basis[1][0] = direction.y;
                                basis[2][0] = direction.z;
                                dim++;
                            }
                            else if (dim == 1){
                                double v;
                                
                                if (basis[0][0] != 0) v = 1.0*direction.x/basis[0][0];
                                else if (basis[1][0] != 0) v = 1.0*direction.y/basis[1][0];
                                else if (basis[2][0] != 0) v = 1.0*direction.z/basis[2][0];
                                else {
                                    cerr << "Error: Pore basis vector is zero vector. Exiting..." << "\n";
                                    exit(1);
                                }
                                
                                if(!(basis[0][0]*v == direction.x && basis[1][0]*v == direction.y &&
                                     basis[2][0]*v == direction.z)){
                                    basis[0][1] = direction.x;
                                    basis[1][1] = direction.y;
                                    basis[2][1] = direction.z;
                                    dim++;
                                }
                            }
                            else if (dim == 2){
                                basis[0][2] = direction.x;
                                basis[1][2] = direction.y;
                                basis[2][2] = direction.z;
                                if(abs(calcDeterminant(basis)) < 1e-8){
                                    basis[0][2] = basis[1][2] = basis[2][2] = 0;
                                }
                                else
                                    dim++;
                            }
                            /****** End of Michael's code ******/
                        }
                    }
                    else{
                        // Node being visited for the first time
                        visitedNodeDisplacement.insert(pair<int,DELTA_POS>(to, newDisplacement));
                        stack.push_back(pair<int,DELTA_POS> (to, newDisplacement));
                    }
                }
                else{
                    // The status of a region should be determined
                    // with all of its neighbors. Otherwise, all possible nodes
                    // were not explored.
                    cerr << "Error: Illogical result  when attempting to identify channels/pockets." << "\n";
                    cerr << "Please contact the source code provider with your program input. " << "\n";
                    cerr << "Exiting ..." << "\n";
                    exit(1);
                }
                connIter++;
            }
        }
        
        // All connected nodes are inaccessible if their status is still UNKNOWN
        if((stack.size() == 0) && (accessStatus == UNKNOWN))
            accessStatus = INACCESSIBLE;
        
        // Record the access status for each node in the cycle and create
        // a list of the node ids for channel identification
        map<int,DELTA_POS>::iterator resultIter = visitedNodeDisplacement.begin();
        vector<int> listOfIDs = vector<int> ();
        while(resultIter != visitedNodeDisplacement.end()){
            
            int nodeID = resultIter->first;
            if(accessStatuses.at(nodeID) != UNKNOWN){
                // Each node should only have its accessibility determined once
                cerr << "Error: Accessibility of node was determined more than once." << "\n";
                cerr << "Please contact the source code provider with your program input. " << "\n";
                cerr << "Exiting ..." << "\n";
                exit(1);
            }
            else{
                // Store node's status
                accessStatuses.at(nodeID) = accessStatus;
                listOfIDs.push_back(nodeID);
            }
            resultIter++;
        }
        nodeIndex++;
        
        // Create CHANNEL from ACCESSIBLE nodes
        if(accessStatus == ACCESSIBLE){
            pores->push_back(PORE(listOfIDs, dnet, dim, basis));
            // store pore statistics (number of nodes included in pore)
            noAccDijkNodesAssigned += listOfIDs.size();
            //output << dim << " ";
        }else
        { // OTHERWISE create POCKET from INACCESSIBLE nodes (dim set to 0 indicates pocket)
            // additionally pockets have to be built from active nodes (this is to ensure their
            // size is larger than mix_radius)
            if(dnet->nodes[listOfIDs[0]].active == true)
            {
                pores->push_back(PORE(listOfIDs, dnet, dim, basis));
                // store pore statistics (number of nodes included in pore)
                noAccDijkNodesAssigned += listOfIDs.size();
            };
        };
        
        //more debug
        bool flg;
        for(unsigned int i=0;i<listOfIDs.size();i++)
        {
            if(i==0) flg = dnet->nodes[listOfIDs[0]].active;
            else
            {
                if(flg !=dnet->nodes[listOfIDs[i]].active) cout << "pocket error" << endl;
            };
        };
        //end of debug
    }
    // Store information in provided vector
    infoStorage -> resize(accessStatuses.size());
    for(unsigned int i = 0; i < accessStatuses.size(); i++){
        infoStorage -> at(i) = (accessStatuses.at(i) == ACCESSIBLE);
    }
    
    // Print summary
    int nchannel=0,npocket=0;
    for(unsigned int i = 0; i<pores->size(); i++)
    {
        if(pores->at(i).dimensionality>0) nchannel++; else npocket++;
    };
    cout << "Analyzed and assigned " << nodeIndex << " nodes.";
    cout << "\nIdentified " << nchannel << " channels and " << npocket << " pockets.\n";
    cout << noAccDijkNodesAssigned << " nodes assigned to pores. " << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rdx, 0x70(%rsp)
movq %rsi, 0xc0(%rsp)
movq %rdi, %r13
leaq 0xdc(%rsp), %r8
orl $-0x1, (%r8)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x110(%rsp)
andq $0x0, 0x120(%rsp)
movq 0x8(%rdi), %rax
subq (%rdi), %rax
pushq $0x48
popq %r15
cqto
idivq %r15
leaq 0x78(%rsp), %rdi
leaq 0x158(%rsp), %rcx
movq %rax, %rsi
movq %r8, %rdx
callq 0x2a44a
xorl %r14d, %r14d
xorl %ebx, %ebx
movl %r14d, %r14d
movq 0x8(%r13), %rax
subq (%r13), %rax
cqto
idivq %r15
cmpq %r14, %rax
jbe 0x52d81
movq %r13, %rdi
movq %r14, %rsi
callq 0xabe2
movzbl 0x40(%rax), %eax
addl %eax, %ebx
incl %r14d
jmp 0x52d56
movq 0xfd238(%rip), %rdi     # 0x14ffc0
leaq 0xb0809(%rip), %rsi     # 0x103598
callq 0x4480
movq %rax, %rdi
movq 0x8(%r13), %rax
subq (%r13), %rax
cqto
idivq %r15
movq %rax, %rsi
callq 0x42e0
leaq 0xb081b(%rip), %rsi     # 0x1035ce
movq %rax, %rdi
callq 0x4480
movq %rax, %rdi
movl %ebx, %esi
callq 0x4760
leaq 0xb080d(%rip), %rsi     # 0x1035d9
movq %rax, %rdi
callq 0x4480
movq %rax, %rdi
callq 0x4230
leaq 0xd0(%rsp), %rbx
leaq 0xe0(%rsp), %r14
xorl %eax, %eax
movl $0x0, 0xc(%rsp)
movl %eax, 0x4(%rsp)
movl %eax, %r15d
movq 0x80(%rsp), %rax
subq 0x78(%rsp), %rax
sarq $0x2, %rax
cmpq %r15, %rax
je 0x53383
leaq 0x78(%rsp), %rdi
movq %r15, %rsi
callq 0xac00
cmpl $-0x1, (%rax)
je 0x52e31
movl 0x4(%rsp), %eax
incl %eax
jmp 0x52df6
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movapd %xmm0, 0x40(%rsp)
andl $0x0, 0x60(%rsp)
leaq 0x94(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3d328
andl $0x0, 0xe8(%rsp)
andq $0x0, 0xf0(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq %rax, 0x100(%rsp)
andq $0x0, 0x108(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movl 0x4(%rsp), %ebp
movl %ebp, 0x158(%rsp)
movl 0x9c(%rsp), %eax
leaq 0x15c(%rsp), %r12
movl %eax, 0x8(%r12)
movq 0x94(%rsp), %rax
movq %rax, (%r12)
leaq 0xa0(%rsp), %rdi
leaq 0x158(%rsp), %r15
movq %r15, %rsi
callq 0x57d50
movq %r13, 0x68(%rsp)
movl %ebp, 0x158(%rsp)
movl 0x9c(%rsp), %eax
movl %eax, 0x8(%r12)
movq 0x94(%rsp), %rax
movq %rax, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x57ed0
xorl %r12d, %r12d
pushq $-0x1
popq %rbp
movq 0xa8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
je 0x53185
movupd -0x10(%rax), %xmm0
movapd %xmm0, 0x20(%rsp)
movslq 0x20(%rsp), %rsi
movq 0x68(%rsp), %rdi
callq 0xabe2
leaq 0x158(%rsp), %rdi
movq %rax, %rsi
callq 0x29ebe
addq $-0x10, 0xa8(%rsp)
movq 0x178(%rsp), %r15
cmpq 0x180(%rsp), %r15
je 0x53173
movl 0x4(%r15), %eax
movl %eax, 0x8(%rsp)
addq $0x18, %r15
leaq 0x24(%rsp), %rdi
movq %r15, %rsi
callq 0x3d380
movq %rax, 0x10(%rsp)
movl %edx, 0x18(%rsp)
movslq 0x8(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0xac00
cmpl $-0x1, (%rax)
jne 0x534f2
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0x5805a
movq %rax, %r13
leaq 0xe8(%rsp), %rax
cmpq %rax, %r13
je 0x5302e
addq $0x24, %r13
movq 0x10(%rsp), %rsi
movl 0x18(%rsp), %edx
movq %r13, %rdi
callq 0x3d332
testb %al, %al
jne 0x53085
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x3d398
cmpl $0x2, %r12d
je 0x5309c
cmpl $0x1, %r12d
je 0x5308e
pushq $0x1
popq %rbp
testl %r12d, %r12d
jne 0x53085
movl %eax, 0x40(%rsp)
shrq $0x20, %rax
movl %eax, 0x4c(%rsp)
movl %edx, 0x58(%rsp)
pushq $0x1
popq %r12
movl %r12d, %ebp
jmp 0x53085
movl 0x8(%rsp), %eax
movl %eax, 0xcc(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
movq %r14, %rdi
leaq 0xcc(%rsp), %r13
movq %r13, %rsi
callq 0x57ed0
movl 0x8(%rsp), %eax
movl %eax, 0xcc(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
leaq 0xa0(%rsp), %rdi
movq %r13, %rsi
callq 0x57d50
addq $0x10, %r15
jmp 0x52f6a
movl 0x40(%rsp), %ecx
testl %ecx, %ecx
je 0x530d5
movl %eax, %edi
movl %ecx, %esi
jmp 0x530f4
movl %eax, 0x48(%rsp)
shrq $0x20, %rax
movl %eax, 0x54(%rsp)
movl %edx, 0x60(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x63896
pushq $0x1
popq %rbp
pushq $0x3
popq %r12
testl %eax, %eax
jne 0x53085
andl $0x0, 0x60(%rsp)
andl $0x0, 0x54(%rsp)
andl $0x0, 0x48(%rsp)
jmp 0x5316a
movl 0x4c(%rsp), %esi
testl %esi, %esi
je 0x530e6
movq %rax, %rdi
shrq $0x20, %rdi
jmp 0x530f4
movl 0x58(%rsp), %esi
movl %edx, %edi
testl %esi, %esi
je 0x535c8
cvtsi2sd %edi, %xmm0
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvtsi2sd %eax, %xmm2
ucomisd %xmm2, %xmm1
jne 0x53154
jp 0x53154
cvtsi2sdl 0x4c(%rsp), %xmm1
mulsd %xmm0, %xmm1
movq %rax, %rcx
shrq $0x20, %rcx
cvtsi2sd %ecx, %xmm2
ucomisd %xmm2, %xmm1
jne 0x5315b
jp 0x5315b
cvtsi2sdl 0x58(%rsp), %xmm1
mulsd %xmm1, %xmm0
cvtsi2sd %edx, %xmm1
ucomisd %xmm1, %xmm0
pushq $0x1
popq %r12
movl %r12d, %ebp
jne 0x5315b
jnp 0x53085
jmp 0x5315b
movq %rax, %rcx
shrq $0x20, %rcx
movl %eax, 0x44(%rsp)
movl %ecx, 0x50(%rsp)
movl %edx, 0x5c(%rsp)
pushq $0x1
popq %rbp
pushq $0x2
popq %r12
jmp 0x53085
leaq 0x178(%rsp), %rdi
callq 0xaf14
jmp 0x52f19
cmpl $-0x1, %ebp
movl $0x0, %eax
cmovel %eax, %ebp
movq 0xf8(%rsp), %r15
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0xe8(%rsp), %rax
cmpq %rax, %r15
je 0x53206
movslq 0x20(%r15), %rsi
movl %esi, 0x158(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xac00
cmpl $-0x1, (%rax)
jne 0x53560
movslq 0x158(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0xac00
movl %ebp, (%rax)
leaq 0x20(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x9434
movq %r15, %rdi
callq 0x4300
movq %rax, %r15
jmp 0x531a8
cmpl $0x1, %ebp
jne 0x53262
leaq 0x140(%rsp), %r15
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0xa6ce
movq 0x68(%rsp), %r13
leaq 0x158(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %r12d, %ecx
leaq 0x40(%rsp), %r8
callq 0x52212
movq 0x70(%rsp), %rdi
movq %rbp, %rsi
callq 0x580ac
movq %rbp, %rdi
callq 0xb718
leaq 0x140(%rsp), %rdi
jmp 0x532ce
movq 0x20(%rsp), %rax
movslq (%rax), %rcx
movq 0x68(%rsp), %r13
movq (%r13), %rdx
imulq $0x48, %rcx, %rcx
cmpb $0x1, 0x40(%rdx,%rcx)
jne 0x532e8
leaq 0x128(%rsp), %r15
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0xa6ce
leaq 0x158(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %r12d, %ecx
leaq 0x40(%rsp), %r8
callq 0x52212
movq 0x70(%rsp), %rdi
movq %rbp, %rsi
callq 0x580ac
movq %rbp, %rdi
callq 0xb718
leaq 0x128(%rsp), %rdi
callq 0xb290
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
addl %ecx, 0xc(%rsp)
incl 0x4(%rsp)
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0x28(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x5335b
testq %r15, %r15
je 0x53343
movb 0x3(%rsp), %cl
andb $0x1, %cl
movslq (%rax,%r15,4), %rdx
movq (%r13), %rsi
imulq $0x48, %rdx, %rdx
cmpb 0x40(%rsi,%rdx), %cl
je 0x53356
movq 0xfcc98(%rip), %rdi     # 0x14ffc0
leaq 0xb03c3(%rip), %rsi     # 0x1036f2
callq 0x4480
movq %rax, %rdi
callq 0x4230
movq 0x20(%rsp), %rax
jmp 0x53356
movslq (%rax), %rcx
movq (%r13), %rdx
imulq $0x48, %rcx, %rcx
movb 0x40(%rdx,%rcx), %cl
movb %cl, 0x3(%rsp)
incl %r15d
jmp 0x532ef
leaq 0x20(%rsp), %rdi
callq 0xb290
leaq 0xa0(%rsp), %rdi
callq 0x57d1c
movq %r14, %rdi
callq 0x57b3a
movl 0x4(%rsp), %eax
jmp 0x52df6
xorl %ebx, %ebx
movq 0xc0(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xab36
leaq 0x78(%rsp), %r14
movl %ebx, %ebx
movq 0x80(%rsp), %rax
subq 0x78(%rsp), %rax
sarq $0x2, %rax
cmpq %rbx, %rax
jbe 0x533e8
movq %r14, %rdi
movq %rbx, %rsi
callq 0xac00
movl (%rax), %ebp
movq 0xc0(%rsp), %rdi
movq %rbx, %rsi
callq 0xaba4
cmpl $0x1, %ebp
jne 0x533db
orq (%rax), %rdx
jmp 0x533e1
notq %rdx
andq (%rax), %rdx
movq %rdx, (%rax)
incl %ebx
jmp 0x5339c
xorl %ebp, %ebp
movl $0x130, %r12d           # imm = 0x130
xorl %ebx, %ebx
xorl %r14d, %r14d
movl %r14d, %r14d
movq 0x70(%rsp), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
cqto
idivq %r12
cmpq %r14, %rax
jbe 0x53430
movq %r14, %rsi
callq 0x57642
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x0, 0x108(%rax)
setle %cl
setg %dl
addl %edx, %ebp
addl %ecx, %ebx
incl %r14d
jmp 0x533f5
movq 0xfcb89(%rip), %rdi     # 0x14ffc0
leaq 0xb02c1(%rip), %rsi     # 0x1036ff
callq 0x4480
movq %rax, %rdi
movq %r15, %rsi
callq 0x42e0
leaq 0xb02c1(%rip), %rsi     # 0x103716
movq %rax, %rdi
callq 0x4480
movq 0xfcb5c(%rip), %rdi     # 0x14ffc0
leaq 0xb02b3(%rip), %rsi     # 0x10371e
callq 0x4480
movq %rax, %rdi
movl %ebp, %esi
callq 0x4760
leaq 0xb02aa(%rip), %rsi     # 0x10372b
movq %rax, %rdi
callq 0x4480
movq %rax, %rdi
movl %ebx, %esi
callq 0x4760
leaq 0xb02a0(%rip), %rsi     # 0x10373a
movq %rax, %rdi
callq 0x4480
movq 0xfcb17(%rip), %rdi     # 0x14ffc0
movl 0xc(%rsp), %esi
callq 0x4760
leaq 0xb028c(%rip), %rsi     # 0x103745
movq %rax, %rdi
callq 0x4480
movq %rax, %rdi
callq 0x4230
leaq 0x78(%rsp), %rdi
callq 0xb290
leaq 0x110(%rsp), %rdi
callq 0xb758
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xfcaf7(%rip), %rdi     # 0x14fff0
leaq 0xb012d(%rip), %rsi     # 0x10362d
callq 0x4480
leaq 0xaf072(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
movq 0xfcad5(%rip), %rdi     # 0x14fff0
leaq 0xb0152(%rip), %rsi     # 0x103674
callq 0x4480
leaq 0xaf050(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
movq 0xfcab3(%rip), %rdi     # 0x14fff0
leaq 0xa966f(%rip), %rsi     # 0xfcbb3
callq 0x4480
leaq 0xaf02e(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
pushq $0x1
popq %rdi
callq 0x524c
movq 0xfca89(%rip), %rdi     # 0x14fff0
leaq 0xb0148(%rip), %rsi     # 0x1036b6
callq 0x4480
leaq 0xaf004(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
movq 0xfca67(%rip), %rdi     # 0x14fff0
leaq 0xb00e4(%rip), %rsi     # 0x103674
callq 0x4480
leaq 0xaefe2(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
movq 0xfca45(%rip), %rdi     # 0x14fff0
leaq 0xa9601(%rip), %rsi     # 0xfcbb3
callq 0x4480
leaq 0xaefc0(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
jmp 0x53558
movq 0xfca21(%rip), %rdi     # 0x14fff0
leaq 0xb0023(%rip), %rsi     # 0x1035f9
callq 0x4480
leaq 0xaef9c(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
jmp 0x53558
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0xb718
jmp 0x53604
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
jmp 0x5362d
jmp 0x5365d
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0xb718
jmp 0x53625
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0xb290
jmp 0x53660
jmp 0x5365d
jmp 0x53658
jmp 0x53658
jmp 0x53653
movq %rax, %rbx
jmp 0x536ac
jmp 0x53653
jmp 0x53678
jmp 0x53653
jmp 0x5365d
jmp 0x5365d
jmp 0x53653
jmp 0x53653
jmp 0x53653
jmp 0x53653
movq %rax, %rbx
jmp 0x536a2
movq %rax, %rbx
jmp 0x53688
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb290
jmp 0x53688
jmp 0x53678
jmp 0x53678
jmp 0x53678
jmp 0x53678
jmp 0x53678
jmp 0x53678
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0xaf14
leaq 0xa0(%rsp), %rdi
callq 0x57d1c
leaq 0xe0(%rsp), %rdi
callq 0x57b3a
leaq 0x78(%rsp), %rdi
callq 0xb290
leaq 0x110(%rsp), %rdi
callq 0xb758
movq %rbx, %rdi
callq 0x4780
nop