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

```asm
<C_advect_velocity>:
  endbr64
  push   %r15
  mov    %rdi,%rax
  mov    %r9d,%edi
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    0xc0(%rsp),%esi
  imul   %esi,%edi
  test   %r9d,%r9d
  jle    L53
  test   %esi,%esi
  jle    L53
  movapd %xmm0,%xmm6
  movapd %xmm1,%xmm7
  pxor   %xmm4,%xmm4
  movslq %esi,%r11
  lea    0x0(,%r11,4),%rbx
  movl   $0x0,0x5c(%rsp)
  pxor   %xmm8,%xmm8
  mov    %rbx,0x70(%rsp)
  movslq %edi,%rbx
  mov    %rdx,%rdi
  neg    %rdi
  mov    %rbx,0x60(%rsp)
  lea    (%rcx,%rbx,4),%r10
  shl    $0x3,%rdi
  mov    %rdi,0x78(%rsp)
  mov    %rbx,%rdi
  sub    %rdx,%rdi
  shl    $0x3,%rdi
  mov    %rdi,0x68(%rsp)
  mov    %rax,%rdi
  mov    %rdx,%rax
  mov    %rdi,%r15
  nopl   (%rax)
L31:
  pxor   %xmm5,%xmm5
  mov    0x78(%rsp),%rdi
  xor    %ebx,%ebx
  mov    %r8,%r12
  cvtsi2sdl 0x5c(%rsp),%xmm5
  lea    0x0(,%rax,8),%rbp
  lea    0x0(%rbp,%rdi,1),%r13
  add    0x68(%rsp),%rbp
  xchg   %ax,%ax
L120:
  movsd  (%r14,%r13,1),%xmm0
  movsd  (%r14,%rbp,1),%xmm3
  movapd %xmm5,%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm3
  divsd  %xmm6,%xmm0
  divsd  %xmm7,%xmm3
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  cvtsd2ss %xmm1,%xmm1
  comiss %xmm1,%xmm4
  subsd  %xmm3,%xmm0
  cvtsd2ss %xmm0,%xmm0
  ja     L51
  pxor   %xmm9,%xmm9
  pxor   %xmm3,%xmm3
  cvtsi2sd %r9d,%xmm9
  cvtss2sd %xmm1,%xmm3
  subsd  D0(%rip),%xmm9
  comisd %xmm9,%xmm3
  jae    L50
  cvttss2si %xmm1,%edx
  pxor   %xmm1,%xmm1
  pxor   %xmm9,%xmm9
  pxor   %xmm10,%xmm10
  cvtsi2sd %edx,%xmm1
  subsd  %xmm1,%xmm3
  cvtsd2ss %xmm3,%xmm9
  cvtss2sd %xmm9,%xmm10
L109:
  comiss %xmm0,%xmm4
  ja     L52
  pxor   %xmm3,%xmm3
  pxor   %xmm1,%xmm1
  cvtsi2sd %esi,%xmm3
  subsd  D0(%rip),%xmm3
  cvtss2sd %xmm0,%xmm1
  comisd %xmm3,%xmm1
  jae    L111
  cvttss2si %xmm0,%edi
  pxor   %xmm0,%xmm0
  cvtsi2sd %edi,%xmm0
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm1
  cvtss2sd %xmm1,%xmm0
L112:
  mov    %edx,(%rcx,%rbx,4)
  mov    %edi,(%r10,%rbx,4)
  movsd  %xmm10,(%r12,%r13,1)
  movsd  %xmm0,(%r12,%rbp,1)
  cmpb   $0x0,(%rax,%rbx,1)
  je     L63
  movsd  (%r14,%r13,1),%xmm0
  add    $0x1,%rbx
  movsd  %xmm0,(%r15,%r13,1)
  movsd  (%r14,%rbp,1),%xmm0
  add    $0x8,%r13
  movsd  %xmm0,(%r15,%rbp,1)
  add    $0x8,%rbp
  cmp    %r11,%rbx
  jne    L120
L39:
  mov    0x70(%rsp),%rbx
  addl   $0x1,0x5c(%rsp)
  mov    %r12,%r8
  add    %r11,%rax
  mov    0x5c(%rsp),%edi
  add    %rbx,%rcx
  add    %rbx,%r10
  cmp    %edi,%r9d
  jne    L31
L53:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L52:
  movapd %xmm8,%xmm0
  movaps %xmm4,%xmm1
  xor    %edi,%edi
  jmp    L112
  nopw   0x0(%rax,%rax,1)
L51:
  movapd %xmm8,%xmm10
  movaps %xmm4,%xmm9
  xor    %edx,%edx
  jmp    L109
L63:
  imul   %esi,%edx
  movaps %xmm9,%xmm0
  mov    %r11,0x50(%rsp)
  add    $0x1,%rbx
  mov    %r9d,0x58(%rsp)
  mov    %rcx,0x38(%rsp)
  add    %edi,%edx
  mov    %r10,0x30(%rsp)
  movslq %edx,%rdx
  mov    %rax,0x28(%rsp)
  lea    (%r14,%rdx,8),%rdi
  movsd  %xmm2,0x48(%rsp)
  movsd  %xmm5,0x40(%rsp)
  movsd  %xmm7,0x20(%rsp)
  movsd  %xmm6,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %esi,0xc0(%rsp)
  movss  %xmm1,0xc(%rsp)
  movss  %xmm9,0x8(%rsp)
  call   <advect_sample@plt>
  mov    0x10(%rsp),%rdx
  add    0x60(%rsp),%rdx
  movss  0xc(%rsp),%xmm1
  movsd  %xmm0,(%r15,%r13,1)
  lea    (%r14,%rdx,8),%rdi
  movss  0x8(%rsp),%xmm9
  mov    0xc0(%rsp),%esi
  add    $0x8,%r13
  movaps %xmm9,%xmm0
  call   <advect_sample@plt>
  mov    0x50(%rsp),%r11
  mov    0x28(%rsp),%rax
  pxor   %xmm4,%xmm4
  movsd  %xmm0,(%r15,%rbp,1)
  add    $0x8,%rbp
  mov    0xc0(%rsp),%esi
  movsd  0x18(%rsp),%xmm6
  cmp    %rbx,%r11
  movsd  0x20(%rsp),%xmm7
  mov    0x30(%rsp),%r10
  pxor   %xmm8,%xmm8
  mov    0x38(%rsp),%rcx
  movsd  0x40(%rsp),%xmm5
  mov    0x58(%rsp),%r9d
  movsd  0x48(%rsp),%xmm2
  jne    L120
  jmp    L39
  nopl   0x0(%rax)
L50:
  cvtsd2ss %xmm9,%xmm9
  cvttss2si %xmm9,%edx
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm9,%xmm9
  pxor   %xmm10,%xmm10
  cvtsi2sd %edx,%xmm1
  subsd  %xmm1,%xmm9
  cvtsd2ss %xmm9,%xmm9
  cvtss2sd %xmm9,%xmm10
  jmp    L109
  nopl   0x0(%rax,%rax,1)
L111:
  cvtsd2ss %xmm3,%xmm3
  cvttss2si %xmm3,%edi
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm3,%xmm1
  cvtsi2sd %edi,%xmm0
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm1
  cvtss2sd %xmm1,%xmm0
  jmp    L112
```

tool_calls: name: parse_data
arguments: data_label: D0
type_infered: f64

tool: D0: 1.01

assistant: ```c
void C_advect_velocity(double *v, const double *const v0, const unsigned char *bound, int *advect_indexes, double *advect_lerps, const int Nx, const int Ny, const double dx, const double dy, const double dt) {
  int x, y, idx, xi, yi, iidx;
  int vyidx = Nx * Ny;
  float xa, ya, s, t;
#pragma omp for schedule(auto)
  for (x = 0; x < Nx; ++x) {
    for (y = 0; y < Ny; ++y) {
      idx = y + x * Ny;
      xa = (double)x - dt * v0[0 + idx] / dx;
      ya = (double)y - dt * v0[vyidx + idx] / dy;
      xa = xa < 0.0 ? 0.0 : (xa >= Nx - 1.01) ? (Nx - 1.01) : xa;
      ya = ya < 0.0 ? 0.0 : (ya >= Ny - 1.01) ? (Ny - 1.01) : ya;
      xi = (int)xa;
      yi = (int)ya;
      s = xa - (double)xi;
      t = ya - (double)yi;
      advect_indexes[0 + idx] = xi;
      advect_indexes[vyidx + idx] = yi;
      advect_lerps[0 + idx] = s;
      advect_lerps[vyidx + idx] = t;
      if (!bound[idx]) {
        iidx = yi + xi * Ny;
        v[0 + idx] = advect_sample(v0 + iidx, Ny, s, t);
        v[vyidx + idx] = advect_sample(v0 + vyidx + iidx, Ny, s, t);
      } else {
        v[0 + idx] = v0[0 + idx];
        v[vyidx + idx] = v0[vyidx + idx];
      }
    }
  }
}
```