user: 请将以下的汇编代码转换成C语言代码:

```asm
<sais_bwt>:
  endbr64
  test   %rdi,%rdi
  je     L292
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L118
  mov    %rdx,%rbx
  test   %rdx,%rdx
  je     L118
  mov    %ecx,%r12d
  test   %ecx,%ecx
  js     L118
  mov    %rdi,%r13
  cmp    $0x1,%ecx
  jle    L513
  sub    $0x8,%rsp
  mov    %ecx,%r8d
  mov    $0x100,%r9d
  xor    %ecx,%ecx
  push   $0x1
  xor    %edx,%edx
  mov    %rbx,%rsi
  push   $0x1
  push   $0x1
  call   <sais_main@plt>
  add    $0x20,%rsp
  mov    %eax,%r8d
  test   %eax,%eax
  js     L2
  movslq %r12d,%rax
  movzbl -0x1(%r13,%rax,1),%eax
  mov    %al,0x0(%rbp)
  je     L467
  movslq %r8d,%rax
  lea    0x1(%rbp),%rdx
  lea    (%rbx,%rax,4),%rcx
  lea    0x1(%rbp,%rax,1),%rax
  cmp    %rcx,%rdx
  setae  %cl
  cmp    %rax,%rbx
  setae  %al
  or     %al,%cl
  je     L464
  lea    -0x1(%r8),%eax
  cmp    $0xe,%eax
  jbe    L464
  mov    %r8d,%ecx
  movdqa D16(%rip),%xmm2
  mov    %rbx,%rax
  shr    $0x4,%ecx
  sub    $0x1,%ecx
  shl    $0x6,%rcx
  lea    0x40(%rbx,%rcx,1),%rcx
  nopl   0x0(%rax)
L124:
  movdqu (%rax),%xmm0
  movdqu 0x10(%rax),%xmm5
  add    $0x40,%rax
  add    $0x10,%rdx
  movdqu -0x10(%rax),%xmm7
  movdqa %xmm0,%xmm1
  punpcklwd %xmm5,%xmm0
  punpckhwd %xmm5,%xmm1
  movdqa %xmm0,%xmm3
  punpckhwd %xmm1,%xmm3
  punpcklwd %xmm1,%xmm0
  movdqu -0x20(%rax),%xmm1
  punpcklwd %xmm3,%xmm0
  movdqa %xmm1,%xmm3
  punpcklwd %xmm7,%xmm1
  pand   %xmm2,%xmm0
  punpckhwd %xmm7,%xmm3
  movdqa %xmm1,%xmm4
  punpckhwd %xmm3,%xmm4
  punpcklwd %xmm3,%xmm1
  punpcklwd %xmm4,%xmm1
  pand   %xmm2,%xmm1
  packuswb %xmm1,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %rcx,%rax
  jne    L124
  mov    %r8d,%edx
  and    $0xfffffff0,%edx
  test   $0xf,%r8b
  je     L396
  mov    %edx,%eax
  mov    (%rbx,%rax,4),%esi
  lea    0x0(,%rax,4),%rcx
  mov    %sil,0x1(%rbp,%rax,1)
  lea    0x1(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x4(%rbx,%rcx,1),%esi
  mov    %sil,0x2(%rbp,%rax,1)
  lea    0x2(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x8(%rbx,%rcx,1),%esi
  mov    %sil,0x3(%rbp,%rax,1)
  lea    0x3(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0xc(%rbx,%rcx,1),%esi
  mov    %sil,0x4(%rbp,%rax,1)
  lea    0x4(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x10(%rbx,%rcx,1),%esi
  mov    %sil,0x5(%rbp,%rax,1)
  lea    0x5(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x14(%rbx,%rcx,1),%esi
  mov    %sil,0x6(%rbp,%rax,1)
  lea    0x6(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x18(%rbx,%rcx,1),%esi
  mov    %sil,0x7(%rbp,%rax,1)
  lea    0x7(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x1c(%rbx,%rcx,1),%esi
  mov    %sil,0x8(%rbp,%rax,1)
  lea    0x8(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x20(%rbx,%rcx,1),%esi
  mov    %sil,0x9(%rbp,%rax,1)
  lea    0x9(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x24(%rbx,%rcx,1),%esi
  mov    %sil,0xa(%rbp,%rax,1)
  lea    0xa(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x28(%rbx,%rcx,1),%esi
  mov    %sil,0xb(%rbp,%rax,1)
  lea    0xb(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x2c(%rbx,%rcx,1),%esi
  mov    %sil,0xc(%rbp,%rax,1)
  lea    0xc(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x30(%rbx,%rcx,1),%esi
  mov    %sil,0xd(%rbp,%rax,1)
  lea    0xd(%rdx),%esi
  cmp    %esi,%r8d
  jle    L396
  mov    0x34(%rbx,%rcx,1),%esi
  add    $0xe,%edx
  mov    %sil,0xe(%rbp,%rax,1)
  cmp    %edx,%r8d
  jle    L396
  mov    0x38(%rbx,%rcx,1),%edx
  mov    %dl,0xf(%rbp,%rax,1)
  nopl   0x0(%rax,%rax,1)
L396:
  add    $0x1,%r8d
  mov    %r8d,%ecx
  cmp    %r8d,%r12d
  jle    L2
L318:
  mov    %r12d,%r10d
  mov    $0x4,%r13d
  movslq %ecx,%rsi
  sub    %ecx,%r10d
  cmp    %r12d,%ecx
  lea    0x0(,%rsi,4),%r11
  mov    %r10d,%edi
  lea    0x0(%rbp,%rsi,1),%rdx
  lea    (%rbx,%r11,1),%rax
  lea    0x0(,%rdi,4),%r9
  cmovge %r13,%r9
  add    %r11,%r9
  mov    $0x1,%r11d
  add    %rbx,%r9
  cmp    %r9,%rdx
  setae  %r9b
  cmp    %r12d,%ecx
  cmovge %r11,%rdi
  add    %rsi,%rdi
  add    %rbp,%rdi
  cmp    %rdi,%rax
  setae  %dil
  or     %r9b,%dil
  je     L265
  lea    -0x1(%r10),%edi
  cmp    $0xe,%edi
  seta   %r9b
  cmp    %r12d,%ecx
  setl   %dil
  test   %dil,%r9b
  je     L265
  cmp    %r12d,%ecx
  mov    $0x1,%edi
  movdqa D16(%rip),%xmm2
  cmovl  %r10d,%edi
  mov    %edi,%esi
  shr    $0x4,%esi
  sub    $0x1,%esi
  shl    $0x6,%rsi
  lea    0x40(%rax,%rsi,1),%rsi
  nopw   0x0(%rax,%rax,1)
L239:
  movdqu (%rax),%xmm0
  movdqu 0x10(%rax),%xmm6
  add    $0x40,%rax
  add    $0x10,%rdx
  movdqu -0x10(%rax),%xmm5
  movdqa %xmm0,%xmm1
  punpcklwd %xmm6,%xmm0
  punpckhwd %xmm6,%xmm1
  movdqa %xmm0,%xmm3
  punpckhwd %xmm1,%xmm3
  punpcklwd %xmm1,%xmm0
  movdqu -0x20(%rax),%xmm1
  punpcklwd %xmm3,%xmm0
  movdqa %xmm1,%xmm3
  punpcklwd %xmm5,%xmm1
  pand   %xmm2,%xmm0
  punpckhwd %xmm5,%xmm3
  movdqa %xmm1,%xmm4
  punpckhwd %xmm3,%xmm4
  punpcklwd %xmm3,%xmm1
  punpcklwd %xmm4,%xmm1
  pand   %xmm2,%xmm1
  packuswb %xmm1,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %rax,%rsi
  jne    L239
  mov    %edi,%eax
  and    $0xfffffff0,%eax
  add    %eax,%ecx
  cmp    %eax,%edi
  je     L2
  movslq %ecx,%rax
  mov    (%rbx,%rax,4),%edx
  mov    %dl,0x0(%rbp,%rax,1)
  lea    0x1(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  movslq %edx,%rdx
  mov    (%rbx,%rdx,4),%esi
  lea    0x0(,%rdx,4),%rax
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x2(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x4(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x3(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x8(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x4(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0xc(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x5(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x10(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x6(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x14(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x7(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x18(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x8(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x1c(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x9(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x20(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xa(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x24(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xb(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x28(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xc(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x2c(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xd(%rcx),%edx
  cmp    %edx,%r12d
  jle    L2
  mov    0x30(%rbx,%rax,1),%esi
  movslq %edx,%rdx
  add    $0xe,%ecx
  mov    %sil,0x0(%rbp,%rdx,1)
  cmp    %ecx,%r12d
  jle    L2
  mov    0x34(%rbx,%rax,1),%eax
  movslq %ecx,%rcx
  mov    %al,0x0(%rbp,%rcx,1)
L2:
  add    $0x8,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L265:
  mov    (%rbx,%rsi,4),%eax
  mov    %al,0x0(%rbp,%rsi,1)
  add    $0x1,%rsi
  cmp    %esi,%r12d
  jle    L2
  mov    (%rbx,%rsi,4),%eax
  mov    %al,0x0(%rbp,%rsi,1)
  add    $0x1,%rsi
  cmp    %esi,%r12d
  jg     L265
  jmp    L2
  nopw   0x0(%rax,%rax,1)
L513:
  mov    $0x0,%r8d
  jne    L2
  movzbl (%rdi),%eax
  mov    $0x1,%r8d
  mov    %al,(%rsi)
  add    $0x8,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L464:
  mov    %r8d,%ecx
  xor    %eax,%eax
  nopl   (%rax)
L336:
  mov    (%rbx,%rax,4),%edx
  mov    %dl,0x1(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L336
  jmp    L396
  nopl   (%rax)
L467:
  mov    $0x1,%ecx
  mov    $0x1,%r8d
  jmp    L318
L118:
  mov    $0xffffffff,%r8d
  jmp    L2
L292:
  or     $0xffffffff,%eax
  ret
```

tool_calls: name: disassemble_data
arguments: label: D16
data_type: byte[16]

tool: {"D16": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

assistant: ```c
int sais_bwt(const unsigned char *T, unsigned char *U, int *A, int n) {
  int i, pidx;
  if ((T == NULL) || (U == NULL) || (A == NULL) || (n < 0)) {
    return -1;
  }
  if (n <= 1) {
    if (n == 1) {
      U[0] = T[0];
    }
    return n;
  }
  pidx = sais_main(T, A, NULL, 0, n, 256, sizeof(unsigned char), 1, 1);
  if (pidx < 0) {
    return pidx;
  }
  U[0] = T[n - 1];
  for (i = 0; i < pidx; ++i) {
    U[i + 1] = (unsigned char)A[i];
  }
  for (i += 1; i < n; ++i) {
    U[i] = (unsigned char)A[i];
  }
  pidx += 1;
  return pidx;
}
```