// File: Kingsford-Group[P]ghost2/src/localImprove.hpp
// Function: searchIter(Graph&, Graph&, boost::unordered::unordered_map<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, double, boost::hash<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::equal_to<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const, double>>>*, boost::bimaps::bimap<boost::bimaps::unordered_set_of<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, boost::bimaps::unordered_set_of<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, mpl_::na, mpl_::na, mpl_::na>*, double, int)
int searchIter(Graph& G, Graph& H, blastmap *dists, bmap *f, double ratio, int numthreads)
{
  if(numthreads == -1) numthreads = boost::thread::hardware_concurrency();
  if(numthreads < 2) numthreads = 2;
  boost::threadpool::pool threads(numthreads);

  int totalDelt = 0;
  vector<string> hverts = H.nodes();
  int numMoves = hverts.size();
  vector<string> lefts;
  for(auto it = f->left.begin(); it != f->left.end(); it++) 
    lefts.push_back(it->first);

  move** moves = new move*[numMoves];
  int i = 0;
  for(auto it = hverts.begin(); it != hverts.end(); it++){
    auto up = f->right.find(*it);
    moves[i++] = new move(*it, up == f->right.end() ? "" : up->second);
  }

  ProgressBar pbar(lefts.size(), bclock::local_time());
  srand(time(0));
  
  for(auto it = lefts.begin(); it != lefts.end(); it++){
    string u = *it;
    string w = f->left.at(u);
    
    move *bestMove = NULL;
    bool constrained = rand() > (ratio*RAND_MAX);

    for(int threadsMade = 0, i = 0; threadsMade < numthreads; threadsMade++){
      int n = (numMoves - i)/(numthreads - threadsMade);
      auto worker = boost::bind(&calcScoresWorker, &G, &H, dists, f, u, w, moves + i, n);
      i += n;
      threads.schedule(worker);
    }
    threads.wait();

    for(int i = 0; i < numMoves; i++){
      move *m = moves[i];
      //Check if move is acceptible
      //if(m->s0 > 0 && m->s1 >= 0 && (!constrained || m->s2 >= 0)){
      if(m->s0 >= 0){
        if(!bestMove) bestMove = m;
        else if(m->s0 > bestMove->s0) bestMove = m;
        else if(m->s0 == bestMove->s0 && m->s1 > bestMove->s1) bestMove = m;
        else if(m->s0 == bestMove->s0 && m->s1 == bestMove->s1 && m->s2 > bestMove->s2) bestMove = m;
      }
    }

    if(bestMove){
      bestMove->apply(f);
      totalDelt += bestMove->s0;
      
      auto upt = f->right.find(bestMove->w);
      string up = upt == f->right.end() ? "" : upt->second;
      for(int i = 0; i < numMoves; i++)
        if(moves[i]->v == bestMove->w){moves[i]->up = up; break;}
    }
    pbar.update();
  }
  return totalDelt; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
jne 0x1fbb2
callq 0x108b0
movl %eax, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jge 0x1fbbf
movl $0x2, -0x2c(%rbp)
movslq -0x2c(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x25990
movl $0x0, -0x54(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x12320
jmp 0x1fbe2
leaq -0x70(%rbp), %rdi
callq 0x24d70
movl %eax, -0x80(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x235d0
movq -0x20(%rbp), %rdi
addq $0x98, %rdi
callq 0x29d90
movq %rax, -0x398(%rbp)
jmp 0x1fc13
movq -0x398(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x20(%rbp), %rdi
addq $0x98, %rdi
callq 0x288f0
movq %rax, -0x3a0(%rbp)
jmp 0x1fc3a
movq -0x3a0(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x288b0
movb %al, -0x3a1(%rbp)
jmp 0x1fc63
movb -0x3a1(%rbp), %al
testb $0x1, %al
jne 0x1fc6f
jmp 0x1fce7
leaq -0xa0(%rbp), %rdi
callq 0x28920
movq %rax, -0x3b0(%rbp)
jmp 0x1fc84
movq -0x3b0(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x23620
jmp 0x1fc99
jmp 0x1fc9b
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
callq 0x29e30
movq %rax, -0x3b8(%rbp)
jmp 0x1fcb2
movq -0x3b8(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x1fc21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x207f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x207e1
movslq -0x80(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x10040
movq %rax, -0x3c0(%rbp)
jmp 0x1fd0f
movq -0x3c0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl $0x0, -0xbc(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x29e60
movq %rax, -0xc8(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x29ed0
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x29e90
testb $0x1, %al
jne 0x1fd63
jmp 0x20023
movq -0x20(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x3d0(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x29f00
movq -0x3d0(%rbp), %rdi
movq %rax, %rsi
callq 0x28a90
movq %rax, -0x3c8(%rbp)
jmp 0x1fd98
movq -0x3c8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x98, %edi
callq 0x106e0
movq %rax, -0x3d8(%rbp)
jmp 0x1fdb9
movb $0x1, -0x125(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x29f00
movq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x10300
jmp 0x1fddd
movq -0x20(%rbp), %rdi
addq $0xa0, %rdi
movb $0x0, -0x122(%rbp)
movb $0x0, -0x123(%rbp)
movb $0x0, -0x124(%rbp)
callq 0x28d10
movq %rax, -0x3e0(%rbp)
jmp 0x1fe0b
movq -0x3e0(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x29b20
movb %al, -0x3e1(%rbp)
jmp 0x1fe34
movb -0x3e1(%rbp), %al
testb $0x1, %al
jne 0x1fe40
jmp 0x1fe7f
leaq -0x121(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x10ce0
movq -0x3f0(%rbp), %rdx
movb $0x1, -0x122(%rbp)
leaq 0x9ca24(%rip), %rsi     # 0xbc88c
leaq -0x118(%rbp), %rdi
callq 0x23400
jmp 0x1fe76
movb $0x1, -0x123(%rbp)
jmp 0x1feb0
leaq -0xd8(%rbp), %rdi
callq 0x2ab30
movq %rax, -0x3f8(%rbp)
jmp 0x1fe94
movq -0x3f8(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x10300
jmp 0x1fea9
movb $0x1, -0x124(%rbp)
movq -0x3d8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0x2ab60
jmp 0x1fecc
movq -0x3d8(%rbp), %rdx
movb $0x0, -0x125(%rbp)
movq -0xb8(%rbp), %rax
movl -0xbc(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0xbc(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
testb $0x1, -0x124(%rbp)
jne 0x1ff04
jmp 0x1ff10
leaq -0x118(%rbp), %rdi
callq 0x10460
testb $0x1, -0x123(%rbp)
jne 0x1ff1b
jmp 0x1ff27
leaq -0x118(%rbp), %rdi
callq 0x10460
testb $0x1, -0x122(%rbp)
jne 0x1ff32
jmp 0x1ff3e
leaq -0x121(%rbp), %rdi
callq 0x10770
leaq -0xf8(%rbp), %rdi
callq 0x10460
leaq -0xc8(%rbp), %rdi
xorl %esi, %esi
callq 0x29f20
movq %rax, -0x130(%rbp)
jmp 0x1fd37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x20002
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x1fff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x1ffdd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x1ffc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
testb $0x1, -0x124(%rbp)
jne 0x1ffb6
jmp 0x1ffc2
leaq -0x118(%rbp), %rdi
callq 0x10460
jmp 0x1ffc4
testb $0x1, -0x123(%rbp)
jne 0x1ffcf
jmp 0x1ffdb
leaq -0x118(%rbp), %rdi
callq 0x10460
jmp 0x1ffdd
testb $0x1, -0x122(%rbp)
jne 0x1ffe8
jmp 0x1fff4
leaq -0x121(%rbp), %rdi
callq 0x10770
jmp 0x1fff6
leaq -0xf8(%rbp), %rdi
callq 0x10460
testb $0x1, -0x125(%rbp)
jne 0x2000d
jmp 0x2001e
movq -0x3d8(%rbp), %rdi
movl $0x98, %esi
callq 0x10710
jmp 0x207e1
leaq -0x98(%rbp), %rdi
callq 0x24d70
movl %eax, -0x404(%rbp)
callq 0x23b20
movq %rax, -0x400(%rbp)
jmp 0x20043
movl -0x404(%rbp), %esi
movq -0x400(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rdx
leaq -0x180(%rbp), %rdi
callq 0x25dd0
jmp 0x2006c
xorl %eax, %eax
movl %eax, %edi
callq 0x10630
movl %eax, %edi
callq 0x10680
leaq -0x98(%rbp), %rdi
callq 0x29e60
movq %rax, -0x190(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x29ed0
movq %rax, -0x198(%rbp)
leaq -0x190(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x29e90
testb $0x1, %al
jne 0x200be
jmp 0x20793
leaq -0x190(%rbp), %rdi
callq 0x29f00
movq %rax, %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x10300
jmp 0x200db
movq -0x20(%rbp), %rdi
addq $0x98, %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x2ac80
movq %rax, -0x410(%rbp)
jmp 0x200fb
movq -0x410(%rbp), %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x10300
jmp 0x20110
movq $0x0, -0x1e0(%rbp)
callq 0x101f0
cvtsi2sd %eax, %xmm0
movsd 0x9bfb4(%rip), %xmm1    # 0xbc0e0
mulsd -0x28(%rbp), %xmm1
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x1e1(%rbp)
movl $0x0, -0x1e8(%rbp)
movl $0x0, -0x1ec(%rbp)
movl -0x1e8(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x2039d
movl -0x80(%rbp), %eax
movl -0x1ec(%rbp), %ecx
subl %ecx, %eax
movl -0x2c(%rbp), %ecx
movl -0x1e8(%rbp), %edx
subl %edx, %ecx
cltd
idivl %ecx
movl %eax, -0x1f0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x430(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x428(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x420(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x418(%rbp)
leaq -0x288(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x10300
jmp 0x201c3
leaq -0x2a8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x10300
jmp 0x201d8
movq -0x418(%rbp), %r9
movq -0x420(%rbp), %r8
movq -0x428(%rbp), %rcx
movq -0x430(%rbp), %rdx
movq -0xb8(%rbp), %rax
movslq -0x1ec(%rbp), %rsi
leaq (%rax,%rsi,8), %rsi
movl -0x1f0(%rbp), %edi
movq %rsp, %rax
movl %edi, 0x18(%rax)
movq %rsi, 0x10(%rax)
leaq -0x2a8(%rbp), %rsi
movq %rsi, 0x8(%rax)
leaq -0x288(%rbp), %rsi
movq %rsi, (%rax)
leaq -0x752(%rip), %rsi      # 0x1fae0
leaq -0x268(%rbp), %rdi
callq 0x2ad30
jmp 0x20240
leaq -0x2a8(%rbp), %rdi
callq 0x10460
leaq -0x288(%rbp), %rdi
callq 0x10460
movl -0x1f0(%rbp), %ecx
movl -0x1ec(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x1ec(%rbp)
leaq -0x340(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x2af30
jmp 0x20281
leaq -0x2c8(%rbp), %rdi
leaq -0x340(%rbp), %rsi
xorl %edx, %edx
callq 0x2af70
jmp 0x20298
leaq -0x50(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x25f80
jmp 0x202aa
leaq -0x2c8(%rbp), %rdi
callq 0x261a0
leaq -0x340(%rbp), %rdi
callq 0x2b010
leaq -0x268(%rbp), %rdi
callq 0x2b010
movl -0x1e8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e8(%rbp)
jmp 0x20154
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x207d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x20785
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x20779
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2033b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x10460
leaq -0x288(%rbp), %rdi
callq 0x10460
jmp 0x20779
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2038c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x20380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x261a0
leaq -0x340(%rbp), %rdi
callq 0x2b010
leaq -0x268(%rbp), %rdi
callq 0x2b010
jmp 0x20779
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0x261f0
jmp 0x203ac
movl $0x0, -0x344(%rbp)
movl -0x344(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x2052c
movq -0xb8(%rbp), %rax
movslq -0x344(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x350(%rbp)
movq -0x350(%rbp), %rax
movsd 0x80(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x20516
cmpq $0x0, -0x1e0(%rbp)
jne 0x20417
movq -0x350(%rbp), %rax
movq %rax, -0x1e0(%rbp)
jmp 0x20514
movq -0x350(%rbp), %rax
movsd 0x80(%rax), %xmm0
movq -0x1e0(%rbp), %rax
ucomisd 0x80(%rax), %xmm0
jbe 0x2044a
movq -0x350(%rbp), %rax
movq %rax, -0x1e0(%rbp)
jmp 0x20512
movq -0x350(%rbp), %rax
movsd 0x80(%rax), %xmm0
movq -0x1e0(%rbp), %rax
ucomisd 0x80(%rax), %xmm0
jne 0x2049c
jp 0x2049c
movq -0x350(%rbp), %rax
movsd 0x88(%rax), %xmm0
movq -0x1e0(%rbp), %rax
ucomisd 0x88(%rax), %xmm0
jbe 0x2049c
movq -0x350(%rbp), %rax
movq %rax, -0x1e0(%rbp)
jmp 0x20510
movq -0x350(%rbp), %rax
movsd 0x80(%rax), %xmm0
movq -0x1e0(%rbp), %rax
ucomisd 0x80(%rax), %xmm0
jne 0x2050e
jp 0x2050e
movq -0x350(%rbp), %rax
movsd 0x88(%rax), %xmm0
movq -0x1e0(%rbp), %rax
ucomisd 0x88(%rax), %xmm0
jne 0x2050e
jp 0x2050e
movq -0x350(%rbp), %rax
movsd 0x90(%rax), %xmm0
movq -0x1e0(%rbp), %rax
ucomisd 0x90(%rax), %xmm0
jbe 0x2050e
movq -0x350(%rbp), %rax
movq %rax, -0x1e0(%rbp)
jmp 0x20510
jmp 0x20512
jmp 0x20514
jmp 0x20516
jmp 0x20518
movl -0x344(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x344(%rbp)
jmp 0x203b6
cmpq $0x0, -0x1e0(%rbp)
je 0x20739
movq -0x1e0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2b030
jmp 0x2054c
movq -0x1e0(%rbp), %rax
movsd 0x80(%rax), %xmm1
cvtsi2sdl -0x54(%rbp), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x54(%rbp)
movq -0x20(%rbp), %rdi
addq $0xa0, %rdi
movq -0x1e0(%rbp), %rsi
addq $0x20, %rsi
callq 0x28a90
movq %rax, -0x438(%rbp)
jmp 0x2058f
movq -0x438(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x20(%rbp), %rdi
addq $0xa0, %rdi
movb $0x0, -0x382(%rbp)
callq 0x28d10
movq %rax, -0x440(%rbp)
jmp 0x205bd
movq -0x440(%rbp), %rax
movq %rax, -0x380(%rbp)
leaq -0x358(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x29b20
movb %al, -0x441(%rbp)
jmp 0x205e6
movb -0x441(%rbp), %al
testb $0x1, %al
jne 0x205f2
jmp 0x2062a
leaq -0x381(%rbp), %rdi
movq %rdi, -0x450(%rbp)
callq 0x10ce0
movq -0x450(%rbp), %rdx
movb $0x1, -0x382(%rbp)
leaq 0x9c272(%rip), %rsi     # 0xbc88c
leaq -0x378(%rbp), %rdi
callq 0x23400
jmp 0x20628
jmp 0x20656
leaq -0x358(%rbp), %rdi
callq 0x2ab30
movq %rax, -0x458(%rbp)
jmp 0x2063f
movq -0x458(%rbp), %rsi
leaq -0x378(%rbp), %rdi
callq 0x10300
jmp 0x20654
jmp 0x20656
testb $0x1, -0x382(%rbp)
jne 0x20661
jmp 0x2066d
leaq -0x381(%rbp), %rdi
callq 0x10770
movl $0x0, -0x388(%rbp)
movl -0x388(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x2072d
movq -0xb8(%rbp), %rax
movslq -0x388(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x40, %rdi
movq -0x1e0(%rbp), %rsi
addq $0x20, %rsi
callq 0x234b0
testb $0x1, %al
jne 0x206b2
jmp 0x20717
movq -0xb8(%rbp), %rax
movslq -0x388(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x60, %rdi
leaq -0x378(%rbp), %rsi
callq 0x10070
jmp 0x206d6
jmp 0x2072d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
testb $0x1, -0x382(%rbp)
jne 0x206ef
jmp 0x206fb
leaq -0x381(%rbp), %rdi
callq 0x10770
jmp 0x20779
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x10460
jmp 0x20779
jmp 0x20719
movl -0x388(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x388(%rbp)
jmp 0x20677
leaq -0x378(%rbp), %rdi
callq 0x10460
leaq -0x180(%rbp), %rdi
callq 0x14360
jmp 0x20747
leaq -0x1d8(%rbp), %rdi
callq 0x10460
leaq -0x1b8(%rbp), %rdi
callq 0x10460
leaq -0x190(%rbp), %rdi
xorl %esi, %esi
callq 0x29f20
movq %rax, -0x390(%rbp)
jmp 0x2008f
leaq -0x1d8(%rbp), %rdi
callq 0x10460
leaq -0x1b8(%rbp), %rdi
callq 0x10460
jmp 0x207d5
movl -0x54(%rbp), %eax
movl %eax, -0x45c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x26640
leaq -0x98(%rbp), %rdi
callq 0x236d0
leaq -0x70(%rbp), %rdi
callq 0x236d0
leaq -0x50(%rbp), %rdi
callq 0x26680
movl -0x45c(%rbp), %eax
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
leaq -0x180(%rbp), %rdi
callq 0x26640
leaq -0x98(%rbp), %rdi
callq 0x236d0
leaq -0x70(%rbp), %rdi
callq 0x236d0
leaq -0x50(%rbp), %rdi
callq 0x26680
movq -0x78(%rbp), %rdi
callq 0x10cc0
nopl (%rax,%rax)