user: Translate the below assembly code into C programming language:

```asm
<XLS>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x488,%rsp
  mov    %edi,0x10(%rsp)
  mov    %rsi,%r13
  mov    %edx,%ebx
  mov    %rcx,%r12
  mov    %r8,%rbp
  mov    %r9d,%r14d
  mov    0x4c0(%rsp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x478(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rdi
  mov    $0x10,%edx
  call   <memcpy@plt>
  lea    0x40(%r13),%rsi
  lea    0x70(%rsp),%rdi
  mov    %ebx,%edx
  call   <memcpy@plt>
  mov    $0x80,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  mov    %r14d,%esi
  mov    %rbp,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  cmpl   $0x0,0x10(%rsp)
  je     L16
  lea    0xb0(%rsp),%rcx
  lea    0x30(%rsp),%rsi
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
L3:
  mov    $0x10,%r13d
  sub    %ebx,%r13d
  lea    0xb0(%rsp),%rsi
  lea    0xf0(%rsp),%r14
  mov    %r13d,%edx
  mov    %rsi,0x8(%rsp)
  mov    %r14,%rdi
  call   <memcpy@plt>
  movslq %ebx,%rdx
  mov    $0x10,%eax
  sub    %rdx,%rax
  shl    $0x2,%rax
  mov    0x8(%rsp),%rsi
  mov    %rax,0x8(%rsp)
  add    %rax,%rsi
  lea    0x130(%rsp),%rcx
  mov    %ebx,%edx
  mov    %rcx,0x18(%rsp)
  mov    %rcx,%rdi
  call   <memcpy@plt>
  lea    0x170(%rsp),%rdx
  mov    %rdx,%r11
  mov    %r13d,%edx
  mov    %r14,%rsi
  mov    %r11,0x20(%rsp)
  mov    %r11,%rdi
  call   <memcpy@plt>
  mov    $0xf,%r14d
  sub    %ebx,%r14d
  movslq %r14d,%rax
  xorl   $0x1,0x170(%rsp,%rax,4)
  lea    0x1b0(%rsp),%rdx
  lea    0x70(%rsp),%rsi
  lea    0x1f0(%rsp),%r8
  mov    %rdx,0x28(%rsp)
  mov    %rdx,%rcx
  mov    %ebx,%edx
  mov    0x18(%rsp),%rdi
  call   <mix@plt>
  lea    0x230(%rsp),%rdx
  mov    %rdx,%r10
  mov    %r13d,%edx
  mov    0x20(%rsp),%rsi
  mov    %r10,0x18(%rsp)
  mov    %r10,%rdi
  call   <memcpy@plt>
  mov    0x18(%rsp),%rdi
  add    0x8(%rsp),%rdi
  mov    %ebx,%edx
  mov    0x28(%rsp),%rsi
  call   <memcpy@plt>
  mov    $0x90,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  cmpl   $0x0,0x10(%rsp)
  je     L30
  lea    0x270(%rsp),%rcx
  lea    0x230(%rsp),%rsi
  mov    %rcx,0x10(%rsp)
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  lea    0x2b0(%rsp),%r10
  mov    %r13d,%edx
  mov    0x10(%rsp),%rsi
  mov    %r10,0x18(%rsp)
  mov    %r10,%rdi
  call   <memcpy@plt>
  mov    0x10(%rsp),%rcx
  add    0x8(%rsp),%rcx
  mov    %rcx,%rsi
  lea    0x2f0(%rsp),%rcx
  mov    %ebx,%edx
  mov    %rcx,0x10(%rsp)
  mov    %rcx,%rdi
  call   <memcpy@plt>
  lea    0x330(%rsp),%rdx
  mov    %rdx,%r11
  mov    %r13d,%edx
  mov    0x18(%rsp),%rsi
  mov    %r11,0x18(%rsp)
  mov    %r11,%rdi
  call   <memcpy@plt>
  movslq %r14d,%r14
  xorl   $0x1,0x330(%rsp,%r14,4)
  lea    0x370(%rsp),%rdx
  lea    0x1f0(%rsp),%rsi
  lea    0x430(%rsp),%r8
  mov    %rdx,0x20(%rsp)
  mov    %rdx,%rcx
  mov    %ebx,%edx
  mov    0x10(%rsp),%rdi
  call   <mix@plt>
  lea    0x3b0(%rsp),%r14
  mov    %r13d,%edx
  mov    0x18(%rsp),%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    0x8(%rsp),%rdi
  add    %r14,%rdi
  mov    %ebx,%edx
  mov    0x20(%rsp),%rsi
  call   <memcpy@plt>
  mov    $0x80,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  lea    0x3f0(%rsp),%rcx
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
L37:
  lea    0x3f0(%rsp),%rsi
  mov    $0x10,%edx
  mov    %r15,%rdi
  call   <memcpy@plt>
  lea    0x430(%rsp),%rsi
  lea    0x40(%r15),%rdi
  mov    %ebx,%edx
  call   <memcpy@plt>
  mov    0x478(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L26
  add    $0x488,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  lea    0xb0(%rsp),%rcx
  lea    0x30(%rsp),%rsi
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakDecrypt@plt>
  jmp    L3
L30:
  lea    0x270(%rsp),%rax
  lea    0x230(%rsp),%rsi
  mov    %rax,0x10(%rsp)
  mov    %rax,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakDecrypt@plt>
  lea    0x2b0(%rsp),%rdi
  mov    %r13d,%edx
  mov    0x10(%rsp),%rsi
  mov    %rdi,0x18(%rsp)
  call   <memcpy@plt>
  mov    0x10(%rsp),%rax
  add    0x8(%rsp),%rax
  mov    %rax,%rsi
  lea    0x2f0(%rsp),%rax
  mov    %ebx,%edx
  mov    %rax,0x10(%rsp)
  mov    %rax,%rdi
  call   <memcpy@plt>
  lea    0x330(%rsp),%rcx
  mov    %r13d,%edx
  mov    0x18(%rsp),%rsi
  mov    %rcx,0x18(%rsp)
  mov    %rcx,%rdi
  call   <memcpy@plt>
  movslq %r14d,%r14
  xorl   $0x1,0x330(%rsp,%r14,4)
  lea    0x370(%rsp),%rcx
  lea    0x1f0(%rsp),%rsi
  lea    0x430(%rsp),%r8
  mov    %rcx,0x20(%rsp)
  mov    %ebx,%edx
  mov    0x10(%rsp),%rdi
  call   <mix@plt>
  lea    0x3b0(%rsp),%r14
  mov    %r13d,%edx
  mov    0x18(%rsp),%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    0x8(%rsp),%rdi
  add    %r14,%rdi
  mov    %ebx,%edx
  mov    0x20(%rsp),%rsi
  call   <memcpy@plt>
  mov    $0x80,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  lea    0x3f0(%rsp),%rcx
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    $0x180,%edi
  call   <aesTweakDecrypt@plt>
  jmp    L37
L26:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void XLS(const uint8_t isDirect, uint8_t message[], const uint32_t s, uint8_t *tweakey, uint8_t *tweak, const uint32_t l, uint8_t *cipher) {
  uint8_t M1[16];
  uint8_t M2[16];
  uint8_t X1[16];
  uint8_t X1ns[16];
  uint8_t X1s[16];
  uint8_t Xp1ns[16];
  uint8_t Xp1s[16];
  uint8_t X2[16];
  uint8_t Xp1[16];
  uint8_t Y1[16];
  uint8_t Y1ns[16];
  uint8_t Y1s[16];
  uint8_t Yp1ns[16];
  uint8_t Yp1s[16];
  uint8_t Yp1[16];
  uint8_t C1[16];
  uint8_t C2[16];
  memcpy(M1, message, 16);
  memcpy(M2, message + 16, s);
  set_stage_in_tweak(tweak, (0x8 << 4));
  set_block_number_in_tweak(tweak, l);
  set_tweak_in_tweakey(tweakey, tweak);
  if (isDirect)
    aesTweakEncrypt(384, M1, tweakey, X1);
  else
    aesTweakDecrypt(384, M1, tweakey, X1);
  memcpy(X1ns, X1, 16 - s);
  memcpy(X1s, X1 + 16 - s, s);
  memcpy(Xp1ns, X1ns, 16 - s);
  Xp1ns[16 - s - 1] ^= 1;
  mix(X1s, M2, s, Xp1s, X2);
  memcpy(Xp1, Xp1ns, 16 - s);
  memcpy(Xp1 + 16 - s, Xp1s, s);
  set_stage_in_tweak(tweak, (0x9 << 4));
  set_tweak_in_tweakey(tweakey, tweak);
  if (isDirect)
    aesTweakEncrypt(384, Xp1, tweakey, Y1);
  else
    aesTweakDecrypt(384, Xp1, tweakey, Y1);
  memcpy(Y1ns, Y1, 16 - s);
  memcpy(Y1s, Y1 + 16 - s, s);
  memcpy(Yp1ns, Y1ns, 16 - s);
  Yp1ns[16 - s - 1] ^= 1;
  mix(Y1s, X2, s, Yp1s, C2);
  memcpy(Yp1, Yp1ns, 16 - s);
  memcpy(Yp1 + 16 - s, Yp1s, s);
  set_stage_in_tweak(tweak, (0x8 << 4));
  set_tweak_in_tweakey(tweakey, tweak);
  if (isDirect)
    aesTweakEncrypt(384, Yp1, tweakey, C1);
  else
    aesTweakDecrypt(384, Yp1, tweakey, C1);
  memcpy(cipher, C1, 16);
  memcpy(cipher + 16, C2, s);
}
```