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

```asm
<advect>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,0x38(%rsp)
  mov    %esi,0x3c(%rsp)
  mov    %rdx,%r15
  pxor   %xmm1,%xmm1
  cvtsi2ss %edi,%xmm1
  mulss  %xmm0,%xmm1
  test   %edi,%edi
  jle    L60
  mov    %rcx,%r12
  mov    %r8,%rbx
  mov    %r9,%rbp
  movaps %xmm1,%xmm12
  lea    0x2(%rdi),%r13d
  mov    %r13d,%r14d
  imul   %r13d,%r14d
  movslq %r13d,%rdx
  movslq %r14d,%rax
  lea    0x1(%rdx,%rax,1),%rcx
  lea    0x0(,%rcx,4),%rsi
  mov    %rsi,0x30(%rsp)
  lea    0x1(%rdi),%esi
  mov    %esi,0xc(%rsp)
  lea    0x0(,%rdx,4),%rsi
  mov    %rsi,0x20(%rsp)
  shl    $0x2,%rax
  mov    %rax,0x10(%rsp)
  movl   $0x1,0x2c(%rsp)
  movss  D49(%rip),%xmm11
  movaps %xmm11,%xmm14
  pxor   %xmm6,%xmm6
  cvtsi2sd %edi,%xmm6
  addsd  D14(%rip),%xmm6
  movaps %xmm11,%xmm10
  movaps %xmm11,%xmm9
  movss  D22(%rip),%xmm8
  jmp    L15
L20:
  cvttss2si %xmm2,%esi
  lea    0x1(%rsi),%r11d
  cvttss2si %xmm0,%edx
  cvttss2si %xmm4,%ecx
  pxor   %xmm1,%xmm1
  cvtsi2ss %esi,%xmm1
  subss  %xmm1,%xmm2
  pxor   %xmm1,%xmm1
  cvtsi2ss %edx,%xmm1
  subss  %xmm1,%xmm0
  movaps %xmm8,%xmm3
  subss  %xmm0,%xmm3
  pxor   %xmm1,%xmm1
  cvtsi2ss %ecx,%xmm1
  subss  %xmm1,%xmm4
  movaps %xmm8,%xmm1
  subss  %xmm4,%xmm1
  movaps %xmm3,%xmm5
  mulss  %xmm1,%xmm5
  imul   %r13d,%edx
  lea    (%rdx,%rsi,1),%eax
  imul   %r14d,%ecx
  mulss  %xmm0,%xmm1
  lea    0x0(%r13,%rdx,1),%r10d
  add    %r10d,%esi
  mulss  %xmm4,%xmm3
  lea    (%r14,%rcx,1),%edi
  mulss  %xmm4,%xmm0
  add    %r11d,%edx
  add    %r11d,%r10d
  lea    (%rax,%rcx,1),%r11d
  movslq %r11d,%r11
  movaps %xmm5,%xmm4
  mulss  (%r12,%r11,4),%xmm4
  lea    (%rcx,%rsi,1),%r11d
  movslq %r11d,%r11
  movaps %xmm1,%xmm7
  mulss  (%r12,%r11,4),%xmm7
  addss  %xmm4,%xmm7
  add    %edi,%eax
  cltq
  movaps %xmm3,%xmm4
  mulss  (%r12,%rax,4),%xmm4
  addss  %xmm7,%xmm4
  add    %edi,%esi
  movslq %esi,%rsi
  movaps %xmm0,%xmm7
  mulss  (%r12,%rsi,4),%xmm7
  addss  %xmm4,%xmm7
  movaps %xmm8,%xmm4
  subss  %xmm2,%xmm4
  mulss  %xmm7,%xmm4
  lea    (%rcx,%rdx,1),%eax
  cltq
  mulss  (%r12,%rax,4),%xmm5
  add    %r10d,%ecx
  movslq %ecx,%rcx
  mulss  (%r12,%rcx,4),%xmm1
  addss  %xmm5,%xmm1
  add    %edi,%edx
  movslq %edx,%rdx
  mulss  (%r12,%rdx,4),%xmm3
  addss  %xmm3,%xmm1
  add    %r10d,%edi
  movslq %edi,%rdi
  mulss  (%r12,%rdi,4),%xmm0
  addss  %xmm0,%xmm1
  mulss  %xmm2,%xmm1
  addss  %xmm4,%xmm1
  movss  %xmm1,(%r15,%r8,1)
  add    $0x1,%r9d
  add    0x10(%rsp),%r8
  cmp    0xc(%rsp),%r9d
  je     L11
L45:
  movaps %xmm12,%xmm0
  mulss  (%rbx,%r8,1),%xmm0
  movaps %xmm15,%xmm2
  subss  %xmm0,%xmm2
  movaps %xmm12,%xmm1
  mulss  0x0(%rbp,%r8,1),%xmm1
  movaps %xmm13,%xmm0
  subss  %xmm1,%xmm0
  pxor   %xmm4,%xmm4
  cvtsi2ss %r9d,%xmm4
  mov    0x80(%rsp),%rax
  movaps %xmm12,%xmm1
  mulss  (%rax,%r8,1),%xmm1
  subss  %xmm1,%xmm4
  movaps %xmm2,%xmm3
  cmpnltss %xmm11,%xmm3
  andps  %xmm3,%xmm2
  andnps %xmm14,%xmm3
  orps   %xmm3,%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm2,%xmm1
  comisd %xmm6,%xmm1
  jbe    L30
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm6,%xmm2
L30:
  movaps %xmm0,%xmm3
  cmpnltss %xmm10,%xmm3
  andps  %xmm3,%xmm0
  movss  D49(%rip),%xmm5
  andnps %xmm5,%xmm3
  orps   %xmm3,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  comisd %xmm6,%xmm1
  jbe    L107
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm6,%xmm0
L107:
  movaps %xmm4,%xmm3
  cmpnltss %xmm9,%xmm3
  andps  %xmm3,%xmm4
  movss  D49(%rip),%xmm5
  andnps %xmm5,%xmm3
  orps   %xmm3,%xmm4
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm4,%xmm1
  comisd %xmm6,%xmm1
  jbe    L20
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm6,%xmm4
  jmp    L20
L11:
  addl   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%eax
  mov    0x20(%rsp),%rsi
  add    %rsi,0x18(%rsp)
  cmp    0xc(%rsp),%eax
  je     L103
L58:
  mov    0x18(%rsp),%r8
  mov    $0x1,%r9d
  pxor   %xmm13,%xmm13
  cvtsi2ssl 0x28(%rsp),%xmm13
  jmp    L45
L103:
  addl   $0x1,0x2c(%rsp)
  mov    0x2c(%rsp),%eax
  addq   $0x4,0x30(%rsp)
  cmp    0xc(%rsp),%eax
  je     L60
L15:
  mov    0x30(%rsp),%rax
  mov    %rax,0x18(%rsp)
  movl   $0x1,0x28(%rsp)
  pxor   %xmm15,%xmm15
  cvtsi2ssl 0x2c(%rsp),%xmm15
  jmp    L58
L60:
  mov    0x3c(%rsp),%edx
  mov    %r15,%rsi
  mov    0x38(%rsp),%edi
  call   <boundary_condition@plt>
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_tag: D49
type: f32
name: read_data
arguments: data_tag: D14
type: byte[8]
name: read_data
arguments: data_tag: D22
type: byte[4]

tool: D49: 0.5

tool: {"D14": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D22": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void advect(int N, int b, float *density, float *density_prev, float *velocity_u, float *velocity_v, float *velocity_w, float dt) {
  int count_x;
  int count_y;
  int count_z;
  int i0;
  int j0;
  int k0;
  int i1;
  int j1;
  int k1;
  float x;
  float y;
  float z;
  float s0;
  float t0;
  float s1;
  float t1;
  float u1;
  float u0;
  float dh;
  dh = dt * N;
  for (count_x = 1; count_x <= N; count_x++) {
    for (count_y = 1; count_y <= N; count_y++) {
      for (count_z = 1; count_z <= N; count_z++) {
        x = count_x - dh * velocity_u[((count_x) + (N + 2) * (count_y) + (N + 2) * (N + 2) * (count_z))];
        y = count_y - dh * velocity_v[((count_x) + (N + 2) * (count_y) + (N + 2) * (N + 2) * (count_z))];
        z = count_z - dh * velocity_w[((count_x) + (N + 2) * (count_y) + (N + 2) * (N + 2) * (count_z))];
        if (x < 0.5) {
          x = 0.5;
        }
        if (x > N + 0.5) {
          x = (float)(N + 0.5);
        }
        if (y < 0.5) {
          y = 0.5;
        }
        if (y > N + 0.5) {
          y = (float)(N + 0.5);
        }
        if (z < 0.5) {
          z = 0.5;
        }
        if (z > N + 0.5) {
          z = (float)(N + 0.5);
        }
        i0 = (int)x;
        i1 = i0 + 1;
        j0 = (int)y;
        j1 = j0 + 1;
        k0 = (int)z;
        k1 = k0 + 1;
        s1 = x - i0;
        s0 = 1 - s1;
        t1 = y - j0;
        t0 = 1 - t1;
        u1 = z - k0;
        u0 = 1 - u1;
        density[((count_x) + (N + 2) * (count_y) + (N + 2) * (N + 2) * (count_z))] = s0 * (t0 * u0 * density_prev[((i0) + (N + 2) * (j0) + (N + 2) * (N + 2) * (k0))] + t1 * u0 * density_prev[((i0) + (N + 2) * (j1) + (N + 2) * (N + 2) * (k0))] + t0 * u1 * density_prev[((i0) + (N + 2) * (j0) + (N + 2) * (N + 2) * (k1))] + t1 * u1 * density_prev[((i0) + (N + 2) * (j1) + (N + 2) * (N + 2) * (k1))]) + s1 * (t0 * u0 * density_prev[((i1) + (N + 2) * (j0) + (N + 2) * (N + 2) * (k0))] + t1 * u0 * density_prev[((i1) + (N + 2) * (j1) + (N + 2) * (N + 2) * (k0))] + t0 * u1 * density_prev[((i1) + (N + 2) * (j0) + (N + 2) * (N + 2) * (k1))] + t1 * u1 * density_prev[((i1) + (N + 2) * (j1) + (N + 2) * (N + 2) * (k1))]);
      }
    }
  }
  boundary_condition(N, density, b);
}
```