// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/bitops.c
// Function: redisPopcount
size_t redisPopcount(void *s, long count) {
    size_t bits = 0;
    unsigned char *p = s;
    uint32_t *p4;
    static const unsigned char bitsinbyte[256] = {0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8};

    /* Count initial bytes not aligned to 32 bit. */
    while((unsigned long)p & 3 && count) {
        bits += bitsinbyte[*p++];
        count--;
    }

    /* Count bits 28 bytes at a time */
    p4 = (uint32_t*)p;
    while(count>=28) {
        uint32_t aux1, aux2, aux3, aux4, aux5, aux6, aux7;

        aux1 = *p4++;
        aux2 = *p4++;
        aux3 = *p4++;
        aux4 = *p4++;
        aux5 = *p4++;
        aux6 = *p4++;
        aux7 = *p4++;
        count -= 28;

        aux1 = aux1 - ((aux1 >> 1) & 0x55555555);
        aux1 = (aux1 & 0x33333333) + ((aux1 >> 2) & 0x33333333);
        aux2 = aux2 - ((aux2 >> 1) & 0x55555555);
        aux2 = (aux2 & 0x33333333) + ((aux2 >> 2) & 0x33333333);
        aux3 = aux3 - ((aux3 >> 1) & 0x55555555);
        aux3 = (aux3 & 0x33333333) + ((aux3 >> 2) & 0x33333333);
        aux4 = aux4 - ((aux4 >> 1) & 0x55555555);
        aux4 = (aux4 & 0x33333333) + ((aux4 >> 2) & 0x33333333);
        aux5 = aux5 - ((aux5 >> 1) & 0x55555555);
        aux5 = (aux5 & 0x33333333) + ((aux5 >> 2) & 0x33333333);
        aux6 = aux6 - ((aux6 >> 1) & 0x55555555);
        aux6 = (aux6 & 0x33333333) + ((aux6 >> 2) & 0x33333333);
        aux7 = aux7 - ((aux7 >> 1) & 0x55555555);
        aux7 = (aux7 & 0x33333333) + ((aux7 >> 2) & 0x33333333);
        bits += ((((aux1 + (aux1 >> 4)) & 0x0F0F0F0F) +
                    ((aux2 + (aux2 >> 4)) & 0x0F0F0F0F) +
                    ((aux3 + (aux3 >> 4)) & 0x0F0F0F0F) +
                    ((aux4 + (aux4 >> 4)) & 0x0F0F0F0F) +
                    ((aux5 + (aux5 >> 4)) & 0x0F0F0F0F) +
                    ((aux6 + (aux6 >> 4)) & 0x0F0F0F0F) +
                    ((aux7 + (aux7 >> 4)) & 0x0F0F0F0F))* 0x01010101) >> 24;
    }
    /* Count the remaining bytes. */
    p = (unsigned char*)p4;
    while(count--) bits += bitsinbyte[*p++];
    return bits;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
andq $0x3, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x45(%rbp)
je 0x901da
cmpq $0x0, -0x10(%rbp)
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x901e3
jmp 0x90218
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xb5ac2(%rip), %rax     # 0x145cc0
movzbl (%rax,%rcx), %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x901bc
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x1c, -0x10(%rbp)
jl 0x90491
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
subq $0x1c, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %eax
movl -0x2c(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x2c(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
movl -0x30(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x30(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x34(%rbp), %eax
movl -0x34(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x34(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
movl -0x38(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x38(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
movl -0x3c(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x3c(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
movl -0x40(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x40(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x44(%rbp), %eax
movl -0x44(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x44(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x44(%rbp)
movl -0x2c(%rbp), %eax
movl -0x2c(%rbp), %ecx
shrl $0x4, %ecx
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
movl -0x30(%rbp), %ecx
movl -0x30(%rbp), %edx
shrl $0x4, %edx
addl %edx, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
addl %ecx, %eax
movl -0x34(%rbp), %ecx
movl -0x34(%rbp), %edx
shrl $0x4, %edx
addl %edx, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
addl %ecx, %eax
movl -0x38(%rbp), %ecx
movl -0x38(%rbp), %edx
shrl $0x4, %edx
addl %edx, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
addl %ecx, %eax
movl -0x3c(%rbp), %ecx
movl -0x3c(%rbp), %edx
shrl $0x4, %edx
addl %edx, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
addl %ecx, %eax
movl -0x40(%rbp), %ecx
movl -0x40(%rbp), %edx
shrl $0x4, %edx
addl %edx, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
addl %ecx, %eax
movl -0x44(%rbp), %ecx
movl -0x44(%rbp), %edx
shrl $0x4, %edx
addl %edx, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
addl %ecx, %eax
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
movl %eax, %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x90220
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0x904d7
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xb57f7(%rip), %rax     # 0x145cc0
movzbl (%rax,%rcx), %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x90499
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)