// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
testq %rax, %rax
je 0x21ed
movq %rdi, %rbp
leaq 0x1036(%rip), %r12      # 0x3062
leaq 0x1048(%rip), %r13      # 0x307b
leaq 0x1044(%rip), %r14      # 0x307e
movq %rdi, 0x10(%rsp)
movq %rax, 0x8(%rsp)
cmpq (%rbp), %rax
je 0x209d
movq 0x8(%rsp), %r15
movl 0x4(%r15), %ebx
testl %ebx, %ebx
leaq 0xfcd(%rip), %r12       # 0x3029
jle 0x2074
xorl %ebp, %ebp
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
movl 0x4(%r15), %ebx
cmpl %ebx, %ebp
jl 0x2060
movq 0x10(%rsp), %rbp
cmpl 0x10(%rbp), %ebx
leaq 0xfdf(%rip), %r12       # 0x3062
leaq 0xfb2(%rip), %r15       # 0x303c
jge 0x209d
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%rbp), %ebx
jl 0x208c
movl $0xa, %edi
callq 0x10f0
movq 0x8(%rsp), %r15
cmpq 0x8(%rbp), %r15
je 0x21fc
movl 0x4(%r15), %ebx
testl %ebx, %ebx
jle 0x20d7
xorl %ebp, %ebp
movl (%r15), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebp
movl 0x4(%r15), %ebx
cmpl %ebx, %ebp
jl 0x20c0
movq 0x10(%rsp), %rbp
cmpl 0x10(%rbp), %ebx
leaq 0xf56(%rip), %r15       # 0x303c
jge 0x20f9
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%rbp), %ebx
jl 0x20e8
movl $0xa, %edi
callq 0x10f0
movq 0x8(%rsp), %r12
movl 0x4(%r12), %ebx
testl %ebx, %ebx
jle 0x21a2
leaq 0x8(%r12), %rbp
xorl %r15d, %r15d
leaq 0xf53(%rip), %rdi       # 0x3077
xorl %eax, %eax
callq 0x1040
xorl %ebx, %ebx
movl (%rbp,%rbx), %esi
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
jne 0x2145
movq %r13, %rdi
xorl %eax, %eax
callq 0x1040
jmp 0x214f
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
cmpq $0x30, %rbx
je 0x215f
movl $0x7c, %edi
callq 0x10f0
addq $0x10, %rbx
cmpq $0x40, %rbx
jne 0x212d
leaq 0xf13(%rip), %rdi       # 0x3083
xorl %eax, %eax
callq 0x1040
incq %r15
movslq 0x4(%r12), %rbx
addq $0x40, %rbp
cmpq %rbx, %r15
jl 0x211d
movq 0x10(%rsp), %rbp
leaq 0xea8(%rip), %r15       # 0x303c
jmp 0x21a2
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%rbp), %ebx
jl 0x2196
movl $0xa, %edi
callq 0x10f0
cmpl $0x0, 0x10(%rbp)
leaq 0xea6(%rip), %r12       # 0x3062
jle 0x21d1
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%rbp), %ebx
jl 0x21c0
movl $0xa, %edi
callq 0x10f0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x203f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x10(%rbp)
jle 0x221c
leaq 0xe46(%rip), %r14       # 0x304f
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%rbp), %ebx
jl 0x220b
movl $0xa, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0