// File: davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::check()
void DNS_DB::DnsIndex::check() {
	// Check consistency
	for (unsigned int i = 0; i < nodes.size(); i++) {
		if (!less(nodes[i].min, nodes[i].max)) {
			fprintf(stderr, "DB index error!!!\n");
		}
	}

	// Make sure the index is sorted
	for (unsigned int i = 1; i < nodes.size(); i++) {
		if (!less(nodes[i-1].min, nodes[i].min) ||
			!  eq(nodes[i-1].max, nodes[i].min)) {

			fprintf(stderr, "DB index error!!!\n");
		}
	}

	for (unsigned int i = 0; i < nodes.size(); i++) {
		DNS_DB::DnsBlockPtr blk = database->getBlock(nodes[i].dnsblock_id);
		blk->check();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x40(%rbp), %rdi
movl -0xc(%rbp), %eax
movq %rax, -0x48(%rbp)
callq 0x8530
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jae 0x7859
movq -0x40(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x8610
movq -0x40(%rbp), %rdi
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x8610
movq -0x50(%rbp), %rdi
movq %rax, %rsi
addq $0x23, %rsi
movl $0x23, %edx
callq 0x4150
cmpl $0x0, %eax
jl 0x784c
movq 0x14795(%rip), %rax     # 0x1bfd0
movq (%rax), %rdi
leaq 0xb93d(%rip), %rsi      # 0x13182
movb $0x0, %al
callq 0x43f0
jmp 0x784e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x77de
movl $0x1, -0x10(%rbp)
movq -0x40(%rbp), %rdi
movl -0x10(%rbp), %eax
movq %rax, -0x58(%rbp)
callq 0x8530
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jae 0x7922
movq -0x40(%rbp), %rdi
movl -0x10(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x8610
movq -0x40(%rbp), %rdi
movq %rax, -0x60(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0x8610
movq -0x60(%rbp), %rdi
movq %rax, %rsi
movl $0x23, %edx
callq 0x4150
cmpl $0x0, %eax
jge 0x78fa
movq -0x40(%rbp), %rdi
movl -0x10(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x8610
movq -0x40(%rbp), %rdi
addq $0x23, %rax
movq %rax, -0x68(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0x8610
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movl $0x23, %edx
callq 0x4150
cmpl $0x0, %eax
je 0x7912
movq 0x146cf(%rip), %rax     # 0x1bfd0
movq (%rax), %rdi
leaq 0xb877(%rip), %rsi      # 0x13182
movb $0x0, %al
callq 0x43f0
jmp 0x7914
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7860
movl $0x0, -0x14(%rbp)
movq -0x40(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x70(%rbp)
callq 0x8530
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x79ad
movq -0x40(%rbp), %rdi
movq 0x18(%rdi), %rax
movq %rax, -0x80(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x8610
movq -0x80(%rbp), %rsi
movl 0x46(%rax), %edx
leaq -0x28(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x8650
movq -0x78(%rbp), %rdi
callq 0x8680
movq %rax, %rdi
callq 0xbda0
jmp 0x7982
leaq -0x28(%rbp), %rdi
callq 0x5f20
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7929
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5f20
jmp 0x79b6
addq $0x80, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x44f0
nop