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

```asm
<qsort_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x260,%rsp
  mov    %rdi,-0x258(%rbp)
  mov    %rsi,-0x260(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x210(%rbp)
  mov    -0x260(%rbp),%rax
  sub    $0x1,%eax
  mov    %eax,-0x20c(%rbp)
  movl   $0x1,-0x23c(%rbp)
L98:
  subl   $0x1,-0x23c(%rbp)
  mov    -0x23c(%rbp),%eax
  cltq
  mov    -0x210(%rbp,%rax,8),%eax
  mov    %eax,-0x238(%rbp)
  mov    -0x23c(%rbp),%eax
  cltq
  mov    -0x20c(%rbp,%rax,8),%eax
  mov    %eax,-0x234(%rbp)
  mov    -0x234(%rbp),%eax
  sub    -0x238(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x230(%rbp)
  cmpl   $0x1,-0x230(%rbp)
  jle    L47
  cmpl   $0xf,-0x230(%rbp)
  jle    L15
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idivl  -0x230(%rbp)
  mov    -0x238(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x21c(%rbp)
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idivl  -0x230(%rbp)
  mov    -0x238(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x218(%rbp)
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idivl  -0x230(%rbp)
  mov    -0x238(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x214(%rbp)
  mov    -0x21c(%rbp),%edx
  mov    -0x218(%rbp),%eax
  cmp    %eax,%edx
  jle    L69
  mov    -0x21c(%rbp),%eax
  mov    %eax,-0x22c(%rbp)
  mov    -0x218(%rbp),%eax
  mov    %eax,-0x21c(%rbp)
  mov    -0x22c(%rbp),%eax
  mov    %eax,-0x218(%rbp)
L69:
  mov    -0x218(%rbp),%edx
  mov    -0x214(%rbp),%eax
  cmp    %eax,%edx
  jle    L155
  mov    -0x218(%rbp),%eax
  mov    %eax,-0x228(%rbp)
  mov    -0x214(%rbp),%eax
  mov    %eax,-0x218(%rbp)
  mov    -0x228(%rbp),%eax
  mov    %eax,-0x214(%rbp)
L155:
  mov    -0x21c(%rbp),%edx
  mov    -0x214(%rbp),%eax
  cmp    %eax,%edx
  jle    L185
  mov    -0x21c(%rbp),%eax
  mov    %eax,-0x224(%rbp)
  mov    -0x214(%rbp),%eax
  mov    %eax,-0x21c(%rbp)
  mov    -0x224(%rbp),%eax
  mov    %eax,-0x214(%rbp)
L185:
  mov    -0x218(%rbp),%eax
  mov    %eax,-0x240(%rbp)
  jmp    L16
L15:
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idivl  -0x230(%rbp)
  mov    -0x238(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x240(%rbp)
L16:
  mov    -0x238(%rbp),%eax
  mov    %eax,-0x248(%rbp)
  mov    -0x234(%rbp),%eax
  mov    %eax,-0x244(%rbp)
  jmp    L108
L152:
  addl   $0x1,-0x248(%rbp)
L108:
  mov    -0x248(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x240(%rbp)
  jg     L152
  jmp    L31
L34:
  subl   $0x1,-0x244(%rbp)
L31:
  mov    -0x244(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x240(%rbp)
  jl     L34
  mov    -0x248(%rbp),%eax
  cmp    -0x244(%rbp),%eax
  jg     L182
  mov    -0x248(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x220(%rbp)
  mov    -0x244(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rdx,%rax
  mov    -0x248(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x258(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x244(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x258(%rbp),%rax
  add    %rax,%rdx
  mov    -0x220(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x248(%rbp)
  subl   $0x1,-0x244(%rbp)
L182:
  mov    -0x248(%rbp),%eax
  cmp    -0x244(%rbp),%eax
  jle    L108
  mov    -0x238(%rbp),%eax
  cmp    -0x244(%rbp),%eax
  jge    L110
  mov    -0x23c(%rbp),%eax
  cltq
  mov    -0x238(%rbp),%edx
  mov    %edx,-0x210(%rbp,%rax,8)
  mov    -0x23c(%rbp),%eax
  cltq
  mov    -0x244(%rbp),%edx
  mov    %edx,-0x20c(%rbp,%rax,8)
  addl   $0x1,-0x23c(%rbp)
L110:
  mov    -0x248(%rbp),%eax
  cmp    -0x234(%rbp),%eax
  jge    L188
  mov    -0x23c(%rbp),%eax
  cltq
  mov    -0x248(%rbp),%edx
  mov    %edx,-0x210(%rbp,%rax,8)
  mov    -0x23c(%rbp),%eax
  cltq
  mov    -0x234(%rbp),%edx
  mov    %edx,-0x20c(%rbp,%rax,8)
  addl   $0x1,-0x23c(%rbp)
  jmp    L83
L47:
  nop
  jmp    L83
L188:
  nop
L83:
  cmpl   $0x0,-0x23c(%rbp)
  jle    L92
  jmp    L98
L92:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

assistant: ```c
void qsort_int(int v[], const size_t n) {
  int stack[64][2];
  int l, r, i, j, p;
  stack[0][0] = 0;
  stack[0][1] = n - 1;
  int depth = 1;
  int selements[3];
PARTITION:
  --depth;
  l = stack[depth][0];
  r = stack[depth][1];
  int psize = r - l + 1;
  if (psize < 2)
    goto NEXT_PARTITION;
  if (psize >= 16) {
    selements[0] = v[l + rand() % psize];
    selements[1] = v[l + rand() % psize];
    selements[2] = v[l + rand() % psize];
    if (selements[0] > selements[1]) {
      int t = selements[0];
      selements[0] = selements[1];
      selements[1] = t;
    };
    if (selements[1] > selements[2]) {
      int t = selements[1];
      selements[1] = selements[2];
      selements[2] = t;
    };
    if (selements[0] > selements[2]) {
      int t = selements[0];
      selements[0] = selements[2];
      selements[2] = t;
    };
    p = selements[1];
  } else
    p = v[l + rand() % psize];
  i = l;
  j = r;
  do {
    while (v[i] < p)
      ++i;
    while (v[j] > p)
      --j;
    if (i <= j) {
      {
        int t = v[i];
        v[i] = v[j];
        v[j] = t;
      };
      ++i;
      --j;
    }
  } while (i <= j);
  if (l < j) {
    stack[depth][0] = l;
    stack[depth][1] = j;
    depth++;
  }
  if (i < r) {
    stack[depth][0] = i;
    stack[depth][1] = r;
    depth++;
  }
NEXT_PARTITION:
  if (depth > 0)
    goto PARTITION;
}
```