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

```asm
<_get2dPhase>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,-0x24(%rsp)
  mov    %r9,-0x18(%rsp)
  test   %ecx,%ecx
  jle    L13
  imul   -0x24(%rsp),%edx
  mov    %ecx,%eax
  mov    %r8,-0x30(%rsp)
  xor    %r14d,%r14d
  sub    $0x1,%eax
  movl   $0x0,-0x1c(%rsp)
  movss  D7(%rip),%xmm4
  lea    0x4(%r8,%rax,4),%rax
  mov    %edx,%r13d
  mov    %rax,-0x10(%rsp)
  mov    0x38(%rsp),%eax
  imul   %ecx,%r13d
  mov    %edx,-0x8(%rsp)
  xor    %edx,%edx
  lea    -0x1(%rax),%r15d
L87:
  mov    -0x30(%rsp),%rbx
  mov    0x40(%rsp),%eax
  mov    (%rbx),%esi
  add    %edx,%eax
  test   %esi,%esi
  je     L10
L48:
  addq   $0x4,-0x30(%rsp)
  mov    0x38(%rsp),%ecx
  mov    %eax,%edx
  add    %ecx,-0x1c(%rsp)
  mov    -0x30(%rsp),%rbx
  add    -0x8(%rsp),%r14d
  cmp    %rbx,-0x10(%rsp)
  jne    L87
L13:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L10:
  mov    0x40(%rsp),%ecx
  test   %ecx,%ecx
  jle    L48
  movslq -0x1c(%rsp),%rbx
  mov    0x48(%rsp),%r12
  mov    %edx,-0x28(%rsp)
  movl   $0x0,-0x20(%rsp)
  mov    %eax,-0x4(%rsp)
  shl    $0x2,%rbx
  add    %rbx,%r12
  add    0x50(%rsp),%rbx
L92:
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  jle    L27
  movslq -0x28(%rsp),%rax
  mov    0x58(%rsp),%rcx
  xor    %edx,%edx
  mov    (%rcx,%rax,4),%r9d
  mov    0x60(%rsp),%rcx
  lea    (%rcx,%rax,4),%rbp
  mov    -0x24(%rsp),%eax
  lea    0x1(%r9),%r10d
  mov    -0x18(%rsp),%rcx
  imul   %eax,%r10d
  imul   %eax,%r9d
  movslq -0x20(%rsp),%rax
  lea    (%rcx,%rax,4),%r11
  jmp    L4
  nopl   0x0(%rax,%rax,1)
L38:
  lea    (%rax,%r9,1),%r8d
  movaps %xmm2,%xmm0
  add    %r9d,%esi
  add    %r10d,%eax
  mulss  %xmm3,%xmm0
  movslq %r8d,%r8
  movslq %esi,%rsi
  cltq
  mulss  %xmm1,%xmm3
  movslq %ecx,%rcx
  mulss  (%rdi,%r8,4),%xmm0
  mulss  (%rdi,%rsi,4),%xmm3
  mulss  %xmm5,%xmm2
  mulss  (%rdi,%rax,4),%xmm2
  lea    0x1(%rdx),%rax
  mulss  %xmm5,%xmm1
  mulss  (%rdi,%rcx,4),%xmm1
  addss  %xmm3,%xmm0
  addss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  addss  (%r11,%rdx,4),%xmm0
  movss  %xmm0,(%r11,%rdx,4)
  cmp    %r15,%rdx
  je     L27
  mov    %rax,%rdx
L4:
  mov    (%r12,%rdx,4),%eax
  movss  (%rbx,%rdx,4),%xmm1
  movaps %xmm4,%xmm2
  movaps %xmm4,%xmm3
  movss  0x0(%rbp),%xmm5
  add    %r14d,%eax
  subss  %xmm1,%xmm2
  lea    0x1(%rax),%esi
  subss  %xmm5,%xmm3
  lea    (%rsi,%r10,1),%ecx
  cmp    %r13d,%ecx
  jl     L38
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L27:
  mov    0x38(%rsp),%ecx
  addl   $0x1,-0x28(%rsp)
  add    %ecx,-0x20(%rsp)
  mov    -0x4(%rsp),%esi
  mov    -0x28(%rsp),%ecx
  mov    %esi,%eax
  cmp    %ecx,%esi
  jne    L92
  jmp    L48
```

tool_calls: name: parse_data
arguments: tag: D7
datatype: byte[4]

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

assistant: ```c
int _get2dPhase(float *pscreens, int psnx, int psny, int nscreens, int *skip, float *outphase, int phnx, int phny, int *ishifts, float *xshifts, int *jshifts, float *yshifts) {
  int i, j, k, ips, jps;
  int firstel;
  float wx1, wx2, wy1, wy2;
  for (k = 0; k < nscreens; ++k) {
    if (skip[k])
      continue;
    firstel = k * (psnx * psny);
    for (j = 0; j < phny; ++j) {
      for (i = 0; i < phnx; ++i) {
        ips = ishifts[i + k * phnx];
        jps = jshifts[j + k * phny];
        wx1 = (1.0f - xshifts[i + k * phnx]);
        wx2 = (xshifts[i + k * phnx]);
        wy1 = (1.0f - yshifts[j + k * phny]);
        wy2 = (yshifts[j + k * phny]);
        if ((firstel + ips + 1 + (jps + 1) * psnx) >= (psnx * psny * nscreens)) {
          return (1);
        }
        outphase[i + j * phnx] += (wx1 * wy1 * pscreens[firstel + ips + jps * psnx] + wx2 * wy1 * pscreens[firstel + ips + 1 + jps * psnx] + wx1 * wy2 * pscreens[firstel + ips + (jps + 1) * psnx] + wx2 * wy2 * pscreens[firstel + ips + 1 + (jps + 1) * psnx]);
      }
    }
  }
  return (0);
}
```