user: Converte this assembly snippet into its equivalent C code:

```asm
<nextstep>:
  endbr64
  mov    %rsi,%rcx
  lea    0x20(%rdx),%rsi
  mov    %rdi,%rax
  cmp    %rsi,%rdi
  lea    0x80(%rdi),%rdi
  setae  %sil
  cmp    %rdi,%rdx
  setae  %dil
  or     %dil,%sil
  je     L8
  lea    0x1f(%rdx),%rsi
  sub    %rcx,%rsi
  cmp    $0x3e,%rsi
  jbe    L8
  movupd (%rax),%xmm1
  movupd 0x20(%rax),%xmm10
  pxor   %xmm0,%xmm0
  movsd  (%rcx),%xmm7
  movupd 0x10(%rax),%xmm3
  movapd %xmm0,%xmm2
  movhpd 0x10(%rax),%xmm1
  movhpd 0x30(%rax),%xmm10
  movlpd 0x8(%rax),%xmm3
  movsd  0x8(%rcx),%xmm6
  movapd %xmm1,%xmm9
  unpcklpd %xmm7,%xmm7
  movupd 0x30(%rax),%xmm8
  movlpd 0x28(%rax),%xmm8
  unpcklpd %xmm10,%xmm9
  unpcklpd %xmm6,%xmm6
  movsd  0x10(%rcx),%xmm5
  unpckhpd %xmm10,%xmm1
  mulpd  %xmm7,%xmm9
  movsd  0x18(%rcx),%xmm4
  unpcklpd %xmm5,%xmm5
  mulpd  %xmm5,%xmm1
  unpcklpd %xmm4,%xmm4
  subpd  %xmm9,%xmm2
  movapd %xmm3,%xmm9
  unpckhpd %xmm8,%xmm3
  mulpd  %xmm4,%xmm3
  unpcklpd %xmm8,%xmm9
  mulpd  %xmm6,%xmm9
  subpd  %xmm9,%xmm2
  subpd  %xmm1,%xmm2
  subpd  %xmm3,%xmm2
  movupd (%rdx),%xmm3
  addpd  %xmm3,%xmm2
  movups %xmm2,(%rdx)
  movupd 0x40(%rax),%xmm1
  movupd 0x50(%rax),%xmm9
  movupd 0x60(%rax),%xmm3
  movupd 0x70(%rax),%xmm8
  movapd %xmm1,%xmm2
  unpckhpd %xmm9,%xmm1
  unpcklpd %xmm9,%xmm2
  movapd %xmm3,%xmm9
  unpckhpd %xmm8,%xmm3
  unpcklpd %xmm8,%xmm9
  movapd %xmm2,%xmm8
  unpcklpd %xmm9,%xmm8
  unpckhpd %xmm9,%xmm2
  mulpd  %xmm8,%xmm7
  mulpd  %xmm5,%xmm2
  subpd  %xmm7,%xmm0
  movapd %xmm1,%xmm7
  unpckhpd %xmm3,%xmm1
  mulpd  %xmm4,%xmm1
  unpcklpd %xmm3,%xmm7
  movupd 0x10(%rdx),%xmm4
  mulpd  %xmm7,%xmm6
  subpd  %xmm6,%xmm0
  subpd  %xmm2,%xmm0
  subpd  %xmm1,%xmm0
  addpd  %xmm4,%xmm0
  movups %xmm0,0x10(%rdx)
  ret
L8:
  movsd  (%rax),%xmm2
  mulsd  (%rcx),%xmm2
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  0x8(%rax),%xmm2
  mulsd  0x8(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  0x10(%rax),%xmm2
  mulsd  0x10(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  0x18(%rax),%xmm2
  mulsd  0x18(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  addsd  (%rdx),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  0x20(%rax),%xmm2
  mulsd  (%rcx),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  0x28(%rax),%xmm2
  mulsd  0x8(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  0x30(%rax),%xmm2
  mulsd  0x10(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  0x38(%rax),%xmm2
  mulsd  0x18(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  addsd  0x8(%rdx),%xmm1
  movsd  %xmm1,0x8(%rdx)
  movsd  0x40(%rax),%xmm2
  mulsd  (%rcx),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  0x48(%rax),%xmm2
  mulsd  0x8(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  0x50(%rax),%xmm2
  mulsd  0x10(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  0x58(%rax),%xmm2
  mulsd  0x18(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  addsd  0x10(%rdx),%xmm1
  movsd  %xmm1,0x10(%rdx)
  movsd  0x60(%rax),%xmm1
  mulsd  (%rcx),%xmm1
  subsd  %xmm1,%xmm0
  movsd  0x68(%rax),%xmm1
  mulsd  0x8(%rcx),%xmm1
  subsd  %xmm1,%xmm0
  movsd  0x70(%rax),%xmm1
  mulsd  0x10(%rcx),%xmm1
  subsd  %xmm1,%xmm0
  movsd  0x78(%rax),%xmm1
  mulsd  0x18(%rcx),%xmm1
  subsd  %xmm1,%xmm0
  addsd  0x18(%rdx),%xmm0
  movsd  %xmm0,0x18(%rdx)
  ret
```

assistant: ```c
void nextstep(double invhk[4][4], double gk[4], double xk[4]) {
  int i, j;
  double di = 0;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      di += -invhk[i][j] * gk[j];
    }
    xk[i] += di;
    di = 0;
  }
}
```