// File: /workspace/github_cpp_makefile_star2_O3/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::DualUpdates(_cell&, std::queue<_tree_node*, std::deque<_tree_node*, std::allocator<_tree_node*>>>&)
int
Primal::DualUpdates(cell& _start_cell, queue<tree_node*>& _bfs){

  // search the epsilon (minimal value) for varibles adjustments
  // it must satisfy 3 conditions: 
  // 1. >=0 in oprt_matrix; 2. in exploited rows; 3. in un-exploited cols

  // define and init epsilon as a largest positive value
  double epsilon = std::numeric_limits<double>::infinity();
  bool updated_epsilon = false;

#ifdef USE_HEAP

  /**** lines below are version using min-heaps, relatively faster ****/
  // search for min epsilon
  for(uint row_index=0; row_index<row_size; row_index++){
    if(exploited_rows.find(row_index) != exploited_rows.end()){
      //expose the first unvisited entry
      while(!min_heaps[row_index].empty()){ 
	if(exploited_cols.find(min_heaps[row_index].top().first) != exploited_cols.end())
	  min_heaps[row_index].pop();
        else
	  break;
      }
      if(!min_heaps[row_index].empty()){
        double cell_val = min_heaps[row_index].top().second + deltas[min_heaps[row_index].top().first] - deltas[GetAssignedCol(row_index)];
        if(cell_val < epsilon){
	  epsilon = cell_val;
          updated_epsilon = true;
        }
      }//if !min
    }//if exploited row
  }//for row_index

  // one more round traversal to find all qualified entries
  queue<cell> tmp_q;
  cell qual_c;
  if(updated_epsilon){
    for(uint row_index=0; row_index<row_size; row_index++)
      if(exploited_rows.find(row_index) != exploited_rows.end()){
        while(!min_heaps[row_index].empty()){ 
	  if(exploited_cols.find(min_heaps[row_index].top().first) != exploited_cols.end()){
            min_heaps[row_index].pop();
          }
          else{
            double cell_val = min_heaps[row_index].top().second + deltas[min_heaps[row_index].top().first] - deltas[GetAssignedCol(row_index)];
            if(fabs(cell_val - epsilon)<DOUBLE_EPSILON){
              qual_c.row_idx = row_index;
	      qual_c.col_idx = min_heaps[row_index].top().first;
              tmp_q.push(qual_c);
	      //this entry will be colored as visited later, so remove it here
	      // and this also expose next available entry for judging
	      min_heaps[row_index].pop();
            }
	    else if( cell_val - epsilon > DOUBLE_EPSILON){
              // stop at encountering the first uncolored entry that > epsilon
	      break;
	    }
            else {
	      cerr<<"Very weired thing happens."<<endl;
	      assert(0);
            }
          }//else
        }//while
      }//if exploited rows
  }//if updated epsilon

#else

  /**** lines below are version NOT using min-heaps, relatively slower ****/
  for(uint row_index=0; row_index<row_size; row_index++)
    if(exploited_rows.find(row_index) != exploited_rows.end())
      for(uint col_index=0; col_index<col_size; col_index++)
        if(exploited_cols.find(col_index) == exploited_cols.end()){
	  //double cell_val = oprt_matrix[row_index][col_index] - deltas[col_index];
	  double cell_val = oprt_matrix[row_index][col_index] + deltas[col_index] - deltas[GetAssignedCol(row_index)];
          if(cell_val > 0 && cell_val < epsilon){
            epsilon = cell_val;
            updated_epsilon = true;
          }
        }

  // one more round traversal to find all qualified entries
  queue<cell> tmp_q;
  cell qual_c;
  if(updated_epsilon){
    for(uint row_index=0; row_index<row_size; row_index++)
      if(exploited_rows.find(row_index) != exploited_rows.end())
        for(uint col_index=0; col_index<col_size; col_index++)
          if(exploited_cols.find(col_index) == exploited_cols.end()){
	    double cell_val = oprt_matrix[row_index][col_index] + deltas[col_index] - deltas[GetAssignedCol(row_index)];
            if(fabs(cell_val - epsilon)<DOUBLE_EPSILON){
              qual_c.row_idx = row_index;
	      qual_c.col_idx = col_index;
              tmp_q.push(qual_c);
            }
          }
  }//if

#endif

  // if found nothing, i.e., all available entries are <=0, leaving a void set
  if(!updated_epsilon)
    epsilon = - (oprt_matrix[_start_cell.row_idx][_start_cell.col_idx] 
		+ deltas[_start_cell.col_idx] - deltas[GetAssignedCol(_start_cell.row_idx)]);
  assert(epsilon > 0 && epsilon < std::numeric_limits<double>::infinity());

  _cout("# epsilon: "<<epsilon<<endl);

  // delta update
  for(uint col_index=0; col_index<col_size; col_index++)
    if(exploited_cols.find(col_index) != exploited_cols.end())
      deltas[col_index] += epsilon;  

  _cout("Updated deltas: "<<endl);
  DisplayVec<double>(deltas);

  vector<double> tmp_d(row_size);
  
  for(uint row_index=0; row_index<row_size; row_index++){
    tmp_d[row_index] = oprt_matrix[row_index][_start_cell.col_idx] + deltas[_start_cell.col_idx] - deltas[GetAssignedCol(row_index)];
  }

  _cout("Updated column ["<<_start_cell.col_idx<<"]:"<<endl);
  DisplayVec<double>(tmp_d);

  double min_d = std::numeric_limits<double>::infinity();
  uint new_start_row = row_size;
  for(uint i=0; i<row_size; i++)
    if(tmp_d[i] < min_d){ 
      min_d = tmp_d[i];
      new_start_row = i;
    }
  assert(new_start_row != row_size);
  _cout("Updated root: ("<<new_start_row<<", "<<_start_cell.col_idx<<")"<<endl);

  //terminate this stage if conditions below occur
  if(min_d >= 0){
    _cout("No loop, but the whole column is feasible!"<<endl);
    swap_loop.clear();

    return 0;
  }
  else if(new_start_row !=(uint)_start_cell.row_idx)
    if(exploited_rows.find(new_start_row) != exploited_rows.end()){
      _cout("Loop already exists!"<<endl);
      //update the starting cell
      _start_cell.row_idx = new_start_row;
      //now search the loop or notify the upper funciton to search it
      assert(asgn_ptrs[new_start_row]!=NULL);
      tree_node* tmp_ptr = asgn_ptrs[new_start_row];
      swap_loop.clear();
      while(tmp_ptr->asgn != -1){
        swap_loop.push_back(tmp_ptr->c);
        tmp_ptr=tmp_ptr->parent;
      }
      //finally append the updated root 
      swap_loop.push_back(_start_cell); 

      return 1;
    }
 
  while(!tmp_q.empty()){
    cell cur_c = tmp_q.front();
    tmp_q.pop();
    tree_node* p_cur_tree_node = asgn_ptrs[cur_c.row_idx];
    _cout("Current dead-end entry is: ("<<p_cur_tree_node->c.row_idx<<", "<<p_cur_tree_node->c.col_idx<<")"<<endl);
/*
    for(uint col_index=0; col_index<col_size; col_index++){
      //if(exploited_cols.find(col_index) == exploited_cols.end() && oprt_matrix[epsilon_row_idx][col_index] == oprt_matrix[epsilon_row_idx][epsilon_col_idx] ){
      if(fabs(oprt_matrix[epsilon_row_idx][col_index] + deltas[col_index] - deltas[GetAssignedCol(epsilon_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 = epsilon_row_idx;
          cur_c.col_idx = col_index;
*/
          _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;
	    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
  }//while tmp_q

  return -1;  // did not form loop, countinue searching outside
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x5837
movq %r12, 0x30(%rsp)
leaq 0x58(%rbx), %r12
leaq 0x88(%rbx), %r13
movsd 0x5b4b(%rip), %xmm0     # 0xb0b0
movapd %xmm0, (%rsp)
xorl %ebp, %ebp
movq $0x0, 0x18(%rsp)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x5666
movq %r12, %rcx
movl 0x20(%rax), %edx
xorl %esi, %esi
cmpq %rdx, %rbp
cmovbeq %rax, %rcx
seta %sil
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x5585
cmpq %r12, %rcx
je 0x5666
movl 0x20(%rcx), %eax
cmpq %rax, %rbp
jb 0x5666
movq 0xe0(%rbx), %rdi
movq %rbp, %r15
shlq $0x5, %r15
movq (%rdi,%r15), %rax
cmpq 0x8(%rdi,%r15), %rax
je 0x5666
addq %r15, %rdi
movq 0x90(%rbx), %rdx
testq %rdx, %rdx
je 0x5624
movl (%rax), %ecx
movq %r13, %rsi
xorl %r8d, %r8d
cmpl %ecx, 0x20(%rdx)
setb %r8b
cmovaeq %rdx, %rsi
movq 0x10(%rdx,%r8,8), %rdx
testq %rdx, %rdx
jne 0x55e5
cmpq %r13, %rsi
je 0x5626
cmpl 0x20(%rsi), %ecx
jb 0x5626
callq 0x70ea
movq 0xe0(%rbx), %rcx
leaq (%rcx,%r15), %rdi
movq (%rcx,%r15), %rax
cmpq 0x8(%rcx,%r15), %rax
jne 0x55d4
jmp 0x5666
movl (%rax), %ecx
movsd 0x8(%rax), %xmm0
movl %ecx, %eax
movq 0x38(%rbx), %rcx
addsd (%rcx,%rax,8), %xmm0
movq 0xf8(%rbx), %rax
movl (%rax,%rbp,4), %eax
subsd (%rcx,%rax,8), %xmm0
movapd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
seta %al
movq 0x18(%rsp), %rcx
orb %al, %cl
movq %rcx, 0x18(%rsp)
minsd %xmm1, %xmm0
movapd %xmm0, (%rsp)
incq %rbp
movl (%rbx), %eax
cmpq %rax, %rbp
jb 0x5575
xorpd %xmm0, %xmm0
leaq 0x50(%rsp), %rdi
movapd %xmm0, 0x40(%rdi)
movapd %xmm0, 0x30(%rdi)
movapd %xmm0, 0x20(%rdi)
movapd %xmm0, 0x10(%rdi)
movapd %xmm0, (%rdi)
xorl %esi, %esi
callq 0x8762
testb $0x1, 0x18(%rsp)
movq 0x30(%rsp), %r12
je 0x585f
cmpl $0x0, (%rbx)
je 0x5830
leaq 0x58(%rbx), %rbp
leaq 0x88(%rbx), %r15
xorl %r12d, %r12d
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x581d
movq %rbp, %rcx
movl 0x20(%rax), %edx
xorl %esi, %esi
cmpq %rdx, %r12
cmovbeq %rax, %rcx
seta %sil
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x56d3
cmpq %rbp, %rcx
je 0x581d
movl 0x20(%rcx), %eax
cmpq %rax, %r12
jb 0x581d
movq 0xe0(%rbx), %rdi
movq %r12, %r13
shlq $0x5, %r13
movq (%rdi,%r13), %rax
cmpq 0x8(%rdi,%r13), %rax
je 0x581d
addq %r13, %rdi
movq 0x90(%rbx), %rdx
testq %rdx, %rdx
je 0x575f
movl (%rax), %ecx
movq %r15, %rsi
xorl %r8d, %r8d
cmpl %ecx, 0x20(%rdx)
setb %r8b
cmovaeq %rdx, %rsi
movq 0x10(%rdx,%r8,8), %rdx
testq %rdx, %rdx
jne 0x5733
cmpq %r15, %rsi
je 0x5761
cmpl 0x20(%rsi), %ecx
jb 0x5761
callq 0x70ea
jmp 0x57f3
movl (%rax), %ecx
movsd 0x8(%rax), %xmm0
movl %ecx, %eax
movq 0x38(%rbx), %rdx
movq 0xf8(%rbx), %rsi
addsd (%rdx,%rax,8), %xmm0
movl (%rsi,%r12,4), %eax
subsd (%rdx,%rax,8), %xmm0
subsd (%rsp), %xmm0
movapd %xmm0, %xmm1
andpd 0x593e(%rip), %xmm1     # 0xb0d0
movsd 0x591e(%rip), %xmm2     # 0xb0b8
ucomisd %xmm1, %xmm2
jbe 0x580f
movl %r12d, 0x28(%rsp)
movl %ecx, 0x2c(%rsp)
movq 0x80(%rsp), %rax
movq 0x90(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x57d5
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x80(%rsp)
jmp 0x57e4
leaq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x88d8
movq 0xe0(%rbx), %rdi
addq %r13, %rdi
callq 0x70ea
movq 0xe0(%rbx), %rcx
leaq (%rcx,%r13), %rdi
movq (%rcx,%r13), %rax
cmpq 0x8(%rcx,%r13), %rax
jne 0x5722
jmp 0x581d
ucomisd 0x58a1(%rip), %xmm0     # 0xb0b8
jbe 0x5ca4
incq %r12
movl (%rbx), %eax
cmpq %rax, %r12
jb 0x56c3
movq 0x30(%rsp), %r12
movapd (%rsp), %xmm0
jmp 0x589f
xorpd %xmm0, %xmm0
leaq 0x50(%rsp), %rdi
movapd %xmm0, 0x40(%rdi)
movapd %xmm0, 0x30(%rdi)
movapd %xmm0, 0x20(%rdi)
movapd %xmm0, 0x10(%rdi)
movapd %xmm0, (%rdi)
xorl %esi, %esi
callq 0x8762
movl (%r12), %eax
movslq %eax, %rcx
movq 0x38(%rbx), %rdx
movq 0xc8(%rbx), %rsi
leaq (%rcx,%rcx,2), %rcx
movslq 0x4(%r12), %rdi
movq (%rsi,%rcx,8), %rcx
movsd (%rcx,%rdi,8), %xmm0
addsd (%rdx,%rdi,8), %xmm0
movq 0xf8(%rbx), %rcx
movl (%rcx,%rax,4), %eax
subsd (%rdx,%rax,8), %xmm0
xorpd 0x5781(%rip), %xmm0     # 0xb020
movq %xmm0, %rax
movq %rax, %rcx
btrq $0x3f, %rcx
movabsq $-0x10000000000000, %rdx # imm = 0xFFF0000000000000
addq %rcx, %rdx
shrq $0x35, %rdx
cmpl $0x3ff, %edx            # imm = 0x3FF
setae %cl
testq %rax, %rax
sets %dl
orb %cl, %dl
decq %rax
movabsq $0xffffffffffffe, %rcx  # imm = 0xFFFFFFFFFFFFE
cmpq %rcx, %rax
seta %al
testb %dl, %al
jne 0x5c66
movl 0x4(%rbx), %eax
testq %rax, %rax
je 0x5954
movapd %xmm0, %xmm1
movq 0x38(%rbx), %rcx
movq 0x90(%rbx), %rdx
leaq 0x88(%rbx), %rsi
xorl %edi, %edi
testq %rdx, %rdx
je 0x594c
movq %rdx, %r9
movq %rsi, %r8
movl 0x20(%r9), %r10d
xorl %r11d, %r11d
cmpq %r10, %rdi
cmovbeq %r9, %r8
seta %r11b
movq 0x10(%r9,%r11,8), %r9
testq %r9, %r9
jne 0x5914
cmpq %rsi, %r8
je 0x594c
movl 0x20(%r8), %r8d
cmpq %r8, %rdi
jb 0x594c
movsd (%rcx,%rdi,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rdi,8)
incq %rdi
cmpq %rax, %rdi
jne 0x5909
movl (%rbx), %esi
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x713c
movl (%rbx), %eax
testq %rax, %rax
je 0x59f7
movq 0x38(%rbx), %rcx
movq 0xc8(%rbx), %rdx
movslq 0x4(%r12), %rsi
movq 0xf8(%rbx), %rdi
movq 0x38(%rsp), %r8
xorl %r9d, %r9d
movq (%rdx), %r10
movsd (%r10,%rsi,8), %xmm0
addsd (%rcx,%rsi,8), %xmm0
movl (%rdi,%r9,4), %r10d
subsd (%rcx,%r10,8), %xmm0
movsd %xmm0, (%r8,%r9,8)
incq %r9
addq $0x18, %rdx
cmpq %r9, %rax
jne 0x598f
testl %eax, %eax
je 0x59f7
movsd 0x56eb(%rip), %xmm0     # 0xb0b0
movq 0x38(%rsp), %rdx
xorl %esi, %esi
movl %eax, %ecx
movapd %xmm0, %xmm1
movsd (%rdx,%rsi,8), %xmm0
ucomisd %xmm0, %xmm1
cmoval %esi, %ecx
minsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x59ce
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
setb %dl
jmp 0x59fb
xorl %ecx, %ecx
xorl %edx, %edx
cmpl %eax, %ecx
je 0x5c85
testb %dl, %dl
je 0x5b7a
cmpl (%r12), %ecx
je 0x5a46
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x5a46
leaq 0x58(%rbx), %rsi
movq %rsi, %rdx
xorl %edi, %edi
cmpl %ecx, 0x20(%rax)
setb %dil
cmovaeq %rax, %rdx
movq 0x10(%rax,%rdi,8), %rax
testq %rax, %rax
jne 0x5a21
cmpq %rsi, %rdx
je 0x5a46
cmpl 0x20(%rdx), %ecx
jae 0x5bc0
movq 0x60(%rsp), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %rax, 0x80(%rsp)
je 0x5b8b
leaq 0x20(%rsp), %r15
movq (%rax), %xmm0
movq 0x70(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
movdqa %xmm0, (%rsp)
je 0x5a80
addq $0x8, %rax
jmp 0x5ab7
movq 0x68(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x3260
movdqa (%rsp), %xmm0
movq 0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x68(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x70(%rsp)
movq %rax, 0x60(%rsp)
movd %xmm0, %eax
movslq %eax, %r12
movq 0x128(%rbx), %rax
movq (%rax,%r12,8), %r13
movl $0x28, %edi
callq 0x3250
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq %rax, 0x20(%rsp)
movdqa (%rsp), %xmm0
movq %xmm0, (%rax)
movl $0x0, 0x8(%rax)
movq %r13, 0x18(%rax)
cmpq $0x0, 0x10(%r13)
je 0x5b27
movq 0x140(%rbx), %rdx
movq (%rdx,%r12,8), %rcx
testq %rcx, %rcx
je 0x5c47
leaq (%rdx,%r12,8), %r12
movq %rax, 0x20(%rcx)
jmp 0x5b36
movq %rax, 0x10(%r13)
shlq $0x3, %r12
addq 0x140(%rbx), %r12
movq %rax, (%r12)
movq 0x30(%r14), %rax
movq 0x40(%r14), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x5b5a
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%r14)
jmp 0x5b65
movq %r14, %rdi
movq %r15, %rsi
callq 0x8404
movq 0x60(%rsp), %rax
cmpq %rax, 0x80(%rsp)
jne 0x5a63
jmp 0x5b8b
addq $0x110, %rbx            # imm = 0x110
movq %rbx, %rdi
callq 0x70ae
xorl %ebp, %ebp
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5ba2
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3260
leaq 0x50(%rsp), %rdi
callq 0x744a
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, (%r12)
movl %ecx, %eax
movq 0x128(%rbx), %rcx
movq (%rcx,%rax,8), %r15
testq %r15, %r15
je 0x5ce7
leaq 0x110(%rbx), %r14
movq %r14, %rdi
callq 0x70ae
cmpl $-0x1, 0x8(%r15)
je 0x5c19
movl $0x18, %edi
callq 0x3250
movq (%r15), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x3040
incq 0x120(%rbx)
movq 0x18(%r15), %r15
jmp 0x5be9
movl $0x18, %edi
callq 0x3250
movq (%r12), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x3040
incq 0x120(%rbx)
movl $0x1, %ebp
jmp 0x5b8b
leaq 0x5571(%rip), %rdi      # 0xb1bf
leaq 0x54c2(%rip), %rsi      # 0xb117
leaq 0x55c2(%rip), %rcx      # 0xb21e
movl $0x285, %edx            # imm = 0x285
callq 0x3150
leaq 0x55e7(%rip), %rdi      # 0xb254
leaq 0x54a3(%rip), %rsi      # 0xb117
leaq 0x55a3(%rip), %rcx      # 0xb21e
movl $0x22e, %edx            # imm = 0x22E
callq 0x3150
leaq 0x5609(%rip), %rdi      # 0xb295
leaq 0x5484(%rip), %rsi      # 0xb117
leaq 0x5584(%rip), %rcx      # 0xb21e
movl $0x24a, %edx            # imm = 0x24A
callq 0x3150
movq 0x9345(%rip), %rdi      # 0xeff0
leaq 0x5551(%rip), %rsi      # 0xb203
movl $0x1a, %edx
callq 0x32a0
movq 0x932d(%rip), %rdi      # 0xeff0
callq 0x3110
leaq 0x560e(%rip), %rdi      # 0xb2dd
leaq 0x5441(%rip), %rsi      # 0xb117
leaq 0x5541(%rip), %rcx      # 0xb21e
movl $0x201, %edx            # imm = 0x201
callq 0x3150
leaq 0x55c1(%rip), %rdi      # 0xb2af
leaq 0x5422(%rip), %rsi      # 0xb117
leaq 0x5522(%rip), %rcx      # 0xb21e
movl $0x25a, %edx            # imm = 0x25A
callq 0x3150
jmp 0x5d10
jmp 0x5d2c
jmp 0x5d10
jmp 0x5d2c
jmp 0x5d2c
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5d2f
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3260
jmp 0x5d2f
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x744a
movq %rbx, %rdi
callq 0x33d0
nop