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

```asm
<cg_Yk>:
  endbr64
  mov    %rsi,%r9
  mov    %rdx,%rsi
  mov    %rcx,%r10
  movabs $0x6666666666666667,%rdx
  mov    %r8,%rax
  imul   %rdx
  sar    %rdx
  mov    %r8,%rax
  sar    $0x3f,%rax
  sub    %rax,%rdx
  lea    (%rdx,%rdx,4),%rax
  mov    %r8,%rdx
  sub    %rax,%rdx
  test   %rdi,%rdi
  je     L49
  test   %rcx,%rcx
  jne    L49
  test   %rdx,%rdx
  jle    L30
  mov    $0x0,%ecx
L110:
  movsd  (%rsi,%rcx,8),%xmm0
  subsd  (%r9,%rcx,8),%xmm0
  movsd  %xmm0,(%rdi,%rcx,8)
  movsd  (%rsi,%rcx,8),%xmm0
  movsd  %xmm0,(%r9,%rcx,8)
  add    $0x1,%rcx
  cmp    %rcx,%rdx
  jne    L110
L53:
  cmp    %rdx,%r8
  jle    L100
  lea    0x0(,%rdx,8),%rcx
  add    %rcx,%rsi
  add    %r9,%rcx
L156:
  movsd  (%rsi),%xmm0
  subsd  (%rcx),%xmm0
  movsd  %xmm0,(%rdi,%rdx,8)
  movsd  (%rsi),%xmm0
  movsd  %xmm0,(%rcx)
  movsd  0x8(%rsi),%xmm0
  subsd  0x8(%rcx),%xmm0
  movsd  %xmm0,0x8(%rdi,%rdx,8)
  movsd  0x8(%rsi),%xmm0
  movsd  %xmm0,0x8(%rcx)
  movsd  0x10(%rsi),%xmm0
  subsd  0x10(%rcx),%xmm0
  movsd  %xmm0,0x10(%rdi,%rdx,8)
  movsd  0x10(%rsi),%xmm0
  movsd  %xmm0,0x10(%rcx)
  movsd  0x18(%rsi),%xmm0
  subsd  0x18(%rcx),%xmm0
  movsd  %xmm0,0x18(%rdi,%rdx,8)
  movsd  0x18(%rsi),%xmm0
  movsd  %xmm0,0x18(%rcx)
  movsd  0x20(%rsi),%xmm0
  subsd  0x20(%rcx),%xmm0
  movsd  %xmm0,0x20(%rdi,%rdx,8)
  movsd  0x20(%rsi),%xmm0
  movsd  %xmm0,0x20(%rcx)
  add    $0x5,%rdx
  add    $0x28,%rsi
  add    $0x28,%rcx
  cmp    %rdx,%r8
  jg     L156
  ret
L30:
  mov    $0x0,%edx
  jmp    L53
L49:
  test   %rdi,%rdi
  jne    L187
  test   %r10,%r10
  je     L187
  test   %rdx,%rdx
  jle    L181
  pxor   %xmm0,%xmm0
  mov    $0x0,%eax
L149:
  movsd  (%rsi,%rax,8),%xmm2
  movapd %xmm2,%xmm1
  subsd  (%r9,%rax,8),%xmm1
  movsd  %xmm2,(%r9,%rax,8)
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L149
L154:
  cmp    %rdx,%r8
  jle    L90
  lea    (%r9,%rdx,8),%rcx
L158:
  movsd  (%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm1
  subsd  (%rcx),%xmm1
  movsd  %xmm2,(%rcx)
  mulsd  %xmm1,%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x8(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x8(%rcx),%xmm0
  movsd  %xmm2,0x8(%rcx)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x10(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x10(%rcx),%xmm0
  movsd  %xmm2,0x10(%rcx)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x18(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x18(%rcx),%xmm0
  movsd  %xmm2,0x18(%rcx)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x20(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x20(%rcx),%xmm0
  movsd  %xmm2,0x20(%rcx)
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  add    $0x5,%rdx
  add    $0x28,%rcx
  cmp    %rdx,%r8
  jg     L158
L90:
  movsd  %xmm0,(%r10)
  ret
L187:
  pxor   %xmm0,%xmm0
  mov    $0x0,%eax
  test   %rdx,%rdx
  jle    L63
L147:
  movsd  (%rsi,%rax,8),%xmm2
  movapd %xmm2,%xmm1
  subsd  (%r9,%rax,8),%xmm1
  movsd  %xmm2,(%r9,%rax,8)
  movsd  %xmm1,(%rdi,%rax,8)
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L147
L72:
  cmp    %rdx,%r8
  jle    L52
  lea    (%r9,%rdx,8),%rcx
L4:
  movsd  (%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm1
  subsd  (%rcx),%xmm1
  movsd  %xmm2,(%rcx)
  movsd  %xmm1,(%rdi,%rdx,8)
  mulsd  %xmm1,%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x8(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x8(%rcx),%xmm0
  movsd  %xmm2,0x8(%rcx)
  movsd  %xmm0,0x8(%rdi,%rdx,8)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x10(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x10(%rcx),%xmm0
  movsd  %xmm2,0x10(%rcx)
  movsd  %xmm0,0x10(%rdi,%rdx,8)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x18(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x18(%rcx),%xmm0
  movsd  %xmm2,0x18(%rcx)
  movsd  %xmm0,0x18(%rdi,%rdx,8)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x20(%rsi,%rdx,8),%xmm2
  movapd %xmm2,%xmm0
  subsd  0x20(%rcx),%xmm0
  movsd  %xmm2,0x20(%rcx)
  movsd  %xmm0,0x20(%rdi,%rdx,8)
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  add    $0x5,%rdx
  add    $0x28,%rcx
  cmp    %rdx,%r8
  jg     L4
L52:
  movsd  %xmm0,(%r10)
L100:
  ret
L63:
  mov    $0x0,%edx
  jmp    L72
L181:
  pxor   %xmm0,%xmm0
  mov    $0x0,%edx
  jmp    L154
```

assistant: ```c
void cg_Yk(double *y, double *gold, double *gnew, double *yty, long int n) {
  long int n5, i;
  double s, t;
  n5 = n % 5;
  if ((y != 0) && (yty == 0)) {
    for (i = 0; i < n5; i++) {
      y[i] = gnew[i] - gold[i];
      gold[i] = gnew[i];
    }
    for (; i < n;) {
      y[i] = gnew[i] - gold[i];
      gold[i] = gnew[i];
      i++;
      y[i] = gnew[i] - gold[i];
      gold[i] = gnew[i];
      i++;
      y[i] = gnew[i] - gold[i];
      gold[i] = gnew[i];
      i++;
      y[i] = gnew[i] - gold[i];
      gold[i] = gnew[i];
      i++;
      y[i] = gnew[i] - gold[i];
      gold[i] = gnew[i];
      i++;
    }
  } else if ((y == 0) && (yty != 0)) {
    s = ((double)0);
    for (i = 0; i < n5; i++) {
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      s += t * t;
    }
    for (; i < n;) {
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      s += t * t;
      i++;
    }
    *yty = s;
  } else {
    s = ((double)0);
    for (i = 0; i < n5; i++) {
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      y[i] = t;
      s += t * t;
    }
    for (; i < n;) {
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      y[i] = t;
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      y[i] = t;
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      y[i] = t;
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      y[i] = t;
      s += t * t;
      i++;
      t = gnew[i] - gold[i];
      gold[i] = gnew[i];
      y[i] = t;
      s += t * t;
      i++;
    }
    *yty = s;
  }
  return;
}
```