// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x44e4
movq %rbx, %rdi
callq 0x4c0e
movl (%rbx), %eax
movq $-0x1, %r15
movq $-0x1, %rdx
testq %rax, %rax
je 0x6565
movq 0xc8(%rbx), %rdx
xorpd %xmm0, %xmm0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %esi, %esi
xorl %r8d, %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq (%rdx), %r9
movsd (%r9), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r8d, %edi
minsd %xmm0, %xmm1
cmoval %esi, %ecx
incq %r8
addq $0x18, %rdx
movapd %xmm1, %xmm0
cmpq %r8, %rax
jne 0x6535
shlq $0x20, %rcx
movl %edi, %edx
orq %rcx, %rdx
movq %rdx, (%rsp)
movq 0x8a58(%rip), %r14      # 0xefc8
leaq 0x4e0b(%rip), %rsi      # 0xb382
movl $0x15, %edx
movq %r14, %rdi
callq 0x32a0
movl (%rsp), %esi
movq %r14, %rdi
callq 0x33c0
movq %rax, %r14
leaq 0x4dff(%rip), %rsi      # 0xb398
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x33c0
movq %rax, %r14
leaq 0x4c76(%rip), %rsi      # 0xb232
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movl (%rbx), %eax
testq %rax, %rax
je 0x6646
movq 0xc8(%rbx), %rdx
xorpd %xmm0, %xmm0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %esi, %esi
movl $0x1, %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq (%rdx), %r9
movsd 0x8(%r9), %xmm1
ucomisd %xmm1, %xmm0
cmoval %esi, %edi
minsd %xmm0, %xmm1
cmoval %r8d, %ecx
incq %rsi
addq $0x18, %rdx
movapd %xmm1, %xmm0
cmpq %rsi, %rax
jne 0x6614
shlq $0x20, %rcx
movl %edi, %r15d
orq %rcx, %r15
movq %rsp, %r14
movq %r15, (%r14)
movq 0x8975(%rip), %r15      # 0xefc8
leaq 0x4d28(%rip), %rsi      # 0xb382
movl $0x15, %edx
movq %r15, %rdi
callq 0x32a0
movl (%r14), %esi
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x4d1c(%rip), %rsi      # 0xb398
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
movl 0x4(%r14), %esi
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x4b93(%rip), %rsi      # 0xb232
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e9a
movq %rbx, %rdi
callq 0x5d58
movl (%rbx), %eax
movq $-0x1, %r12
movq $-0x1, %rdx
testq %rax, %rax
je 0x6749
movq 0xc8(%rbx), %rdx
xorpd %xmm0, %xmm0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %esi, %esi
movl $0x2, %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq (%rdx), %r9
movsd 0x10(%r9), %xmm1
ucomisd %xmm1, %xmm0
cmoval %esi, %edi
minsd %xmm0, %xmm1
cmoval %r8d, %ecx
incq %rsi
addq $0x18, %rdx
movapd %xmm1, %xmm0
cmpq %rsi, %rax
jne 0x6718
shlq $0x20, %rcx
movl %edi, %edx
orq %rcx, %rdx
movq %rsp, %r14
movq %rdx, (%r14)
movq 0x8872(%rip), %r15      # 0xefc8
leaq 0x4c25(%rip), %rsi      # 0xb382
movl $0x15, %edx
movq %r15, %rdi
callq 0x32a0
movl (%r14), %esi
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x4c19(%rip), %rsi      # 0xb398
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
movl 0x4(%r14), %esi
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x4a90(%rip), %rsi      # 0xb232
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %rbx, %rdi
callq 0x4c0e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e9a
movq %rbx, %rdi
callq 0x5d58
movl (%rbx), %eax
testq %rax, %rax
je 0x6847
movq 0xc8(%rbx), %rdx
xorpd %xmm0, %xmm0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %esi, %esi
movl $0x3, %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq (%rdx), %r9
movsd 0x18(%r9), %xmm1
ucomisd %xmm1, %xmm0
cmoval %esi, %edi
minsd %xmm0, %xmm1
cmoval %r8d, %ecx
incq %rsi
addq $0x18, %rdx
movapd %xmm1, %xmm0
cmpq %rsi, %rax
jne 0x6815
shlq $0x20, %rcx
movl %edi, %r12d
orq %rcx, %r12
movq %rsp, %r14
movq %r12, (%r14)
movq 0x8774(%rip), %r15      # 0xefc8
leaq 0x4b27(%rip), %rsi      # 0xb382
movl $0x15, %edx
movq %r15, %rdi
callq 0x32a0
movl (%r14), %esi
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x4b1b(%rip), %rsi      # 0xb398
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
movl 0x4(%r14), %esi
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x4992(%rip), %rsi      # 0xb232
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %rbx, %rdi
callq 0x4c0e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e9a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5d58