user: 请从给定的汇编指令推导出C源代码:

```asm
<sse2_popcount3>:
  endbr64
  mov    %rdi,%r8
  lea    D0(%rip),%rax
  movdqu (%eax),%xmm5
  lea    D2(%rip),%rax
  movdqu (%eax),%xmm6
  lea    D15(%rip),%rax
  movdqu (%eax),%xmm7
  pxor   %xmm4,%xmm4
  test   %esi,%esi
  jle    L36
  mov    $0x0,%edi
  mov    $0x1c,%r10d
  lea    0x100(%r8),%r9
  jmp    L25
L45:
  mov    %esi,%eax
  mov    $0x0,%esi
L12:
  pxor   %xmm3,%xmm3
  test   %eax,%eax
  jle    L63
  movslq %edi,%rcx
  lea    (%r8,%rcx,4),%rdx
  lea    -0x1(%rax),%r11d
  shr    $0x2,%r11d
  mov    %r11d,%eax
  shl    $0x6,%rax
  add    %rcx,%rax
  lea    (%r9,%rax,4),%rcx
L8:
  mov    %rdx,%rax
  movdqa (%eax),%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x1,%xmm1
  pand   %xmm5,%xmm0
  pand   %xmm5,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x2,%xmm1
  pand   %xmm6,%xmm0
  pand   %xmm6,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x4,%xmm1
  pand   %xmm7,%xmm0
  pand   %xmm7,%xmm1
  paddb  %xmm1,%xmm0
  paddb  %xmm0,%xmm3
  lea    0x40(%rdx),%rax
  movdqa (%eax),%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x1,%xmm1
  pand   %xmm5,%xmm0
  pand   %xmm5,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x2,%xmm1
  pand   %xmm6,%xmm0
  pand   %xmm6,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x4,%xmm1
  pand   %xmm7,%xmm0
  pand   %xmm7,%xmm1
  paddb  %xmm1,%xmm0
  paddb  %xmm0,%xmm3
  lea    0x80(%rdx),%rax
  movdqa (%eax),%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x1,%xmm1
  pand   %xmm5,%xmm0
  pand   %xmm5,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x2,%xmm1
  pand   %xmm6,%xmm0
  pand   %xmm6,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x4,%xmm1
  pand   %xmm7,%xmm0
  pand   %xmm7,%xmm1
  paddb  %xmm1,%xmm0
  paddb  %xmm0,%xmm3
  lea    0xc0(%rdx),%rax
  movdqa (%eax),%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x1,%xmm1
  pand   %xmm5,%xmm0
  pand   %xmm5,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x2,%xmm1
  pand   %xmm6,%xmm0
  pand   %xmm6,%xmm1
  paddb  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrlw  $0x4,%xmm1
  pand   %xmm7,%xmm0
  pand   %xmm7,%xmm1
  paddb  %xmm1,%xmm0
  paddb  %xmm0,%xmm3
  add    $0x100,%rdx
  cmp    %rcx,%rdx
  jne    L8
  shl    $0x6,%r11d
  lea    0x40(%rdi,%r11,1),%edi
L63:
  pxor   %xmm0,%xmm0
  psadbw %xmm0,%xmm3
  paddd  %xmm3,%xmm4
  test   %esi,%esi
  jle    L36
L25:
  cmp    $0x1c,%esi
  jle    L45
  sub    $0x1c,%esi
  mov    %r10d,%eax
  jmp    L12
L36:
  movhlps %xmm4,%xmm0
  paddd  %xmm4,%xmm0
  movd   %xmm0,%eax
  ret
```

assistant: ```c
uint32_t sse2_popcount3(uint8_t *buffer, int chunks16) {
  static uint8_t mask33[16] = {0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33};
  static uint8_t mask55[16] = {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55};
  static uint8_t mask0f[16] = {0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f};
  uint32_t result = 0;
  int i, n, k;
  __asm__ volatile("movdqu (%%eax), %%xmm5" : : "a"(mask55));
  __asm__ volatile("movdqu (%%eax), %%xmm6" : : "a"(mask33));
  __asm__ volatile("movdqu (%%eax), %%xmm7" : : "a"(mask0f));
  __asm__ volatile("pxor %xmm4, %xmm4");
  i = 0;
  while (chunks16 > 0) {
    if (chunks16 > (7 * 4)) {
      k = (7 * 4);
      chunks16 -= (7 * 4);
    } else {
      k = chunks16;
      chunks16 = 0;
    }
    __asm__ volatile("pxor %xmm3, %xmm3");
    for (n = 0; n < k; n += 4) {
      __asm__ volatile("movdqa	  (%%eax), %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $1, %%xmm1	\n"
                       "pand      %%xmm5, %%xmm0	\n"
                       "pand      %%xmm5, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $2, %%xmm1	\n"
                       "pand      %%xmm6, %%xmm0	\n"
                       "pand      %%xmm6, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $4, %%xmm1	\n"
                       "pand      %%xmm7, %%xmm0	\n"
                       "pand      %%xmm7, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "paddb     %%xmm0, %%xmm3	\n"
                       :
                       : "a"(&buffer[i + 0 * 16]));
      ;
      __asm__ volatile("movdqa	  (%%eax), %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $1, %%xmm1	\n"
                       "pand      %%xmm5, %%xmm0	\n"
                       "pand      %%xmm5, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $2, %%xmm1	\n"
                       "pand      %%xmm6, %%xmm0	\n"
                       "pand      %%xmm6, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $4, %%xmm1	\n"
                       "pand      %%xmm7, %%xmm0	\n"
                       "pand      %%xmm7, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "paddb     %%xmm0, %%xmm3	\n"
                       :
                       : "a"(&buffer[i + 1 * 16]));
      ;
      __asm__ volatile("movdqa	  (%%eax), %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $1, %%xmm1	\n"
                       "pand      %%xmm5, %%xmm0	\n"
                       "pand      %%xmm5, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $2, %%xmm1	\n"
                       "pand      %%xmm6, %%xmm0	\n"
                       "pand      %%xmm6, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $4, %%xmm1	\n"
                       "pand      %%xmm7, %%xmm0	\n"
                       "pand      %%xmm7, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "paddb     %%xmm0, %%xmm3	\n"
                       :
                       : "a"(&buffer[i + 2 * 16]));
      ;
      __asm__ volatile("movdqa	  (%%eax), %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $1, %%xmm1	\n"
                       "pand      %%xmm5, %%xmm0	\n"
                       "pand      %%xmm5, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $2, %%xmm1	\n"
                       "pand      %%xmm6, %%xmm0	\n"
                       "pand      %%xmm6, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "movdqa    %%xmm0, %%xmm1	\n"
                       "psrlw         $4, %%xmm1	\n"
                       "pand      %%xmm7, %%xmm0	\n"
                       "pand      %%xmm7, %%xmm1	\n"
                       "paddb     %%xmm1, %%xmm0	\n"
                       "paddb     %%xmm0, %%xmm3	\n"
                       :
                       : "a"(&buffer[i + 3 * 16]));
      ;
      i += 4 * 16;
    }
    __asm__ volatile("pxor	%xmm0, %xmm0		\n"
                     "psadbw	%xmm0, %xmm3		\n"
                     "paddd	%xmm3, %xmm4		\n");
  }
  __asm__ volatile("movhlps   %%xmm4, %%xmm0	\n"
                   "paddd     %%xmm4, %%xmm0	\n"
                   "movd      %%xmm0, %%eax	\n"
                   : "=a"(result));
  return result;
}
```