user: Translate the below assembly code into C programming language:

```asm
<distort_vec_expl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,-0x8(%rsp)
  mov    %rsi,%rbx
  mov    %rdx,%r10
  mov    %rcx,%r11
  mov    %r8,%r12
  mov    0x38(%rsp),%r14d
  mov    %r9d,%r13d
  imul   %r14d,%r13d
  test   %r13d,%r13d
  jle    L198
  mov    %r8,%rax
  lea    -0x1(%r13),%ecx
  lea    0x4(%r8,%rcx,4),%rdx
L139:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L139
  mov    %rbx,%rax
  lea    0x1(%rbx,%rcx,1),%rdx
L173:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L173
  test   %r14d,%r14d
  jle    L49
L79:
  movslq %r9d,%rax
  mov    %rax,-0x18(%rsp)
  mov    -0x8(%rsp),%r15
  shl    $0x2,%rax
  mov    %rax,-0x10(%rsp)
  mov    $0x0,%r8d
  mov    %r9d,%ebp
  jmp    L166
L152:
  add    $0x1,%rdx
  cmp    %rdx,%rbp
  je     L20
L54:
  cvttss2si (%r10,%rdx,4),%ecx
  add    %edx,%ecx
  cvttss2si (%r11,%rdx,4),%eax
  add    %r8d,%eax
  mov    %ecx,%esi
  or     %eax,%esi
  shr    $0x1f,%esi
  cmp    %ecx,%r9d
  setle  %dil
  or     %sil,%dil
  jne    L152
  cmp    %eax,%r14d
  jle    L152
  imul   %r9d,%eax
  add    %ecx,%eax
  cmp    %r13d,%eax
  jge    L84
  test   %eax,%eax
  js     L84
  cltq
  movzbl (%r15,%rdx,1),%ecx
  add    %ecx,(%r12,%rax,4)
  addb   $0x1,(%rbx,%rax,1)
  jmp    L152
L20:
  add    $0x1,%r8d
  add    -0x18(%rsp),%r15
  mov    -0x10(%rsp),%rax
  add    %rax,%r10
  add    %rax,%r11
  cmp    %r8d,%r14d
  jle    L2
L166:
  test   %r9d,%r9d
  jle    L20
  mov    $0x0,%edx
  jmp    L54
L2:
  test   %r13d,%r13d
  jle    L84
L49:
  mov    $0x0,%ecx
  mov    -0x8(%rsp),%rdi
  jmp    L190
L117:
  movzbl %al,%esi
  mov    (%r12,%rcx,4),%eax
  cltd
  idiv   %esi
L29:
  mov    %al,(%rbx,%rcx,1)
  add    $0x1,%rcx
  cmp    %ecx,%r13d
  jle    L84
L190:
  movzbl (%rbx,%rcx,1),%eax
  test   %al,%al
  jne    L117
  movzbl (%rdi,%rcx,1),%eax
  jmp    L29
L198:
  test   %r14d,%r14d
  jg     L79
L84:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void distort_vec_expl(unsigned char *in, unsigned char *out, float *vecx, float *vecy, int *acc, int width, int height) {
  int i, j;
  unsigned char *ino;
  float *vecxo, *vecyo;
  int destidx;
  int vecxi, vecyi;
  for (i = 0; i < width * height; i++)
    acc[i] = 0;
  for (i = 0; i < width * height; i++)
    out[i] = 0;
  for (j = 0; j < height; j++) {
    ino = in + j * width;
    vecxo = vecx + j * width;
    vecyo = vecy + j * width;
    for (i = 0; i < width; i++) {
      vecxi = i + (int)(vecxo[i]);
      vecyi = j + (int)(vecyo[i]);
      if (vecxi < 0)
        continue;
      if (vecyi < 0)
        continue;
      if (vecxi >= width)
        continue;
      if (vecyi >= height)
        continue;
      if ((vecxi + width * vecyi) < 0)
        return;
      if ((vecxi + width * vecyi) >= width * height)
        return;
      destidx = vecxi + width * vecyi;
      acc[destidx] += ino[i];
      out[destidx]++;
    }
  }
  for (i = 0; i < width * height; i++) {
    if (out[i] == 0) {
      out[i] = in[i];
    } else {
      out[i] = acc[i] / out[i];
    }
  }
}
```