// File: iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::PrimalTest()
void 
Primal::PrimalTest(void){

  // applies to the demo in Balinsk's paper
  RandSolution();
  InitStage();
  cell next = NextStartEntry(0);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;
  next = NextStartEntry(1);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;

  SearchSwapLoop(next);
  SwapTasks();

  next = NextStartEntry(2);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;
  InitStage();
  SearchSwapLoop(next);
  SwapTasks();

  next = NextStartEntry(3);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;
  InitStage();
  SearchSwapLoop(next);
  SwapTasks();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x6a50
movq -0x30(%rbp), %rdi
callq 0x7770
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x7a40
movq %rax, -0x10(%rbp)
movq 0x1d080(%rip), %rdi     # 0x26fc8
leaq 0x10403(%rip), %rsi     # 0x1a352
callq 0x3270
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x103ff(%rip), %rsi     # 0x1a368
callq 0x3270
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x1027f(%rip), %rsi     # 0x1a202
callq 0x3270
movq %rax, %rdi
movq 0x1d01e(%rip), %rsi     # 0x26fb0
callq 0x32b0
movq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x7a40
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x1d010(%rip), %rdi     # 0x26fc8
leaq 0x10393(%rip), %rsi     # 0x1a352
callq 0x3270
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x1038f(%rip), %rsi     # 0x1a368
callq 0x3270
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x1020f(%rip), %rsi     # 0x1a202
callq 0x3270
movq %rax, %rdi
movq 0x1cfae(%rip), %rsi     # 0x26fb0
callq 0x32b0
movq -0x30(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x7c10
movq -0x30(%rbp), %rdi
callq 0x9530
movq -0x30(%rbp), %rdi
movl $0x2, %esi
callq 0x7a40
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x1cf8a(%rip), %rdi     # 0x26fc8
leaq 0x1030d(%rip), %rsi     # 0x1a352
callq 0x3270
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x10309(%rip), %rsi     # 0x1a368
callq 0x3270
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x10189(%rip), %rsi     # 0x1a202
callq 0x3270
movq %rax, %rdi
movq 0x1cf28(%rip), %rsi     # 0x26fb0
callq 0x32b0
movq -0x30(%rbp), %rdi
callq 0x7770
movq -0x30(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x7c10
movq -0x30(%rbp), %rdi
callq 0x9530
movq -0x30(%rbp), %rdi
movl $0x3, %esi
callq 0x7a40
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x1cefb(%rip), %rdi     # 0x26fc8
leaq 0x1027e(%rip), %rsi     # 0x1a352
callq 0x3270
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x1027a(%rip), %rsi     # 0x1a368
callq 0x3270
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x3480
movq %rax, %rdi
leaq 0x100fa(%rip), %rsi     # 0x1a202
callq 0x3270
movq %rax, %rdi
movq 0x1ce99(%rip), %rsi     # 0x26fb0
callq 0x32b0
movq -0x30(%rbp), %rdi
callq 0x7770
movq -0x30(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x7c10
movq -0x30(%rbp), %rdi
callq 0x9530
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)