// File: iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::SearchSwapLoop(_cell&)
bool
Primal::SearchSwapLoop(cell& _start) {

  //travs.resize(100, 0);

  queue<tree_node*> bfs;  	//used for searching shortest loop
  tree_node* tree_root = new tree_node;  
  tree_root->c = _start;
  tree_root->asgn = -1;

  //vector<double> deltas(col_size, 0);

  //init the current tree_node
  tree_node* p_cur_tree_node = tree_root;
  bfs.push(p_cur_tree_node);
  
  bool found_status = false;
  int dual_update_stat = -1;	//3 cases, can be -1, 0, 1

  uint loop_cnt = 0;
  //continue to search until find a loop or meet a dead end
  while(bfs.size() && !found_status){

    if(loop_cnt++ > col_size*col_size){
      //cout<<" row_size: "<<row_size<<" col_size: "<<col_size<<" loop cnt: "<<loop_cnt<<endl;
      throw EXCEPTION_BROKEN;
    }

    //get the front cell_node and pop it off queue
    p_cur_tree_node = bfs.front();
    bfs.pop();

    // if we are now at an assigned entry, we need to search other feasible
    // entries in the same row
    if(p_cur_tree_node->asgn == 1){
      // record this row as exploited
      exploited_rows.insert(p_cur_tree_node->c.row_idx);

      // create the min_heap on the fly when needed
      for(uint j=0; j<col_size; j++){
        if(oprt_matrix[p_cur_tree_node->c.row_idx][j]>=0 
		&& j!=assignment[p_cur_tree_node->c.row_idx]){
          pair<uint, double> p(j, oprt_matrix[p_cur_tree_node->c.row_idx][j]);
          min_heaps[p_cur_tree_node->c.row_idx].push(p);
        }
      }

      for(uint col_index=0; col_index<col_size; col_index++) {
        // can find multiple satisfying new cell_nodes in a for loop
        // if == 0
        if(fabs(oprt_matrix[p_cur_tree_node->c.row_idx][col_index] + deltas[col_index] - deltas[GetAssignedCol(p_cur_tree_node->c.row_idx)]) < DOUBLE_EPSILON
		&& exploited_cols.find(col_index) == exploited_cols.end()
		&& col_index != (uint)p_cur_tree_node->c.col_idx){
          //current new cell
          cell cur_c;
          cur_c.row_idx = p_cur_tree_node->c.row_idx;
          cur_c.col_idx = col_index;
          // below is pretty useful for tracking or debugging the process
          _cout("  .found a new 0: ("
	  	<<cur_c.row_idx<<", "<<cur_c.col_idx<<")"<<endl);

	  //create a new tree_node
          tree_node* new_tree_node = new tree_node;
	  new_tree_node->c = cur_c;
	  new_tree_node->asgn = 0;
	  new_tree_node->parent = p_cur_tree_node;
          // check if it already has siblings
	  if(p_cur_tree_node->child == NULL){
            p_cur_tree_node->child = new_tree_node;
	    //memorize such unique node into sib_ptrs, for quick localization 
	    sib_ptrs[cur_c.row_idx] = new_tree_node;
          }
          else{
	    assert(sib_ptrs[cur_c.row_idx] != NULL);
	    sib_ptrs[cur_c.row_idx]->next_sibling = new_tree_node;
	    sib_ptrs[cur_c.row_idx] = new_tree_node;
	  }

	  //push the new cell_node in the BFS queue
	  bfs.push(new_tree_node);
        }//if
      }//for i
    }
    // otherwise we must be at an un-assigned entry,
    // and we need search the col and push the one assigned entry out
    else{
      //in iprimal-v2, below is moved to bottom, in the same col, only one asgned cell need be pushed in Q 
      // record this col as exploited 
      //exploited_cols.insert(p_cur_tree_node->c.col_idx);

      for(uint row_index=0; row_index<row_size; row_index++){
        // can find only one satisfying new cell_node in a for loop
        if(assignment[row_index] == (uint)p_cur_tree_node->c.col_idx
		&& exploited_rows.find(row_index) == exploited_rows.end() 
      		//added in iprimal-v2, in the same col, only one asgned cell need be pushed in Q 
		&& exploited_cols.find((uint)p_cur_tree_node->c.col_idx) == exploited_cols.end() 
		){
          //current new cell
          cell cur_c;
          cur_c.row_idx = row_index;
          cur_c.col_idx = p_cur_tree_node->c.col_idx;
          // below is pretty useful for tracking or debugging the process
          _cout("  .found a new *: ("
	  	<<cur_c.row_idx<<", "<<cur_c.col_idx<<")"<<endl);

	  //create a new tree_node
	  tree_node* new_tree_node = new tree_node;
          new_tree_node->c = cur_c;
	  new_tree_node->asgn = 1;
	  new_tree_node->parent = p_cur_tree_node;
          p_cur_tree_node->child = new_tree_node;

	  //memorize such unique node into asgn_ptrs, for quick localization 
          asgn_ptrs[row_index] = new_tree_node;

    	  //do a check if the traversal forms a loop
          if(row_index == (uint)_start.row_idx){
	    // get swap loop
	    tree_node* tmp_ptr = new_tree_node;
            swap_loop.clear();
	    while(tmp_ptr->asgn != -1){
              swap_loop.push_back(tmp_ptr->c);
	      tmp_ptr=tmp_ptr->parent;
	    }
            swap_loop.push_back(tmp_ptr->c); // the root

	    // record row as exploited then exit loop, actually unnecessary
            exploited_rows.insert(row_index);

	    found_status = true;
          }
          else{
	    //push the new cell_node in the BFS queue
	    bfs.push(new_tree_node);
          }

          // record this col as exploited
          exploited_cols.insert(p_cur_tree_node->c.col_idx);
          break;	//break this for loop
        }//if
      }//for i
    }//else
    
    // embed the dual update here, to combine iterations into one stage
    if(bfs.empty() && !found_status){
      _cout("BFS queue is empty, need dual update."<<endl);
      dual_update_stat = DualUpdates(_start, bfs);
      // swap loop already found inside the dual updates
      if(dual_update_stat >=0) 
	break;
    }
  }//while

#ifdef DEBUG
  _cout("Exploited rows: ");
  DisplaySet(exploited_rows);

  _cout("          cols: ");
  DisplaySet(exploited_cols);

  DisplayTree(tree_root);

  // the loop should be an even number
  assert( swap_loop.size()%2 == 0 );

  //if(swap_loop.size() && dual_update_stat != 0){
  if(swap_loop.size()){
     _cout("Found shortest loop: ");
     for(list<cell>::reverse_iterator itr=swap_loop.rbegin(); 
		itr!=swap_loop.rend(); itr++){
       _cout("("<<itr->row_idx<<", "<<itr->col_idx<<")->");
     }
     _cout("head"<<endl<<endl);
  }
#endif

  //destroy the tree here
  //travs[_start.col_idx] += DeleteTree(tree_root);
  return found_status;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xb010
movl $0x28, %edi
callq 0x3280
movq %rax, -0x158(%rbp)
jmp 0x7c4a
movq -0x158(%rbp), %rdi
callq 0xb040
jmp 0x7c58
movq -0x158(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rcx
movq -0x68(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xb070
jmp 0x7c93
movb $0x0, -0x81(%rbp)
movl $0xffffffff, -0x88(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x8c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xb0a0
movq %rax, -0x168(%rbp)
jmp 0x7cc0
movq -0x168(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x169(%rbp)
je 0x7ce3
movb -0x81(%rbp), %al
xorb $-0x1, %al
movb %al, -0x169(%rbp)
movb -0x169(%rbp), %al
testb $0x1, %al
jne 0x7cf2
jmp 0x8608
movq -0x160(%rbp), %rdx
movl -0x8c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8c(%rbp)
movl 0x4(%rdx), %ecx
imull 0x4(%rdx), %ecx
cmpl %ecx, %eax
jbe 0x7d70
movl $0x4, %edi
callq 0x3140
movq %rax, %rdi
movl $0xffffffff, (%rdi)     # imm = 0xFFFFFFFF
movq 0x1f271(%rip), %rsi     # 0x26fa0
xorl %eax, %eax
movl %eax, %edx
callq 0x3470
jmp 0x8640
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x862e
movq -0x158(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
movl $0x28, %esi
callq 0x3290
jmp 0x862e
leaq -0x60(%rbp), %rdi
callq 0xb0c0
movq %rax, -0x178(%rbp)
jmp 0x7d82
movq -0x178(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xb0e0
jmp 0x7d9b
movq -0x80(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x8247
movq -0x160(%rbp), %rdi
addq $0x50, %rdi
movq -0x80(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x90(%rbp)
leaq -0x90(%rbp), %rsi
callq 0xac70
movb %dl, -0x181(%rbp)
movq %rax, -0x180(%rbp)
jmp 0x7ddb
movb -0x181(%rbp), %al
movq -0x180(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
movb %al, -0x98(%rbp)
movl $0x0, -0xa4(%rbp)
movq -0x160(%rbp), %rcx
movl -0xa4(%rbp), %eax
cmpl 0x4(%rcx), %eax
jae 0x7f08
movq -0x160(%rbp), %rdi
addq $0xc8, %rdi
movq -0x80(%rbp), %rax
movslq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
movl -0xa4(%rbp), %eax
movl %eax, %esi
callq 0x43e0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7ef2
movq -0x160(%rbp), %rdi
movl -0xa4(%rbp), %eax
movl %eax, -0x188(%rbp)
addq $0xf8, %rdi
movq -0x80(%rbp), %rax
movslq (%rax), %rsi
callq 0xa4e0
movq %rax, %rcx
movl -0x188(%rbp), %eax
cmpl (%rcx), %eax
je 0x7ef2
movq -0x160(%rbp), %rdi
addq $0xc8, %rdi
movq -0x80(%rbp), %rax
movslq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
movl -0xa4(%rbp), %eax
movl %eax, %esi
callq 0x43e0
movq %rax, %rdx
leaq -0xb8(%rbp), %rdi
leaq -0xa4(%rbp), %rsi
callq 0xaf20
jmp 0x7ec5
movq -0x160(%rbp), %rdi
addq $0xe0, %rdi
movq -0x80(%rbp), %rax
movslq (%rax), %rsi
callq 0xaf50
movq %rax, %rdi
leaq -0xb8(%rbp), %rsi
callq 0xaf70
jmp 0x7ef0
jmp 0x7ef2
jmp 0x7ef4
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x7dff
movl $0x0, -0xbc(%rbp)
movq -0x160(%rbp), %rcx
movl -0xbc(%rbp), %eax
cmpl 0x4(%rcx), %eax
jae 0x8242
movq -0x160(%rbp), %rdi
addq $0xc8, %rdi
movq -0x80(%rbp), %rax
movslq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
movl -0xbc(%rbp), %eax
movl %eax, %esi
callq 0x43e0
movq -0x160(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x1a0(%rbp)
addq $0x38, %rdi
movq %rdi, -0x1a8(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, %esi
callq 0x43e0
movsd -0x1a0(%rbp), %xmm0
movq -0x160(%rbp), %rdi
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x198(%rbp)
movq -0x80(%rbp), %rax
movl (%rax), %esi
callq 0xb100
movl %eax, -0x18c(%rbp)
jmp 0x7faf
movq -0x1a8(%rbp), %rdi
movl -0x18c(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x43e0
movsd -0x198(%rbp), %xmm1
subsd (%rax), %xmm1
movaps 0x120c8(%rip), %xmm0    # 0x1a0a0
pand %xmm0, %xmm1
xorl %eax, %eax
movsd 0x120aa(%rip), %xmm0    # 0x1a090
ucomisd %xmm1, %xmm0
movb %al, -0x1a9(%rbp)
jbe 0x8078
movq -0x160(%rbp), %rdi
subq $-0x80, %rdi
leaq -0xbc(%rbp), %rsi
callq 0xa900
movq %rax, -0x1b8(%rbp)
jmp 0x8016
movq -0x160(%rbp), %rdi
movq -0x1b8(%rbp), %rax
movq %rax, -0xc8(%rbp)
addq $0x80, %rdi
callq 0xa940
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xa8d0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1a9(%rbp)
jne 0x8062
jmp 0x8078
movl -0xbc(%rbp), %eax
movq -0x80(%rbp), %rcx
cmpl 0x4(%rcx), %eax
setne %al
movb %al, -0x1a9(%rbp)
movb -0x1a9(%rbp), %al
testb $0x1, %al
jne 0x8087
jmp 0x822c
movq -0x80(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xd8(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl $0x28, %edi
callq 0x3280
movq %rax, -0x1c0(%rbp)
jmp 0x80b2
movq -0x1c0(%rbp), %rdi
callq 0xb040
jmp 0x80c0
movq -0x1c0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xe0(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x80(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x80(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x816f
movq -0x160(%rbp), %rdi
movq -0xe0(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0xe0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
addq $0x140, %rdi            # imm = 0x140
movslq -0xd8(%rbp), %rsi
callq 0xb130
movq -0x1c8(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x8218
movq -0x1c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
movl $0x28, %esi
callq 0x3290
jmp 0x862e
movq -0x160(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq -0xd8(%rbp), %rsi
callq 0xb130
cmpq $0x0, (%rax)
je 0x8191
jmp 0x81b0
leaq 0x11fd7(%rip), %rdi     # 0x1a16f
leaq 0x11f28(%rip), %rsi     # 0x1a0c7
movl $0x157, %edx            # imm = 0x157
leaq 0x11fe4(%rip), %rcx     # 0x1a18f
callq 0x3190
movq -0x160(%rbp), %rdi
movq -0xe0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
addq $0x140, %rdi            # imm = 0x140
movslq -0xd8(%rbp), %rsi
callq 0xb130
movq -0x1d8(%rbp), %rcx
movq -0x160(%rbp), %rdi
movq (%rax), %rax
movq %rcx, 0x20(%rax)
movq -0xe0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
addq $0x140, %rdi            # imm = 0x140
movslq -0xd8(%rbp), %rsi
callq 0xb130
movq -0x1d0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x60(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0xb070
jmp 0x822a
jmp 0x822c
jmp 0x822e
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x7f12
jmp 0x85a8
movl $0x0, -0xe4(%rbp)
movq -0x160(%rbp), %rcx
movl -0xe4(%rbp), %eax
cmpl (%rcx), %eax
jae 0x85a6
movq -0x160(%rbp), %rdi
addq $0xf8, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xa4e0
movl (%rax), %ecx
movq -0x80(%rbp), %rdx
xorl %eax, %eax
cmpl 0x4(%rdx), %ecx
movb %al, -0x1d9(%rbp)
jne 0x836f
movq -0x160(%rbp), %rdi
addq $0x50, %rdi
leaq -0xe4(%rbp), %rsi
callq 0xa900
movq %rax, -0x1e8(%rbp)
jmp 0x82b8
movq -0x160(%rbp), %rdi
movq -0x1e8(%rbp), %rax
movq %rax, -0xf0(%rbp)
addq $0x50, %rdi
callq 0xa940
movq %rax, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xa8d0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1d9(%rbp)
jne 0x8301
jmp 0x836f
movq -0x160(%rbp), %rdi
subq $-0x80, %rdi
movq -0x80(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x104(%rbp)
leaq -0x104(%rbp), %rsi
callq 0xa900
movq %rax, -0x1f0(%rbp)
jmp 0x832e
movq -0x160(%rbp), %rdi
movq -0x1f0(%rbp), %rax
movq %rax, -0x100(%rbp)
addq $0x80, %rdi
callq 0xa940
movq %rax, -0x110(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xa8d0
movb %al, -0x1d9(%rbp)
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x837e
jmp 0x8590
movl -0xe4(%rbp), %eax
movl %eax, -0x118(%rbp)
movq -0x80(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x114(%rbp)
movl $0x28, %edi
callq 0x3280
movq %rax, -0x1f8(%rbp)
jmp 0x83aa
movq -0x1f8(%rbp), %rdi
callq 0xb040
jmp 0x83b8
movq -0x160(%rbp), %rdi
movq -0x1f8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq -0x118(%rbp), %rcx
movq %rcx, (%rax)
movq -0x120(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x80(%rbp), %rcx
movq -0x120(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x120(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x120(%rbp), %rax
movq %rax, -0x200(%rbp)
addq $0x128, %rdi            # imm = 0x128
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xb130
movq -0x200(%rbp), %rcx
movq %rcx, (%rax)
movl -0xe4(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x852d
movq -0x160(%rbp), %rdi
movq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
addq $0x110, %rdi            # imm = 0x110
callq 0xb150
movq -0x128(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
je 0x84c8
movq -0x160(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq -0x128(%rbp), %rsi
callq 0xb180
jmp 0x8492
movq -0x128(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x128(%rbp)
jmp 0x8469
movq -0x1f8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
movl $0x28, %esi
callq 0x3290
jmp 0x862e
movq -0x160(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq -0x128(%rbp), %rsi
callq 0xb180
jmp 0x84e4
movq -0x160(%rbp), %rdi
addq $0x50, %rdi
leaq -0xe4(%rbp), %rsi
callq 0xa970
movb %dl, -0x209(%rbp)
movq %rax, -0x208(%rbp)
jmp 0x850a
movb -0x209(%rbp), %al
movq -0x208(%rbp), %rcx
movq %rcx, -0x138(%rbp)
movb %al, -0x130(%rbp)
movb $0x1, -0x81(%rbp)
jmp 0x8541
leaq -0x60(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0xb070
jmp 0x853f
jmp 0x8541
movq -0x160(%rbp), %rdi
subq $-0x80, %rdi
movq -0x80(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x13c(%rbp)
leaq -0x13c(%rbp), %rsi
callq 0xac70
movb %dl, -0x219(%rbp)
movq %rax, -0x218(%rbp)
jmp 0x8574
movb -0x219(%rbp), %al
movq -0x218(%rbp), %rcx
movq %rcx, -0x150(%rbp)
movb %al, -0x148(%rbp)
jmp 0x85a6
jmp 0x8592
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x8251
jmp 0x85a8
leaq -0x60(%rbp), %rdi
callq 0xb1c0
movb %al, -0x21a(%rbp)
jmp 0x85b9
movb -0x21a(%rbp), %al
testb $0x1, %al
jne 0x85c5
jmp 0x8603
testb $0x1, -0x81(%rbp)
jne 0x8603
movq -0x160(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x8640
movl %eax, -0x220(%rbp)
jmp 0x85ea
movl -0x220(%rbp), %eax
movl %eax, -0x88(%rbp)
cmpl $0x0, -0x88(%rbp)
jl 0x8601
jmp 0x8608
jmp 0x8603
jmp 0x7cae
movb -0x81(%rbp), %al
movb %al, -0x221(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xb1e0
movb -0x221(%rbp), %al
andb $0x1, %al
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0xb1e0
movq -0x70(%rbp), %rdi
callq 0x3490