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

```asm
<Cutdata_ve>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r14d
  mov    %edx,%ebp
  mov    %rcx,0x10(%rsp)
  mov    %r8d,%r13d
  mov    %r9d,%r15d
  movq   %xmm0,%r12
  movsd  %xmm1,0x8(%rsp)
  call   <floor@plt>
  mov    %eax,0x1c(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <floor@plt>
  mov    0x1c(%rsp),%edi
  pxor   %xmm0,%xmm0
  cvtsi2sd %edi,%xmm0
  movq   %r12,%xmm6
  subsd  %xmm0,%xmm6
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  0x8(%rsp),%xmm7
  subsd  %xmm0,%xmm7
  test   %r13d,%r13d
  jle    L28
  mov    %eax,%esi
  mov    %r15d,%ecx
  shr    $0x1f,%ecx
  add    %r15d,%ecx
  sar    %ecx
  mov    %r13d,%edx
  shr    $0x1f,%edx
  add    %r13d,%edx
  sar    %edx
  neg    %edx
  lea    (%rdx,%r14,1),%r11d
  add    %edi,%r11d
  lea    0x0(%r13,%r14,1),%eax
  add    %edx,%eax
  add    %edi,%eax
  mov    %eax,0x8(%rsp)
  mov    $0x0,%r13d
  movsd  D2(%rip),%xmm8
  mov    %esi,%eax
  sub    %ecx,%eax
  mov    %eax,0x1c(%rsp)
  lea    0x0(%rbp,%r15,1),%r12d
  sub    %ecx,%r12d
  add    %esi,%r12d
  jmp    L32
L57:
  movapd %xmm8,%xmm1
  subsd  %xmm6,%xmm1
  movapd %xmm8,%xmm2
  subsd  %xmm7,%xmm2
  movapd %xmm1,%xmm4
  mulsd  %xmm2,%xmm4
  mov    %r11d,%eax
  cltd
  idiv   %r14d
  imul   %ebp,%edx
  mov    %edx,%r10d
  mulsd  %xmm6,%xmm2
  lea    0x1(%r11),%eax
  cltd
  idiv   %r14d
  imul   %ebp,%edx
  mov    %edx,%r9d
  mulsd  %xmm7,%xmm1
  movapd %xmm6,%xmm3
  mulsd  %xmm7,%xmm3
  mov    0x1c(%rsp),%eax
  lea    (%rax,%rbp,1),%esi
  lea    0x0(%r13,%r13,1),%eax
  cltq
  mov    0x10(%rsp),%rdi
  lea    (%rdi,%rax,8),%r8
L30:
  mov    %esi,%eax
  cltd
  idiv   %ebp
  lea    (%r10,%rdx,1),%edi
  add    %edi,%edi
  movslq %edi,%rdi
  lea    (%rdx,%r9,1),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  add    $0x1,%esi
  mov    %esi,%eax
  cltd
  idiv   %ebp
  lea    (%r10,%rdx,1),%eax
  add    %eax,%eax
  cltq
  add    %r9d,%edx
  add    %edx,%edx
  movslq %edx,%rdx
  movapd %xmm4,%xmm0
  mulsd  (%rbx,%rdi,8),%xmm0
  movapd %xmm2,%xmm5
  mulsd  (%rbx,%rcx,8),%xmm5
  addsd  %xmm5,%xmm0
  movapd %xmm1,%xmm5
  mulsd  (%rbx,%rax,8),%xmm5
  addsd  %xmm5,%xmm0
  movapd %xmm3,%xmm5
  mulsd  (%rbx,%rdx,8),%xmm5
  addsd  %xmm5,%xmm0
  movsd  %xmm0,(%r8)
  movapd %xmm4,%xmm0
  mulsd  0x8(%rbx,%rdi,8),%xmm0
  movapd %xmm2,%xmm5
  mulsd  0x8(%rbx,%rcx,8),%xmm5
  addsd  %xmm5,%xmm0
  movapd %xmm1,%xmm5
  mulsd  0x8(%rbx,%rax,8),%xmm5
  addsd  %xmm5,%xmm0
  movapd %xmm3,%xmm5
  mulsd  0x8(%rbx,%rdx,8),%xmm5
  addsd  %xmm5,%xmm0
  movsd  %xmm0,0x8(%r8)
  add    $0x10,%r8
  cmp    %r12d,%esi
  jne    L30
L17:
  add    %r15d,%r13d
  add    $0x1,%r11d
  cmp    0x8(%rsp),%r11d
  je     L28
L32:
  test   %r15d,%r15d
  jg     L57
  jmp    L17
L28:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D2
type: byte[8]

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

assistant: ```c
void Cutdata_ve(double *gpo, int ox, int oy, double *gpn, int nx, int ny, double xofs, double yofs) {
  int x, y, cmxI, cmyI;
  double cmx, cmy, *gppo;
  gppo = gpo;
  cmxI = floor(xofs);
  cmyI = floor(yofs);
  cmx = xofs - cmxI;
  cmy = yofs - cmyI;
  for (x = 0; x < nx; x++)
    for (y = 0; y < ny; y++) {
      gpn[(x * ny + y) * 2] = +(1 - cmx) * (1 - cmy) * gpo[(((x + cmxI - nx / 2 + ox) % ox) * oy + (y + cmyI - ny / 2 + oy) % oy) * 2] + cmx * (1 - cmy) * gpo[(((x + 1 + cmxI - nx / 2 + ox) % ox) * oy + (y + cmyI - ny / 2 + oy) % oy) * 2] + (1 - cmx) * cmy * gpo[(((x + cmxI - nx / 2 + ox) % ox) * oy + (y + 1 + cmyI - ny / 2 + oy) % oy) * 2] + cmx * cmy * gpo[(((x + 1 + cmxI - nx / 2 + ox) % ox) * oy + (y + 1 + cmyI - ny / 2 + oy) % oy) * 2];
      gpn[(x * ny + y) * 2 + 1] = +(1 - cmx) * (1 - cmy) * gpo[(((x + cmxI - nx / 2 + ox) % ox) * oy + (y + cmyI - ny / 2 + oy) % oy) * 2 + 1] + cmx * (1 - cmy) * gpo[(((x + 1 + cmxI - nx / 2 + ox) % ox) * oy + (y + cmyI - ny / 2 + oy) % oy) * 2 + 1] + (1 - cmx) * cmy * gpo[(((x + cmxI - nx / 2 + ox) % ox) * oy + (y + 1 + cmyI - ny / 2 + oy) % oy) * 2 + 1] + cmx * cmy * gpo[(((x + 1 + cmxI - nx / 2 + ox) % ox) * oy + (y + 1 + cmyI - ny / 2 + oy) % oy) * 2 + 1];
    }
}
```