user: 请从给定的汇编指令推导出C源代码:

```asm
<crypto_aead_encrypt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x168,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%r12
  mov    %rcx,%r13
  mov    %r8,%rbp
  mov    %r9,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x158(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rdx
  mov    0x1a8(%rsp),%rsi
  mov    0x1b0(%rsp),%rdi
  call   <acorn128_initialization@plt>
  test   %r14,%r14
  je     L49
  mov    %rbp,%rbx
  add    %r14,%rbp
  lea    0x1f(%rsp),%r15
L62:
  lea    0x1e(%rsp),%rdx
  movzbl (%rbx),%esi
  lea    0x30(%rsp),%rdi
  mov    $0xff,%r9d
  mov    $0xff,%r8d
  mov    %r15,%rcx
  call   <acorn128_enc_onebyte@plt>
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  jne    L62
L49:
  mov    $0x0,%ebx
  lea    0x1f(%rsp),%rbp
L34:
  cmp    $0x1f,%rbx
  setbe  %r8b
  neg    %r8d
  lea    0x1e(%rsp),%rdx
  test   %rbx,%rbx
  sete   %sil
  movzbl %sil,%esi
  lea    0x30(%rsp),%rdi
  mov    $0xff,%r9d
  movzbl %r8b,%r8d
  mov    %rbp,%rcx
  call   <acorn128_enc_onebyte@plt>
  add    $0x1,%rbx
  cmp    $0x40,%rbx
  jne    L34
  test   %r13,%r13
  je     L8
  mov    %r12,%rbx
  mov    (%rsp),%rbp
  add    %r13,%r12
  lea    0x1f(%rsp),%r15
L57:
  movzbl (%rbx),%esi
  lea    0x30(%rsp),%rdi
  mov    $0x0,%r9d
  mov    $0xff,%r8d
  mov    %r15,%rcx
  mov    %rbp,%rdx
  call   <acorn128_enc_onebyte@plt>
  add    $0x1,%rbx
  add    $0x1,%rbp
  cmp    %rbx,%r12
  jne    L57
L8:
  mov    $0x0,%ebx
  lea    0x1f(%rsp),%rbp
L9:
  cmp    $0x1f,%rbx
  setbe  %r8b
  neg    %r8d
  lea    0x1e(%rsp),%rdx
  test   %rbx,%rbx
  sete   %sil
  movzbl %sil,%esi
  lea    0x30(%rsp),%rdi
  mov    $0x0,%r9d
  movzbl %r8b,%r8d
  mov    %rbp,%rcx
  call   <acorn128_enc_onebyte@plt>
  add    $0x1,%rbx
  cmp    $0x40,%rbx
  jne    L9
  lea    0x20(%rsp),%rbx
  lea    0x30(%rsp),%r8
  mov    %rbx,%rcx
  mov    $0x10,%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <acorn128_tag_generation@plt>
  lea    0x10(%r13),%rax
  mov    0x8(%rsp),%rcx
  mov    %rax,(%rcx)
  mov    (%rsp),%rdi
  add    %r13,%rdi
  mov    $0x10,%edx
  mov    %rbx,%rsi
  call   <memcpy@plt>
  mov    0x158(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  mov    $0x0,%eax
  add    $0x168,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L41:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int crypto_aead_encrypt(unsigned char *c, unsigned long long *clen, const unsigned char *m, unsigned long long mlen, const unsigned char *ad, unsigned long long adlen, const unsigned char *nsec, const unsigned char *npub, const unsigned char *k) {
  unsigned long i;
  unsigned char plaintextbyte, ciphertextbyte, ksbyte, mac[16];
  unsigned char state[293];
  unsigned char ca, cb;
  acorn128_initialization(k, npub, state);
  for (i = 0; i < adlen; i++) {
    acorn128_enc_onebyte(state, ad[i], &ciphertextbyte, &ksbyte, 0xff, 0xff);
  }
  for (i = 0; i < 512 / 8; i++) {
    if (i == 0)
      plaintextbyte = 1;
    else
      plaintextbyte = 0;
    if (i < 256 / 8)
      ca = 0xff;
    else
      ca = 0;
    cb = 0xff;
    acorn128_enc_onebyte(state, plaintextbyte, &ciphertextbyte, &ksbyte, ca, cb);
  }
  for (i = 0; i < mlen; i++) {
    acorn128_enc_onebyte(state, m[i], &c[i], &ksbyte, 0xff, 0);
  }
  for (i = 0; i < 512 / 8; i++) {
    if (i == 0)
      plaintextbyte = 1;
    else
      plaintextbyte = 0;
    if (i < 256 / 8)
      ca = 0xff;
    else
      ca = 0;
    cb = 0;
    acorn128_enc_onebyte(state, plaintextbyte, &ciphertextbyte, &ksbyte, ca, cb);
  }
  acorn128_tag_generation(mlen, adlen, 16, mac, state);
  *clen = mlen + 16;
  memcpy(c + mlen, mac, 16);
  return 0;
}
```