// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkanalysis.cc
// Function: identifyCages(ATOM_NETWORK*, VORONOI_NETWORK*, DIJKSTRA_NETWORK*, double, bool, std::basic_fstream<char, std::char_traits<char>>&, std::vector<CAGE, std::allocator<CAGE>>&)
void identifyCages(ATOM_NETWORK *atmnet, VORONOI_NETWORK *vornet, DIJKSTRA_NETWORK *dnet, double probeRadius, bool visualize, fstream &output, vector<CAGE> &cages) {
  vector<bool> nodeProcessed = vector<bool>(dnet->nodes.size(), false);
  vector<double> bestRadii   = vector<double>(dnet->nodes.size(), -1);
  unsigned int nodeIndex = 0;

  double maxRadius = 0.0;
  DELTA_POS filter(1,1,1);

  // Iterate over all nodes
  while(nodeIndex < nodeProcessed.size()){
   
    // Place starting node on stack with (0,0,0) displacement
    DELTA_POS displacement(0,0,0);
    map<int, pair<DELTA_POS, double> > visitedNodes;
    
    HEAP<pair<int, pair<DELTA_POS, double> > > heap (betterPath);
    heap.insert(pair<int, pair<DELTA_POS, double> > (nodeIndex, pair<DELTA_POS, double> (displacement, dnet->nodes[nodeIndex].max_radius)));
  
    while(heap.size() != 0){
      // Remove best remaining path
      pair<int, pair<DELTA_POS, double> > pathInfo = heap.pop();
      map<int, pair<DELTA_POS, double> >::iterator nodeInfo = visitedNodes.find(pathInfo.first);
      
      // Ending on a preprocessed node
      if(pathInfo.first == -1){
	bestRadii[nodeIndex] = pathInfo.second.second;
	break;
      }

      if(nodeInfo != visitedNodes.end()){
	if(nodeInfo->second.first.equals(pathInfo.second.first)){
	  // Circling back to previous node so terminate path
	  continue;
	}
	else {
	  // Found the optimal path through the start node
	  bestRadii[nodeIndex] = min(pathInfo.second.second, nodeInfo->second.second);
	  maxRadius = max(maxRadius, bestRadii[nodeIndex]);
	  break;
	}
      }
      else{
	visitedNodes.insert(pathInfo);
	DIJKSTRA_NODE currentNode = dnet->nodes[pathInfo.first];
	vector<CONN>::iterator connIter = currentNode.connections.begin();
	// Follow all edges leading to adjoining nodes
      
	while(connIter != currentNode.connections.end()){
	  int to = connIter->to;
	  if(nodeProcessed[to]){
	    // Know the best radii for this path because the next node has already been processed
	    // Change the path's node id to -1 to denote this
	    heap.insert(pair<int, pair<DELTA_POS, double> > (-1, pair<DELTA_POS, double> (DELTA_POS(0,0,0), min(connIter->max_radius, min(pathInfo.second.second, bestRadii[to])))));
	  }
	  else{
	    DELTA_POS newDisplacement = pathInfo.second.first + (connIter->deltaPos*filter);
	    heap.insert(pair<int, pair<DELTA_POS, double> > (to, pair<DELTA_POS, double> (newDisplacement, 
											  min(dnet->nodes[to].max_radius, min(pathInfo.second.second, connIter->max_radius)))));
	  }
	  connIter++;
	}
      }
    }
    nodeProcessed[nodeIndex] = true;
    nodeIndex++;
  }

  double CUTOFF_RATIO = 0.8; 

  // Identify nodes that satisfy cage criteria
  set<int> cageElements;
  for(unsigned int i = 0; i < vornet->nodes.size(); i++){
    double ratio = bestRadii[i]/(dnet->nodes[i].max_radius);
    if(ratio < CUTOFF_RATIO && bestRadii[i] > probeRadius) {
      cageElements.insert(i);
    }
  }
  
  // Calculate node overlaps
  vector< vector<double> > overlapFractions = calculateNodeOverlap(atmnet, vornet);

  // Cluster nodes in cages
  vector< set<int> > clusters = clusterElements(cageElements, overlapFractions, 0.1);


  //vector<CAGE> cages;
  for(unsigned int i = 0; i < clusters.size(); i++){
    cages.push_back(CAGE(clusters[i], atmnet, vornet));
  }

  if(visualize){
    output << "set num_cages " << clusters.size() << "\n";
    for(unsigned int i = 0; i < cages.size(); i++){
      cages[i].writeToVMD(i, output);
    }
  }
  else{
    vector<double> cageRadii;
    for(unsigned int i = 0; i < cages.size(); i++){
      cageRadii.push_back(cages[i].getRadius());
    }

     sort(cageRadii.begin(), cageRadii.end());
    
    vector<int> counts;
    vector<double> radii;
    double prevRad = -1, tolerance = 0.001;
    int numCageTypes = 0;
    for(unsigned int i = 0; i < cageRadii.size(); i++){
      if(abs(cageRadii[i] - prevRad) < tolerance)
	counts[numCageTypes - 1]++;
      else{
	counts.push_back(1); radii.push_back(cageRadii[i]);
	prevRad = cageRadii[i];	numCageTypes++;
      }
    }

    double totalCageAV = 0;
    output << "Note: Probe radius is subtracted from cage radius" << "\n";
    for(unsigned int i = 0; i < counts.size(); i++){
      output << counts[i] << " cage(s) of radius " << radii[i] - probeRadius << "\n";
      totalCageAV += calcSphereVolume(radii[i] - probeRadius)*counts[i];
    }
    output << "Total Cage AV: " << totalCageAV << " A^3" << "\n";
    double volumeFraction = totalCageAV/calcDeterminant(atmnet->ucVectors);
    double rho_crystal    = calcDensity(atmnet);
    double cageAVPerMass  = volumeFraction/rho_crystal;
    output << "Total Cage AV/Mass: " << cageAVPerMass << " cm^3/g" <<  "\n";
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
movq %r9, 0x88(%rsp)
movq %r8, %r15
movl %ecx, %ebp
movsd %xmm0, 0x80(%rsp)
movq %rdx, %r13
movq %rsi, 0x90(%rsp)
movq 0x8(%rdx), %rax
subq (%rdx), %rax
movq %rdi, %r12
pushq $0x48
popq %r14
cqto
idivq %r14
leaq 0x130(%rsp), %rbx
movb $0x0, (%rbx)
leaq 0x1d8(%rsp), %rdi
leaq 0xc8(%rsp), %rcx
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2a0d6
movq 0x8(%r13), %rax
movq %r13, 0x28(%rsp)
subq (%r13), %rax
cqto
idivq %r14
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rbx)
leaq 0x118(%rsp), %rdi
leaq 0x130(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
movq %rax, %rsi
callq 0x2a2b4
movl %ebp, 0x98(%rsp)
movq %r12, 0xc0(%rsp)
movq %r15, 0xb8(%rsp)
leaq 0x21c(%rsp), %rdi
pushq $0x1
popq %rcx
movl %ecx, %esi
movl %ecx, %edx
callq 0x3d328
xorl %eax, %eax
leaq 0x230(%rsp), %r13
leaq 0xf8(%rsp), %r14
leaq 0x1d8(%rsp), %r15
leaq 0x40(%rsp), %rbx
leaq 0xa0(%rsp), %rbp
movl %eax, 0x38(%rsp)
movl %eax, %edx
movq 0x1e8(%rsp), %rax
movl 0x1f0(%rsp), %ecx
subq 0x1d8(%rsp), %rax
leaq (%rcx,%rax,8), %rax
movq %rdx, 0x30(%rsp)
cmpq %rdx, %rax
jbe 0x28fd5
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3d328
andl $0x0, 0xd0(%rsp)
andq $0x0, 0xd8(%rsp)
leaq 0xd0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq %rax, 0xe8(%rsp)
andq $0x0, 0xf0(%rsp)
movq %r14, %rdi
leaq -0x13c9(%rip), %rsi     # 0x27923
callq 0x2a30a
movq 0x28(%rsp), %rax
movq (%rax), %rax
imulq $0x48, 0x30(%rsp), %rcx
movl 0x68(%rsp), %edx
movl %edx, 0x138(%rsp)
movq 0x60(%rsp), %rdx
movq %rdx, 0x130(%rsp)
movsd 0x38(%rax,%rcx), %xmm0
movl 0x38(%rsp), %eax
movl %eax, 0x248(%rsp)
movq 0x130(%rsp), %rax
leaq 0x250(%rsp), %rcx
movq %rax, (%rcx)
movl 0x138(%rsp), %eax
movl %eax, 0x8(%rcx)
movl 0x13c(%rsp), %eax
movl %eax, 0xc(%rcx)
movsd %xmm0, 0x260(%rsp)
movupd 0x248(%rsp), %xmm0
movupd 0x258(%rsp), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2a340
movq 0x100(%rsp), %rax
subq 0xf8(%rsp), %rax
shrq $0x5, %rax
testl %eax, %eax
je 0x28f9e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a360
leaq 0xc8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2c1f6
cmpl $-0x1, 0x40(%rsp)
je 0x28f79
movq %rax, %rbx
leaq 0xd0(%rsp), %rax
cmpq %rax, %rbx
je 0x28dee
leaq 0x28(%rbx), %rdi
movq 0x48(%rsp), %rsi
movl 0x50(%rsp), %edx
callq 0x3d332
testb %al, %al
jne 0x28f6f
jmp 0x28f81
leaq 0xc8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2c248
movslq 0x40(%rsp), %rax
imulq $0x48, %rax, %rsi
movq 0x28(%rsp), %rax
addq (%rax), %rsi
leaq 0x130(%rsp), %rdi
callq 0x29ebe
movq 0x150(%rsp), %rbx
addq $0x18, %rbx
leaq -0x18(%rbx), %rax
cmpq 0x158(%rsp), %rax
je 0x28f62
movl 0x4(%rax), %eax
movslq %eax, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1043e
testq %rdx, (%rax)
je 0x28ecb
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3d328
movq 0x118(%rsp), %rax
movsd (%rax,%r12,8), %xmm0
minsd 0x58(%rsp), %xmm0
minsd -0x8(%rbx), %xmm0
movl 0xa8(%rsp), %eax
movl %eax, 0x8(%r13)
movq 0xa0(%rsp), %rax
movq %rax, (%r13)
orl $-0x1, 0x228(%rsp)
movsd %xmm0, 0x240(%rsp)
movupd 0x228(%rsp), %xmm0
movupd 0x238(%rsp), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2a340
jmp 0x28f59
movq %rbx, %rdi
leaq 0x21c(%rsp), %rsi
callq 0x3d364
movq %rax, 0xa0(%rsp)
movl %edx, 0xa8(%rsp)
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
callq 0x3d380
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
imulq $0x48, %r12, %rsi
movsd -0x8(%rbx), %xmm0
minsd 0x58(%rsp), %xmm0
minsd 0x38(%rcx,%rsi), %xmm0
movl %r12d, 0x1b8(%rsp)
movq %rax, 0x1c0(%rsp)
movl %edx, 0x1c8(%rsp)
movsd %xmm0, 0x1d0(%rsp)
movupd 0x1b8(%rsp), %xmm0
movupd 0x1c8(%rsp), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2a340
addq $0x28, %rbx
jmp 0x28e2a
leaq 0x150(%rsp), %rdi
callq 0xaf14
leaq 0x40(%rsp), %rbx
jmp 0x28d7d
movsd 0x58(%rsp), %xmm0
jmp 0x28f8c
movsd 0x38(%rbx), %xmm0
minsd 0x58(%rsp), %xmm0
movq 0x118(%rsp), %rax
movq 0x30(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq %r15, %rdi
movq 0x30(%rsp), %rsi
callq 0x1043e
orq %rdx, (%rax)
movl 0x38(%rsp), %ebx
incl %ebx
movq %r14, %rdi
callq 0x2ab72
leaq 0xc8(%rsp), %rdi
callq 0x2aba6
movl %ebx, %eax
leaq 0x40(%rsp), %rbx
jmp 0x28c71
leaq 0xc8(%rsp), %rbx
andl $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
leaq 0xd0(%rsp), %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
andq $0x0, 0x28(%rbx)
xorl %ebp, %ebp
leaq 0x130(%rsp), %r14
movl %ebp, %eax
movq 0x90(%rsp), %rdx
movq 0x50(%rdx), %rcx
subq 0x48(%rdx), %rcx
sarq $0x6, %rcx
cmpq %rax, %rcx
jbe 0x2906e
movq 0x118(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
ucomisd 0x80(%rsp), %xmm0
jbe 0x2906a
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
imulq $0x48, %rax, %rax
divsd 0x38(%rcx,%rax), %xmm0
movsd 0xd729e(%rip), %xmm1    # 0x1002f0
ucomisd %xmm0, %xmm1
jbe 0x2906a
movl %ebp, 0x130(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c98e
incl %ebp
jmp 0x29005
leaq 0xf8(%rsp), %rdi
movq 0xc0(%rsp), %rbp
movq %rbp, %rsi
movq 0x90(%rsp), %rdx
callq 0x27e1b
leaq 0x268(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xd16e
movq 0xb8(%rsp), %r13
leaq 0x200(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xacd6
leaq 0x40(%rsp), %rdi
leaq 0x268(%rsp), %rsi
leaq 0x200(%rsp), %rdx
movsd 0xd2f93(%rip), %xmm0    # 0xfc070
callq 0x28020
leaq 0x200(%rsp), %rdi
callq 0xad30
leaq 0x268(%rsp), %rdi
callq 0xafbe
xorl %r12d, %r12d
pushq $0x30
popq %r15
leaq 0x298(%rsp), %rbx
leaq 0x130(%rsp), %r14
movl %r12d, %r12d
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
subq %rsi, %rax
cqto
idivq %r15
cmpq %r12, %rax
jbe 0x29177
imulq $0x30, %r12, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0xd16e
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq 0x90(%rsp), %rcx
callq 0x288dc
movq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x2ca3c
movq %r14, %rdi
callq 0x2a42a
movq %rbx, %rdi
callq 0xafbe
incl %r12d
jmp 0x29113
cmpb $0x0, 0x98(%rsp)
je 0x291f5
leaq 0x10(%r13), %rdi
leaq 0xd72ed(%rip), %rsi     # 0x100479
callq 0x4480
movq %rax, %rdi
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
cqto
idivq %r15
movq %rax, %rsi
callq 0x42e0
leaq 0xd93cc(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %ebx, %ebx
movl %ebx, %ebx
movq 0x88(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rax
subq %rdi, %rax
sarq $0x7, %rax
cmpq %rbx, %rax
jbe 0x294fc
movq %rbx, %rax
shlq $0x7, %rax
addq %rax, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x28a4a
incl %ebx
jmp 0x291bc
leaq 0x130(%rsp), %rbx
andq $0x0, 0x10(%rbx)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rbx)
xorl %r15d, %r15d
leaq 0x60(%rsp), %r14
movl %r15d, %r15d
movq 0x88(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
cmpq %r15, %rcx
jbe 0x29253
movq %r15, %rcx
shlq $0x7, %rcx
movsd 0x78(%rax,%rcx), %xmm0
movsd %xmm0, 0x60(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf9fe
incl %r15d
jmp 0x29212
movq 0x130(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x2cc88
xorpd %xmm0, %xmm0
leaq 0x60(%rsp), %rbx
andq $0x0, 0x10(%rbx)
leaq 0xa0(%rsp), %r14
andq $0x0, 0x10(%r14)
movapd %xmm0, (%rbx)
movapd %xmm0, (%r14)
xorl %ebp, %ebp
movsd 0xd7052(%rip), %xmm0    # 0x1002e8
movapd 0xd2e02(%rip), %xmm2    # 0xfc0a0
movsd 0xd2da2(%rip), %xmm3    # 0xfc048
leaq 0x9c(%rsp), %r15
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x29348
movsd (%rax,%r12,8), %xmm1
subsd %xmm0, %xmm1
andpd %xmm2, %xmm1
ucomisd %xmm1, %xmm3
jbe 0x292f2
movq 0x60(%rsp), %rax
movslq %ebp, %rcx
incl -0x4(%rax,%rcx,4)
jmp 0x29340
movl $0x1, 0x9c(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10324
leaq (,%r12,8), %rsi
addq 0x130(%rsp), %rsi
movq %r14, %rdi
callq 0xac88
movq 0x130(%rsp), %rax
movsd (%rax,%r12,8), %xmm0
incl %ebp
movapd 0xd2d68(%rip), %xmm2    # 0xfc0a0
movsd 0xd2d08(%rip), %xmm3    # 0xfc048
incl %r12d
jmp 0x292b1
movq 0xb8(%rsp), %r12
addq $0x10, %r12
leaq 0xd712d(%rip), %rsi     # 0x100488
movq %r12, %rdi
callq 0x4480
movq 0xc0(%rsp), %r13
leaq 0xd920c(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x60(%rsp), %rax
leaq 0xd7128(%rip), %rbx     # 0x1004ba
leaq 0xd91e5(%rip), %r14     # 0x10257e
movl %ecx, %r15d
movq 0x68(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x29436
movl (%rax,%r15,4), %esi
movq %r12, %rdi
callq 0x4760
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4480
movq 0xa0(%rsp), %rcx
movsd (%rcx,%r15,8), %xmm0
subsd 0x80(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x4480
movq 0xa0(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
subsd 0x80(%rsp), %xmm0
callq 0x6491f
movq 0x60(%rsp), %rax
cvtsi2sdl (%rax,%r15,4), %xmm1
mulsd %xmm1, %xmm0
movsd 0x28(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
leal 0x1(%r15), %ecx
jmp 0x29399
leaq 0xd7091(%rip), %rsi     # 0x1004ce
movq %r12, %rdi
callq 0x4480
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x46c0
leaq 0xd7084(%rip), %rsi     # 0x1004de
movq %rax, %rdi
callq 0x4480
leaq 0xd9115(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
leaq 0x80(%r13), %rdi
callq 0x63835
movsd %xmm0, 0x30(%rsp)
movq %r13, %rdi
callq 0x2d85c
movsd %xmm0, 0x38(%rsp)
leaq 0xd704b(%rip), %rsi     # 0x1004e3
movq %r12, %rdi
callq 0x4480
movsd 0x28(%rsp), %xmm0
divsd 0x30(%rsp), %xmm0
divsd 0x38(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
leaq 0xd7037(%rip), %rsi     # 0x1004f8
movq %rax, %rdi
callq 0x4480
leaq 0xd90ae(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
leaq 0xa0(%rsp), %rdi
callq 0xb25c
leaq 0x60(%rsp), %rdi
callq 0xb290
leaq 0x130(%rsp), %rdi
callq 0xb25c
leaq 0x40(%rsp), %rdi
callq 0xb494
leaq 0xf8(%rsp), %rdi
callq 0xad30
leaq 0xc8(%rsp), %rdi
callq 0xafbe
leaq 0x118(%rsp), %rdi
callq 0xb25c
leaq 0x1d8(%rsp), %rdi
callq 0xa976
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x295e1
jmp 0x295e1
jmp 0x2959f
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
callq 0xad30
jmp 0x2956d
movq %rax, %rbx
leaq 0x268(%rsp), %rdi
callq 0xafbe
jmp 0x29612
movq %rax, %rbx
jmp 0x29612
jmp 0x295a4
jmp 0x295d7
movq %rax, %rbx
jmp 0x29674
jmp 0x295d2
jmp 0x295e1
jmp 0x295e1
jmp 0x295e1
jmp 0x295e1
jmp 0x295d2
movq %rax, %rbx
jmp 0x295fb
movq %rax, %rbx
jmp 0x2961f
jmp 0x29632
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x2a42a
jmp 0x295c3
movq %rax, %rbx
leaq 0x298(%rsp), %rdi
callq 0xafbe
jmp 0x29608
movq %rax, %rbx
jmp 0x29608
movq %rax, %rbx
jmp 0x29667
jmp 0x29632
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0xb25c
leaq 0x60(%rsp), %rdi
callq 0xb290
leaq 0x130(%rsp), %rdi
callq 0xb25c
leaq 0x40(%rsp), %rdi
callq 0xb494
leaq 0xf8(%rsp), %rdi
callq 0xad30
leaq 0xc8(%rsp), %rdi
callq 0xafbe
jmp 0x29667
jmp 0x29632
jmp 0x29632
movq %rax, %rbx
jmp 0x2964d
jmp 0x2963d
jmp 0x2963d
jmp 0x2963d
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0xaf14
leaq 0xf8(%rsp), %rdi
callq 0x2ab72
leaq 0xc8(%rsp), %rdi
callq 0x2aba6
leaq 0x118(%rsp), %rdi
callq 0xb25c
leaq 0x1d8(%rsp), %rdi
callq 0xa976
movq %rbx, %rdi
callq 0x4780