// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d58
movq %rdi, %rbx
leaq 0x4dd(%rip), %r15       # 0x20e0
leaq 0x4ce(%rip), %r12       # 0x20d8
cmpq (%rbx), %r13
je 0x1c43
movl 0x4(%r13), %ebp
testl %ebp, %ebp
jle 0x1c3e
xorl %r14d, %r14d
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %r14d
movl 0x4(%r13), %ebp
cmpl %ebp, %r14d
jl 0x1c1a
jmp 0x1c3e
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1c32
movl $0xa, %edi
callq 0x10f0
cmpq 0x8(%rbx), %r13
je 0x1d67
movl 0x4(%r13), %ebp
testl %ebp, %ebp
leaq 0x48c(%rip), %r12       # 0x20f0
jle 0x1c91
xorl %r14d, %r14d
movl (%r13), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %r14d
movl 0x4(%r13), %ebp
cmpl %ebp, %r14d
jl 0x1c69
jmp 0x1c91
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1c85
movl $0xa, %edi
callq 0x10f0
movl 0x4(%r13), %ebp
testl %ebp, %ebp
jle 0x1d12
leaq 0x38(%r13), %r14
xorl %r12d, %r12d
leaq 0x444(%rip), %rdi       # 0x20fa
xorl %eax, %eax
callq 0x1040
movl (%r14), %esi
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
jne 0x1cd8
leaq 0x42f(%rip), %rdi       # 0x20fe
xorl %eax, %eax
callq 0x1040
jmp 0x1ce6
leaq 0x422(%rip), %rdi       # 0x2101
xorl %eax, %eax
callq 0x1040
leaq 0x400(%rip), %rdi       # 0x20ed
xorl %eax, %eax
callq 0x1040
incq %r12
movslq 0x4(%r13), %rbp
addq $0x40, %r14
cmpq %rbp, %r12
jl 0x1caf
jmp 0x1d12
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1d06
movl $0xa, %edi
callq 0x10f0
cmpl $0x0, 0x14(%rbx)
leaq 0x3ac(%rip), %r12       # 0x20d8
jle 0x1d41
xorl %ebp, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1d30
movl $0xa, %edi
callq 0x10f0
movq 0x40(%r13), %r13
testq %r13, %r13
jne 0x1c0a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x14(%rbx)
jle 0x1d87
leaq 0x374(%rip), %r14       # 0x20e8
xorl %ebp, %ebp
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
cmpl 0x14(%rbx), %ebp
jl 0x1d76
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0