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

```asm
<freev_>:
  endbr64
  push   %r15
  mov    %edi,%r10d
  mov    %rsi,%rdi
  push   %r14
  lea    0x1(%r10),%esi
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  lea    -0x4(%rdx),%rbp
  push   %rbx
  mov    0x58(%rsp),%eax
  movl   $0x0,(%rcx)
  mov    0x38(%rsp),%rbx
  mov    %esi,%ecx
  mov    %esi,(%r8)
  test   %eax,%eax
  jle    L61
  mov    0x50(%rsp),%eax
  test   %eax,%eax
  je     L61
  mov    (%rdi),%eax
  mov    %rdx,%r11
  lea    -0x4(%rbx),%r13
  sub    $0x4,%r9
  test   %eax,%eax
  jle    L107
  mov    $0x1,%edx
  nopl   (%rax)
L43:
  movslq -0x4(%r11,%rdx,4),%r15
  mov    %r15,%r14
  mov    0x0(%r13,%r15,4),%r15d
  test   %r15d,%r15d
  jle    L172
  mov    (%r8),%eax
  add    $0x1,%rdx
  sub    $0x1,%eax
  mov    %eax,(%r8)
  cltq
  mov    %r14d,(%r9,%rax,4)
  mov    (%rdi),%eax
  cmp    %edx,%eax
  jge    L43
L107:
  lea    0x1(%rax),%edx
  movslq %edx,%rax
  cmp    %edx,%r10d
  jl     L177
  nopw   0x0(%rax,%rax,1)
L191:
  movslq -0x4(%r11,%rax,4),%rdx
  mov    0x0(%r13,%rdx,4),%r15d
  mov    %rdx,%r14
  test   %r15d,%r15d
  jg     L42
  mov    (%r12),%edx
  add    $0x1,%edx
  mov    %edx,(%r12)
  movslq %edx,%rdx
  mov    %r14d,(%r9,%rdx,4)
L42:
  add    $0x1,%rax
  cmp    %eax,%r10d
  jge    L191
L177:
  mov    (%r8),%edx
L171:
  mov    $0x1,%eax
  cmp    %edx,%r10d
  jge    L68
  mov    (%r12),%r9d
  test   %r9d,%r9d
  jle    L81
L68:
  mov    0x40(%rsp),%rdx
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  movl   $0x0,(%rdi)
  test   %r10d,%r10d
  jg     L142
  jmp    L139
  nopl   0x0(%rax)
L17:
  sub    $0x1,%ecx
  movslq %ecx,%rdx
  mov    %eax,0x0(%rbp,%rdx,4)
  add    $0x1,%rax
  cmp    %rax,%rsi
  je     L139
L142:
  mov    -0x4(%rbx,%rax,4),%edx
  test   %edx,%edx
  jg     L17
  mov    (%rdi),%edx
  add    $0x1,%edx
  mov    %edx,(%rdi)
  movslq %edx,%rdx
  mov    %eax,0x0(%rbp,%rdx,4)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L142
L139:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L61:
  mov    %esi,%edx
  jmp    L171
  nopl   0x0(%rax)
L81:
  mov    0x48(%rsp),%rax
  mov    (%rax),%r8d
  xor    %eax,%eax
  test   %r8d,%r8d
  setne  %al
  jmp    L68
  nopw   0x0(%rax,%rax,1)
L172:
  add    $0x1,%rdx
  cmp    %edx,%eax
  jge    L43
  lea    0x1(%rax),%edx
  movslq %edx,%rax
  cmp    %edx,%r10d
  jge    L191
  jmp    L177
```

assistant: ```c
void freev_(int n, int *nfree, int *index, int *nenter, int *ileave, int *indx2, int *iwhere, int *wrk, int *updatd, int cnstnd, int iter) {
  int i, k, iact;
  --iwhere;
  --indx2;
  --index;
  *nenter = 0;
  *ileave = n + 1;
  if (iter > 0 && cnstnd) {
    for (i = 1; i <= *nfree; ++i) {
      k = index[i];
      if (iwhere[k] > 0) {
        --(*ileave);
        indx2[*ileave] = k;
      }
    }
    for (i = *nfree + 1; i <= n; ++i) {
      k = index[i];
      if (iwhere[k] <= 0) {
        ++(*nenter);
        indx2[*nenter] = k;
      }
    }
  }
  *wrk = *ileave < n + 1 || *nenter > 0 || *updatd;
  *nfree = 0;
  iact = n + 1;
  for (i = 1; i <= n; ++i) {
    if (iwhere[i] <= 0) {
      ++(*nfree);
      index[*nfree] = i;
    } else {
      --iact;
      index[iact] = i;
    }
  }
}
```