user: What would the C source look like for the assembly code provided here:

```asm
<computeBWT>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r15
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %r8d,0x34(%rsp)
  mov    %r9d,0x3c(%rsp)
  cmp    %rcx,%rdx
  je     L52
L62:
  mov    $0x0,%ecx
  mov    0x3c(%rsp),%edx
  mov    0x10(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  call   <getBuckets@plt>
  mov    0x34(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x38(%rsp)
  cmpl   $0x4,0x80(%rsp)
  je     L197
  mov    0x38(%rsp),%esi
  movslq %esi,%rcx
  mov    0x8(%rsp),%rax
  movzbl (%rax,%rcx,1),%eax
  movzbl %al,%edx
  mov    %edx,0x30(%rsp)
  movzbl %al,%eax
  mov    0x10(%rsp),%rdx
  movslq (%rdx,%rax,4),%rax
  lea    (%r15,%rax,4),%rdx
  mov    %esi,%eax
  test   %esi,%esi
  jle    L107
  mov    0x8(%rsp),%rax
  movzbl -0x1(%rax,%rcx,1),%ecx
L215:
  mov    0x34(%rsp),%eax
  neg    %eax
  cmp    0x30(%rsp),%ecx
  cmovge 0x38(%rsp),%eax
L107:
  lea    0x4(%rdx),%rcx
  mov    %rcx,0x18(%rsp)
  mov    %eax,(%rdx)
  mov    0x34(%rsp),%eax
  test   %eax,%eax
  jle    L237
  mov    %eax,%eax
  mov    %rax,0x20(%rsp)
  mov    $0x0,%ebx
  jmp    L127
L52:
  mov    0x80(%rsp),%r8d
  mov    %r9d,%ecx
  mov    0x34(%rsp),%edx
  mov    0x28(%rsp),%rsi
  call   <getCounts@plt>
  jmp    L62
L197:
  mov    %eax,%esi
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x8(%rsp),%rdx
  mov    (%rdx,%rax,4),%eax
  mov    %eax,0x30(%rsp)
  cltq
  mov    0x10(%rsp),%rdx
  movslq (%rdx,%rax,4),%rax
  lea    (%r15,%rax,4),%rdx
  mov    %esi,%eax
  test   %esi,%esi
  jle    L107
  mov    0x8(%rsp),%rax
  mov    -0x4(%rax,%rcx,1),%ecx
  jmp    L215
L310:
  movslq %r12d,%r13
  mov    0x8(%rsp),%r14
  mov    0x4(%r14,%r13,4),%eax
  cmp    %eax,(%r14,%r13,4)
  setge  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    (%r14,%r13,4),%r13d
  jmp    L341
L10:
  movslq %r12d,%rax
  mov    0x8(%rsp),%rdx
  mov    -0x4(%rdx,%rax,4),%eax
L38:
  neg    %ebp
  cmp    %eax,%r13d
  cmovg  %ebp,%r12d
L50:
  lea    0x4(%r14),%rax
  mov    %rax,0x18(%rsp)
  mov    %r12d,(%r14)
  mov    %r13d,0x30(%rsp)
L2:
  add    $0x1,%rbx
  cmp    0x20(%rsp),%rbx
  je     L237
L127:
  mov    (%r15,%rbx,4),%ebp
  test   %ebp,%ebp
  jle    L293
  lea    -0x1(%rbp),%r12d
  cmpl   $0x4,0x80(%rsp)
  je     L310
  movslq %r12d,%r13
  mov    0x8(%rsp),%rcx
  add    %rcx,%r13
  movslq %ebp,%rax
  movzbl (%rcx,%rax,1),%eax
  cmp    %al,0x0(%r13)
  setae  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movzbl 0x0(%r13),%r13d
L341:
  mov    %r13d,%eax
  not    %eax
  mov    %eax,(%r15,%rbx,4)
  mov    0x18(%rsp),%rax
  mov    %rax,%r14
  mov    0x30(%rsp),%esi
  cmp    %esi,%r13d
  je     L346
  movslq %esi,%rdx
  sub    %r15,%rax
  sar    $0x2,%rax
  mov    0x10(%rsp),%rcx
  mov    %eax,(%rcx,%rdx,4)
  movslq %r13d,%rax
  movslq (%rcx,%rax,4),%rax
  lea    (%r15,%rax,4),%r14
L346:
  mov    %r14,%rax
  sub    %r15,%rax
  sar    $0x2,%rax
  cmp    %rbx,%rax
  setg   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  test   %r12d,%r12d
  jle    L50
  cmpl   $0x4,0x80(%rsp)
  je     L10
  movslq %r12d,%rax
  mov    0x8(%rsp),%rcx
  movzbl -0x1(%rcx,%rax,1),%eax
  jmp    L38
L293:
  je     L2
  not    %ebp
  mov    %ebp,(%r15,%rbx,4)
  jmp    L2
L237:
  mov    0x10(%rsp),%rdx
  cmp    %rdx,0x28(%rsp)
  je     L176
L327:
  mov    $0x1,%ecx
  mov    0x3c(%rsp),%edx
  mov    0x10(%rsp),%rbx
  mov    %rbx,%rsi
  mov    0x28(%rsp),%rdi
  call   <getBuckets@plt>
  movslq (%rbx),%rax
  lea    (%r15,%rax,4),%r12
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  js     L64
  movslq %eax,%rbx
  movl   $0x0,0x30(%rsp)
  movl   $0xffffffff,0x18(%rsp)
  jmp    L186
L176:
  mov    0x80(%rsp),%r8d
  mov    0x3c(%rsp),%ecx
  mov    0x34(%rsp),%edx
  mov    0x28(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <getCounts@plt>
  jmp    L327
L86:
  movslq %ebp,%r13
  mov    0x8(%rsp),%r14
  mov    0x4(%r14,%r13,4),%eax
  cmp    %eax,(%r14,%r13,4)
  setle  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    (%r14,%r13,4),%r13d
  jmp    L133
L172:
  movslq %ebp,%rax
  lea    0x0(,%rax,4),%rdx
  mov    0x8(%rsp),%rcx
  cmp    -0x4(%rcx,%rax,4),%r13d
  jl     L155
L249:
  lea    -0x4(%r14),%r12
  mov    %ebp,-0x4(%r14)
  mov    %r13d,0x30(%rsp)
L194:
  sub    $0x1,%rbx
  test   %ebx,%ebx
  js     L307
L186:
  mov    (%r15,%rbx,4),%eax
  test   %eax,%eax
  jle    L278
  lea    -0x1(%rax),%ebp
  cmpl   $0x4,0x80(%rsp)
  je     L86
  movslq %ebp,%r13
  mov    0x8(%rsp),%rdx
  add    %rdx,%r13
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,0x0(%r13)
  setbe  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movzbl 0x0(%r13),%r13d
L133:
  mov    %r13d,(%r15,%rbx,4)
  mov    %r12,%r14
  mov    0x30(%rsp),%eax
  cmp    %eax,%r13d
  je     L232
  cltq
  sub    %r15,%r12
  sar    $0x2,%r12
  mov    0x10(%rsp),%rsi
  mov    %r12d,(%rsi,%rax,4)
  movslq %r13d,%rax
  movslq (%rsi,%rax,4),%rax
  lea    (%r15,%rax,4),%r14
L232:
  mov    %r14,%rax
  sub    %r15,%rax
  sar    $0x2,%rax
  cmp    %rax,%rbx
  setge  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  test   %ebp,%ebp
  jle    L249
  cmpl   $0x4,0x80(%rsp)
  je     L172
  movslq %ebp,%rax
  mov    0x8(%rsp),%rcx
  movzbl -0x1(%rcx,%rax,1),%eax
  mov    %eax,%edx
  not    %edx
  cmp    %eax,%r13d
  cmovl  %edx,%ebp
  jmp    L249
L155:
  mov    0x8(%rsp),%rax
  mov    -0x4(%rax,%rdx,1),%ebp
  not    %ebp
  jmp    L249
L278:
  je     L306
  not    %eax
  mov    %eax,(%r15,%rbx,4)
  jmp    L194
L306:
  mov    %ebx,0x18(%rsp)
  jmp    L194
L64:
  movl   $0xffffffff,0x18(%rsp)
L307:
  mov    0x18(%rsp),%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

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