user: 下面的汇编指令对应的C源代码是什么:

```asm
<gen_branch_metrics_n4>:
  endbr64
  mov    %rcx,%r8
  mov    %edi,%ecx
  mov    %edi,%eax
  shr    $0x1f,%ecx
  add    %edi,%ecx
  sar    %ecx
  cmp    $0x1,%edi
  jle    L60
  mov    %rsi,%rdi
  mov    %rdx,%rsi
  mov    %ecx,%edx
  lea    (%r8,%rdx,4),%r10
  shl    $0x4,%rdx
  add    %rsi,%rdx
  cmp    %rdx,%r8
  setae  %r9b
  cmp    %r10,%rsi
  setae  %dl
  or     %edx,%r9d
  lea    0x10(%rdi),%rdx
  cmp    %rdx,%r8
  setae  %dl
  cmp    %r10,%rdi
  setae  %r10b
  or     %r10d,%edx
  test   %dl,%r9b
  je     L45
  cmp    $0x7,%eax
  jle    L45
  movd   (%rdi),%xmm2
  movd   0x4(%rdi),%xmm3
  mov    %ecx,%r9d
  mov    %rsi,%rax
  movd   0xc(%rdi),%xmm6
  shr    $0x2,%r9d
  mov    %r8,%rdx
  pshufd $0x0,%xmm2,%xmm5
  movd   0x8(%rdi),%xmm2
  pshufd $0x0,%xmm3,%xmm4
  sub    $0x1,%r9d
  shl    $0x6,%r9
  movdqa %xmm5,%xmm9
  movdqa %xmm4,%xmm8
  pshufd $0x0,%xmm2,%xmm3
  pshufd $0x0,%xmm6,%xmm2
  lea    0x40(%rsi,%r9,1),%r9
  movdqa %xmm3,%xmm7
  psrlq  $0x20,%xmm9
  movdqa %xmm2,%xmm6
  psrlq  $0x20,%xmm8
  psrlq  $0x20,%xmm7
  psrlq  $0x20,%xmm6
  nopl   (%rax)
L59:
  movdqu (%rax),%xmm0
  movdqu 0x10(%rax),%xmm14
  add    $0x40,%rax
  add    $0x10,%rdx
  movdqu -0x20(%rax),%xmm10
  movdqu -0x10(%rax),%xmm15
  movdqa %xmm0,%xmm1
  shufps $0xdd,%xmm14,%xmm0
  shufps $0x88,%xmm14,%xmm1
  movdqa %xmm10,%xmm12
  movdqa %xmm1,%xmm13
  shufps $0xdd,%xmm15,%xmm10
  shufps $0x88,%xmm15,%xmm12
  shufps $0x88,%xmm12,%xmm13
  movdqa %xmm13,%xmm11
  psrlq  $0x20,%xmm13
  pmuludq %xmm5,%xmm11
  pmuludq %xmm9,%xmm13
  shufps $0xdd,%xmm12,%xmm1
  movdqa %xmm1,%xmm12
  psrlq  $0x20,%xmm1
  pmuludq %xmm3,%xmm12
  pmuludq %xmm7,%xmm1
  pshufd $0x8,%xmm11,%xmm11
  pshufd $0x8,%xmm13,%xmm13
  movdqa %xmm11,%xmm14
  movdqa %xmm0,%xmm11
  shufps $0xdd,%xmm10,%xmm0
  pshufd $0x8,%xmm12,%xmm12
  shufps $0x88,%xmm10,%xmm11
  movdqa %xmm11,%xmm15
  psrlq  $0x20,%xmm11
  punpckldq %xmm13,%xmm14
  movdqa %xmm11,%xmm13
  pmuludq %xmm4,%xmm15
  movdqa %xmm0,%xmm10
  pmuludq %xmm8,%xmm13
  psrlq  $0x20,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  pmuludq %xmm2,%xmm10
  pmuludq %xmm6,%xmm0
  punpckldq %xmm1,%xmm12
  pshufd $0x8,%xmm15,%xmm15
  pshufd $0x8,%xmm13,%xmm11
  punpckldq %xmm11,%xmm15
  pshufd $0x8,%xmm10,%xmm10
  pshufd $0x8,%xmm0,%xmm0
  paddd  %xmm15,%xmm14
  punpckldq %xmm0,%xmm10
  movdqa %xmm14,%xmm1
  paddd  %xmm12,%xmm1
  paddd  %xmm10,%xmm1
  movups %xmm1,-0x10(%rdx)
  cmp    %r9,%rax
  jne    L59
  mov    %ecx,%r9d
  and    $0xfffffffc,%r9d
  test   $0x3,%cl
  je     L60
  lea    0x0(,%r9,4),%edx
  push   %rbp
  movslq %edx,%r11
  push   %rbx
  lea    0x1(%r11),%rbx
  mov    (%rsi,%r11,4),%eax
  lea    0x0(,%r11,4),%r10
  imul   (%rdi),%eax
  lea    0x0(,%rbx,4),%rbp
  mov    (%rsi,%rbx,4),%ebx
  imul   0x4(%rdi),%ebx
  add    %ebx,%eax
  mov    0x4(%rsi,%rbp,1),%ebx
  imul   0x8(%rdi),%ebx
  add    %ebx,%eax
  mov    0x8(%rsi,%rbp,1),%ebx
  imul   0xc(%rdi),%ebx
  add    %ebx,%eax
  mov    %eax,(%r8,%r11,1)
  lea    0x1(%r9),%eax
  cmp    %eax,%ecx
  jle    L13
  lea    0x4(%rdx),%r11d
  mov    0x10(%rsi,%r10,1),%eax
  add    $0x2,%r9d
  movslq %r11d,%r11
  imul   (%rdi),%eax
  lea    0x1(%r11),%rbx
  lea    0x0(,%rbx,4),%rbp
  mov    (%rsi,%rbx,4),%ebx
  imul   0x4(%rdi),%ebx
  add    %ebx,%eax
  mov    0x4(%rsi,%rbp,1),%ebx
  imul   0x8(%rdi),%ebx
  add    %ebx,%eax
  mov    0x8(%rsi,%rbp,1),%ebx
  imul   0xc(%rdi),%ebx
  add    %ebx,%eax
  mov    %eax,(%r8,%r11,1)
  cmp    %r9d,%ecx
  jle    L13
  add    $0x8,%edx
  mov    0x20(%rsi,%r10,1),%eax
  imul   (%rdi),%eax
  movslq %edx,%rdx
  lea    0x1(%rdx),%rcx
  lea    0x0(,%rcx,4),%r9
  mov    (%rsi,%rcx,4),%ecx
  imul   0x4(%rdi),%ecx
  add    %ecx,%eax
  mov    0x4(%rsi,%r9,1),%ecx
  imul   0x8(%rdi),%ecx
  add    %ecx,%eax
  mov    0x8(%rsi,%r9,1),%ecx
  imul   0xc(%rdi),%ecx
  add    %ecx,%eax
  mov    %eax,(%r8,%rdx,1)
L13:
  pop    %rbx
  pop    %rbp
  ret
L60:
  ret
  nopl   0x0(%rax)
L45:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L73:
  mov    0x4(%rsi),%eax
  mov    (%rsi),%r9d
  add    $0x10,%rsi
  imul   (%rdi),%r9d
  imul   0x4(%rdi),%eax
  add    %r9d,%eax
  mov    -0x8(%rsi),%r9d
  imul   0x8(%rdi),%r9d
  add    %r9d,%eax
  mov    0xc(%rdi),%r9d
  imul   -0x4(%rsi),%r9d
  add    %r9d,%eax
  mov    %eax,(%r8,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%ecx
  jg     L73
  ret
```

assistant: ```c
void gen_branch_metrics_n4(int num_states, const int8_t *seq, const int16_t *out, int16_t *metrics) {
  int i;
  for (i = 0; i < num_states / 2; i++) {
    metrics[i] = seq[0] * out[4 * i + 0] + seq[1] * out[4 * i + 1] + seq[2] * out[4 * i + 2] + seq[3] * out[4 * i + 3];
  }
}
```