// File: eschwabe[P]interview-practice/src/libds_btree.cpp
// Function: main
int main()
{
  BinaryTree t;
  t.Insert(1);
  t.Insert(97);
  t.Insert(44);
  t.Insert(4);
  t.Insert(3);
  t.Insert(10);
  t.Insert(100);
  t.Insert(5);
  t.Insert(5);
  t.Print(std::cout);
  std::cout << "Find: " << 10 << " : " << t.Find(10) << std::endl;
  std::cout << "Find: " << 100 << " : " << t.Find(100) << std::endl;
  std::cout << "Find: " << 99 << " : " << t.Find(99) << std::endl;
  t.Remove(10);
  t.Remove(5);
  t.Remove(4);
  t.Remove(100);
  t.Remove(44);
  t.Print(std::cout);
  t.Remove(5);
  t.Remove(1);
  t.Remove(3);
  t.Remove(97);
  t.Print(std::cout);
  t.Insert(5);
  t.Insert(5);
  t.Print(std::cout);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl $0x0, -0x4(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x1230
movq -0x88(%rbp), %rdi
movl $0x1, -0x14(%rbp)
leaq -0x14(%rbp), %rsi
callq 0x1270
jmp 0x184b
movl $0x61, -0x28(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1270
jmp 0x1861
movl $0x2c, -0x2c(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1270
jmp 0x1877
movl $0x4, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1270
jmp 0x188d
movl $0x3, -0x34(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x1270
jmp 0x18a3
movl $0xa, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1270
jmp 0x18b9
movl $0x64, -0x3c(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x1270
jmp 0x18cf
movl $0x5, -0x40(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1270
jmp 0x18e5
movl $0x5, -0x44(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0x1270
jmp 0x18fb
movq 0x36d6(%rip), %rsi      # 0x4fd8
leaq -0x10(%rbp), %rdi
callq 0x1740
jmp 0x190d
movq 0x36c4(%rip), %rdi      # 0x4fd8
leaq 0x16e9(%rip), %rsi      # 0x3004
callq 0x1070
movq %rax, -0x90(%rbp)
jmp 0x1929
movq -0x90(%rbp), %rdi
movl $0xa, %esi
callq 0x10c0
movq %rax, -0x98(%rbp)
jmp 0x1943
movq -0x98(%rbp), %rdi
leaq 0x16ba(%rip), %rsi      # 0x300b
callq 0x1070
movq %rax, -0xa0(%rbp)
jmp 0x195f
movl $0xa, -0x48(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x16c0
movq -0xa0(%rbp), %rdi
movzbl %al, %esi
callq 0x10e0
movq %rax, -0xa8(%rbp)
jmp 0x198b
movq -0xa8(%rbp), %rdi
movq 0x362f(%rip), %rsi      # 0x4fc8
callq 0x10a0
jmp 0x19a0
movq 0x3631(%rip), %rdi      # 0x4fd8
leaq 0x1656(%rip), %rsi      # 0x3004
callq 0x1070
movq %rax, -0xb0(%rbp)
jmp 0x19bc
movq -0xb0(%rbp), %rdi
movl $0x64, %esi
callq 0x10c0
movq %rax, -0xb8(%rbp)
jmp 0x19d6
movq -0xb8(%rbp), %rdi
leaq 0x1627(%rip), %rsi      # 0x300b
callq 0x1070
movq %rax, -0xc0(%rbp)
jmp 0x19f2
movl $0x64, -0x4c(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x16c0
movq -0xc0(%rbp), %rdi
movzbl %al, %esi
callq 0x10e0
movq %rax, -0xc8(%rbp)
jmp 0x1a1e
movq -0xc8(%rbp), %rdi
movq 0x359c(%rip), %rsi      # 0x4fc8
callq 0x10a0
jmp 0x1a33
movq 0x359e(%rip), %rdi      # 0x4fd8
leaq 0x15c3(%rip), %rsi      # 0x3004
callq 0x1070
movq %rax, -0xd0(%rbp)
jmp 0x1a4f
movq -0xd0(%rbp), %rdi
movl $0x63, %esi
callq 0x10c0
movq %rax, -0xd8(%rbp)
jmp 0x1a69
movq -0xd8(%rbp), %rdi
leaq 0x1594(%rip), %rsi      # 0x300b
callq 0x1070
movq %rax, -0xe0(%rbp)
jmp 0x1a85
movl $0x63, -0x50(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x16c0
movq -0xe0(%rbp), %rdi
movzbl %al, %esi
callq 0x10e0
movq %rax, -0xe8(%rbp)
jmp 0x1ab1
movq -0xe8(%rbp), %rdi
movq 0x3509(%rip), %rsi      # 0x4fc8
callq 0x10a0
jmp 0x1ac6
movl $0xa, -0x54(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
leaq -0x54(%rbp), %rsi
callq 0x1500
movq -0xf0(%rbp), %rdi
movl $0x5, -0x58(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x1500
movq -0xf0(%rbp), %rdi
movl $0x4, -0x5c(%rbp)
leaq -0x5c(%rbp), %rsi
callq 0x1500
movq -0xf0(%rbp), %rdi
movl $0x64, -0x60(%rbp)
leaq -0x60(%rbp), %rsi
callq 0x1500
movq -0xf0(%rbp), %rdi
movl $0x2c, -0x64(%rbp)
leaq -0x64(%rbp), %rsi
callq 0x1500
movq -0xf0(%rbp), %rdi
movq 0x348d(%rip), %rsi      # 0x4fd8
callq 0x1740
jmp 0x1b52
movl $0x5, -0x68(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
leaq -0x68(%rbp), %rsi
callq 0x1500
movq -0xf8(%rbp), %rdi
movl $0x1, -0x6c(%rbp)
leaq -0x6c(%rbp), %rsi
callq 0x1500
movq -0xf8(%rbp), %rdi
movl $0x3, -0x70(%rbp)
leaq -0x70(%rbp), %rsi
callq 0x1500
movq -0xf8(%rbp), %rdi
movl $0x61, -0x74(%rbp)
leaq -0x74(%rbp), %rsi
callq 0x1500
movq -0xf8(%rbp), %rdi
movq 0x3418(%rip), %rsi      # 0x4fd8
callq 0x1740
jmp 0x1bc7
movl $0x5, -0x78(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1270
jmp 0x1bdd
movl $0x5, -0x7c(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
callq 0x1270
jmp 0x1bf3
movq 0x33de(%rip), %rsi      # 0x4fd8
leaq -0x10(%rbp), %rdi
callq 0x1740
jmp 0x1c05
movl $0x0, -0x4(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x1250
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x1250
movq -0x20(%rbp), %rdi
callq 0x10d0
nop