// File: /workspace/github_cpp_makefile_star2_O3/narula[P]skiplists/skiplist-fanout.cc
// Function: SkipList::pretty_print_skiplist()
void SkipList::pretty_print_skiplist() {
  node* ptr = head;
  while (ptr != 0) {
	if (ptr != head) {
	  for (int i = 0; i < ptr->topLevel; i++) {
		printf("   V   ");
	  }
	  for (int i = ptr->topLevel; i < max_level; i++) {
		printf("   |   ");
	  }
	}
	printf("\n");
	if (ptr == tail) {
	  for (int i = 0; i < max_level; i++) {
		printf("[K:ND] ");
	  }
	  printf("\n");
	  return;
	}
	for (int i = 0; i < ptr->topLevel; i++) {
	  printf("[K:%02d] ", ptr->key);
	}
	for (int i = ptr->topLevel; i < max_level; i++) {
	  printf("   |   ");
	}
	printf("\n");
	
	for (int i = 0; i < ptr->topLevel; i++) {
	  printf("[P:");
	  if (ptr->nexts[i][FANOUT-1].prefix == INT_MAX) {
		printf("ND");
	  } else {		
		printf("%02d", ptr->nexts[i][FANOUT-1].prefix);
	  }
	  printf("] ");
	}
	for (int i = ptr->topLevel; i < max_level; i++) {
	  printf("   |   ");
	}
	printf("\n");
	for (int i = 0; i < max_level; i++) {
	  printf("   |   ");
	}
	printf ("\n");
	ptr = ptr->nexts[0][FANOUT-1].nxt;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
testq %r13, %r13
je 0x1d80
movq %rdi, %rbx
leaq 0x4b5(%rip), %r15       # 0x20e0
leaq 0x4a6(%rip), %r12       # 0x20d8
cmpq (%rbx), %r13
je 0x1c6b
movl 0x4(%r13), %ebp
testl %ebp, %ebp
jle 0x1c66
xorl %r14d, %r14d
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %r14d
movl 0x4(%r13), %ebp
cmpl %ebp, %r14d
jl 0x1c42
jmp 0x1c66
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1c5a
movl $0xa, %edi
callq 0x10f0
cmpq 0x8(%rbx), %r13
je 0x1d8f
movl 0x4(%r13), %ebp
testl %ebp, %ebp
leaq 0x464(%rip), %r12       # 0x20f0
jle 0x1cb9
xorl %r14d, %r14d
movl (%r13), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %r14d
movl 0x4(%r13), %ebp
cmpl %ebp, %r14d
jl 0x1c91
jmp 0x1cb9
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1cad
movl $0xa, %edi
callq 0x10f0
movl 0x4(%r13), %ebp
testl %ebp, %ebp
jle 0x1d3a
leaq 0x38(%r13), %r14
xorl %r12d, %r12d
leaq 0x41c(%rip), %rdi       # 0x20fa
xorl %eax, %eax
callq 0x1040
movl (%r14), %esi
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
jne 0x1d00
leaq 0x407(%rip), %rdi       # 0x20fe
xorl %eax, %eax
callq 0x1040
jmp 0x1d0e
leaq 0x3fa(%rip), %rdi       # 0x2101
xorl %eax, %eax
callq 0x1040
leaq 0x3d8(%rip), %rdi       # 0x20ed
xorl %eax, %eax
callq 0x1040
incq %r12
movslq 0x4(%r13), %rbp
addq $0x40, %r14
cmpq %rbp, %r12
jl 0x1cd7
jmp 0x1d3a
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1d2e
movl $0xa, %edi
callq 0x10f0
cmpl $0x0, 0x14(%rbx)
leaq 0x384(%rip), %r12       # 0x20d8
jle 0x1d69
xorl %ebp, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1d58
movl $0xa, %edi
callq 0x10f0
movq 0x40(%r13), %r13
testq %r13, %r13
jne 0x1c32
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x14(%rbx)
jle 0x1daf
leaq 0x34c(%rip), %r14       # 0x20e8
xorl %ebp, %ebp
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1d9e
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0