// File: /workspace/github_cpp_makefile_star2_O3/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, 0xc(%rsp)
movq %rdi, %rbp
leaq 0x1735f(%rip), %rdi     # 0x2891c
callq 0x28826
movq %rax, %r13
movq %rax, 0x150(%rsp)
testl %r14d, %r14d
jg 0x115da
callq 0xc6b0
movl %eax, %r14d
testl %r14d, %r14d
movl $0x2, %esi
cmovgl %r14d, %esi
leaq 0x110(%rsp), %rdi
callq 0x1cb1e
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
callq 0xd978
movq 0x50(%rsp), %rbx
subq 0x48(%rsp), %rbx
leaq 0x168(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%rbp), %rsi
movq 0x70(%rbp), %rdx
addq %rsi, %rdx
leaq 0x158(%rsp), %rdi
callq 0x27846
leaq 0x3720b(%rip), %rsi     # 0x48840
leaq 0x158(%rsp), %rdi
callq 0xca60
leaq 0x140(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11672
movq %rdx, 0x130(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x140(%rsp)
jmp 0x11679
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x130(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2b8(%rsp), %rdi
callq 0x1cc26
shrq $0x5, %rbx
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x116c6
movq 0x140(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x116e3
movq 0x168(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0x158(%rsp), %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x1ce88
movq 0x6689c(%rip), %rdi     # 0x77f98
leaq 0x37145(%rip), %rsi     # 0x48848
movl $0xa, %edx
callq 0xc620
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%rbp), %rsi
movq 0x70(%rbp), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0x27846
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x6685c(%rip), %rdi     # 0x77f98
callq 0xc620
leaq 0x3710b(%rip), %rsi     # 0x48853
movl $0x8, %edx
movq %rax, %rdi
callq 0xc620
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x1176c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0x2b8(%rsp), %rdi
movl %ebx, %esi
callq 0x1ca10
leaq 0x2b8(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x1ca10
movb $0x0, 0x60(%rsp)
movq $0x10, 0x68(%rsp)
xorl %eax, %eax
movq %rax, 0x70(%rsp)
movl $0x3f800000, 0x78(%rsp) # imm = 0x3F800000
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rax, 0x10(%rdi)
movaps %xmm0, (%rdi)
movslq %ebx, %rsi
callq 0x1cef8
leaq 0x37112(%rip), %rsi     # 0x488e4
movq %r12, %rdi
callq 0xc1b0
testl %eax, %eax
movq %rbp, 0x20(%rsp)
movq %rbx, 0x18(%rsp)
je 0x11946
leaq 0x37069(%rip), %rsi     # 0x4885c
movq %r12, %rdi
callq 0xc1b0
testl %eax, %eax
je 0x11a6d
leaq 0x3705b(%rip), %rsi     # 0x48865
movq %r12, %rdi
callq 0xc1b0
testl %eax, %eax
jne 0x11d95
testl %ebx, %ebx
jle 0x11b94
movq 0x18(%rsp), %r14
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
xorl %r12d, %r12d
leaq 0x90(%rsp), %r13
leaq 0x1b0(%rsp), %rbx
leaq 0x28(%rsp), %r15
movq %r14, 0x10(%rsp)
movq %r15, %r14
movq 0x48(%rsp), %rax
leaq 0xa0(%rsp), %rcx
movq %rcx, 0x90(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r13, %r15
movq %r13, %rdi
callq 0x27846
movq 0xd0(%rsp), %r9
addq %r12, %r9
leaq 0x158(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0x59c(%rip), %rsi      # 0x11304
movq 0x20(%rsp), %rdx
movl 0xc(%rsp), %ecx
movq %r15, %r8
callq 0x1cfa0
movq %r14, %r15
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1d0bc
leaq 0x110(%rsp), %rdi
movq %r15, %rsi
callq 0x1cf74
movq %r15, %rdi
callq 0x1d158
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x118fe
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
movq 0x10(%rsp), %r14
je 0x11928
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0xc550
addq $0x20, %rbp
addq $0x18, %r12
decq %r14
leaq 0x90(%rsp), %r13
jne 0x1184b
jmp 0x11b94
testl %ebx, %ebx
jle 0x11b94
movq 0x18(%rsp), %r14
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
xorl %r12d, %r12d
leaq 0xf0(%rsp), %r13
leaq 0x240(%rsp), %rbx
leaq 0x28(%rsp), %r15
movq %r14, 0x10(%rsp)
movq %r15, %r14
movq 0x48(%rsp), %rax
leaq 0x100(%rsp), %rcx
movq %rcx, 0xf0(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r13, %r15
movq %r13, %rdi
callq 0x27846
movq 0xd0(%rsp), %r9
addq %r12, %r9
leaq 0x158(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0xbf0(%rip), %rsi      # 0x10ddc
movq 0x20(%rsp), %rdx
movl 0xc(%rsp), %ecx
movq %r15, %r13
movq %r15, %r8
callq 0x1cfa0
movq %r14, %r15
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1d0bc
leaq 0x110(%rsp), %rdi
movq %r15, %rsi
callq 0x1cf74
movq %r15, %rdi
callq 0x1d158
movq 0x258(%rsp), %rdi
leaq 0x268(%rsp), %rax
cmpq %rax, %rdi
je 0x11a2d
movq 0x268(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
movq 0x10(%rsp), %r14
je 0x11a57
movq 0x100(%rsp), %rsi
incq %rsi
callq 0xc550
addq $0x20, %rbp
addq $0x18, %r12
decq %r14
jne 0x11977
jmp 0x11b94
testl %ebx, %ebx
jle 0x11b94
movq 0x18(%rsp), %r14
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
xorl %r12d, %r12d
leaq 0xb0(%rsp), %r13
leaq 0x1f8(%rsp), %rbx
leaq 0x28(%rsp), %r15
movq %r14, 0x10(%rsp)
movq %r15, %r14
movq 0x48(%rsp), %rax
leaq 0xc0(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r13, %r15
movq %r13, %rdi
callq 0x27846
movq 0xd0(%rsp), %r9
addq %r12, %r9
leaq 0x158(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0xa83(%rip), %rsi      # 0x11070
movq 0x20(%rsp), %rdx
movl 0xc(%rsp), %ecx
movq %r15, %r8
callq 0x1cfa0
movq %r14, %r15
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1d0bc
leaq 0x110(%rsp), %rdi
movq %r15, %rsi
callq 0x1cf74
movq %r15, %rdi
callq 0x1d158
movq 0x210(%rsp), %rdi
leaq 0x220(%rsp), %rax
cmpq %rax, %rdi
je 0x11b51
movq 0x220(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
movq 0x10(%rsp), %r14
je 0x11b7b
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0xc550
addq $0x20, %rbp
addq $0x18, %r12
decq %r14
leaq 0xb0(%rsp), %r13
jne 0x11a9e
leaq 0x110(%rsp), %rdi
xorl %esi, %esi
callq 0x1d190
movq 0x20(%rsp), %rbp
movq 0x18(%rsp), %rbx
movq 0x663e4(%rip), %rdi     # 0x77f98
leaq 0x36ae4(%rip), %rsi     # 0x4869f
movl $0x1, %edx
callq 0xc620
testl %ebx, %ebx
jle 0x11c11
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %r14d, %r14d
leaq 0x60(%rsp), %r15
xorl %r13d, %r13d
movq 0xd0(%rsp), %r12
movq 0x48(%rsp), %rsi
addq %r14, %rsi
movq %r15, %rdi
callq 0x38498
addq %r13, %r12
addq $0x30, %rax
movq %rax, %rdi
movq %r12, %rsi
callq 0x1d1bc
addq $0x18, %r13
addq $0x20, %r14
decq %rbx
jne 0x11bda
leaq 0x288(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x1d292
leaq 0x2b8(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x10b84
leaq 0x288(%rsp), %rdi
callq 0x37766
movq 0x6634c(%rip), %rdi     # 0x77f98
leaq 0x36c52(%rip), %rsi     # 0x488a5
movl $0x9, %edx
callq 0xc620
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%rbp), %rsi
movq 0x70(%rbp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x27846
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x6630c(%rip), %rdi     # 0x77f98
callq 0xc620
movq %rax, %rbx
leaq 0x36c14(%rip), %rsi     # 0x488af
movl $0xb, %edx
movq %rax, %rdi
callq 0xc620
leaq 0x16c6d(%rip), %rdi     # 0x2891c
callq 0x28826
leaq 0x1a8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x150(%rsp), %rsi
callq 0x20fc4
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x7, %rdx
addq %rdx, %rsi
movq %rbx, %rdi
callq 0xc4c0
leaq 0x36b07(%rip), %rsi     # 0x487fd
movl $0xe, %edx
movq %rax, %rdi
callq 0xc620
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x11d1a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0xd0(%rsp), %rdi
callq 0x1d2f6
leaq 0x60(%rsp), %rdi
callq 0x37766
leaq 0x180(%rsp), %rdi
callq 0x27078
leaq 0x63a0b(%rip), %rsi     # 0x75750
leaq 0x2b8(%rsp), %rdi
callq 0x25ba4
leaq 0x2e0(%rsp), %rdi
callq 0xc1e0
leaq 0x48(%rsp), %rdi
callq 0x1c0cc
leaq 0x128(%rsp), %rdi
callq 0x21c42
leaq 0x118(%rsp), %rdi
callq 0x21c42
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x661fc(%rip), %rdi     # 0x77f98
leaq 0x36ace(%rip), %rsi     # 0x48871
callq 0xc500
xorl %edi, %edi
callq 0xc690
jmp 0x11faa
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
callq 0x37766
jmp 0x11fad
jmp 0x11e56
movq %rax, %rbx
jmp 0x11fd1
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x11dfb
movq 0x140(%rsp), %rsi
incq %rsi
callq 0xc550
jmp 0x11dfb
movq %rax, %rbx
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x11ff2
movq 0x168(%rsp), %rsi
incq %rsi
callq 0xc550
jmp 0x11ff2
movq %rax, %rbx
jmp 0x11ff2
movq %rax, %rbx
jmp 0x11ffc
jmp 0x11e5e
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x11fc4
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xc550
jmp 0x11fc4
movq %rax, %rbx
jmp 0x11fc4
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x11fad
movq 0x38(%rsp), %rsi
jmp 0x11fa0
jmp 0x11faa
movq %rax, %rbx
jmp 0x11eba
movq %rax, %rbx
jmp 0x11e95
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1d158
movq 0x210(%rsp), %rdi
leaq 0x220(%rsp), %rax
cmpq %rax, %rdi
je 0x11eba
movq 0x220(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x11fad
movq 0xc0(%rsp), %rsi
jmp 0x11fa0
jmp 0x11faa
jmp 0x11faa
movq %rax, %rbx
jmp 0x11f26
movq %rax, %rbx
jmp 0x11f01
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1d158
movq 0x258(%rsp), %rdi
leaq 0x268(%rsp), %rax
cmpq %rax, %rdi
je 0x11f26
movq 0x268(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x11fad
movq 0x100(%rsp), %rsi
jmp 0x11fa0
jmp 0x11faa
movq %rax, %rbx
jmp 0x11f83
movq %rax, %rbx
jmp 0x11f5e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1d158
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x11f83
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x11fad
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0xc550
jmp 0x11fad
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x1d2f6
leaq 0x60(%rsp), %rdi
callq 0x37766
leaq 0x180(%rsp), %rdi
callq 0x27078
leaq 0x63778(%rip), %rsi     # 0x75750
leaq 0x2b8(%rsp), %rdi
callq 0x25ba4
leaq 0x2e0(%rsp), %rdi
callq 0xc1e0
leaq 0x48(%rsp), %rdi
callq 0x1c0cc
leaq 0x128(%rsp), %rdi
callq 0x21c42
leaq 0x118(%rsp), %rdi
callq 0x21c42
movq %rbx, %rdi
callq 0xc9c0