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

```asm
<tmpmysortstringint>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x14(%rsp)
  mov    %esi,0x18(%rsp)
  cmp    $0x1,%edi
  jle    L121
  mov    %edi,%ebx
  mov    %esi,%r14d
  mov    %rdx,%r13
  mov    %rcx,%r15
  mov    $0x0,%eax
  call   <rand@plt>
  mov    (%r15),%ecx
  cltd
  idiv   %ebx
  movslq %edx,%rdx
  lea    (%r15,%rdx,4),%rax
  mov    (%rax),%edx
  mov    %edx,(%r15)
  mov    %ecx,(%rax)
  movslq %r14d,%r14
  movslq (%r15),%rax
  mov    0x0(%r13,%rax,8),%rax
  movsbl (%rax,%r14,1),%ecx
  sub    $0x1,%ebx
  lea    0x4(%r15),%r8
  mov    %ebx,%ebp
  mov    $0x1,%r10d
  mov    $0x2,%r9d
  movl   $0x1,0x10(%rsp)
L70:
  mov    %r10d,%r12d
  mov    %r8,%r11
  mov    (%r8),%edx
  movslq %edx,%rax
  mov    0x0(%r13,%rax,8),%rax
  movsbl (%rax,%r14,1),%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jle    L26
  movslq %ebx,%rax
  lea    (%r15,%rax,4),%rax
  mov    %r8,0x8(%rsp)
  jmp    L68
L26:
  test   %eax,%eax
  jne    L6
  mov    0x10(%rsp),%edi
  movslq %edi,%rax
  lea    (%r15,%rax,4),%rax
  mov    (%rax),%esi
  mov    %edx,(%rax)
  mov    %esi,(%r11)
  add    $0x1,%edi
  mov    %edi,0x10(%rsp)
L6:
  mov    %r9d,%r12d
  jmp    L0
L43:
  sub    $0x1,%ebx
  sub    $0x4,%rax
  cmp    %r12d,%ebx
  jl     L100
L68:
  mov    %rax,%rsi
  mov    (%rax),%edx
  movslq %edx,%rdi
  mov    0x0(%r13,%rdi,8),%rdi
  movsbl (%rdi,%r14,1),%edi
  sub    %ecx,%edi
  js     L65
  test   %edi,%edi
  jne    L43
  movslq %ebp,%rdi
  lea    (%r15,%rdi,4),%rdi
  mov    (%rdi),%r8d
  mov    %r8d,(%rsi)
  mov    %edx,(%rdi)
  sub    $0x1,%ebp
  jmp    L43
L65:
  mov    0x8(%rsp),%r8
  cmp    %r12d,%ebx
  jl     L100
  mov    (%r11),%edx
  movslq %ebx,%rax
  lea    (%r15,%rax,4),%rax
  mov    (%rax),%esi
  mov    %esi,(%r11)
  mov    %edx,(%rax)
  mov    %r9d,%r12d
  sub    $0x1,%ebx
L0:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%r10d
  cmp    %ebx,%r12d
  jle    L70
L100:
  mov    %r12d,%eax
  mov    0x10(%rsp),%ecx
  sub    %ecx,%eax
  cmp    %ecx,%eax
  mov    %ecx,%edx
  mov    %eax,0x8(%rsp)
  cmovle %eax,%edx
  mov    %r12d,%esi
  sub    %edx,%esi
  mov    %r15,%rcx
  mov    $0x0,%edi
  call   <tmpvecswap@plt>
  mov    %ebp,%ecx
  sub    %ebx,%ecx
  mov    %ecx,0x1c(%rsp)
  mov    0x14(%rsp),%esi
  mov    %esi,%edx
  sub    %ebp,%edx
  sub    $0x1,%edx
  cmp    %ecx,%edx
  cmovg  %ecx,%edx
  sub    %edx,%esi
  mov    %r15,%rcx
  mov    %r12d,%edi
  call   <tmpvecswap@plt>
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    0x18(%rsp),%esi
  mov    0x8(%rsp),%ebx
  mov    %ebx,%edi
  call   <tmpmysortstringint>
  mov    %ebx,%eax
  cltq
  lea    (%r15,%rax,4),%rcx
  movslq (%rcx),%rax
  mov    0x0(%r13,%rax,8),%rax
  cmpb   $0x0,(%rax,%r14,1)
  jne    L92
L99:
  movslq 0x14(%rsp),%rax
  mov    0x1c(%rsp),%edi
  movslq %edi,%rdx
  sub    %rdx,%rax
  lea    (%r15,%rax,4),%rcx
  mov    %r13,%rdx
  mov    0x18(%rsp),%esi
  call   <tmpmysortstringint>
L121:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L92:
  mov    0x18(%rsp),%eax
  lea    0x1(%rax),%esi
  mov    0x10(%rsp),%edi
  add    0x14(%rsp),%edi
  sub    %ebp,%edi
  sub    $0x1,%edi
  mov    %r13,%rdx
  call   <tmpmysortstringint>
  jmp    L99
```

assistant: ```c
void tmpmysortstringint(int N, int depth, char **data1, int *data2) {
  int a, b, c, d, r, v, t;
  if (N <= 1)
    return;
  a = rand() % N;
  t = data2[0];
  data2[0] = data2[a];
  data2[a] = t;
  v = data1[data2[0]][depth];
  a = b = 1;
  c = d = N - 1;
  for (;;) {
    while (b <= c && (r = data1[data2[b]][depth] - v) <= 0) {
      if (r == 0) {
        t = data2[a];
        data2[a] = data2[b];
        data2[b] = t;
        a++;
      }
      b++;
    }
    while (b <= c && (r = data1[data2[c]][depth] - v) >= 0) {
      if (r == 0) {
        t = data2[c];
        data2[c] = data2[d];
        data2[d] = t;
        d--;
      }
      c--;
    }
    if (b > c)
      break;
    t = data2[b];
    data2[b] = data2[c];
    data2[c] = t;
    b++;
    c--;
  }
  r = (a < (b - a) ? a : (b - a));
  tmpvecswap(0, b - r, r, data2);
  r = ((d - c) < (N - d - 1) ? (d - c) : (N - d - 1));
  tmpvecswap(b, N - r, r, data2);
  r = b - a;
  tmpmysortstringint(r, depth, data1, data2);
  if (data1[data2[r]][depth] != 0)
    tmpmysortstringint(a + N - d - 1, depth + 1, data1, data2 + r);
  r = d - c;
  tmpmysortstringint(r, depth, data1, data2 + N - r);
}
```