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

```asm
<_update>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rsi,0x28(%rsp)
  mov    %ecx,0x20(%rsp)
  mov    %r8d,0x5c(%rsp)
  test   %r8d,%r8d
  jle    L19
  movslq %ecx,%rax
  movl   $0x0,0x58(%rsp)
  mov    %rdi,%r15
  mov    %rdx,%r14
  mov    %rax,0x48(%rsp)
  neg    %rax
  shl    $0x3,%rax
  mov    %rax,0x8(%rsp)
  lea    0x1(%rcx),%eax
  mov    %eax,0x54(%rsp)
  nopw   0x0(%rax,%rax,1)
L49:
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jle    L98
  mov    0x28(%rsp),%rax
  movl   $0x0,0x50(%rsp)
  xor    %ebp,%ebp
  movq   $0x0,0x38(%rsp)
  mov    %rax,0x18(%rsp)
  mov    %r15,%rax
  mov    %rbp,%r15
  mov    %rax,%rbp
  nopw   0x0(%rax,%rax,1)
L5:
  movslq 0x50(%rsp),%rax
  mov    0x38(%rsp),%rbx
  xor    %r12d,%r12d
  mov    %rbp,%rsi
  lea    0x0(,%r15,8),%r13
  mov    %r15d,0x24(%rsp)
  shl    $0x3,%rax
  lea    0x0(%rbp,%rax,1),%rcx
  add    %r14,%rax
  mov    %rbx,%rbp
  mov    %rsi,%rbx
  mov    %rax,0x40(%rsp)
  mov    %r14,%rax
  mov    %r13,%r14
  mov    %r12d,%r13d
  mov    %rcx,0x30(%rsp)
  mov    %rax,%r12
  jmp    L112
  nopw   0x0(%rax,%rax,1)
L25:
  mov    0x24(%rsp),%edx
  mov    0x20(%rsp),%esi
  mov    %r12,%rdi
  call   <_sum_row@plt>
  mov    0x20(%rsp),%esi
  mov    %r13d,%edx
  mov    %r12,%rdi
  movapd %xmm0,%xmm1
  subsd  (%r12,%rbp,1),%xmm1
  movsd  %xmm1,0x10(%rsp)
  call   <_sum_row@plt>
  mov    0x18(%rsp),%rax
  movsd  (%rbx,%rbp,1),%xmm3
  mov    $0x1,%edi
  movapd %xmm0,%xmm2
  addsd  (%rbx,%r14,1),%xmm3
  subsd  (%r12,%r14,1),%xmm2
  movsd  (%rax,%rbp,1),%xmm5
  mov    0x28(%rsp),%rax
  movsd  (%r12,%rbp,1),%xmm0
  movsd  0x10(%rsp),%xmm1
  movsd  (%rax,%r15,8),%xmm4
  call   <_update_step@plt>
  movsd  %xmm0,(%r12,%rbp,1)
  movsd  %xmm0,(%r12,%r14,1)
L51:
  add    $0x1,%r13d
  add    $0x8,%rbp
  sub    0x8(%rsp),%r14
  cmp    %r15d,%r13d
  jg     L12
L112:
  movsd  (%rbx,%rbp,1),%xmm0
  addsd  (%rbx,%r14,1),%xmm0
  pxor   %xmm6,%xmm6
  comisd %xmm6,%xmm0
  jbe    L51
  cmp    %r15d,%r13d
  jne    L25
  mov    0x30(%rsp),%rax
  movsd  (%rax),%xmm0
  call   <is_positive@plt>
  test   %rax,%rax
  je     L51
  mov    0x28(%rsp),%rax
  movsd  (%rax,%r15,8),%xmm0
  mov    0x30(%rsp),%rax
  subsd  (%rax),%xmm0
  call   <is_positive@plt>
  test   %rax,%rax
  je     L51
  mov    0x30(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x28(%rsp),%rax
  movsd  (%rax,%r15,8),%xmm1
  subsd  %xmm0,%xmm1
  call   <genbet@plt>
  mov    0x24(%rsp),%edx
  mov    0x20(%rsp),%esi
  mov    %r12,%rdi
  movsd  D3(%rip),%xmm1
  subsd  %xmm0,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  call   <_sum_row@plt>
  mov    0x40(%rsp),%rax
  subsd  (%rax),%xmm0
  mulsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  call   <is_positive@plt>
  test   %rax,%rax
  je     L51
  mov    0x40(%rsp),%rax
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L51
  nopw   0x0(%rax,%rax,1)
L12:
  mov    0x8(%rsp),%rcx
  mov    0x54(%rsp),%edx
  mov    %rbx,%rbp
  mov    %r12,%r14
  add    %edx,0x50(%rsp)
  add    $0x1,%r15
  add    %rcx,0x18(%rsp)
  sub    %rcx,0x38(%rsp)
  cmp    %r15,0x48(%rsp)
  jne    L5
  mov    %rbx,%r15
L98:
  mov    0x20(%rsp),%esi
  mov    %r14,%rdi
  call   <_normalize_all@plt>
  addl   $0x1,0x58(%rsp)
  mov    0x58(%rsp),%eax
  cmp    %eax,0x5c(%rsp)
  jne    L49
L19:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D3
type_guessed: byte[8]

tool: {"D3": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void _update(double *C, double *sumC, double *X, int n, int n_step) {
  int iter, i, j;
  double tmp1, tmp2;
  for (iter = 0; iter < n_step; iter++) {
    for (i = 0; i < n; i++) {
      for (j = 0; j <= i; j++) {
        if (C[i * n + j] + C[j * n + i] > 0) {
          if (i == j) {
            if (is_positive(C[i * n + i]) && is_positive(sumC[i] - C[i * n + i])) {
              tmp1 = genbet(C[i * n + i], sumC[i] - C[i * n + i]);
              tmp2 = tmp1 / (1 - tmp1) * (_sum_row(X, n, i) - X[i * n + i]);
              if (is_positive(tmp2)) {
                X[i * n + i] = tmp2;
              }
            }
          } else {
            tmp1 = _sum_row(X, n, i) - X[i * n + j];
            tmp2 = _sum_row(X, n, j) - X[j * n + i];
            X[i * n + j] = _update_step(X[i * n + j], tmp1, tmp2, C[i * n + j] + C[j * n + i], sumC[i], sumC[j], 1);
            X[j * n + i] = X[i * n + j];
          }
        }
      }
    }
    _normalize_all(X, n);
  }
}
```