user: Translate the below assembly code into C programming language:

```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    L90
  imul   -0x24(%rsp),%edx
  mov    %ecx,%eax
  mov    %r8,-0x30(%rsp)
  xor    %r14d,%r14d
  sub    $0x1,%eax
  movl   $0x0,-0x1c(%rsp)
  movss  D0(%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
L6:
  mov    -0x30(%rsp),%rbx
  mov    0x40(%rsp),%eax
  mov    (%rbx),%esi
  add    %edx,%eax
  test   %esi,%esi
  je     L83
L25:
  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    L6
L90:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L83:
  mov    0x40(%rsp),%ecx
  test   %ecx,%ecx
  jle    L25
  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
L59:
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  jle    L42
  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    L58
  nopl   0x0(%rax,%rax,1)
L49:
  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     L42
  mov    %rax,%rdx
L58:
  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     L49
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L42:
  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    L59
  jmp    L25
```

tool_calls: name: unpack_data
arguments: label: D0
type: byte[4]

tool: {"D0": [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);
}
```