// File: /workspace/github_cpp_makefile_star2_O1/Kingsford-Group[P]ghost2/src/computeSpectralSignatures.hpp
// Function: computeSpectralSignatures(Graph*, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void computeSpectralSignatures(Graph *input, int numHops, int numP, string mode)
{
  ptime t = bclock::local_time();
  if(numP < 1) numP = boost::thread::hardware_concurrency();
  if(numP < 1) numP = 2;
  pool tpool(numP);
  vector<string> nodes = (*input).nodes();
  int numNodes = nodes.size();
  GzWriter w((*input).getName()+".sig.gz");
  ProgressBar p(numNodes, t);
  cout << "creating: " << (*input).getName() << ".sig.gz\n";
  w.writeInt(numNodes);
  w.writeInt(numHops);
  
  levelMap levelmap;
  vector< vector<LevelData> > data;
  data.resize(numNodes);
  if(mode=="")
    for(int i=0;i<numNodes;i++)
      tpool.schedule(
        boost::bind(&spectrum, input, numHops, nodes[i], &(data[i]), &p)
      );
  else if(mode=="rayleigh")
    for(int i=0;i<numNodes;i++)
      tpool.schedule(
        boost::bind(&spectrumR, input, numHops, nodes[i], &(data[i]), &p)
      );
  else if(mode=="inverseIter")
    for(int i=0;i<numNodes;i++)
      tpool.schedule(
        boost::bind(&spectrumI, input, numHops, nodes[i], &(data[i]), &p)
      );
  else
  {
    cout << "sigApprox should be either rayleigh or inverseIter\n";
    exit(0);
  }
  tpool.wait();
  cout << "\n";

  for(int i=0;i<numNodes;i++)
    levelmap[nodes[i]] = data[i];
  w.writeData(levelmap);
  cout << "created: " << (*input).getName() << ".sig.gz in " <<
    (bclock::local_time() - t).total_milliseconds() << " milliseconds\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rcx, %r12
movl %edx, %r14d
movl %esi, 0x14(%rsp)
movq %rdi, %r13
leaq 0x1769b(%rip), %rdi     # 0x29e54
callq 0x29d5e
movq %rax, 0x68(%rsp)
testl %r14d, %r14d
jg 0x127d0
callq 0xd6b0
movl %eax, %r14d
testl %r14d, %r14d
movl $0x2, %esi
cmovgl %r14d, %esi
leaq 0x118(%rsp), %rdi
callq 0x1de1a
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0xe982
movq 0x58(%rsp), %rbx
subq 0x50(%rsp), %rbx
leaq 0x168(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%r13), %rsi
movq 0x70(%r13), %rdx
addq %rsi, %rdx
leaq 0x158(%rsp), %rdi
callq 0x28d6a
leaq 0x36fe5(%rip), %rsi     # 0x49810
leaq 0x158(%rsp), %rdi
callq 0xda60
leaq 0x148(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12868
movq %rdx, 0x138(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x148(%rsp)
jmp 0x1286f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x138(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2b8(%rsp), %rdi
callq 0x1df22
shrq $0x5, %rbx
movq 0x138(%rsp), %rdi
cmpq %r15, %rdi
je 0x128bc
movq 0x148(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x128d9
movq 0x168(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x68(%rsp), %rdx
leaq 0x158(%rsp), %rdi
movl %ebx, %esi
callq 0x1e184
movq 0x666a4(%rip), %rdi     # 0x78f98
leaq 0x36f1d(%rip), %rsi     # 0x49818
movl $0xa, %edx
callq 0xd620
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%r13), %rsi
movq 0x70(%r13), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x28d6a
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x66661(%rip), %rdi     # 0x78f98
callq 0xd620
leaq 0x36ee0(%rip), %rsi     # 0x49823
movl $0x8, %edx
movq %rax, %rdi
callq 0xd620
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x1296a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0x2b8(%rsp), %rdi
movl %ebx, %esi
callq 0x1dd0c
leaq 0x2b8(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1dd0c
movb $0x0, 0x70(%rsp)
movq $0x10, 0x78(%rsp)
xorl %eax, %eax
movq %rax, 0x80(%rsp)
movl $0x3f800000, 0x88(%rsp) # imm = 0x3F800000
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rsp)
leaq 0xe0(%rsp), %rdi
movq %rax, 0x10(%rdi)
movaps %xmm0, (%rdi)
movslq %ebx, %rsi
callq 0x1e1f4
leaq 0x36ede(%rip), %rsi     # 0x498b4
movq %r12, %rdi
callq 0xd1b0
testl %eax, %eax
movq %r13, 0x28(%rsp)
movq %rbx, 0x20(%rsp)
je 0x12b4a
leaq 0x36e35(%rip), %rsi     # 0x4982c
movq %r12, %rdi
callq 0xd1b0
testl %eax, %eax
je 0x12c71
leaq 0x36e27(%rip), %rsi     # 0x49835
movq %r12, %rdi
callq 0xd1b0
testl %eax, %eax
jne 0x12f96
testl %ebx, %ebx
jle 0x12d98
movq 0x20(%rsp), %r14
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
xorl %r12d, %r12d
leaq 0xa0(%rsp), %r13
leaq 0x1b0(%rsp), %rbx
leaq 0x30(%rsp), %r15
movq %r14, 0x18(%rsp)
movq %r15, %r14
movq 0x50(%rsp), %rax
leaq 0xb0(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r13, %r15
movq %r13, %rdi
callq 0x28d6a
movq 0xe0(%rsp), %r9
addq %r12, %r9
leaq 0x158(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0x5ab(%rip), %rsi      # 0x124f9
movq 0x28(%rsp), %rdx
movl 0x14(%rsp), %ecx
movq %r15, %r8
callq 0x1e29c
movq %r14, %r15
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1e3c0
leaq 0x118(%rsp), %rdi
movq %r15, %rsi
callq 0x1e270
movq %r15, %rdi
callq 0x1e464
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x12b02
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
movq 0x18(%rsp), %r14
je 0x12b2c
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0xd550
addq $0x20, %rbp
addq $0x18, %r12
decq %r14
leaq 0xa0(%rsp), %r13
jne 0x12a4f
jmp 0x12d98
testl %ebx, %ebx
jle 0x12d98
movq 0x20(%rsp), %r14
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
xorl %r12d, %r12d
leaq 0xf8(%rsp), %r13
leaq 0x240(%rsp), %rbx
leaq 0x30(%rsp), %r15
movq %r14, 0x18(%rsp)
movq %r15, %r14
movq 0x50(%rsp), %rax
leaq 0x108(%rsp), %rcx
movq %rcx, 0xf8(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r13, %r15
movq %r13, %rdi
callq 0x28d6a
movq 0xe0(%rsp), %r9
addq %r12, %r9
leaq 0x158(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0xc0d(%rip), %rsi      # 0x11fc3
movq 0x28(%rsp), %rdx
movl 0x14(%rsp), %ecx
movq %r15, %r13
movq %r15, %r8
callq 0x1e29c
movq %r14, %r15
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1e3c0
leaq 0x118(%rsp), %rdi
movq %r15, %rsi
callq 0x1e270
movq %r15, %rdi
callq 0x1e464
movq 0x258(%rsp), %rdi
leaq 0x268(%rsp), %rax
cmpq %rax, %rdi
je 0x12c31
movq 0x268(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
movq 0x18(%rsp), %r14
je 0x12c5b
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xd550
addq $0x20, %rbp
addq $0x18, %r12
decq %r14
jne 0x12b7b
jmp 0x12d98
testl %ebx, %ebx
jle 0x12d98
movq 0x20(%rsp), %r14
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
xorl %r12d, %r12d
leaq 0xc0(%rsp), %r13
leaq 0x1f8(%rsp), %rbx
leaq 0x30(%rsp), %r15
movq %r14, 0x18(%rsp)
movq %r15, %r14
movq 0x50(%rsp), %rax
leaq 0xd0(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r13, %r15
movq %r13, %rdi
callq 0x28d6a
movq 0xe0(%rsp), %r9
addq %r12, %r9
leaq 0x158(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0xa99(%rip), %rsi      # 0x1225e
movq 0x28(%rsp), %rdx
movl 0x14(%rsp), %ecx
movq %r15, %r8
callq 0x1e29c
movq %r14, %r15
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1e3c0
leaq 0x118(%rsp), %rdi
movq %r15, %rsi
callq 0x1e270
movq %r15, %rdi
callq 0x1e464
movq 0x210(%rsp), %rdi
leaq 0x220(%rsp), %rax
cmpq %rax, %rdi
je 0x12d55
movq 0x220(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
movq 0x18(%rsp), %r14
je 0x12d7f
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0xd550
addq $0x20, %rbp
addq $0x18, %r12
decq %r14
leaq 0xc0(%rsp), %r13
jne 0x12ca2
leaq 0x118(%rsp), %rdi
xorl %esi, %esi
callq 0x1e49c
movq 0x28(%rsp), %rbp
movq 0x20(%rsp), %rbx
movq 0x661e0(%rip), %rdi     # 0x78f98
leaq 0x368b0(%rip), %rsi     # 0x4966f
movl $0x1, %edx
callq 0xd620
testl %ebx, %ebx
jle 0x12e15
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %r14d, %r14d
leaq 0x70(%rsp), %r15
xorl %r13d, %r13d
movq 0xe0(%rsp), %r12
movq 0x50(%rsp), %rsi
addq %r14, %rsi
movq %r15, %rdi
callq 0x3955a
addq %r13, %r12
addq $0x30, %rax
movq %rax, %rdi
movq %r12, %rsi
callq 0x1e4c8
addq $0x18, %r13
addq $0x20, %r14
decq %rbx
jne 0x12dde
leaq 0x288(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x1e59e
leaq 0x2b8(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x11da6
leaq 0x288(%rsp), %rdi
callq 0x38812
movq 0x66148(%rip), %rdi     # 0x78f98
leaq 0x36a1e(%rip), %rsi     # 0x49875
movl $0x9, %edx
callq 0xd620
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%rbp), %rsi
movq 0x70(%rbp), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x28d6a
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x66108(%rip), %rdi     # 0x78f98
callq 0xd620
movq %rax, %rbx
leaq 0x369e0(%rip), %rsi     # 0x4987f
movl $0xb, %edx
movq %rax, %rdi
callq 0xd620
leaq 0x16fa1(%rip), %rdi     # 0x29e54
callq 0x29d5e
leaq 0x1a8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x68(%rsp), %rsi
callq 0x223a0
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x7, %rdx
addq %rdx, %rsi
movq %rbx, %rdi
callq 0xd4c0
leaq 0x368d6(%rip), %rsi     # 0x497cd
movl $0xe, %edx
movq %rax, %rdi
callq 0xd620
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x12f1b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0xe0(%rsp), %rdi
callq 0x1e602
leaq 0x70(%rsp), %rdi
callq 0x38812
leaq 0x180(%rsp), %rdi
callq 0x28594
leaq 0x636ba(%rip), %rsi     # 0x76600
leaq 0x2b8(%rsp), %rdi
callq 0x27096
leaq 0x2e0(%rsp), %rdi
callq 0xd1e0
leaq 0x50(%rsp), %rdi
callq 0x1d3ca
leaq 0x130(%rsp), %rdi
callq 0x2307a
leaq 0x120(%rsp), %rdi
callq 0x2307a
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x65ffb(%rip), %rdi     # 0x78f98
leaq 0x3689d(%rip), %rsi     # 0x49841
callq 0xd500
xorl %edi, %edi
callq 0xd690
jmp 0x131ae
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
callq 0x38812
jmp 0x131b1
jmp 0x1305a
movq %rax, %rbx
jmp 0x131d5
movq %rax, %rbx
movq 0x138(%rsp), %rdi
cmpq %r15, %rdi
je 0x12ffc
movq 0x148(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x12ffc
movq %rax, %rbx
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x131f6
movq 0x168(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x131f6
movq %rax, %rbx
jmp 0x131f6
movq %rax, %rbx
jmp 0x13200
jmp 0x13062
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x131c8
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x131c8
movq %rax, %rbx
jmp 0x131c8
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x131b1
movq 0x40(%rsp), %rsi
jmp 0x131a4
jmp 0x131ae
movq %rax, %rbx
jmp 0x130be
movq %rax, %rbx
jmp 0x13099
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1e464
movq 0x210(%rsp), %rdi
leaq 0x220(%rsp), %rax
cmpq %rax, %rdi
je 0x130be
movq 0x220(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x131b1
movq 0xd0(%rsp), %rsi
jmp 0x131a4
jmp 0x131ae
jmp 0x131ae
movq %rax, %rbx
jmp 0x1312a
movq %rax, %rbx
jmp 0x13105
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1e464
movq 0x258(%rsp), %rdi
leaq 0x268(%rsp), %rax
cmpq %rax, %rdi
je 0x1312a
movq 0x268(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x131b1
movq 0x108(%rsp), %rsi
jmp 0x131a4
jmp 0x131ae
movq %rax, %rbx
jmp 0x13187
movq %rax, %rbx
jmp 0x13162
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1e464
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x13187
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x131b1
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x131b1
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x1e602
leaq 0x70(%rsp), %rdi
callq 0x38812
leaq 0x180(%rsp), %rdi
callq 0x28594
leaq 0x63424(%rip), %rsi     # 0x76600
leaq 0x2b8(%rsp), %rdi
callq 0x27096
leaq 0x2e0(%rsp), %rdi
callq 0xd1e0
leaq 0x50(%rsp), %rdi
callq 0x1d3ca
leaq 0x130(%rsp), %rdi
callq 0x2307a
leaq 0x120(%rsp), %rdi
callq 0x2307a
movq %rbx, %rdi
callq 0xd9c0