user: Please show me the C implementation that matches the assembly code listed below:

```asm
<predict>:
  endbr64
  push   %r15
  imul   %esi,%edx
  mov    $0xffffffff,%r15d
  lea    -0x1(%rcx),%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %ecx,%ecx
  cmovs  %ecx,%r15d
  add    $0x1,%r15d
  test   %ecx,%ecx
  mov    $0xffffffff,%ecx
  cmovg  %eax,%r15d
  test   %r8d,%r8d
  lea    -0x1(%r8),%eax
  cmovs  %r8d,%ecx
  add    $0x1,%ecx
  test   %r8d,%r8d
  cmovg  %eax,%ecx
  mov    %ecx,%ebx
  imul   %esi,%ebx
  test   %edx,%edx
  jle    L115
  mov    %edx,%r14d
  lea    -0x1(%rdx),%r12d
  mov    %edx,%edx
  mov    %esi,%ebp
  mov    %rdi,%r13
  shl    $0x2,%rdx
  mov    %r9,%rdi
  xor    %esi,%esi
  call   <memset@plt>
  movslq %ebp,%r8
  lea    (%r15,%rbp,1),%r11d
  mov    %ebx,%ecx
  mov    %rax,%r9
  shl    $0x2,%r8
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  sub    %ebx,%r11d
  jmp    L38
  nopl   0x0(%rax,%rax,1)
L84:
  add    %ebp,%ecx
  mov    %r10d,%eax
  add    %r8,%r13
  cmp    %r10d,%r14d
  jle    L110
L38:
  lea    (%rax,%rbp,1),%r10d
  test   %ecx,%ecx
  js     L84
  cmp    %ecx,%r14d
  jle    L84
  cmp    %r10d,%eax
  jge    L84
  lea    (%r11,%rcx,1),%edi
  mov    %r13,%rdx
  sub    %eax,%edi
  mov    %r15d,%eax
  nopl   0x0(%rax,%rax,1)
L113:
  test   %eax,%eax
  js     L8
  cmp    %eax,%ebp
  jle    L8
  movss  (%rdx),%xmm0
  lea    (%rax,%rcx,1),%esi
  movslq %esi,%rsi
  addss  %xmm0,%xmm1
  movss  %xmm0,(%r9,%rsi,4)
L8:
  add    $0x1,%eax
  add    $0x4,%rdx
  cmp    %edi,%eax
  jne    L113
  add    %ebp,%ecx
  mov    %r10d,%eax
  add    %r8,%r13
  cmp    %r10d,%r14d
  jg     L38
L110:
  mov    0x40(%rsp),%eax
  test   %eax,%eax
  jne    L115
  movss  D5(%rip),%xmm2
  lea    0x4(%r9,%r12,4),%rax
  divss  %xmm1,%xmm2
  nopl   (%rax)
L57:
  movss  (%r9),%xmm0
  add    $0x4,%r9
  mulss  %xmm2,%xmm0
  movss  %xmm0,-0x4(%r9)
  cmp    %r9,%rax
  jne    L57
L115:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
type_infered: f32

tool: D5: 2

assistant: ```c
void predict(filt, x_dim, y_dim, x_pos, y_pos, result, f_or_e) register float *filt, *result;
register int x_dim;
int y_dim, x_pos, y_pos, f_or_e;
{
  register int y_filt, x_filt, y_res, x_res;
  register float taps_used = 0;
  register float fraction;
  int filt_sz = x_dim * y_dim;
  int x_start = ((x_pos > 0) ? (x_pos - 1) : ((x_pos < 0) ? (x_pos + 1) : 0));
  int y_start = x_dim * ((y_pos > 0) ? (y_pos - 1) : ((y_pos < 0) ? (y_pos + 1) : 0));
  int i;
  for (i = 0; i < filt_sz; i++)
    result[i] = 0.0;
  for (y_filt = 0, y_res = y_start; y_filt < filt_sz; y_filt += x_dim, y_res += x_dim)
    if ((y_res >= 0) && (y_res < filt_sz))
      for (x_filt = y_filt, x_res = x_start; x_filt < y_filt + x_dim; x_filt++, x_res++)
        if ((x_res >= 0) && (x_res < x_dim)) {
          result[y_res + x_res] = filt[x_filt];
          taps_used += filt[x_filt];
        }
  if (f_or_e == 0) {
    fraction = ((float)2.0) / ((float)taps_used);
    for (i = 0; i < filt_sz; i++)
      result[i] *= fraction;
  }
}
```