user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<convolve3>:
  endbr64
  lea    -0x1(%r8),%eax
  pxor   %xmm0,%xmm0
  push   %r15
  mov    %r8d,%r11d
  cvtsi2sd %eax,%xmm0
  mulsd  D33(%rip),%xmm0
  movsd  D76(%rip),%xmm2
  push   %r14
  movsd  D31(%rip),%xmm3
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %rdi,%rbx
  movapd %xmm0,%xmm1
  andpd  %xmm2,%xmm1
  ucomisd %xmm1,%xmm3
  mov    %r9,-0x18(%rsp)
  jbe    L121
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  movsd  D62(%rip),%xmm4
  andnpd %xmm0,%xmm2
  cvtsi2sd %rax,%xmm1
  movapd %xmm1,%xmm3
  cmpnlesd %xmm0,%xmm3
  andpd  %xmm4,%xmm3
  subsd  %xmm3,%xmm1
  orpd   %xmm2,%xmm1
  movapd %xmm1,%xmm0
L121:
  cvttsd2si %xmm0,%eax
  pxor   %xmm6,%xmm6
  pxor   %xmm0,%xmm0
  movss  D50(%rip),%xmm5
  cvtsi2ssl 0x38(%rsp),%xmm6
  movss  D39(%rip),%xmm1
  cvtsi2ss %esi,%xmm0
  movaps %xmm1,%xmm3
  divss  %xmm6,%xmm0
  movaps %xmm0,%xmm2
  andps  %xmm1,%xmm2
  ucomiss %xmm2,%xmm5
  jbe    L56
  cvttss2si %xmm0,%edx
  pxor   %xmm2,%xmm2
  movss  D20(%rip),%xmm7
  andnps %xmm0,%xmm3
  cvtsi2ss %edx,%xmm2
  movaps %xmm2,%xmm4
  cmpnless %xmm0,%xmm4
  andps  %xmm7,%xmm4
  subss  %xmm4,%xmm2
  orps   %xmm3,%xmm2
  movaps %xmm2,%xmm0
L56:
  cvttss2si %xmm0,%edi
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  mov    %edi,-0x10(%rsp)
  divss  %xmm6,%xmm0
  movaps %xmm0,%xmm2
  andps  %xmm1,%xmm2
  ucomiss %xmm2,%xmm5
  jbe    L41
  cvttss2si %xmm0,%edx
  pxor   %xmm2,%xmm2
  movss  D20(%rip),%xmm4
  andnps %xmm0,%xmm1
  cvtsi2ss %edx,%xmm2
  movaps %xmm2,%xmm3
  cmpnless %xmm0,%xmm3
  andps  %xmm4,%xmm3
  subss  %xmm3,%xmm2
  orps   %xmm1,%xmm2
  movaps %xmm2,%xmm0
L41:
  cvttss2si %xmm0,%edi
  mov    %edi,-0x8(%rsp)
  cmp    $0x2,%ebp
  jle    L61
  mov    $0x1,%edx
  movl   $0x0,-0x1c(%rsp)
  pxor   %xmm2,%xmm2
  sub    %eax,%edx
  mov    %edx,-0xc(%rsp)
  mov    %edx,%r15d
  lea    -0x3(%rbp),%edx
  and    $0xfffffffe,%edx
  add    $0x3,%edx
  sub    %eax,%edx
  mov    %edx,-0x4(%rsp)
  lea    -0x3(%rsi),%edx
  and    $0xfffffffe,%edx
  add    $0x3,%edx
  sub    %eax,%edx
  mov    %edx,-0x20(%rsp)
L141:
  cmp    $0x2,%esi
  jle    L62
  movslq -0x1c(%rsp),%rax
  mov    -0x18(%rsp),%rdi
  lea    (%r15,%r11,1),%r12d
  mov    -0xc(%rsp),%r10d
  lea    (%rdi,%rax,4),%r14
  nopl   0x0(%rax,%rax,1)
L98:
  mov    %r13,%r9
  mov    %r15d,%r8d
  movaps %xmm2,%xmm1
  test   %r11d,%r11d
  jle    L57
  xchg   %ax,%ax
L68:
  mov    %r8d,%eax
  xor    %ecx,%ecx
  cltd
  idiv   %ebp
  mov    %edx,%edi
  imul   %esi,%edi
L151:
  lea    (%r10,%rcx,1),%eax
  cltd
  idiv   %esi
  add    %edi,%edx
  movslq %edx,%rdx
  movss  (%rbx,%rdx,4),%xmm0
  mulss  (%r9,%rcx,4),%xmm0
  add    $0x1,%rcx
  addss  %xmm0,%xmm1
  cmp    %ecx,%r11d
  jg     L151
  add    $0x1,%r8d
  add    $0xc,%r9
  cmp    %r12d,%r8d
  jne    L68
L57:
  movss  %xmm1,(%r14)
  add    $0x2,%r10d
  add    $0x4,%r14
  cmp    %r10d,-0x20(%rsp)
  jne    L98
L62:
  mov    -0x10(%rsp),%edi
  add    $0x2,%r15d
  add    %edi,-0x1c(%rsp)
  cmp    -0x4(%rsp),%r15d
  jne    L141
L61:
  and    $0x1,%esi
  jne    L138
  mov    -0x8(%rsp),%eax
  test   %eax,%eax
  jle    L138
  movslq -0x10(%rsp),%rax
  mov    -0x18(%rsp),%rbx
  xor    %ecx,%ecx
  shl    $0x2,%rax
  lea    -0x8(%rbx,%rax,1),%rdx
L67:
  movss  (%rdx),%xmm0
  add    $0x1,%ecx
  movss  %xmm0,0x4(%rdx)
  add    %rax,%rdx
  cmp    %ecx,-0x8(%rsp)
  jne    L67
L138:
  and    $0x1,%ebp
  jne    L145
  mov    -0x10(%rsp),%ebx
  test   %ebx,%ebx
  jle    L145
  mov    -0x8(%rsp),%eax
  mov    -0x18(%rsp),%rsi
  lea    -0x1(%rbx),%ecx
  sub    $0x2,%eax
  imul   %ebx,%eax
  cltq
  lea    (%rsi,%rax,4),%rdx
  add    %rcx,%rax
  lea    0x4(%rsi,%rax,4),%rcx
  movslq %ebx,%rax
L76:
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L76
L145:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D33
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_tag: D76
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_tag: D31
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_tag: D62
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_tag: D50
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_tag: D39
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_tag: D20
type_infered: byte[4]

tool: {"D33": [0.0,1.75]}

tool: {"D76": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: {"D31": [0.0,176.0]}

tool: {"D62": [0.0,1.875]}

tool: {"D50": [0x00,0x00,0x00,0x4b]}

tool: {"D39": [0xff,0xff,0xff,0x7f]}

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

assistant: ```c
void convolve3(input, nx, ny, filter, filter_size, output, sample) float *input, filter[3][3];
float *output;
int nx, ny, filter_size, sample;
{
  float val;
  int i, ii, ir, j, jj, jr;
  int snx, sny, f_off, si, sj;
  f_off = (int)floor((filter_size - 1) / 2.0);
  snx = (int)floor(nx / ((float)sample));
  sny = (int)floor(ny / ((float)sample));
  si = 0;
  for (i = 1; i < ny - 1; i = i + 2) {
    sj = 0;
    for (j = 1; j < nx - 1; j = j + 2) {
      val = 0.0;
      for (ii = 0; ii < filter_size; ii++) {
        ir = (i + ii - f_off) % ny;
        for (jj = 0; jj < filter_size; jj++) {
          jr = (j + jj - f_off) % nx;
          val += filter[ii][jj] * input[(int)(ir * nx + jr)];
        }
      }
      output[si * snx + sj] = val;
      sj++;
    }
    si++;
  }
  if ((nx % 2) == 0) {
    for (i = 0; i < sny; i++) {
      output[(i * snx) + (snx - 1)] = output[i * snx + (snx - 2)];
    }
  }
  if ((ny % 2) == 0) {
    for (j = 0; j < snx; j++) {
      output[((sny - 1) * snx) + j] = output[(sny - 2) * snx + j];
    }
  }
}
```