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

```asm
<induceSA>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8d,-0x44(%rbp)
  mov    %r9d,-0x48(%rbp)
  mov    -0x38(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jne    L334
  mov    -0x48(%rbp),%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    0x10(%rbp),%r8d
  mov    %rax,%rdi
  call   <getCounts@plt>
L334:
  mov    -0x48(%rbp),%edx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <getBuckets@plt>
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  cmpl   $0x4,0x10(%rbp)
  jne    L229
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L75
L229:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L75:
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jle    L102
  cmpl   $0x4,0x10(%rbp)
  jne    L275
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L232
L275:
  mov    -0x10(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L232:
  cmp    -0x14(%rbp),%eax
  jge    L102
  mov    -0x10(%rbp),%eax
  not    %eax
  mov    %eax,%edx
  jmp    L221
L102:
  mov    -0x10(%rbp),%edx
L221:
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    %rcx,-0x8(%rbp)
  mov    %edx,(%rax)
  movl   $0x0,-0x18(%rbp)
  jmp    L47
L263:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  not    %edx
  mov    %edx,(%rax)
  cmpl   $0x0,-0x10(%rbp)
  jle    L237
  subl   $0x1,-0x10(%rbp)
  cmpl   $0x4,0x10(%rbp)
  jne    L202
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  jmp    L97
L202:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
L97:
  cmpl   $0x4,0x10(%rbp)
  jne    L153
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  jmp    L350
L153:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L350:
  cmp    %eax,%edx
  setge  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x4,0x10(%rbp)
  jne    L356
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L91
L356:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L91:
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L345
  mov    -0x8(%rbp),%rax
  sub    -0x30(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
L345:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  sub    -0x30(%rbp),%rax
  sar    $0x2,%rax
  cmp    %rax,%rdx
  setl   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x10(%rbp)
  jle    L130
  cmpl   $0x4,0x10(%rbp)
  jne    L177
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L175
L177:
  mov    -0x10(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L175:
  cmp    -0x14(%rbp),%eax
  jge    L130
  mov    -0x10(%rbp),%eax
  not    %eax
  mov    %eax,%edx
  jmp    L95
L130:
  mov    -0x10(%rbp),%edx
L95:
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    %rcx,-0x8(%rbp)
  mov    %edx,(%rax)
L237:
  addl   $0x1,-0x18(%rbp)
L47:
  mov    -0x18(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L263
  mov    -0x38(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jne    L132
  mov    -0x48(%rbp),%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    0x10(%rbp),%r8d
  mov    %rax,%rdi
  call   <getCounts@plt>
L132:
  mov    -0x48(%rbp),%edx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <getBuckets@plt>
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  jmp    L72
L36:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jle    L62
  subl   $0x1,-0x10(%rbp)
  cmpl   $0x4,0x10(%rbp)
  jne    L347
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  jmp    L215
L347:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
L215:
  cmpl   $0x4,0x10(%rbp)
  jne    L208
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  jmp    L376
L208:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L376:
  cmp    %eax,%edx
  setle  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x4,0x10(%rbp)
  jne    L395
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L176
L395:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L176:
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L191
  mov    -0x8(%rbp),%rax
  sub    -0x30(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
L191:
  mov    -0x8(%rbp),%rax
  sub    -0x30(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  setle  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x10(%rbp)
  je     L158
  cmpl   $0x4,0x10(%rbp)
  jne    L69
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L139
L69:
  mov    -0x10(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L139:
  cmp    -0x14(%rbp),%eax
  jle    L305
L158:
  mov    -0x10(%rbp),%eax
  not    %eax
  jmp    L332
L305:
  mov    -0x10(%rbp),%eax
L332:
  subq   $0x4,-0x8(%rbp)
  mov    -0x8(%rbp),%rdx
  mov    %eax,(%rdx)
  jmp    L38
L62:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  not    %edx
  mov    %edx,(%rax)
L38:
  subl   $0x1,-0x18(%rbp)
L72:
  cmpl   $0x0,-0x18(%rbp)
  jns    L36
  nop
  nop
  leave
  ret
```

assistant: ```c
void induceSA(const void *T, int *SA, int *C, int *B, int n, int k, int cs) {
  int *b, i, j;
  int c0, c1;
  if (C == B) {
    getCounts(T, C, n, k, cs);
  }
  getBuckets(C, B, k, 0);
  j = n - 1;
  b = SA + B[c1 = (cs == sizeof(int) ? ((int *)T)[(j)] : ((unsigned char *)T)[(j)])];
  *b++ = ((0 < j) && ((cs == sizeof(int) ? ((int *)T)[(j - 1)] : ((unsigned char *)T)[(j - 1)]) < c1)) ? ~j : j;
  for (i = 0; i < n; ++i) {
    j = SA[i], SA[i] = ~j;
    if (0 < j) {
      --j;
      assert((cs == sizeof(int) ? ((int *)T)[(j)] : ((unsigned char *)T)[(j)]) >= (cs == sizeof(int) ? ((int *)T)[(j + 1)] : ((unsigned char *)T)[(j + 1)]));
      if ((c0 = (cs == sizeof(int) ? ((int *)T)[(j)] : ((unsigned char *)T)[(j)])) != c1) {
        B[c1] = b - SA;
        b = SA + B[c1 = c0];
      }
      assert(i < (b - SA));
      *b++ = ((0 < j) && ((cs == sizeof(int) ? ((int *)T)[(j - 1)] : ((unsigned char *)T)[(j - 1)]) < c1)) ? ~j : j;
    }
  }
  if (C == B) {
    getCounts(T, C, n, k, cs);
  }
  getBuckets(C, B, k, 1);
  for (i = n - 1, b = SA + B[c1 = 0]; 0 <= i; --i) {
    if (0 < (j = SA[i])) {
      --j;
      assert((cs == sizeof(int) ? ((int *)T)[(j)] : ((unsigned char *)T)[(j)]) <= (cs == sizeof(int) ? ((int *)T)[(j + 1)] : ((unsigned char *)T)[(j + 1)]));
      if ((c0 = (cs == sizeof(int) ? ((int *)T)[(j)] : ((unsigned char *)T)[(j)])) != c1) {
        B[c1] = b - SA;
        b = SA + B[c1 = c0];
      }
      assert((b - SA) <= i);
      *--b = ((j == 0) || ((cs == sizeof(int) ? ((int *)T)[(j - 1)] : ((unsigned char *)T)[(j - 1)]) > c1)) ? ~j : j;
    } else {
      SA[i] = ~j;
    }
  }
}
```