// File: /workspace/github_cpp_makefile_star2_O2/narula[P]skiplists/skiplist-extra.cc
// Function: SkipList::pretty_print()
void SkipList::pretty_print() {
  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:");
	  for (int k = 0; k < FANOUT; k++) {
		if (ptr->nexts[i][k].prefix == INT_MAX) {
		  printf("ND");
		} else {		
		  printf("%02d", ptr->nexts[i][k].prefix);
		}
		if (k != FANOUT-1) {
		  printf("|");
		}
	  }
	  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][0].nxt;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r13
leaq 0x117f(%rip), %rbp      # 0x307b
pushq $0x7c
popq %r14
leaq 0x1177(%rip), %r12      # 0x307e
movq %rdi, %rax
movq %rdi, 0x10(%rsp)
movq (%rax), %rax
testq %rax, %rax
je 0x208c
movq %rax, 0x8(%rsp)
cmpq (%r13), %rax
je 0x1f5f
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movl 0x4(%rax), %ebx
cmpl %ebx, %r15d
jge 0x1f52
leaq 0x10ec(%rip), %rdi      # 0x3029
xorl %eax, %eax
callq 0x1040
incl %r15d
jmp 0x1f29
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%r13), %ebx
leaq 0x10df(%rip), %rdi      # 0x303c
jl 0x1f49
pushq $0xa
popq %rdi
callq 0x10f0
movq 0x8(%rsp), %r15
cmpq 0x8(%r13), %r15
je 0x209b
xorl %ebx, %ebx
movl 0x4(%r15), %r15d
cmpl %r15d, %ebx
jge 0x1fac
movq 0x8(%rsp), %r15
movl (%r15), %esi
leaq 0x10d2(%rip), %rdi      # 0x3062
xorl %eax, %eax
callq 0x1040
incl %ebx
jmp 0x1f78
leaq 0x109a(%rip), %rdi      # 0x303c
xorl %eax, %eax
callq 0x1040
incl %r15d
cmpl 0x10(%r13), %r15d
jl 0x1f9b
pushq $0xa
popq %rdi
callq 0x10f0
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %r15
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rbx
cmpq %rbx, %r13
jge 0x2038
leaq 0x109c(%rip), %rdi      # 0x3077
xorl %eax, %eax
callq 0x1040
pushq $-0x40
popq %rbx
testq %rbx, %rbx
je 0x2021
movl 0x40(%r15,%rbx), %esi
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
jne 0x2003
movq %rbp, %rdi
xorl %eax, %eax
callq 0x1040
jmp 0x200d
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
cmpq $-0x10, %rbx
je 0x201b
movl %r14d, %edi
callq 0x10f0
addq $0x10, %rbx
jmp 0x1fe5
leaq 0x105b(%rip), %rdi      # 0x3083
xorl %eax, %eax
callq 0x1040
incq %r13
addq $0x40, %r15
jmp 0x1fc6
movq 0x10(%rsp), %r13
leaq 0xff8(%rip), %r15       # 0x303c
cmpl 0x10(%r13), %ebx
jge 0x2058
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
jmp 0x2044
pushq $0xa
popq %rdi
callq 0x10f0
xorl %ebx, %ebx
cmpl 0x10(%r13), %ebx
jge 0x2076
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
jmp 0x2062
pushq $0xa
popq %rdi
callq 0x10f0
movq 0x8(%rsp), %rax
addq $0x10, %rax
jmp 0x1f0f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfad(%rip), %r14       # 0x304f
xorl %ebx, %ebx
cmpl 0x10(%r13), %ebx
jge 0x20b8
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
jmp 0x20a4
pushq $0xa
popq %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0