user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<stage_one>:
  endbr64
  push   %r15
  lea    -0x1(%r8),%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x30(%rsp)
  mov    0x90(%rsp),%r14
  mov    %rdx,0x38(%rsp)
  mov    0xa0(%rsp),%r12
  mov    %rcx,0x40(%rsp)
  mov    %r8d,0x48(%rsp)
  mov    %eax,0x4c(%rsp)
  test   %eax,%eax
  jle    L35
  mov    %r8d,%eax
  mov    %rsi,%rbp
  mov    %r9,%r15
  xor    %r13d,%r13d
  sub    $0x2,%eax
  mov    %eax,0x28(%rsp)
  mov    0x38(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    0x98(%rsp),%rax
  mov    %rax,0x20(%rsp)
L40:
  mov    0x28(%rsp),%ecx
  pxor   %xmm6,%xmm6
  movups %xmm6,(%r12)
  lea    0x1(%rcx),%eax
  test   %eax,%eax
  jle    L63
  movslq %r13d,%rax
  mov    0x30(%rsp),%rsi
  add    0x48(%rsp),%r13d
  mov    %ecx,%ebx
  mov    %r13d,0x2c(%rsp)
  lea    (%rsi,%rax,8),%r9
  movslq %r13d,%rax
  lea    (%rsi,%rax,8),%r8
  xor    %eax,%eax
  nopl   0x0(%rax)
L85:
  movsd  (%r8,%rax,8),%xmm1
  movsd  (%r9,%rax,8),%xmm0
  mov    %rax,%rdx
  movapd %xmm1,%xmm2
  movsd  %xmm0,(%r15,%rax,8)
  divsd  %xmm0,%xmm2
  movsd  %xmm2,(%r14,%rax,8)
  movsd  (%r12),%xmm3
  movupd (%r12),%xmm4
  add    $0x1,%rax
  movsd  0x8(%r12),%xmm2
  addsd  %xmm0,%xmm3
  unpcklpd %xmm1,%xmm0
  addpd  %xmm4,%xmm0
  addsd  %xmm1,%xmm2
  movups %xmm0,(%r12)
  cmp    %rbx,%rdx
  jne    L85
  divsd  %xmm3,%xmm2
  mov    0x20(%rsp),%rax
  xor    %r13d,%r13d
  pxor   %xmm1,%xmm1
  movsd  %xmm2,0x0(%rbp)
  movsd  (%r12),%xmm0
  movsd  %xmm0,(%rax)
  nopl   0x0(%rax,%rax,1)
L73:
  movsd  (%r14,%r13,8),%xmm0
  subsd  0x0(%rbp),%xmm0
  mov    $0x2,%edi
  movsd  %xmm1,0x10(%rsp)
  movsd  (%r15,%r13,8),%xmm5
  movsd  %xmm5,0x8(%rsp)
  call   <pow@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm1
  mov    %r13,%rax
  add    $0x1,%r13
  addsd  %xmm0,%xmm1
  cmp    %rbx,%rax
  jne    L73
L118:
  mov    0x28(%rsp),%eax
  pxor   %xmm0,%xmm0
  mov    0x18(%rsp),%rsi
  add    $0x8,%rbp
  addq   $0x8,0x20(%rsp)
  mov    0x2c(%rsp),%r13d
  cvtsi2sd %eax,%xmm0
  add    $0x8,%rsi
  sub    $0x1,%eax
  mov    %eax,0x28(%rsp)
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rsi)
  mov    %rsi,0x18(%rsp)
  cmp    $0xffffffff,%eax
  jne    L40
L35:
  movslq 0x48(%rsp),%rbx
  mov    0x38(%rsp),%r14
  shl    $0x3,%rbx
  movsd  -0x18(%r14,%rbx,1),%xmm2
  lea    -0x20(%r14,%rbx,1),%rbp
  movsd  0x0(%rbp),%xmm0
  movapd %xmm2,%xmm1
  movsd  %xmm2,0x10(%rsp)
  call   <fmin@plt>
  movsd  0x10(%rsp),%xmm2
  mov    $0x2,%edi
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm2,%xmm0
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm1
  divsd  0x0(%rbp),%xmm0
  call   <fmin@plt>
  mov    0x4c(%rsp),%eax
  movsd  %xmm0,-0x10(%r14,%rbx,1)
  test   %eax,%eax
  jle    L104
  mov    0x38(%rsp),%rcx
  mov    0x40(%rsp),%rsi
  lea    0x8(%rcx),%rax
  cmp    %rax,%rsi
  setne  %dl
  cmpl   $0x2,0x48(%rsp)
  setne  %al
  test   %al,%dl
  je     L76
  mov    0x98(%rsp),%rax
  add    $0x8,%rax
  cmp    %rax,%rsi
  je     L76
  mov    0x4c(%rsp),%edx
  mov    0x98(%rsp),%rdi
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  nopl   (%rax)
L5:
  movupd (%rcx,%rax,1),%xmm0
  movupd (%rdi,%rax,1),%xmm7
  divpd  %xmm7,%xmm0
  movups %xmm0,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L5
  mov    0x4c(%rsp),%edi
  mov    %edi,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%edi
  je     L104
  mov    0x38(%rsp),%rdi
  cltq
  mov    0x40(%rsp),%rcx
  movsd  (%rdi,%rax,8),%xmm0
  mov    0x98(%rsp),%rdi
  divsd  (%rdi,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
L104:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L63:
  pxor   %xmm0,%xmm0
  mov    0x20(%rsp),%rax
  pxor   %xmm1,%xmm1
  divsd  %xmm0,%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  (%r12),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x48(%rsp),%eax
  add    %r13d,%eax
  mov    %eax,0x2c(%rsp)
  jmp    L118
L76:
  mov    0x48(%rsp),%eax
  mov    0x38(%rsp),%rsi
  mov    0x40(%rsp),%rdi
  mov    0x98(%rsp),%r8
  lea    -0x2(%rax),%ecx
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L43:
  mov    %rax,%rdx
  movsd  (%rsi,%rax,8),%xmm0
  divsd  (%r8,%rax,8),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rcx
  jne    L43
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void stage_one(double *vec, double *fact, double *sigmas, double *var_f, int p, double *Cik, double *Cik1_Cik, double *ECik, double *col_sums) {
  int j, m;
  double cik, cik_1, sigmacum;
  for (j = 0; j < p - 1; ++j) {
    col_sums[0] = 0.;
    col_sums[1] = 0., sigmacum = 0;
    for (m = 0; m < (p - (j + 1)); ++m) {
      cik = vec[(m + j * p)];
      cik_1 = vec[(m + (1 + j) * p)];
      Cik[m] = cik;
      Cik1_Cik[m] = cik_1 / cik;
      col_sums[0] += cik;
      col_sums[1] += cik_1;
    }
    fact[j] = col_sums[1] / col_sums[0];
    ECik[j] = col_sums[0];
    for (m = 0; m < (p - (j + 1)); ++m) {
      sigmacum += Cik[m] * pow((Cik1_Cik[m] - fact[j]), 2);
    }
    sigmas[j] = sigmacum / (p - j - 2);
  }
  sigmas[p - 2] = fmin(pow(sigmas[p - 3], 2) / sigmas[p - 4], fmin(sigmas[p - 4], sigmas[p - 3]));
  for (j = 0; j < p - 1; ++j) {
    var_f[j] = sigmas[j] / ECik[j];
  }
}
```