// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x4500
movq %rbx, %rdi
callq 0x4c26
movl (%rbx), %eax
movq $-0x1, %r14
movq $-0x1, %r15
testq %rax, %rax
je 0x6555
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 0x6524
shlq $0x20, %rcx
movl %edi, %r15d
orq %rcx, %r15
movq 0x8a6c(%rip), %r12      # 0xefc8
leaq 0x4e3f(%rip), %rsi      # 0xb3a2
movl $0x15, %edx
movq %r12, %rdi
callq 0x32a0
movq %r12, %rdi
movl %r15d, %esi
callq 0x33c0
movq %rax, %r12
leaq 0x4e33(%rip), %rsi      # 0xb3b8
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
shrq $0x20, %r15
movq %r12, %rdi
movl %r15d, %esi
callq 0x33c0
movq %rax, %r15
leaq 0x4ca7(%rip), %rsi      # 0xb252
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
movl (%rbx), %eax
testq %rax, %rax
je 0x6635
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 0x6603
shlq $0x20, %rcx
movl %edi, %r14d
orq %rcx, %r14
leaq 0x8(%rsp), %r15
movq %r14, (%r15)
movq 0x8984(%rip), %r12      # 0xefc8
leaq 0x4d57(%rip), %rsi      # 0xb3a2
movl $0x15, %edx
movq %r12, %rdi
callq 0x32a0
movq %r12, %rdi
movl %r14d, %esi
callq 0x33c0
movq %rax, %r12
leaq 0x4d4b(%rip), %rsi      # 0xb3b8
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
shrq $0x20, %r14
movq %r12, %rdi
movl %r14d, %esi
callq 0x33c0
movq %rax, %r14
leaq 0x4bbf(%rip), %rsi      # 0xb252
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
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4eb8
movq %rbx, %rdi
callq 0x5d42
movl (%rbx), %eax
movq $-0x1, %r14
movq $-0x1, %r12
testq %rax, %rax
je 0x673e
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 0x670c
shlq $0x20, %rcx
movl %edi, %r12d
orq %rcx, %r12
leaq 0x8(%rsp), %r15
movq %r12, (%r15)
movq 0x887b(%rip), %r13      # 0xefc8
leaq 0x4c4e(%rip), %rsi      # 0xb3a2
movl $0x15, %edx
movq %r13, %rdi
callq 0x32a0
movq %r13, %rdi
movl %r12d, %esi
callq 0x33c0
movq %rax, %r13
leaq 0x4c42(%rip), %rsi      # 0xb3b8
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
shrq $0x20, %r12
movq %r13, %rdi
movl %r12d, %esi
callq 0x33c0
movq %rax, %r12
leaq 0x4ab6(%rip), %rsi      # 0xb252
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %rbx, %rdi
callq 0x4c26
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4eb8
movq %rbx, %rdi
callq 0x5d42
movl (%rbx), %eax
testq %rax, %rax
je 0x6842
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 0x6810
shlq $0x20, %rcx
movl %edi, %r14d
orq %rcx, %r14
leaq 0x8(%rsp), %r15
movq %r14, (%r15)
movq 0x8777(%rip), %r12      # 0xefc8
leaq 0x4b4a(%rip), %rsi      # 0xb3a2
movl $0x15, %edx
movq %r12, %rdi
callq 0x32a0
movq %r12, %rdi
movl %r14d, %esi
callq 0x33c0
movq %rax, %r12
leaq 0x4b3e(%rip), %rsi      # 0xb3b8
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
shrq $0x20, %r14
movq %r12, %rdi
movl %r14d, %esi
callq 0x33c0
movq %rax, %r14
leaq 0x49b2(%rip), %rsi      # 0xb252
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
movq %rbx, %rdi
callq 0x4c26
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4eb8
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5d42