user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<choldc_sparse_neardiag>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,(%rsp)
  mov    %esi,0x30(%rsp)
  test   %esi,%esi
  jle    L178
  mov    %rdx,%r13
  mov    %rcx,0x28(%rsp)
  lea    -0x1(%rsi),%eax
  mov    %eax,0x34(%rsp)
  mov    %eax,%eax
  mov    %rax,0x38(%rsp)
  mov    $0xffffffffffffffff,%r15
  mov    $0x0,%r14d
  movq   $0x0,0x20(%rsp)
  jmp    L1
L188:
  cmp    %ebp,0x1c(%rsp)
  je     L116
  mov    (%rbx),%rax
  mov    0x8(%rsp),%rdi
  divsd  (%rdi),%xmm1
  movsd  %xmm1,(%rax,%r14,1)
L208:
  mov    0x18(%rsp),%eax
  add    $0x1,%eax
  add    $0x1,%rbp
  add    $0x8,%rbx
  cmp    0x10(%rsp),%rbp
  je     L107
L85:
  mov    %ebp,0x18(%rsp)
  mov    %ebp,%ecx
  mov    (%rsp),%rax
  mov    (%rax,%r14,1),%rsi
  movsd  (%rsi,%rbp,8),%xmm1
  ucomisd D9(%rip),%xmm1
  jp     L111
  je     L174
L111:
  test   %r15d,%r15d
  js     L188
  mov    %r15,%rax
  cmp    %ecx,%r12d
  cmovge %r12d,%ecx
L168:
  cmp    %ecx,0x0(%r13,%rax,4)
  jl     L188
  mov    (%rbx),%rdx
  movsd  (%rdx,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  subsd  %xmm0,%xmm1
  sub    $0x1,%rax
  test   %eax,%eax
  jns    L168
  jmp    L188
L116:
  pxor   %xmm2,%xmm2
  comisd %xmm1,%xmm2
  jae    L127
  ucomisd %xmm1,%xmm2
  ja     L14
L145:
  sqrtsd %xmm1,%xmm1
L45:
  mov    0x8(%rsp),%rax
  movsd  %xmm1,(%rax)
  jmp    L208
L127:
  movsd  D10(%rip),%xmm1
  jmp    L145
L14:
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L45
L107:
  mov    %eax,%r12d
L154:
  mov    0x20(%rsp),%rax
  mov    %r12d,0x0(%r13,%rax,4)
  jmp    L78
L174:
  mov    0x20(%rsp),%rax
  mov    %ebp,0x0(%r13,%rax,4)
  cmp    %ebp,0x30(%rsp)
  jle    L78
  movslq %ebp,%rcx
  mov    (%rsp),%rax
  mov    (%rax,%rcx,8),%rax
  movq   $0x0,(%rax,%r14,1)
L78:
  addq   $0x1,0x20(%rsp)
  add    $0x8,%r14
  addq   $0x8,0x28(%rsp)
  add    $0x1,%r15
  cmp    0x38(%rsp),%r15
  je     L178
L1:
  mov    0x20(%rsp),%rax
  mov    %eax,%esi
  mov    %eax,0x1c(%rsp)
  cmp    %eax,0x30(%rsp)
  jle    L143
  mov    0x28(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    (%rsp),%rax
  lea    (%rax,%r14,1),%rbx
  mov    0x34(%rsp),%eax
  mov    0x20(%rsp),%rbp
  sub    %ebp,%eax
  lea    0x1(%rbp,%rax,1),%rax
  mov    %rax,0x10(%rsp)
  mov    %esi,%r12d
  jmp    L85
L143:
  mov    0x20(%rsp),%r12d
  jmp    L154
L178:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D9
type_guessed: f64
name: disassemble_data
arguments: data_tag: D10
type_guessed: byte[8]

tool: D9: 0

tool: {"D10": [0x3e,0xc3,0xd8,0x4e,0x7d,0x7f,0x61,0x2b]}

assistant: ```c
void choldc_sparse_neardiag(double **a, int N, int *Nvec, double *p) {
  int i, j, k;
  double sum;
  for (i = 0; i < N; i++) {
    for (j = i; j < N; j++) {
      if (a[i][j] == 0.) {
        sum = 0;
        break;
      }
      for (sum = a[i][j], k = i - 1; k >= 0; k--) {
        if (Nvec[k] < i || Nvec[k] < j) {
          break;
        } else {
          sum -= a[i][k] * a[j][k];
        }
      }
      if (i == j) {
        if (sum <= 0.) {
          sum = 1.e-99;
        }
        p[i] = sqrt(sum);
      } else
        a[j][i] = sum / p[i];
    }
    Nvec[i] = j;
    if (j < N)
      a[j][i] = 0.0;
  }
}
```