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

```asm
<gl_resizeImage>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %esi,0x3c(%rsp)
  mov    %edx,0x40(%rsp)
  mov    %rcx,0x28(%rsp)
  mov    %r8d,%eax
  mov    %r8d,0x44(%rsp)
  sub    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  lea    -0x1(%rsi),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  divss  %xmm0,%xmm1
  movss  %xmm1,0x30(%rsp)
  lea    -0x1(%r9),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  lea    -0x1(%rdx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  divss  %xmm0,%xmm1
  movss  %xmm1,0x38(%rsp)
  test   %edx,%edx
  jle    L5
  mov    %rdi,%r15
  lea    -0x1(%rsi),%eax
  lea    0x3(%rax,%rax,2),%rax
  mov    %rax,0x48(%rsp)
  movl   $0x0,0x34(%rsp)
  pxor   %xmm7,%xmm7
  movss  %xmm7,0xc(%rsp)
  jmp    L94
L4:
  mov    $0x10000,%eax
  mov    %eax,%r14d
  sub    %r13d,%r14d
  sub    %r12d,%eax
  mov    %eax,0x10(%rsp)
  mov    0x20(%rsp),%eax
  lea    0x1(%rax,%rbx,1),%eax
  lea    (%rax,%rax,2),%r13d
  add    0x24(%rsp),%ebx
  lea    (%rbx,%rbx,2),%ebp
  lea    0x3(%rbp),%r12d
  mov    $0x0,%ebx
  movslq %r13d,%r13
  mov    0x28(%rsp),%rax
  add    %rax,%r13
  movslq %ebp,%rbp
  add    %rax,%rbp
  movslq %r12d,%r12
  add    %rax,%r12
L97:
  movzbl 0x0(%r13,%rbx,1),%edx
  movzbl 0x0(%rbp,%rbx,1),%esi
  movzbl (%r12,%rbx,1),%edi
  mov    0x10(%rsp),%r8d
  mov    %r14d,%ecx
  call   <interpolate@plt>
  mov    %al,(%r15,%rbx,1)
  add    $0x1,%rbx
  cmp    $0x3,%rbx
  jne    L97
L39:
  add    $0x3,%r15
  movss  0x8(%rsp),%xmm2
  addss  0x30(%rsp),%xmm2
  movss  %xmm2,0x8(%rsp)
  cmp    0x18(%rsp),%r15
  je     L73
L55:
  movss  0x8(%rsp),%xmm0
  cvttss2si %xmm0,%ebx
  call   <floor@plt>
  movaps %xmm0,%xmm1
  movss  0x8(%rsp),%xmm0
  subss  %xmm1,%xmm0
  mulss  D19(%rip),%xmm0
  cvttss2si %xmm0,%r13d
  movss  0xc(%rsp),%xmm0
  call   <floor@plt>
  movaps %xmm0,%xmm1
  movss  0xc(%rsp),%xmm0
  subss  %xmm1,%xmm0
  mulss  D19(%rip),%xmm0
  cvttss2si %xmm0,%r12d
  lea    0x0(%r13,%r12,1),%eax
  cmp    $0x10000,%eax
  jg     L4
  mov    0x24(%rsp),%eax
  add    %ebx,%eax
  lea    (%rax,%rax,2),%eax
  mov    0x20(%rsp),%ecx
  lea    0x1(%rcx,%rbx,1),%edx
  lea    (%rdx,%rdx,2),%ebp
  lea    -0x3(%rbp),%r14d
  mov    $0x0,%ebx
  cltq
  mov    %rax,%rcx
  mov    0x28(%rsp),%rax
  add    %rax,%rcx
  mov    %rcx,0x10(%rsp)
  movslq %ebp,%rbp
  add    %rax,%rbp
  movslq %r14d,%r14
  add    %rax,%r14
L76:
  mov    0x10(%rsp),%rax
  movzbl (%rax,%rbx,1),%edx
  movzbl 0x0(%rbp,%rbx,1),%esi
  movzbl (%r14,%rbx,1),%edi
  mov    %r12d,%r8d
  mov    %r13d,%ecx
  call   <interpolate@plt>
  mov    %al,(%r15,%rbx,1)
  add    $0x1,%rbx
  cmp    $0x3,%rbx
  jne    L76
  jmp    L39
L73:
  mov    0x18(%rsp),%r15
L93:
  movss  0xc(%rsp),%xmm4
  addss  0x38(%rsp),%xmm4
  movss  %xmm4,0xc(%rsp)
  addl   $0x1,0x34(%rsp)
  mov    0x34(%rsp),%eax
  cmp    %eax,0x40(%rsp)
  je     L5
L94:
  cmpl   $0x0,0x3c(%rsp)
  jle    L93
  cvttss2si 0xc(%rsp),%eax
  mov    0x44(%rsp),%ecx
  mov    %ecx,%esi
  imul   %eax,%esi
  mov    %esi,0x20(%rsp)
  add    $0x1,%eax
  imul   %ecx,%eax
  mov    %eax,0x24(%rsp)
  mov    0x48(%rsp),%rax
  add    %r15,%rax
  mov    %rax,0x18(%rsp)
  pxor   %xmm6,%xmm6
  movss  %xmm6,0x8(%rsp)
  jmp    L55
L5:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: tag: D19
data_type: byte[4]

tool: {"D19": [0x00,0x00,0x80,0x47]}

assistant: ```c
void gl_resizeImage(unsigned char *dest, int xsize_dest, int ysize_dest, unsigned char *src, int xsize_src, int ysize_src) {
  unsigned char *pix, *pix_src;
  float x1, y1, x1inc, y1inc;
  int xi, yi, j, xf, yf, x, y;
  pix = dest;
  pix_src = src;
  x1inc = (float)(xsize_src - 1) / (float)(xsize_dest - 1);
  y1inc = (float)(ysize_src - 1) / (float)(ysize_dest - 1);
  y1 = 0;
  for (y = 0; y < ysize_dest; y++) {
    x1 = 0;
    for (x = 0; x < xsize_dest; x++) {
      xi = (int)x1;
      yi = (int)y1;
      xf = (int)((x1 - floor(x1)) * (1 << 16));
      yf = (int)((y1 - floor(y1)) * (1 << 16));
      if ((xf + yf) <= (1 << 16)) {
        for (j = 0; j < 3; j++) {
          pix[j] = interpolate(pix_src[(yi * xsize_src + xi) * 3 + j], pix_src[(yi * xsize_src + xi + 1) * 3 + j], pix_src[((yi + 1) * xsize_src + xi) * 3 + j], xf, yf);
        }
      } else {
        xf = (1 << 16) - xf;
        yf = (1 << 16) - yf;
        for (j = 0; j < 3; j++) {
          pix[j] = interpolate(pix_src[((yi + 1) * xsize_src + xi + 1) * 3 + j], pix_src[((yi + 1) * xsize_src + xi) * 3 + j], pix_src[(yi * xsize_src + xi + 1) * 3 + j], xf, yf);
        }
      }
      pix += 3;
      x1 += x1inc;
    }
    y1 += y1inc;
  }
}
```