user: Converte this assembly snippet into its equivalent C code:

```asm
<image_c_resampling_lanczos2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,0x40(%rsp)
  mov    %esi,0x34(%rsp)
  mov    %edx,0xc(%rsp)
  mov    %rcx,0x88(%rsp)
  mov    %r8d,0x84(%rsp)
  mov    %r9d,0x78(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2ss %esi,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ss %r8d,%xmm0
  divss  %xmm0,%xmm1
  movss  %xmm1,0x80(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2ss %edx,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ss %r9d,%xmm0
  divss  %xmm0,%xmm1
  movss  %xmm1,0x70(%rsp)
  test   %r8d,%r8d
  jle    L204
  movl   $0x0,0x7c(%rsp)
  movl   $0x0,0x74(%rsp)
  jmp    L189
L259:
  cvtss2sd %xmm0,%xmm0
  mulsd  D87(%rip),%xmm0
  movsd  %xmm0,0x10(%rsp)
  call   <sin@plt>
  movapd %xmm0,%xmm1
  divsd  0x10(%rsp),%xmm1
  jmp    L56
L272:
  pxor   %xmm4,%xmm4
  cvtss2sd 0x20(%rsp),%xmm4
  movsd  %xmm4,0x10(%rsp)
  pxor   %xmm7,%xmm7
  cvtss2sd 0x18(%rsp),%xmm7
  movsd  %xmm7,0x18(%rsp)
  movss  0x30(%rsp),%xmm6
  ucomiss D141(%rip),%xmm6
  jp     L6
  movsd  D141(%rip),%xmm0
  jne    L6
L182:
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  movss  0x30(%rsp),%xmm0
  mulss  D5(%rip),%xmm0
  ucomiss D141(%rip),%xmm0
  jp     L205
  movsd  D141(%rip),%xmm1
  jne    L205
L192:
  movsd  0x18(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  0x10(%rsp),%xmm0
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm0,%xmm7
  movss  %xmm7,0x20(%rsp)
L96:
  add    $0x1,%ebp
  add    0xc(%rsp),%r12d
  cmp    %r13d,%ebp
  je     L109
L171:
  test   %ebp,%ebp
  js     L96
  cmp    %ebp,0x34(%rsp)
  jle    L96
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  movss  0x6c(%rsp),%xmm3
  subss  %xmm0,%xmm3
  movss  %xmm3,0x30(%rsp)
  movaps %xmm3,%xmm0
  call   <abs@plt>
  comiss D133(%rip),%xmm0
  jbe    L87
  movss  D133(%rip),%xmm5
  movss  %xmm5,0x30(%rsp)
L87:
  mov    0x3c(%rsp),%eax
  lea    -0x1(%rax),%ebx
  lea    0x3(%rax),%r14d
  pxor   %xmm7,%xmm7
  movss  %xmm7,0x18(%rsp)
  jmp    L242
L6:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x30(%rsp),%xmm0
  mulsd  D87(%rip),%xmm0
  movsd  %xmm0,0x20(%rsp)
  call   <sin@plt>
  divsd  0x20(%rsp),%xmm0
  jmp    L182
L205:
  cvtss2sd %xmm0,%xmm0
  mulsd  D87(%rip),%xmm0
  movsd  %xmm0,0x20(%rsp)
  call   <sin@plt>
  movapd %xmm0,%xmm1
  divsd  0x20(%rsp),%xmm1
  jmp    L192
L109:
  mov    0x58(%rsp),%rax
  movss  0x20(%rsp),%xmm0
  addss  (%rax,%r15,4),%xmm0
  movss  %xmm0,(%rax,%r15,4)
  add    $0x1,%r15
  cmp    0x60(%rsp),%r15
  je     L167
L54:
  pxor   %xmm0,%xmm0
  cvtsi2ss %r15d,%xmm0
  mulss  0x70(%rsp),%xmm0
  movss  %xmm0,0x38(%rsp)
  cvttss2si %xmm0,%eax
  mov    %eax,0x3c(%rsp)
  mov    0x50(%rsp),%eax
  lea    0x3(%rax),%r13d
  mov    0x54(%rsp),%r12d
  mov    0x68(%rsp),%ebp
  movl   $0x0,0x20(%rsp)
  jmp    L171
L167:
  addl   $0x1,0x74(%rsp)
  mov    0x74(%rsp),%eax
  mov    0x78(%rsp),%edi
  add    %edi,0x7c(%rsp)
  cmp    %eax,0x84(%rsp)
  je     L204
L189:
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x74(%rsp),%xmm0
  mulss  0x80(%rsp),%xmm0
  movss  %xmm0,0x6c(%rsp)
  cvttss2si %xmm0,%eax
  mov    %eax,0x50(%rsp)
  mov    0x78(%rsp),%edi
  test   %edi,%edi
  jle    L167
  mov    %edi,%esi
  mov    %rsi,0x60(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x68(%rsp)
  imul   0xc(%rsp),%eax
  mov    %eax,0x54(%rsp)
  movslq 0x7c(%rsp),%rax
  mov    0x88(%rsp),%rsi
  lea    (%rsi,%rax,4),%rax
  mov    %rax,0x58(%rsp)
  mov    $0x0,%r15d
  jmp    L54
L24:
  pxor   %xmm6,%xmm6
  cvtss2sd 0x18(%rsp),%xmm6
  movsd  %xmm6,0x28(%rsp)
  lea    (%rbx,%r12,1),%eax
  cltq
  mov    0x40(%rsp),%rdi
  pxor   %xmm4,%xmm4
  cvtss2sd (%rdi,%rax,4),%xmm4
  movsd  %xmm4,0x18(%rsp)
  movss  D133(%rip),%xmm1
  movss  %xmm1,0x10(%rsp)
L92:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x10(%rsp),%xmm0
  mulsd  D87(%rip),%xmm0
  movsd  %xmm0,0x48(%rsp)
  call   <sin@plt>
  divsd  0x48(%rsp),%xmm0
L12:
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  movss  0x10(%rsp),%xmm0
  mulss  D5(%rip),%xmm0
  ucomiss D141(%rip),%xmm0
  jp     L259
  movsd  D141(%rip),%xmm1
  jne    L259
L56:
  movsd  0x18(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  0x28(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm0,%xmm4
  movss  %xmm4,0x18(%rsp)
L22:
  add    $0x1,%ebx
  cmp    %r14d,%ebx
  je     L272
L242:
  test   %ebx,%ebx
  js     L22
  cmp    %ebx,0xc(%rsp)
  jle    L22
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebx,%xmm0
  movss  0x38(%rsp),%xmm2
  subss  %xmm0,%xmm2
  movss  %xmm2,0x10(%rsp)
  movaps %xmm2,%xmm0
  call   <abs@plt>
  comiss D133(%rip),%xmm0
  ja     L24
  pxor   %xmm5,%xmm5
  cvtss2sd 0x18(%rsp),%xmm5
  movsd  %xmm5,0x28(%rsp)
  lea    (%rbx,%r12,1),%eax
  cltq
  mov    0x40(%rsp),%rsi
  pxor   %xmm3,%xmm3
  cvtss2sd (%rsi,%rax,4),%xmm3
  movsd  %xmm3,0x18(%rsp)
  movss  0x10(%rsp),%xmm2
  ucomiss D141(%rip),%xmm2
  jp     L92
  jne    L92
  movsd  D141(%rip),%xmm0
  jmp    L12
L204:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D87
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D141
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D5
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_label: D133
type_infered: byte[4]

tool: D87: 3.141592653589793

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

tool: {"D5": [0x00,0x00,0x00,0x3f]}

tool: {"D133": [0x00,0x00,0x00,0x40]}

assistant: ```c
void image_c_resampling_lanczos2(float *org, int noy, int nox, float *trg, int ny, int nx) {
  float scaley = noy / (float)ny;
  float scalex = nox / (float)nx;
  int x, y;
  int xi, yi;
  float xt, yt;
  int u, v;
  int wy, wx;
  float p, q;
  float dx, dy;
  for (y = 0; y < ny; ++y) {
    yt = y * scaley;
    yi = (int)yt;
    for (x = 0; x < nx; ++x) {
      xt = x * scalex;
      xi = (int)xt;
      q = 0;
      for (wy = -1; wy < 3; ++wy) {
        v = yi + wy;
        if (v >= noy) {
          continue;
        }
        if (v < 0) {
          continue;
        }
        dy = yt - v;
        if (abs(dy) > 2.0f) {
          dy = 2.0f;
        }
        p = 0;
        for (wx = -1; wx < 3; ++wx) {
          u = xi + wx;
          if (u >= nox) {
            continue;
          }
          if (u < 0) {
            continue;
          }
          dx = xt - u;
          if (abs(dx) > 2.0f) {
            dx = 2.0f;
          }
          p = p + org[v * nox + u] * ((dx) == (0) ? 1 : sin(3.141592653589793238462643383279 * (dx)) / (3.141592653589793238462643383279 * (dx))) * ((dx * 0.5f) == (0) ? 1 : sin(3.141592653589793238462643383279 * (dx * 0.5f)) / (3.141592653589793238462643383279 * (dx * 0.5f)));
        }
        q = q + p * ((dy) == (0) ? 1 : sin(3.141592653589793238462643383279 * (dy)) / (3.141592653589793238462643383279 * (dy))) * ((dy * 0.5f) == (0) ? 1 : sin(3.141592653589793238462643383279 * (dy * 0.5f)) / (3.141592653589793238462643383279 * (dy * 0.5f)));
      }
      trg[y * nx + x] += q;
    }
  }
}
```