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

```asm
<MatrixFilter>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    0x0(,%rdx,4),%ebp
  push   %rbx
  mov    %edx,%ebx
  sub    $0xb8,%rsp
  mov    %edi,0x54(%rsp)
  mov    %ebp,%edi
  mov    %esi,0x50(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r8,0x20(%rsp)
  movss  %xmm0,0x44(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  mov    %ebp,%edi
  mov    %rax,%r12
  call   <malloc@plt>
  test   %ebx,%ebx
  mov    0x8(%rsp),%r10
  mov    %rax,0x30(%rsp)
  jle    L575
  lea    -0x1(%rbx),%eax
  cmp    $0x2,%eax
  jbe    L558
  mov    %ebx,%edx
  movdqa D5(%rip),%xmm0
  mov    %r12,%rax
  shr    $0x2,%edx
  shl    $0x4,%rdx
  add    %r12,%rdx
  nopl   0x0(%rax,%rax,1)
L337:
  movups %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L337
  mov    %ebx,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%bl
  je     L575
L451:
  movslq %eax,%rdx
  movl   $0x1,(%r12,%rdx,4)
  lea    0x0(,%rdx,4),%rcx
  lea    0x1(%rax),%edx
  cmp    %edx,%ebx
  jle    L575
  movl   $0x1,0x4(%r12,%rcx,1)
  add    $0x2,%eax
  cmp    %ebx,%eax
  jge    L575
  movl   $0x1,0x8(%r12,%rcx,1)
L575:
  mov    0x50(%rsp),%r15d
  test   %r15d,%r15d
  jle    L258
  mov    0x54(%rsp),%edx
  movl   $0x0,0x40(%rsp)
  mov    %r10,%r13
  mov    %r12,0x8(%rsp)
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    0x30(%rsp),%rdx
  sar    %eax
  mov    %eax,0x60(%rsp)
  lea    -0x2(%rbx),%eax
  lea    0x8(%r12,%rax,4),%r11
  lea    -0x1(%rbx),%eax
  lea    0x4(,%rax,4),%rax
  mov    %r11,%rbp
  add    %rax,%rdx
  add    %r12,%rax
  mov    %rdx,0x48(%rsp)
  mov    %rax,0x58(%rsp)
  nopl   0x0(%rax,%rax,1)
L701:
  mov    0x20(%rsp),%rax
  movq   0x0(%r13),%xmm0
  movss  0x8(%r13),%xmm7
  movq   (%rax),%xmm12
  movaps %xmm0,%xmm3
  movaps %xmm0,%xmm8
  movlps %xmm0,0x88(%rsp)
  movss  %xmm7,0x90(%rsp)
  shufps $0xe5,%xmm3,%xmm3
  movaps %xmm3,%xmm9
  movaps %xmm12,%xmm6
  movaps %xmm12,%xmm10
  movlps %xmm12,0x98(%rsp)
  shufps $0xe5,%xmm6,%xmm6
  movaps %xmm6,%xmm11
  movss  0x8(%rax),%xmm6
  movss  %xmm6,0xa0(%rsp)
  cmp    $0x1,%ebx
  jle    L323
  mov    0x8(%rsp),%rax
  movaps %xmm6,%xmm3
  movaps %xmm11,%xmm4
  movaps %xmm12,%xmm5
  movaps %xmm7,%xmm1
  movaps %xmm9,%xmm2
  xor    %ecx,%ecx
  xor    %edx,%edx
  add    $0x4,%rax
  nopl   (%rax)
L426:
  mov    (%rax),%r14d
  test   %r14d,%r14d
  je     L146
  addss  %xmm8,%xmm0
  addss  %xmm9,%xmm2
  add    $0x1,%edx
  mov    $0x1,%ecx
  addss  %xmm7,%xmm1
  addss  %xmm10,%xmm5
  addss  %xmm11,%xmm4
  addss  %xmm6,%xmm3
L146:
  add    $0x4,%rax
  cmp    %rbp,%rax
  jne    L426
  test   %cl,%cl
  je     L63
  movss  %xmm3,0xa0(%rsp)
  movaps %xmm5,%xmm12
  movss  %xmm4,0x9c(%rsp)
  unpcklps %xmm4,%xmm12
  movss  %xmm5,0x98(%rsp)
  movss  %xmm1,0x90(%rsp)
  movss  %xmm2,0x8c(%rsp)
  movss  %xmm0,0x88(%rsp)
L601:
  unpcklps %xmm2,%xmm0
  test   %edx,%edx
  je     L504
  pxor   %xmm4,%xmm4
  movss  D4(%rip),%xmm2
  cvtsi2ss %edx,%xmm4
  divss  %xmm4,%xmm2
  mulss  %xmm2,%xmm1
  movaps %xmm2,%xmm4
  shufps $0xe0,%xmm4,%xmm4
  mulss  %xmm3,%xmm2
  mulps  %xmm4,%xmm0
  mulps  %xmm12,%xmm4
  movss  %xmm1,0x90(%rsp)
  movss  %xmm2,0xa0(%rsp)
  movlps %xmm0,0x88(%rsp)
  movlps %xmm4,0x98(%rsp)
L504:
  mov    0x8(%rsp),%r15
  xor    %r14d,%r14d
  xor    %r12d,%r12d
  mov    %rbp,0x38(%rsp)
  lea    0x88(%rsp),%rax
  mov    %ebx,%ebp
  mov    %r13,0x18(%rsp)
  mov    %r14d,%ebx
  mov    %rax,0x28(%rsp)
  mov    %r15,%r14
  pxor   %xmm0,%xmm0
  mov    %r12d,%r15d
  jmp    L38
  nopl   0x0(%rax)
L118:
  add    $0x1,%r15d
  add    $0x4,%r14
  cmp    %r15d,%ebp
  jle    L668
L38:
  mov    (%r14),%r12d
  test   %r12d,%r12d
  je     L118
  lea    (%r15,%r15,2),%esi
  mov    0x20(%rsp),%rax
  mov    0x28(%rsp),%rdi
  add    $0x1,%ebx
  movslq %esi,%rsi
  movss  %xmm0,0x10(%rsp)
  add    $0x1,%r15d
  shl    $0x2,%rsi
  lea    (%rax,%rsi,1),%r13
  add    0x18(%rsp),%rsi
  call   <inline_diff3f@plt>
  lea    0x98(%rsp),%rdi
  mov    %r13,%rsi
  mov    %rax,%r12
  call   <inline_diff3f@plt>
  mov    %r12,%rdi
  sub    %rax,%rdi
  call   <fabs@plt>
  pxor   %xmm1,%xmm1
  movss  0x10(%rsp),%xmm0
  cvtsi2ss %rax,%xmm1
  mov    0x30(%rsp),%rax
  sub    0x8(%rsp),%rax
  movss  %xmm1,(%rax,%r14,1)
  addss  %xmm1,%xmm0
  add    $0x4,%r14
  cmp    %r15d,%ebp
  jg     L38
L668:
  mov    %ebx,%r14d
  mov    0x18(%rsp),%r13
  mov    %ebp,%ebx
  mov    0x38(%rsp),%rbp
  test   %r14d,%r14d
  je     L169
  pxor   %xmm1,%xmm1
  cvtsi2ss %r14d,%xmm1
  divss  %xmm1,%xmm0
  comiss D29(%rip),%xmm0
  ja     L476
L169:
  addl   $0x1,0x40(%rsp)
  mov    0x40(%rsp),%eax
  cmp    %eax,0x50(%rsp)
  jne    L701
  mov    0x8(%rsp),%r12
L258:
  cmpq   $0x0,0x30(%rsp)
  jne    L184
L494:
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L734
  add    $0xb8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L63:
  movaps %xmm9,%xmm2
  movaps %xmm7,%xmm1
  movaps %xmm6,%xmm3
  movaps %xmm8,%xmm0
  jmp    L601
  nopl   0x0(%rax,%rax,1)
L476:
  test   %ebx,%ebx
  jle    L169
  mov    0x30(%rsp),%rcx
  mov    0x8(%rsp),%rdx
  mov    %rcx,%rax
  sub    %rcx,%rdx
  nopl   0x0(%rax)
L198:
  movss  (%rax),%xmm1
  divss  %xmm0,%xmm1
  comiss 0x44(%rsp),%xmm1
  jbe    L685
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  movl   $0x0,-0x4(%rax)
  cmp    0x48(%rsp),%rax
  jne    L198
L321:
  mov    0x8(%rsp),%r11
  mov    %rbp,0x10(%rsp)
  xor    %r15d,%r15d
  mov    %r13,%r8
  mov    0x60(%rsp),%edx
  mov    %r11,%r14
  jmp    L655
  nopl   (%rax)
L151:
  mov    %rcx,%r14
  cmp    %r15d,%ebx
  je     L130
L655:
  mov    (%r14),%ebp
  mov    %r15d,%r12d
  lea    0x4(%r14),%rcx
  add    $0x1,%r15d
  test   %ebp,%ebp
  je     L151
  mov    0x54(%rsp),%eax
  cmp    %edx,%eax
  jle    L432
  mov    %r14,%rsi
  mov    %r12d,%ebp
  mov    %r12d,%ecx
  jmp    L301
  nopl   (%rax)
L623:
  cmp    $0xffffffff,%ecx
  je     L719
L301:
  mov    (%rsi),%r11d
  test   %r11d,%r11d
  je     L229
  sub    $0x1,%eax
  mov    %ecx,%ebp
L229:
  sub    $0x1,%ecx
  sub    $0x4,%rsi
  cmp    %eax,%edx
  jl     L623
L719:
  test   %eax,%eax
  lea    0x4(%r14),%rcx
  setle  %r9b
  cmp    %r15d,%ebx
  jle    L28
  mov    %rcx,%rdi
  mov    %r15d,%esi
  test   %r9b,%r9b
  je     L644
  jmp    L28
  nopl   0x0(%rax)
L383:
  test   %r9b,%r9b
  jne    L28
L644:
  mov    (%rdi),%r10d
  test   %r10d,%r10d
  je     L660
  sub    $0x1,%eax
  mov    %esi,%r12d
L660:
  add    $0x1,%esi
  test   %eax,%eax
  setle  %r9b
  add    $0x4,%rdi
  cmp    %esi,%ebx
  jg     L383
L28:
  mov    %ebp,%esi
  sub    $0x1,%esi
  js     L22
  test   %r9b,%r9b
  jne    L22
  mov    0x8(%rsp),%r11
  movslq %esi,%rdi
  lea    (%r11,%rdi,4),%rdi
  jmp    L669
  xchg   %ax,%ax
L622:
  test   %esi,%esi
  js     L22
L669:
  mov    (%rdi),%r9d
  test   %r9d,%r9d
  je     L5
  sub    $0x1,%eax
  mov    %esi,%ebp
L5:
  sub    $0x1,%esi
  sub    $0x4,%rdi
  test   %eax,%eax
  jg     L622
L22:
  mov    %r12d,%eax
  sub    %ebp,%eax
  cmp    0x54(%rsp),%eax
  jl     L151
  cmp    %r12d,%ebp
  jg     L151
  mov    0x8(%rsp),%rdi
  movslq %ebp,%rax
  lea    0x3(%r12,%r12,2),%r11d
  xor    %r10d,%r10d
  movss  0x88(%rsp),%xmm6
  movss  0x8c(%rsp),%xmm9
  movss  0x90(%rsp),%xmm8
  lea    (%rdi,%rax,4),%r9
  xor    %edi,%edi
  movss  0x98(%rsp),%xmm11
  mov    %r9,0x18(%rsp)
  mov    %r9,%rsi
  lea    0x0(%rbp,%rbp,2),%eax
  movaps %xmm9,%xmm2
  mov    0x20(%rsp),%r9
  movaps %xmm11,%xmm1
  movaps %xmm8,%xmm3
  movaps %xmm6,%xmm0
  movss  0x9c(%rsp),%xmm10
  movss  0xa0(%rsp),%xmm7
  movaps %xmm10,%xmm4
  movaps %xmm7,%xmm5
  jmp    L249
  nopl   (%rax)
L597:
  movslq %eax,%rdi
  shl    $0x2,%rdi
  lea    (%r8,%rdi,1),%r13
  add    %r9,%rdi
  movss  0x0(%r13),%xmm0
  movss  0x4(%r13),%xmm2
  movss  0x8(%r13),%xmm3
  movss  (%rdi),%xmm1
  movss  0x4(%rdi),%xmm4
  movss  0x8(%rdi),%xmm5
L226:
  add    $0x1,%r10d
  mov    $0x1,%edi
L529:
  add    $0x3,%eax
  add    $0x4,%rsi
  cmp    %eax,%r11d
  je     L508
L249:
  mov    (%rsi),%r13d
  test   %r13d,%r13d
  je     L529
  test   %r10d,%r10d
  je     L597
  addss  (%r8),%xmm0
  addss  0x4(%r8),%xmm2
  addss  0x8(%r8),%xmm3
  addss  (%r9),%xmm1
  addss  0x4(%r9),%xmm4
  addss  0x8(%r9),%xmm5
  jmp    L226
  nopl   0x0(%rax,%rax,1)
L685:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    0x48(%rsp),%rax
  jne    L198
  jmp    L321
  nopw   0x0(%rax,%rax,1)
L130:
  mov    0x8(%rsp),%rcx
  mov    0x30(%rsp),%rdx
  mov    %r8,%r13
  mov    0x10(%rsp),%rbp
  mov    %rcx,%rax
  sub    %rcx,%rdx
  mov    0x58(%rsp),%rcx
  nopl   (%rax)
L205:
  mov    (%rax),%esi
  test   %esi,%esi
  je     L141
  movss  (%rdx,%rax,1),%xmm0
  comiss 0x44(%rsp),%xmm0
  jbe    L141
  movl   $0x0,(%rax)
L141:
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L205
  jmp    L169
  cs nopw 0x0(%rax,%rax,1)
L323:
  je     L504
  jmp    L169
L508:
  mov    0x18(%rsp),%r9
  test   %dil,%dil
  je     L528
  movss  %xmm1,0x98(%rsp)
  unpcklps %xmm4,%xmm1
  movss  %xmm5,0xa0(%rsp)
  movss  %xmm4,0x9c(%rsp)
  movss  %xmm3,0x90(%rsp)
  movss  %xmm2,0x8c(%rsp)
  movss  %xmm0,0x88(%rsp)
L336:
  unpcklps %xmm2,%xmm0
  test   %r10d,%r10d
  je     L151
  pxor   %xmm4,%xmm4
  xor    %r13d,%r13d
  movss  D4(%rip),%xmm2
  lea    0x88(%rsp),%rax
  cvtsi2ss %r10d,%xmm4
  mov    %r15d,0x64(%rsp)
  mov    %r12d,%r15d
  mov    %r14,0x68(%rsp)
  mov    %ebp,%r14d
  mov    %ebx,0x70(%rsp)
  mov    %r13d,%ebx
  mov    %r9,%r13
  mov    %rax,0x38(%rsp)
  divss  %xmm4,%xmm2
  mov    %r8,0x28(%rsp)
  mov    %edx,0x74(%rsp)
  mov    %rcx,0x78(%rsp)
  mulss  %xmm2,%xmm3
  movaps %xmm2,%xmm4
  shufps $0xe0,%xmm4,%xmm4
  mulss  %xmm5,%xmm2
  mulps  %xmm4,%xmm0
  mulps  %xmm1,%xmm4
  movss  %xmm3,0x90(%rsp)
  movss  %xmm2,0xa0(%rsp)
  movlps %xmm0,0x88(%rsp)
  pxor   %xmm0,%xmm0
  movlps %xmm4,0x98(%rsp)
  jmp    L384
  nopl   0x0(%rax,%rax,1)
L573:
  add    $0x1,%r14d
  add    $0x4,%r13
  cmp    %r15d,%r14d
  jg     L733
L384:
  mov    0x0(%r13),%edi
  test   %edi,%edi
  je     L573
  lea    (%r14,%r14,2),%eax
  mov    0x20(%rsp),%rdx
  add    $0x1,%r14d
  add    $0x1,%ebx
  cltq
  mov    0x38(%rsp),%rdi
  movss  %xmm0,0x18(%rsp)
  add    $0x4,%r13
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%r12
  mov    0x28(%rsp),%rdx
  lea    (%rdx,%rax,1),%rsi
  call   <inline_diff3f@plt>
  lea    0x98(%rsp),%rdi
  mov    %r12,%rsi
  mov    %rax,%rbp
  call   <inline_diff3f@plt>
  mov    %rbp,%rdi
  sub    %rax,%rdi
  call   <fabs@plt>
  pxor   %xmm1,%xmm1
  movss  0x18(%rsp),%xmm0
  cvtsi2ss %rax,%xmm1
  addss  %xmm1,%xmm0
  cmp    %r15d,%r14d
  jle    L384
L733:
  mov    %ebx,%r13d
  mov    0x64(%rsp),%r15d
  mov    0x68(%rsp),%r14
  mov    0x70(%rsp),%ebx
  mov    0x28(%rsp),%r8
  mov    0x74(%rsp),%edx
  mov    0x78(%rsp),%rcx
  test   %r13d,%r13d
  je     L151
  pxor   %xmm1,%xmm1
  cvtsi2ss %r13d,%xmm1
  mov    0x30(%rsp),%r13
  sub    0x8(%rsp),%r13
  add    %r14,%r13
  divss  %xmm1,%xmm0
  comiss D29(%rip),%xmm0
  ja     L440
  movl   $0x0,0x0(%r13)
  jmp    L151
L184:
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  jmp    L494
L432:
  mov    %r12d,%ebp
  jmp    L719
L528:
  movaps %xmm11,%xmm1
  movaps %xmm9,%xmm2
  movaps %xmm8,%xmm3
  unpcklps %xmm10,%xmm1
  movaps %xmm7,%xmm5
  movaps %xmm6,%xmm0
  jmp    L336
L558:
  xor    %eax,%eax
  jmp    L451
L440:
  lea    -0x3(%r15,%r15,2),%r12d
  lea    0x88(%rsp),%rdi
  mov    %edx,0x64(%rsp)
  movslq %r12d,%r12
  mov    %rcx,0x38(%rsp)
  shl    $0x2,%r12
  mov    %r8,0x18(%rsp)
  lea    (%r8,%r12,1),%rsi
  movss  %xmm0,0x28(%rsp)
  call   <inline_diff3f@plt>
  lea    0x98(%rsp),%rdi
  mov    %rax,%rbp
  mov    0x20(%rsp),%rax
  lea    (%rax,%r12,1),%rsi
  call   <inline_diff3f@plt>
  mov    %rbp,%rdi
  sub    %rax,%rdi
  call   <fabs@plt>
  pxor   %xmm1,%xmm1
  movss  0x28(%rsp),%xmm0
  mov    0x18(%rsp),%r8
  cvtsi2ss %rax,%xmm1
  mov    0x38(%rsp),%rcx
  mov    0x64(%rsp),%edx
  divss  %xmm0,%xmm1
  movss  %xmm1,0x0(%r13)
  jmp    L151
L734:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D5
type_infered: byte[16]
name: read_data
arguments: data_label: D4
type_infered: byte[4]
name: read_data
arguments: data_label: D29
type_infered: byte[4]

tool: {"D5": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

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

tool: {"D29": [0x17,0xb7,0xd1,0x38]}

assistant: ```c
int *MatrixFilter(float cutoff, int window, int n_pass, int nv, float *v1, float *v2) {
  int *flag;
  float center1[3], center2[3];
  int a, b, c, cc;
  float *vv1, *vv2;
  float *dev, avg_dev;
  int wc;
  int start, finish;
  int cnt;
  flag = (int *)malloc(sizeof(int) * (nv));
  dev = (float *)malloc(sizeof(float) * (nv));
  for (a = 0; a < nv; a++) {
    flag[a] = 1;
  }
  for (c = 0; c < n_pass; c++) {
    cc = 0;
    {
      (center1)[0] = (v1)[0];
      (center1)[1] = (v1)[1];
      (center1)[2] = (v1)[2];
    };
    {
      (center2)[0] = (v2)[0];
      (center2)[1] = (v2)[1];
      (center2)[2] = (v2)[2];
    };
    for (a = 1; a < nv; a++) {
      if (flag[a]) {
        vv1 = v1 + 3 * a;
        vv2 = v2 + 3 * a;
        {
          (center1)[0] = (v1)[0] + (center1)[0];
          (center1)[1] = (v1)[1] + (center1)[1];
          (center1)[2] = (v1)[2] + (center1)[2];
        };
        {
          (center2)[0] = (v2)[0] + (center2)[0];
          (center2)[1] = (v2)[1] + (center2)[1];
          (center2)[2] = (v2)[2] + (center2)[2];
        };
        cc++;
      }
    }
    if (cc) {
      {
        (center1)[0] = (center1)[0] * (1.0F / cc);
        (center1)[1] = (center1)[1] * (1.0F / cc);
        (center1)[2] = (center1)[2] * (1.0F / cc);
      };
      {
        (center2)[0] = (center2)[0] * (1.0F / cc);
        (center2)[1] = (center2)[1] * (1.0F / cc);
        (center2)[2] = (center2)[2] * (1.0F / cc);
      };
    }
    avg_dev = 0.0F;
    cc = 0;
    for (a = 0; a < nv; a++) {
      if (flag[a]) {
        vv1 = v1 + 3 * a;
        vv2 = v2 + 3 * a;
        dev[a] = (float)fabs(inline_diff3f(center1, vv1) - inline_diff3f(center2, vv2));
        avg_dev += dev[a];
        cc++;
      }
    }
    if (cc) {
      avg_dev /= cc;
      if (avg_dev > 0.0001F) {
        for (a = 0; a < nv; a++) {
          if ((dev[a] / avg_dev) > cutoff)
            flag[a] = 0;
          dev[a] = 0.0F;
        }
        for (a = 0; a < nv; a++) {
          if (flag[a]) {
            cnt = window;
            b = a;
            start = a;
            finish = a;
            while (cnt > (window / 2)) {
              if (b < 0)
                break;
              if (flag[b]) {
                start = b;
                cnt--;
              }
              b--;
            }
            b = a + 1;
            while (cnt > 0) {
              if (b >= nv)
                break;
              if (flag[b]) {
                finish = b;
                cnt--;
              }
              b++;
            }
            b = start - 1;
            while (cnt > 0) {
              if (b < 0)
                break;
              if (flag[b]) {
                start = b;
                cnt--;
              }
              b--;
            }
            if ((finish - start) >= window) {
              wc = 0;
              for (b = start; b <= finish; b++)
                if (flag[b]) {
                  vv1 = v1 + 3 * b;
                  vv2 = v2 + 3 * b;
                  if (!wc) {
                    {
                      (center1)[0] = (vv1)[0];
                      (center1)[1] = (vv1)[1];
                      (center1)[2] = (vv1)[2];
                    };
                    {
                      (center2)[0] = (vv2)[0];
                      (center2)[1] = (vv2)[1];
                      (center2)[2] = (vv2)[2];
                    };
                  } else {
                    {
                      (center1)[0] = (v1)[0] + (center1)[0];
                      (center1)[1] = (v1)[1] + (center1)[1];
                      (center1)[2] = (v1)[2] + (center1)[2];
                    };
                    {
                      (center2)[0] = (v2)[0] + (center2)[0];
                      (center2)[1] = (v2)[1] + (center2)[1];
                      (center2)[2] = (v2)[2] + (center2)[2];
                    };
                  }
                  wc++;
                }
              if (wc) {
                {
                  (center1)[0] = (center1)[0] * (1.0F / wc);
                  (center1)[1] = (center1)[1] * (1.0F / wc);
                  (center1)[2] = (center1)[2] * (1.0F / wc);
                };
                {
                  (center2)[0] = (center2)[0] * (1.0F / wc);
                  (center2)[1] = (center2)[1] * (1.0F / wc);
                  (center2)[2] = (center2)[2] * (1.0F / wc);
                };
                avg_dev = 0.0F;
                wc = 0;
                for (b = start; b <= finish; b++)
                  if (flag[b]) {
                    vv1 = v1 + 3 * b;
                    vv2 = v2 + 3 * b;
                    avg_dev += (float)fabs(inline_diff3f(center1, vv1) - inline_diff3f(center2, vv2));
                    wc++;
                  }
                if (wc) {
                  avg_dev /= wc;
                  vv1 = v1 + 3 * a;
                  vv2 = v2 + 3 * a;
                  if (avg_dev > 0.0001F)
                    dev[a] = (float)fabs(inline_diff3f(center1, vv1) - inline_diff3f(center2, vv2)) / avg_dev;
                  else
                    dev[a] = 0.0F;
                }
              }
            }
          }
        }
        for (a = 0; a < nv; a++)
          if (flag[a])
            if (dev[a] > cutoff)
              flag[a] = 0;
      }
    }
  }
  {
    if (dev) {
      free(dev);
      dev = ((void *)0);
    }
  };
  return flag;
}
```