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

```asm
<XLS>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %edx,%r12d
  mov    $0x10,%edx
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x498,%rsp
  mov    0x4d0(%rsp),%rcx
  mov    %r9d,0x18(%rsp)
  lea    0x40(%rsp),%r14
  lea    0x80(%rsp),%r15
  mov    %edi,0x8(%rsp)
  mov    %r14,%rdi
  mov    %rcx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x488(%rsp)
  xor    %eax,%eax
  call   <memcpy@plt>
  mov    %r12d,%edx
  lea    0x40(%rbx),%rsi
  mov    %r15,%rdi
  call   <memcpy@plt>
  mov    $0x80,%esi
  mov    %rbp,%rdi
  lea    0xc0(%rsp),%rbx
  call   <set_stage_in_tweak@plt>
  mov    0x18(%rsp),%esi
  mov    %rbp,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    0x8(%rsp),%r8d
  mov    %rbx,%rcx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    $0x180,%edi
  test   %r8d,%r8d
  je     L32
  call   <aesTweakEncrypt@plt>
L40:
  mov    $0x10,%r14d
  lea    0x100(%rsp),%r8
  mov    %rbx,%rsi
  sub    %r12d,%r14d
  mov    %r8,%rdi
  mov    %r8,0x18(%rsp)
  mov    %r14d,%edx
  call   <memcpy@plt>
  movslq %r12d,%rdx
  mov    $0x10,%eax
  lea    0x140(%rsp),%r11
  sub    %rdx,%rax
  mov    %r11,%rdi
  mov    %r12d,%edx
  mov    %r11,0x28(%rsp)
  lea    0x0(,%rax,4),%r9
  lea    (%rbx,%r9,1),%rsi
  mov    %r9,0x38(%rsp)
  mov    $0xf,%ebx
  call   <memcpy@plt>
  mov    0x18(%rsp),%rsi
  mov    %r14d,%edx
  sub    %r12d,%ebx
  lea    0x180(%rsp),%r10
  movslq %ebx,%rbx
  mov    %r10,%rdi
  mov    %r10,0x20(%rsp)
  call   <memcpy@plt>
  mov    0x28(%rsp),%rdi
  mov    %r15,%rsi
  mov    %r12d,%edx
  lea    0x200(%rsp),%rax
  lea    0x1c0(%rsp),%rcx
  xorl   $0x1,0x180(%rsp,%rbx,4)
  mov    %rax,%r8
  mov    %rcx,0x30(%rsp)
  lea    0x3c0(%rsp),%r15
  mov    %rax,0x18(%rsp)
  call   <mix@plt>
  lea    0x240(%rsp),%r11
  mov    0x20(%rsp),%rsi
  mov    %r14d,%edx
  mov    %r11,%rdi
  mov    %r11,0x20(%rsp)
  call   <memcpy@plt>
  mov    0x38(%rsp),%r9
  mov    0x20(%rsp),%r11
  mov    %r12d,%edx
  mov    0x30(%rsp),%rsi
  lea    (%r11,%r9,1),%rdi
  mov    %r9,0x28(%rsp)
  call   <memcpy@plt>
  mov    $0x90,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    0x28(%rsp),%r9
  mov    0x8(%rsp),%eax
  lea    0x280(%rsp),%r10
  mov    0x20(%rsp),%r11
  mov    %r10,0x8(%rsp)
  mov    %r10,%rcx
  mov    %r13,%rdx
  lea    (%r10,%r9,1),%r8
  add    %r15,%r9
  test   %eax,%eax
  mov    $0x180,%edi
  mov    %r8,0x20(%rsp)
  mov    %r11,%rsi
  mov    %r9,0x30(%rsp)
  je     L21
  call   <aesTweakEncrypt@plt>
  lea    0x2c0(%rsp),%rcx
  mov    0x8(%rsp),%rsi
  mov    %r14d,%edx
  mov    %rcx,%rdi
  mov    %rcx,0x8(%rsp)
  call   <memcpy@plt>
  lea    0x300(%rsp),%r10
  mov    0x20(%rsp),%rsi
  mov    %r12d,%edx
  mov    %r10,%rdi
  mov    %r10,0x28(%rsp)
  call   <memcpy@plt>
  lea    0x340(%rsp),%r11
  mov    0x8(%rsp),%rsi
  mov    %r14d,%edx
  mov    %r11,%rdi
  mov    %r11,0x20(%rsp)
  call   <memcpy@plt>
  xorl   $0x1,0x340(%rsp,%rbx,4)
  mov    %r12d,%edx
  mov    0x18(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  lea    0x440(%rsp),%rbx
  lea    0x380(%rsp),%rcx
  mov    %rbx,%r8
  mov    %rcx,0x8(%rsp)
  call   <mix@plt>
  mov    0x20(%rsp),%rsi
  mov    %r14d,%edx
  mov    %r15,%rdi
  call   <memcpy@plt>
  mov    0x8(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  mov    %r12d,%edx
  call   <memcpy@plt>
  mov    %rbp,%rdi
  mov    $0x80,%esi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  lea    0x400(%rsp),%rbp
  call   <set_tweak_in_tweakey@plt>
  mov    %rbp,%rcx
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
L25:
  mov    0x10(%rsp),%r15
  mov    $0x10,%edx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <memcpy@plt>
  mov    %r15,%rdi
  mov    %r12d,%edx
  mov    %rbx,%rsi
  add    $0x40,%rdi
  call   <memcpy@plt>
  mov    0x488(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x498,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L32:
  call   <aesTweakDecrypt@plt>
  jmp    L40
  nopw   0x0(%rax,%rax,1)
L21:
  call   <aesTweakDecrypt@plt>
  lea    0x2c0(%rsp),%rcx
  mov    0x8(%rsp),%rsi
  mov    %r14d,%edx
  mov    %rcx,%rdi
  mov    %rcx,0x8(%rsp)
  call   <memcpy@plt>
  lea    0x300(%rsp),%r10
  mov    0x20(%rsp),%rsi
  mov    %r12d,%edx
  mov    %r10,%rdi
  mov    %r10,0x28(%rsp)
  call   <memcpy@plt>
  lea    0x340(%rsp),%r11
  mov    0x8(%rsp),%rsi
  mov    %r14d,%edx
  mov    %r11,%rdi
  mov    %r11,0x20(%rsp)
  call   <memcpy@plt>
  xorl   $0x1,0x340(%rsp,%rbx,4)
  mov    %r12d,%edx
  mov    0x18(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  lea    0x440(%rsp),%rbx
  lea    0x380(%rsp),%rcx
  mov    %rbx,%r8
  mov    %rcx,0x8(%rsp)
  call   <mix@plt>
  mov    0x20(%rsp),%rsi
  mov    %r14d,%edx
  mov    %r15,%rdi
  call   <memcpy@plt>
  mov    0x8(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  mov    %r12d,%edx
  call   <memcpy@plt>
  mov    %rbp,%rdi
  mov    $0x80,%esi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  lea    0x400(%rsp),%rbp
  call   <set_tweak_in_tweakey@plt>
  mov    %rbp,%rcx
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    $0x180,%edi
  call   <aesTweakDecrypt@plt>
  jmp    L25
L37:
  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);
}
```