// File: suyash[P]chan/examples/go/tree.cc
// Function: main
int main() {
	auto t1 = newTree(100, 1, std::mt19937(4));
	auto w1 = walker(t1);
	auto t2 = newTree(100, 1, std::mt19937(4));
	auto w2 = walker(t2);

	if (compare(w1, w2)) {
		printf("same\n");
	} else {
		printf("different\n");
	}

	deleteTree(t2);
	delete w2;
	deleteTree(t1);
	delete w1;

	t1 = newTree(100, 1, std::random_device());
	w1 = walker(t1);
	t2 = newTree(100, 1, std::random_device());
	w2 = walker(t2);

	if (compare(w1, w2)) {
		printf("same\n");
	} else {
		printf("different\n");
	}

	deleteTree(t2);
	delete w2;
	deleteTree(t1);
	delete w1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4ea0, %rsp           # imm = 0x4EA0
movl $0x0, -0x4(%rbp)
leaq -0x1398(%rbp), %rdi
movl $0x4, %esi
callq 0x3140
movl $0x64, %edi
movl $0x1, %esi
leaq -0x1398(%rbp), %rdx
callq 0x3070
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x24e0
movq %rax, -0x13a0(%rbp)
leaq -0x2730(%rbp), %rdi
movl $0x4, %esi
callq 0x3140
movl $0x64, %edi
movl $0x1, %esi
leaq -0x2730(%rbp), %rdx
callq 0x3070
movq %rax, -0x13a8(%rbp)
movq -0x13a8(%rbp), %rdi
callq 0x24e0
movq %rax, -0x2738(%rbp)
movq -0x13a0(%rbp), %rdi
movq -0x2738(%rbp), %rsi
callq 0x2650
testb $0x1, %al
jne 0x28a7
jmp 0x28b7
leaq 0x3756(%rip), %rdi      # 0x6004
movb $0x0, %al
callq 0x2030
jmp 0x28c5
leaq 0x374c(%rip), %rdi      # 0x600a
movb $0x0, %al
callq 0x2030
movq -0x13a8(%rbp), %rdi
callq 0x2790
movq -0x2738(%rbp), %rax
movq %rax, -0x4e60(%rbp)
cmpq $0x0, %rax
je 0x28f2
movq -0x4e60(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x10(%rbp), %rdi
callq 0x2790
movq -0x13a0(%rbp), %rax
movq %rax, -0x4e68(%rbp)
cmpq $0x0, %rax
je 0x291c
movq -0x4e68(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
leaq -0x3ac0(%rbp), %rdi
movq %rdi, -0x4e78(%rbp)
callq 0x3240
movq -0x4e78(%rbp), %rdx
movl $0x64, %edi
movl $0x1, %esi
callq 0x3170
movq %rax, -0x4e70(%rbp)
jmp 0x294e
movq -0x4e70(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0x3ac0(%rbp), %rdi
callq 0x32e0
movq -0x10(%rbp), %rdi
callq 0x24e0
movq %rax, -0x13a0(%rbp)
leaq -0x4e58(%rbp), %rdi
movq %rdi, -0x4e88(%rbp)
callq 0x3240
movq -0x4e88(%rbp), %rdx
movl $0x64, %edi
movl $0x1, %esi
callq 0x3170
movq %rax, -0x4e80(%rbp)
jmp 0x29a7
movq -0x4e80(%rbp), %rax
movq %rax, -0x13a8(%rbp)
leaq -0x4e58(%rbp), %rdi
callq 0x32e0
movq -0x13a8(%rbp), %rdi
callq 0x24e0
movq %rax, -0x2738(%rbp)
movq -0x13a0(%rbp), %rdi
movq -0x2738(%rbp), %rsi
callq 0x2650
testb $0x1, %al
jne 0x29ed
jmp 0x2a40
leaq 0x3610(%rip), %rdi      # 0x6004
movb $0x0, %al
callq 0x2030
jmp 0x2a4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3ac8(%rbp)
movl %eax, -0x3acc(%rbp)
leaq -0x3ac0(%rbp), %rdi
callq 0x32e0
jmp 0x2ab1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3ac8(%rbp)
movl %eax, -0x3acc(%rbp)
leaq -0x4e58(%rbp), %rdi
callq 0x32e0
jmp 0x2ab1
leaq 0x35c3(%rip), %rdi      # 0x600a
movb $0x0, %al
callq 0x2030
movq -0x13a8(%rbp), %rdi
callq 0x2790
movq -0x2738(%rbp), %rax
movq %rax, -0x4e90(%rbp)
cmpq $0x0, %rax
je 0x2a7b
movq -0x4e90(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x10(%rbp), %rdi
callq 0x2790
movq -0x13a0(%rbp), %rax
movq %rax, -0x4e98(%rbp)
cmpq $0x0, %rax
je 0x2aa5
movq -0x4e98(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl -0x4(%rbp), %eax
addq $0x4ea0, %rsp           # imm = 0x4EA0
popq %rbp
retq
movq -0x3ac8(%rbp), %rdi
callq 0x2270
nopl (%rax)