// File: /workspace/github_cpp_makefile_star2_O2/QiumingLu[P]conhash/sample.cc
// Function: main
int main() {
  ConHash conhash;
  Node n1("spanner", 12);
  Node n2("bigtable", 16);
  Node n3("mapreduce", 14);
  Node n4("chubby", 15);
  Node n5("gfs", 10);
  conhash.AddNode(n1);
  conhash.AddNode(n2);
  conhash.AddNode(n3);
  conhash.AddNode(n4);
  conhash.AddNode(n5);
  for (int i = 0; i < 20; ++i) {
    char buf[32];
    snprintf(buf, sizeof(buf), "megastore#%d", i);
    Node node;
    if (conhash.Lookup(buf, &node)) {
      std::cout << node.identify << std::endl;
    } else {
      std::cout << "No server" << std::endl;
    }
  }
  std::cout << "\n";
  conhash.RemoveNode(n3);
  for (int i = 0; i < 20; ++i) {
    char buf[32];
    snprintf(buf, sizeof(buf), "megastore#%d", i);
    Node node;
    if (conhash.Lookup(buf, &node)) {
      std::cout << node.identify << std::endl;
    } else {
      std::cout << "No server" << std::endl;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
leaq 0xb0(%rsp), %rdi
callq 0x28ec
leaq 0x1cc3(%rip), %rsi      # 0x4004
leaq 0xe0(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x27ac
leaq 0x128(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x2180
movl $0xc, 0x148(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x2080
leaq 0x1c85(%rip), %rsi      # 0x400c
leaq 0x38(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x27ac
leaq 0xe0(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2180
movl $0x10, 0x100(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x2080
leaq 0x1c4e(%rip), %rsi      # 0x4015
leaq 0x88(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x27ac
leaq 0x38(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x2180
movl $0xe, 0x58(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x2080
leaq 0x1c18(%rip), %rsi      # 0x401f
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x27ac
leaq 0x88(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2180
movl $0xf, 0xa8(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x2080
leaq 0x1be2(%rip), %rsi      # 0x4026
leaq 0x10(%rsp), %rdi
leaq 0x150(%rsp), %rdx
callq 0x27ac
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2180
movl $0xa, 0x80(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2080
leaq 0xb0(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x2908
leaq 0xb0(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x2908
leaq 0xb0(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2908
leaq 0xb0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x2908
leaq 0xb0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2908
leaq 0x150(%rsp), %r14
leaq 0x108(%rsp), %r12
leaq 0x10(%rsp), %rbx
movq 0x3adf(%rip), %r15      # 0x5fd8
xorl %r13d, %r13d
cmpl $0x14, %r13d
je 0x259d
movq %r14, %rdi
pushq $0x20
popq %rsi
leaq 0x1b17(%rip), %rdx      # 0x402a
movl %r13d, %ecx
xorl %eax, %eax
callq 0x21b0
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
andl $0x0, 0x30(%rsp)
movq %r12, %rdi
movq %r14, %rsi
leaq 0xf(%rsp), %rdx
callq 0x27ac
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2a48
movl %eax, %ebp
movq %r12, %rdi
callq 0x2080
testb %bpl, %bpl
je 0x2576
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2110
jmp 0x2585
movq %r15, %rdi
leaq 0x1ab7(%rip), %rsi      # 0x4037
callq 0x2120
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2080
incl %r13d
jmp 0x24fc
movq 0x3a34(%rip), %rdi      # 0x5fd8
leaq 0x1a96(%rip), %rsi      # 0x4041
callq 0x2120
leaq 0xb0(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2a06
leaq 0x150(%rsp), %r14
leaq 0x108(%rsp), %r12
leaq 0x10(%rsp), %rbx
movq 0x39fa(%rip), %r15      # 0x5fd8
xorl %r13d, %r13d
cmpl $0x14, %r13d
je 0x2682
movq %r14, %rdi
pushq $0x20
popq %rsi
leaq 0x1a32(%rip), %rdx      # 0x402a
movl %r13d, %ecx
xorl %eax, %eax
callq 0x21b0
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
andl $0x0, 0x30(%rsp)
movq %r12, %rdi
movq %r14, %rsi
leaq 0xf(%rsp), %rdx
callq 0x27ac
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2a48
movl %eax, %ebp
movq %r12, %rdi
callq 0x2080
testb %bpl, %bpl
je 0x265b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2110
jmp 0x266a
movq %r15, %rdi
leaq 0x19d2(%rip), %rsi      # 0x4037
callq 0x2120
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2080
incl %r13d
jmp 0x25e1
leaq 0x60(%rsp), %rdi
callq 0x2080
leaq 0x88(%rsp), %rdi
callq 0x2080
leaq 0x38(%rsp), %rdi
callq 0x2080
leaq 0xe0(%rsp), %rdi
callq 0x2080
leaq 0x128(%rsp), %rdi
callq 0x2080
leaq 0xb0(%rsp), %rdi
callq 0x27f2
xorl %eax, %eax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x2760
movq %rax, %rbx
jmp 0x2765
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x276d
movq %rax, %rbx
jmp 0x2772
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x2777
movq %rax, %rbx
jmp 0x277c
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x2784
movq %rax, %rbx
jmp 0x2789
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x2791
movq %rax, %rbx
jmp 0x2796
movq %rax, %rbx
jmp 0x275b
jmp 0x274e
jmp 0x273a
jmp 0x274e
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x2080
jmp 0x2751
jmp 0x274e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2080
leaq 0x60(%rsp), %rdi
callq 0x2080
leaq 0x88(%rsp), %rdi
callq 0x2080
leaq 0x38(%rsp), %rdi
callq 0x2080
leaq 0xe0(%rsp), %rdi
callq 0x2080
leaq 0x128(%rsp), %rdi
callq 0x2080
leaq 0xb0(%rsp), %rdi
callq 0x27f2
movq %rbx, %rdi
callq 0x21d0
nop