// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2af8, %rsp           # imm = 0x2AF8
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0x48(%rsp), %r12
movups %xmm0, 0x2aa0(%r12)
movq %r12, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x3db0
pushq $0x1
popq %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3db0
pushq $-0x1
popq %rax
movl %r14d, %ecx
shlq %cl, %rax
notq %rax
movq %rax, 0x30(%rsp)
leaq 0x8(%rsp), %rbp
movq %r14, 0x20(%rsp)
movq %r15, 0x18(%rsp)
movq 0x2ae8(%rsp), %rax
cmpq 0x2af0(%rsp), %rax
je 0x3d21
leaq 0x48(%rsp), %rdi
callq 0x3e30
movq %rax, %r12
movq %rdx, %rbx
movl %ebx, %r13d
shrl $0x10, %r13d
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x3d66
movq %r12, 0x10(%rsp)
imulq $0x28, %r12, %rbp
addq 0x18(%r15), %rbp
movq %rbx, %r15
shlq $0x2, %r15
movq %r15, 0x28(%rsp)
andl $0x3fffc, %r15d         # imm = 0x3FFFC
leal 0x1(%r13), %eax
movsbl %al, %r14d
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x3cc2
leal (%rbx,%r12), %edx
andl $0x3, %edx
cmpb $0x1, 0x24(%rbp,%rdx)
jne 0x3ce3
cmpb $0x3, %r13b
jg 0x3cbd
cmpq $0x2aa, 0x2af0(%rsp) # imm = 0x2AA
je 0x3d31
movzbl 0x20(%rbp,%rdx), %esi
movabsq $0x46a4a7935bd1e995, %rax # imm = 0x46A4A7935BD1E995
imulq %rax, %rsi
addq %rax, %rsi
xorq 0x10(%rsp), %rsi
andq 0x30(%rsp), %rsi
orq %r15, %rdx
leaq 0x38(%rsp), %rdi
movl %r14d, %ecx
callq 0x3e00
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x3db0
incq %r12
jmp 0x3c49
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3ccf
movb $0x0, (%rax)
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %r15
leaq 0x8(%rsp), %rbp
jmp 0x3be0
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3cf0
movb $0x0, (%rax)
andl $0xff0000, %ebx         # imm = 0xFF0000
movq 0x28(%rsp), %rcx
andl $0xfffc, %ecx           # imm = 0xFFFC
orq %rbx, %rcx
orq %rdx, %rcx
movq 0x10(%rsp), %rax
movq %rcx, %rdx
addq $0x2af8, %rsp           # imm = 0x2AF8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xff0000, %ecx         # imm = 0xFF0000
movq $0x0, 0x10(%rsp)
jmp 0x3d07
leaq 0x1eba(%rip), %rdi      # 0x5bf2
leaq 0x154f(%rip), %rsi      # 0x528e
leaq 0x1eb6(%rip), %rcx      # 0x5bfc
movl $0x605, %edx            # imm = 0x605
callq 0x20f0
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
je 0x3d5d
movb $0x0, (%rcx)
movq %rax, %rdi
callq 0x2210
nop