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

```asm
<image_c_resampling_lanczos2>:
  endbr64
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  push   %r15
  cvtsi2ss %r8d,%xmm0
  push   %r14
  cvtsi2ss %esi,%xmm1
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  divss  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ss %r9d,%xmm0
  sub    $0xa8,%rsp
  mov    %rdi,0x30(%rsp)
  mov    %esi,0x1c(%rsp)
  mov    %rcx,0x88(%rsp)
  mov    %r8d,0x90(%rsp)
  mov    %r9d,0x94(%rsp)
  movss  %xmm1,0x84(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2ss %edx,%xmm1
  divss  %xmm0,%xmm1
  movss  %xmm1,0x70(%rsp)
  test   %r8d,%r8d
  jle    L297
  test   %r9d,%r9d
  jle    L297
  movslq %r9d,%rax
  movl   $0x0,0x74(%rsp)
  mov    %edx,%r13d
  movl   $0x0,0x80(%rsp)
  mov    %rax,0x58(%rsp)
  nop
L345:
  pxor   %xmm0,%xmm0
  mov    0x88(%rsp),%rbx
  xor    %r15d,%r15d
  cvtsi2ssl 0x74(%rsp),%xmm0
  mulss  0x84(%rsp),%xmm0
  cvttss2si %xmm0,%eax
  movss  %xmm0,0x54(%rsp)
  lea    -0x1(%rax),%edx
  lea    0x3(%rax),%ebp
  mov    %edx,0x50(%rsp)
  imul   %r13d,%edx
  mov    %edx,0x44(%rsp)
  movslq 0x80(%rsp),%rdx
  lea    (%rbx,%rdx,4),%rdx
  mov    %rdx,0x48(%rsp)
  nopl   0x0(%rax,%rax,1)
L228:
  pxor   %xmm0,%xmm0
  mov    0x44(%rsp),%eax
  mov    0x50(%rsp),%r12d
  movl   $0x0,0x8(%rsp)
  cvtsi2ss %r15d,%xmm0
  mulss  0x70(%rsp),%xmm0
  cvttss2si %xmm0,%ebx
  movss  %xmm0,0x28(%rsp)
  lea    (%rbx,%rax,1),%r14d
  lea    -0x1(%rbx),%eax
  cmp    %eax,%r13d
  mov    %eax,0x40(%rsp)
  lea    0x1(%rbx),%esi
  lea    0x2(%rbx),%edi
  setle  %cl
  shr    $0x1f,%eax
  mov    %esi,0x38(%rsp)
  or     %eax,%ecx
  cmp    %ebx,%r13d
  mov    %ebx,%eax
  mov    %edi,0x3c(%rsp)
  mov    %cl,0x2f(%rsp)
  setle  %cl
  shr    $0x1f,%eax
  or     %eax,%ecx
  mov    %esi,%eax
  shr    $0x1f,%eax
  cmp    %r13d,%esi
  mov    %cl,0x2e(%rsp)
  setge  %cl
  or     %eax,%ecx
  mov    %edi,%eax
  shr    $0x1f,%eax
  cmp    %edi,%r13d
  mov    %cl,0x2c(%rsp)
  setle  %cl
  or     %eax,%ecx
  mov    %cl,0x2d(%rsp)
L329:
  test   %r12d,%r12d
  js     L441
  cmp    %r12d,0x1c(%rsp)
  jg     L416
L441:
  add    $0x1,%r12d
  add    %r13d,%r14d
  cmp    %ebp,%r12d
  jne    L329
  mov    0x48(%rsp),%rax
  movss  0x8(%rsp),%xmm1
  addss  (%rax,%r15,4),%xmm1
  movss  %xmm1,(%rax,%r15,4)
  add    $0x1,%r15
  cmp    0x58(%rsp),%r15
  jne    L228
  addl   $0x1,0x74(%rsp)
  mov    0x94(%rsp),%ebx
  mov    0x74(%rsp),%eax
  add    %ebx,0x80(%rsp)
  cmp    %eax,0x90(%rsp)
  jne    L345
L297:
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L416:
  pxor   %xmm0,%xmm0
  movss  0x54(%rsp),%xmm5
  cvtsi2ss %r12d,%xmm0
  subss  %xmm0,%xmm5
  movaps %xmm5,%xmm0
  movss  %xmm5,0x10(%rsp)
  call   <abs@plt>
  comiss D208(%rip),%xmm0
  jbe    L17
  movss  D208(%rip),%xmm6
  movss  %xmm6,0x10(%rsp)
L17:
  cmpb   $0x0,0x2f(%rsp)
  je     L152
  movss  D10(%rip),%xmm7
  cmpb   $0x0,0x2e(%rsp)
  pxor   %xmm1,%xmm1
  movss  %xmm7,0x20(%rsp)
  je     L200
L301:
  cmpb   $0x0,0x2c(%rsp)
  je     L123
L167:
  cmpb   $0x0,0x2d(%rsp)
  je     L176
L233:
  pxor   %xmm7,%xmm7
  pxor   %xmm6,%xmm6
  cvtss2sd %xmm1,%xmm1
  cvtss2sd 0x8(%rsp),%xmm7
  movsd  %xmm7,0x8(%rsp)
  movss  0x10(%rsp),%xmm7
  ucomiss %xmm6,%xmm7
  jp     L46
  je     L108
L46:
  pxor   %xmm2,%xmm2
  movsd  %xmm1,0x68(%rsp)
  cvtss2sd 0x10(%rsp),%xmm2
  mulsd  D207(%rip),%xmm2
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm2
  movsd  0x68(%rsp),%xmm1
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
L108:
  movss  0x10(%rsp),%xmm2
  mulss  0x20(%rsp),%xmm2
  pxor   %xmm6,%xmm6
  ucomiss %xmm6,%xmm2
  jp     L272
  je     L359
L272:
  cvtss2sd %xmm2,%xmm2
  mulsd  D207(%rip),%xmm2
  movsd  %xmm1,0x20(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x10(%rsp)
  call   <sin@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  0x20(%rsp),%xmm1
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
L359:
  addsd  0x8(%rsp),%xmm1
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm1,%xmm5
  movss  %xmm5,0x8(%rsp)
  jmp    L441
  nopl   0x0(%rax,%rax,1)
L176:
  pxor   %xmm0,%xmm0
  movss  0x28(%rsp),%xmm4
  movss  %xmm1,0x60(%rsp)
  cvtsi2ssl 0x3c(%rsp),%xmm0
  subss  %xmm0,%xmm4
  movaps %xmm4,%xmm0
  movss  %xmm4,0x68(%rsp)
  call   <abs@plt>
  mov    0x30(%rsp),%rdx
  lea    0x2(%r14),%eax
  comiss D208(%rip),%xmm0
  movss  0x60(%rsp),%xmm1
  cltq
  pxor   %xmm3,%xmm3
  lea    (%rdx,%rax,4),%rax
  cvtss2sd %xmm1,%xmm1
  cvtss2sd (%rax),%xmm3
  ja     L410
  movss  0x68(%rsp),%xmm4
  pxor   %xmm7,%xmm7
  movss  0x20(%rsp),%xmm2
  mulss  %xmm4,%xmm2
  ucomiss %xmm7,%xmm4
  jp     L406
  jne    L406
L362:
  pxor   %xmm7,%xmm7
  ucomiss %xmm7,%xmm2
  jp     L169
  je     L292
L169:
  cvtss2sd %xmm2,%xmm2
  mulsd  D207(%rip),%xmm2
  movsd  %xmm1,0x78(%rsp)
  movsd  %xmm3,0x68(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm2
  movsd  0x68(%rsp),%xmm3
  movsd  0x78(%rsp),%xmm1
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm3
L292:
  addsd  %xmm3,%xmm1
  cvtsd2ss %xmm1,%xmm1
  jmp    L233
  nopw   0x0(%rax,%rax,1)
L123:
  pxor   %xmm0,%xmm0
  movss  0x28(%rsp),%xmm4
  movss  %xmm1,0x68(%rsp)
  cvtsi2ssl 0x38(%rsp),%xmm0
  subss  %xmm0,%xmm4
  movaps %xmm4,%xmm0
  movss  %xmm4,0x60(%rsp)
  call   <abs@plt>
  mov    0x30(%rsp),%rdx
  lea    0x1(%r14),%eax
  comiss D208(%rip),%xmm0
  movss  0x68(%rsp),%xmm1
  cltq
  pxor   %xmm3,%xmm3
  movss  0x60(%rsp),%xmm4
  lea    (%rdx,%rax,4),%rax
  cvtss2sd %xmm1,%xmm1
  cvtss2sd (%rax),%xmm3
  jbe    L95
  movss  D17(%rip),%xmm2
  movsd  D102(%rip),%xmm0
L384:
  mulsd  %xmm0,%xmm3
L302:
  pxor   %xmm6,%xmm6
  ucomiss %xmm6,%xmm2
  jp     L313
  je     L395
L313:
  cvtss2sd %xmm2,%xmm2
  mulsd  D207(%rip),%xmm2
  movsd  %xmm3,0x78(%rsp)
  movsd  %xmm1,0x68(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm2
  movsd  0x78(%rsp),%xmm3
  movsd  0x68(%rsp),%xmm1
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm3
L395:
  addsd  %xmm3,%xmm1
  cvtsd2ss %xmm1,%xmm1
  jmp    L167
  nopl   0x0(%rax)
L152:
  pxor   %xmm0,%xmm0
  movss  0x28(%rsp),%xmm3
  cvtsi2ssl 0x40(%rsp),%xmm0
  subss  %xmm0,%xmm3
  movaps %xmm3,%xmm0
  movss  %xmm3,0x20(%rsp)
  call   <abs@plt>
  mov    0x30(%rsp),%rdx
  lea    -0x1(%r14),%eax
  comiss D208(%rip),%xmm0
  cltq
  pxor   %xmm1,%xmm1
  movss  0x20(%rsp),%xmm3
  lea    (%rdx,%rax,4),%rax
  cvtss2sd (%rax),%xmm1
  jbe    L33
  movss  D10(%rip),%xmm6
  movss  D17(%rip),%xmm2
  movsd  D102(%rip),%xmm0
  movss  %xmm6,0x20(%rsp)
L209:
  mulsd  %xmm0,%xmm1
L55:
  pxor   %xmm6,%xmm6
  ucomiss %xmm6,%xmm2
  jp     L388
  je     L336
L388:
  cvtss2sd %xmm2,%xmm2
  mulsd  D207(%rip),%xmm2
  movsd  %xmm1,0x68(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm2
  movsd  0x68(%rsp),%xmm1
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
L336:
  addsd  D140(%rip),%xmm1
  cmpb   $0x0,0x2e(%rsp)
  cvtsd2ss %xmm1,%xmm1
  jne    L301
L200:
  pxor   %xmm0,%xmm0
  movss  0x28(%rsp),%xmm3
  movss  %xmm1,0x68(%rsp)
  cvtsi2ss %ebx,%xmm0
  subss  %xmm0,%xmm3
  movaps %xmm3,%xmm0
  movss  %xmm3,0x60(%rsp)
  call   <abs@plt>
  movss  0x68(%rsp),%xmm1
  mov    0x30(%rsp),%rdx
  movslq %r14d,%rax
  comiss D208(%rip),%xmm0
  pxor   %xmm4,%xmm4
  movss  0x60(%rsp),%xmm3
  lea    (%rdx,%rax,4),%rax
  cvtss2sd %xmm1,%xmm4
  pxor   %xmm1,%xmm1
  cvtss2sd (%rax),%xmm1
  jbe    L161
  movss  D17(%rip),%xmm2
  movsd  D102(%rip),%xmm0
L351:
  mulsd  %xmm0,%xmm1
L445:
  pxor   %xmm7,%xmm7
  ucomiss %xmm7,%xmm2
  jp     L374
  je     L401
L374:
  cvtss2sd %xmm2,%xmm2
  mulsd  D207(%rip),%xmm2
  movsd  %xmm4,0x78(%rsp)
  movsd  %xmm1,0x68(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm2
  movsd  0x68(%rsp),%xmm1
  movsd  0x78(%rsp),%xmm4
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
L401:
  addsd  %xmm4,%xmm1
  cvtsd2ss %xmm1,%xmm1
  jmp    L301
  nopl   0x0(%rax)
L161:
  pxor   %xmm5,%xmm5
  movss  0x20(%rsp),%xmm2
  ucomiss %xmm5,%xmm3
  mulss  %xmm3,%xmm2
  jp     L330
  je     L445
L330:
  cvtss2sd %xmm3,%xmm3
  mulsd  D207(%rip),%xmm3
  movsd  %xmm4,0x98(%rsp)
  movss  %xmm2,0x78(%rsp)
  movsd  %xmm1,0x68(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm3
  movsd  0x68(%rsp),%xmm1
  movsd  0x98(%rsp),%xmm4
  movss  0x78(%rsp),%xmm2
  divsd  %xmm3,%xmm0
  jmp    L351
  nopl   0x0(%rax)
L33:
  pxor   %xmm7,%xmm7
  movss  D10(%rip),%xmm5
  ucomiss %xmm7,%xmm3
  movaps %xmm5,%xmm2
  movss  %xmm5,0x20(%rsp)
  mulss  %xmm3,%xmm2
  jp     L109
  je     L55
L109:
  cvtss2sd %xmm3,%xmm3
  mulsd  D207(%rip),%xmm3
  movsd  %xmm1,0x78(%rsp)
  movss  %xmm2,0x68(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm3
  movss  0x68(%rsp),%xmm2
  movsd  0x78(%rsp),%xmm1
  divsd  %xmm3,%xmm0
  jmp    L209
  xchg   %ax,%ax
L95:
  pxor   %xmm6,%xmm6
  movss  0x20(%rsp),%xmm2
  ucomiss %xmm6,%xmm4
  mulss  %xmm4,%xmm2
  jp     L43
  je     L302
L43:
  cvtss2sd %xmm4,%xmm4
  mulsd  D207(%rip),%xmm4
  movss  %xmm2,0x98(%rsp)
  movsd  %xmm3,0x78(%rsp)
  movsd  %xmm1,0x68(%rsp)
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm4
  movsd  0x68(%rsp),%xmm1
  movss  0x98(%rsp),%xmm2
  movsd  0x78(%rsp),%xmm3
  divsd  %xmm4,%xmm0
  jmp    L384
  nopl   (%rax)
L410:
  mov    D102(%rip),%rax
  movss  D17(%rip),%xmm2
  movq   %rax,%xmm0
L185:
  mulsd  %xmm0,%xmm3
  jmp    L362
L406:
  cvtss2sd %xmm4,%xmm4
  mulsd  D207(%rip),%xmm4
  movss  %xmm2,0x98(%rsp)
  movsd  %xmm1,0x78(%rsp)
  movsd  %xmm3,0x68(%rsp)
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x60(%rsp)
  call   <sin@plt>
  movsd  0x60(%rsp),%xmm4
  movss  0x98(%rsp),%xmm2
  movsd  0x78(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm3
  divsd  %xmm4,%xmm0
  jmp    L185
```

tool_calls: name: disassemble_data
arguments: data_label: D208
type_infered: byte[4]
name: disassemble_data
arguments: data_label: D10
type_infered: byte[4]
name: disassemble_data
arguments: data_label: D207
type_infered: f64
name: disassemble_data
arguments: data_label: D17
type_infered: byte[4]
name: disassemble_data
arguments: data_label: D102
type_infered: byte[8]
name: disassemble_data
arguments: data_label: D140
type_infered: byte[8]

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

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

tool: D207: 3.141592653589793

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

tool: {"D102": [0xd1,0xcd,0x35,0xae,0xaf,0x78,0x86,0xbc]}

tool: {"D140": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

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;
    }
  }
}
```