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

```asm
<_glp_mc21a>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  movl   $0x1,-0x28(%rbp)
  jmp    L279
L152:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x10(%rbp),%rax
  add    %rcx,%rax
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x28(%rbp)
L279:
  mov    -0x28(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L152
  movl   $0x0,-0xc(%rbp)
  movl   $0x1,-0x18(%rbp)
  jmp    L31
L33:
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  movl   $0x1,-0x14(%rbp)
  jmp    L237
L101:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  js     L327
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  sub    -0x8(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  jmp    L262
L28:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L125
  addl   $0x1,-0x24(%rbp)
L262:
  mov    -0x24(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L28
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
L327:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x20(%rbp),%rax
  add    %rcx,%rax
  sub    $0x1,%edx
  mov    %edx,(%rax)
  movl   $0x1,-0x10(%rbp)
  jmp    L216
L206:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  js     L204
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  sub    -0x8(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  jmp    L280
L332:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x18(%rbp)
  je     L242
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x20(%rbp),%rax
  add    %rcx,%rax
  sub    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L314
L242:
  addl   $0x1,-0x24(%rbp)
L280:
  mov    -0x24(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L332
L204:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0xffffffff,-0x1c(%rbp)
  je     L195
  addl   $0x1,-0x10(%rbp)
L216:
  mov    -0x10(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L206
  nop
L314:
  addl   $0x1,-0x14(%rbp)
L237:
  mov    -0x14(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L101
  jmp    L10
L125:
  nop
L10:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x10(%rbp),%rax
  add    %rcx,%rax
  sub    $0x1,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0xc(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L297
L100:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0xffffffff,-0x1c(%rbp)
  je     L299
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %eax,%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x20(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  sub    $0x2,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L297:
  mov    -0x14(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L100
  jmp    L43
L195:
  nop
  jmp    L43
L299:
  nop
L43:
  addl   $0x1,-0x18(%rbp)
L31:
  mov    -0x18(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L33
  mov    -0xc(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jge    L193
  movl   $0x1,-0x28(%rbp)
  jmp    L196
L44:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x28(%rbp)
L196:
  mov    -0x28(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L44
  movl   $0x0,-0x14(%rbp)
  movl   $0x1,-0x28(%rbp)
  jmp    L167
L224:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L261
  addl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L188
L261:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  mov    %eax,(%rdx)
L188:
  addl   $0x1,-0x28(%rbp)
L167:
  mov    -0x28(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L224
  movl   $0x0,-0x14(%rbp)
  movl   $0x1,-0x28(%rbp)
  jmp    L179
L49:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L335
  addl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  mov    %eax,(%rdx)
L335:
  addl   $0x1,-0x28(%rbp)
L179:
  mov    -0x28(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L49
L193:
  mov    -0xc(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int _glp_mc21a(int n, const int icn[], const int ip[], const int lenr[], int iperm[], int pr[], int arp[], int cv[], int out[]) {
  int i, ii, in1, in2, j, j1, jord, k, kk, numnz;
  for (i = 1; i <= n; i++) {
    arp[i] = lenr[i] - 1;
    cv[i] = iperm[i] = 0;
  }
  numnz = 0;
  for (jord = 1; jord <= n; jord++) {
    j = jord;
    pr[j] = -1;
    for (k = 1; k <= jord; k++) {
      in1 = arp[j];
      if (in1 >= 0) {
        in2 = ip[j] + lenr[j] - 1;
        in1 = in2 - in1;
        for (ii = in1; ii <= in2; ii++) {
          i = icn[ii];
          if (iperm[i] == 0)
            goto L110;
        }
        arp[j] = -1;
      }
      out[j] = lenr[j] - 1;
      for (kk = 1; kk <= jord; kk++) {
        in1 = out[j];
        if (in1 >= 0) {
          in2 = ip[j] + lenr[j] - 1;
          in1 = in2 - in1;
          for (ii = in1; ii <= in2; ii++) {
            i = icn[ii];
            if (cv[i] != jord) {
              j1 = j;
              j = iperm[i];
              cv[i] = jord;
              pr[j] = j1;
              out[j1] = in2 - ii - 1;
              goto L100;
            }
          }
        }
        j = pr[j];
        if (j == -1)
          goto L130;
      }
    L100:;
    }
  L110:
    iperm[i] = j;
    arp[j] = in2 - ii - 1;
    numnz++;
    for (k = 1; k <= jord; k++) {
      j = pr[j];
      if (j == -1)
        break;
      ii = ip[j] + lenr[j] - out[j] - 2;
      i = icn[ii];
      iperm[i] = j;
    }
  L130:;
  }
  if (numnz < n) {
    for (i = 1; i <= n; i++)
      arp[i] = 0;
    k = 0;
    for (i = 1; i <= n; i++) {
      if (iperm[i] == 0)
        out[++k] = i;
      else
        arp[iperm[i]] = i;
    }
    k = 0;
    for (i = 1; i <= n; i++) {
      if (arp[i] == 0)
        iperm[out[++k]] = i;
    }
  }
  return numnz;
}
```