// File: /workspace/github_cpp_makefile_star2_O3/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, 0x8(%rsp)
movq (%rdi), %rbp
testq %rbp, %rbp
je 0x223c
leaq 0xfe4(%rip), %r12       # 0x3062
leaq 0xff6(%rip), %r13       # 0x307b
leaq 0xff2(%rip), %r14       # 0x307e
movq 0x8(%rsp), %rax
cmpq (%rax), %rbp
je 0x20ea
movl 0x4(%rbp), %ebx
testl %ebx, %ebx
leaq 0xf87(%rip), %r12       # 0x3029
jle 0x20bc
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %r15d
movl 0x4(%rbp), %ebx
cmpl %ebx, %r15d
jl 0x20a7
movq 0x8(%rsp), %rax
cmpl 0x10(%rax), %ebx
leaq 0xf97(%rip), %r12       # 0x3062
leaq 0xf6a(%rip), %r15       # 0x303c
jge 0x20ea
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
movq 0x8(%rsp), %rax
cmpl 0x10(%rax), %ebx
jl 0x20d4
movl $0xa, %edi
callq 0x10f0
movq 0x8(%rsp), %rax
cmpq 0x8(%rax), %rbp
je 0x224b
movl 0x4(%rbp), %ebx
testl %ebx, %ebx
jle 0x2125
xorl %r15d, %r15d
movl (%rbp), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incl %r15d
movl 0x4(%rbp), %ebx
cmpl %ebx, %r15d
jl 0x210d
movq 0x8(%rsp), %r12
cmpl 0x10(%r12), %ebx
leaq 0xf06(%rip), %r15       # 0x303c
jge 0x214b
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%r12), %ebx
jl 0x2138
movl $0xa, %edi
callq 0x10f0
movl 0x4(%rbp), %ebx
testl %ebx, %ebx
jle 0x21d7
movq %rbp, %r12
xorl %r15d, %r15d
leaq 0xf0e(%rip), %rdi       # 0x3077
xorl %eax, %eax
callq 0x1040
movl $0x8, %ebx
movl (%r12,%rbx), %esi
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
jne 0x218d
movq %r13, %rdi
xorl %eax, %eax
callq 0x1040
jmp 0x2197
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
cmpq $0x38, %rbx
je 0x21ad
movl $0x7c, %edi
callq 0x10f0
addq $0x10, %rbx
jmp 0x2175
leaq 0xecf(%rip), %rdi       # 0x3083
xorl %eax, %eax
callq 0x1040
incq %r15
movslq 0x4(%rbp), %rbx
addq $0x40, %r12
cmpq %rbx, %r15
jl 0x2162
movq 0x8(%rsp), %r12
leaq 0xe65(%rip), %r15       # 0x303c
movq %rbp, 0x10(%rsp)
cmpl 0x10(%r12), %ebx
jge 0x21f1
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
jmp 0x21dc
movl $0xa, %edi
callq 0x10f0
cmpl $0x0, 0x10(%r12)
movq %r12, %rbp
leaq 0xe57(%rip), %r12       # 0x3062
jle 0x2220
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%rbp), %ebx
jl 0x220f
movl $0xa, %edi
callq 0x10f0
movq 0x10(%rsp), %rbp
movq 0x10(%rbp), %rbp
testq %rbp, %rbp
jne 0x208c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %r15
cmpl $0x0, 0x10(%r15)
jle 0x2272
leaq 0xdf1(%rip), %r14       # 0x304f
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incl %ebx
cmpl 0x10(%r15), %ebx
jl 0x2260
movl $0xa, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0