// File: gtonkinhill[P]pairsnp-cpp/libs/boost/dynamic_bitset/detail/dynamic_bitset.hpp
// Function: unsigned long boost::detail::dynamic_bitset_impl::do_count<__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long>(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long, boost::detail::dynamic_bitset_impl::value_to_type<false>*)
inline std::size_t do_count(Iterator first, std::size_t length, ValueType,
                                value_to_type<access_by_blocks>*)
    {
        std::size_t num1 = 0u, num2 = 0u;
        while (length >= 2u) {
            num1 += popcount<ValueType>(*first);
            ++first;
            num2 += popcount<ValueType>(*first);
            ++first;
            length -= 2u;
        }

        if (length > 0u)
            num1 += popcount<ValueType>(*first);

        return num1 + num2;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x2, -0x28(%rbp)
jb 0x9154
leaq -0x20(%rbp), %rdi
callq 0x75a0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, %rax
shrq %rax
movabsq $0x5555555555555555, %rdx # imm = 0x5555555555555555
andq %rdx, %rax
subq %rax, %rcx
movabsq $0x3333333333333333, %rdx # imm = 0x3333333333333333
movq %rcx, %rax
andq %rdx, %rax
shrq $0x2, %rcx
andq %rdx, %rcx
addq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rcx, %rax
movabsq $0xf0f0f0f0f0f0f0f, %rcx # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rcx, %rax
shrq $0x38, %rax
movl %eax, %eax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x91e0
leaq -0x20(%rbp), %rdi
callq 0x75a0
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
shrq %rax
movabsq $0x5555555555555555, %rdx # imm = 0x5555555555555555
andq %rdx, %rax
subq %rax, %rcx
movabsq $0x3333333333333333, %rdx # imm = 0x3333333333333333
movq %rcx, %rax
andq %rdx, %rax
shrq $0x2, %rcx
andq %rdx, %rcx
addq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rcx, %rax
movabsq $0xf0f0f0f0f0f0f0f, %rcx # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rcx, %rax
shrq $0x38, %rax
movl %eax, %eax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x91e0
movq -0x28(%rbp), %rax
subq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x9038
cmpq $0x0, -0x28(%rbp)
jbe 0x91d2
leaq -0x20(%rbp), %rdi
callq 0x75a0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, %rax
shrq %rax
movabsq $0x5555555555555555, %rdx # imm = 0x5555555555555555
andq %rdx, %rax
subq %rax, %rcx
movabsq $0x3333333333333333, %rdx # imm = 0x3333333333333333
movq %rcx, %rax
andq %rdx, %rax
shrq $0x2, %rcx
andq %rdx, %rcx
addq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rcx, %rax
movabsq $0xf0f0f0f0f0f0f0f, %rcx # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rcx, %rax
shrq $0x38, %rax
movl %eax, %eax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq