// File: attractivechaos[P]udb2/libcuckoo/./cuckoohash_map.hh
// Function: cuckoohash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 4ul>::b_slot cuckoohash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 4ul>::slot_search<std::integral_constant<bool, false>>(unsigned long, unsigned long, unsigned long)
b_slot slot_search(const size_type hp, const size_type i1,
                     const size_type i2) {
    b_queue q;
    // The initial pathcode informs cuckoopath_search which bucket the path
    // starts on
    q.enqueue(b_slot(i1, 0, 0));
    q.enqueue(b_slot(i2, 1, 0));
    while (!q.empty()) {
      b_slot x = q.dequeue();
      auto lock_manager = lock_one(hp, x.bucket, TABLE_MODE());
      bucket &b = buckets_[x.bucket];
      // Picks a (sort-of) random slot to start from
      size_type starting_slot = x.pathcode % slot_per_bucket();
      for (size_type i = 0; i < slot_per_bucket(); ++i) {
        size_type slot = (starting_slot + i) % slot_per_bucket();
        if (!b.occupied(slot)) {
          // We can terminate the search here
          x.pathcode = x.pathcode * slot_per_bucket() + slot;
          return x;
        }

        // If x has less than the maximum number of path components,
        // create a new b_slot item, that represents the bucket we would
        // have come from if we kicked out the item at this slot.
        const partial_t partial = b.partial(slot);
        if (x.depth < MAX_BFS_PATH_LEN - 1) {
          assert(!q.full());
          b_slot y(alt_index(hp, partial, x.bucket),
                   x.pathcode * slot_per_bucket() + slot, x.depth + 1);
          q.enqueue(y);
        }
      }
    }
    // We didn't find a short-enough cuckoo path, so the search terminated.
    // Return a failure value.
    return b_slot(0, 0, -1);
  }

// Assembly:
subq $0x2bc8, %rsp           # imm = 0x2BC8
movq %rdi, 0x2bb0(%rsp)
movq %rsi, 0x2ba8(%rsp)
movq %rdx, 0x2ba0(%rsp)
movq %rcx, 0x2b98(%rsp)
movq 0x2bb0(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x75e0
movq 0x2ba0(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x76f0
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
leaq 0xe8(%rsp), %rdi
callq 0x7660
movq 0x2b98(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x76f0
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
leaq 0xe8(%rsp), %rdi
callq 0x7660
leaq 0xe8(%rsp), %rdi
callq 0x7760
xorb $-0x1, %al
testb $0x1, %al
jne 0x71ea
jmp 0x74a1
leaq 0xe8(%rsp), %rdi
callq 0x7780
movq 0x48(%rsp), %rsi
movq %rdx, 0xc0(%rsp)
movq %rax, 0xb8(%rsp)
movl 0xbf(%rsp), %eax
movl %eax, 0x2bbf(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x2bb8(%rsp)
movq 0x2ba8(%rsp), %rdx
movq 0x2bb8(%rsp), %rcx
leaq 0xb0(%rsp), %rdi
callq 0x74e0
movq 0x48(%rsp), %rdi
addq $0x8, %rdi
movq 0x2bb8(%rsp), %rsi
callq 0x4db0
movq %rax, 0x40(%rsp)
jmp 0x7264
movq 0x40(%rsp), %rax
movq %rax, 0xa0(%rsp)
movzwl 0x2bc0(%rsp), %eax
movq %rax, 0x38(%rsp)
callq 0x3ce0
movq %rax, %rcx
movq 0x38(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, 0x88(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
callq 0x3ce0
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x747b
movq 0x88(%rsp), %rax
addq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x3ce0
movq %rax, %rcx
movq 0x28(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, 0x78(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x3590
testb $0x1, (%rax)
jne 0x7368
movzwl 0x2bc0(%rsp), %eax
movq %rax, 0x20(%rsp)
callq 0x3ce0
movq %rax, %rcx
movq 0x20(%rsp), %rax
imulq %rcx, %rax
addq 0x78(%rsp), %rax
movw %ax, 0x2bc0(%rsp)
movl $0x1, 0x74(%rsp)
jmp 0x7483
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x7580
jmp 0x74d2
movq 0xa0(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x7840
movq %rax, 0x18(%rsp)
jmp 0x7381
movq 0x18(%rsp), %rax
movb (%rax), %al
movb %al, 0x73(%rsp)
movsbl 0x2bc2(%rsp), %eax
cmpl $0x4, %eax
jge 0x7460
leaq 0xe8(%rsp), %rdi
callq 0x7870
movb %al, 0x17(%rsp)
jmp 0x73b0
movb 0x17(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x73bc
jmp 0x73be
jmp 0x73dd
leaq 0x784d(%rip), %rdi      # 0xec12
leaq 0x6ee2(%rip), %rsi      # 0xe2ae
movl $0x605, %edx            # imm = 0x605
leaq 0x7844(%rip), %rcx      # 0xec1c
callq 0x2110
movq 0x2ba8(%rsp), %rdi
movzbl 0x73(%rsp), %esi
movq 0x2bb8(%rsp), %rdx
callq 0x4f80
movq %rax, 0x8(%rsp)
movzwl 0x2bc0(%rsp), %eax
movq %rax, (%rsp)
callq 0x3ce0
movq (%rsp), %rdx
movq 0x8(%rsp), %rsi
imulq %rax, %rdx
movq 0x78(%rsp), %rax
addq %rax, %rdx
movzbl 0x2bc2(%rsp), %eax
incl %eax
movsbl %al, %ecx
leaq 0x60(%rsp), %rdi
callq 0x76f0
jmp 0x743b
movups 0x60(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0xe8(%rsp), %rdi
callq 0x7660
jmp 0x745e
jmp 0x7460
jmp 0x7462
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
jmp 0x72a4
movl $0x0, 0x74(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x7580
movl 0x74(%rsp), %eax
testl %eax, %eax
je 0x749c
jmp 0x749a
jmp 0x74ba
jmp 0x71d2
leaq 0x2bb8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rdx, %rsi
callq 0x76f0
movq 0x2bb8(%rsp), %rax
movq 0x2bc0(%rsp), %rdx
addq $0x2bc8, %rsp           # imm = 0x2BC8
retq
movq 0x98(%rsp), %rdi
callq 0x2240
nop