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

```asm
<deoxys_aead_encrypt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x278,%rsp
  mov    %rdx,0x38(%rsp)
  mov    0x2b0(%rsp),%rdx
  lea    0x60(%rsp),%rbp
  lea    0x1a0(%rsp),%r12
  mov    %r9,0x18(%rsp)
  lea    0xa0(%rsp),%r14
  lea    0x80(%rsp),%r15
  mov    %rdx,0x40(%rsp)
  mov    0x2b8(%rsp),%rdx
  mov    %rcx,0x8(%rsp)
  mov    %rdi,0x30(%rsp)
  mov    %rbp,%rdi
  mov    %rsi,0x10(%rsp)
  xor    %esi,%esi
  mov    %rdx,0x48(%rsp)
  mov    $0x40,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x268(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  mov    %r13,%rsi
  mov    $0x20,%edx
  mov    %r12,%rdi
  call   <memcpy@plt>
  mov    $0x10,%edx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  lea    0x120(%rsp),%r13
  call   <set_block_number_in_tweak@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    $0x30,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <xor_values@plt>
  mov    $0x70,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <xor_values@plt>
  cmpq   $0x0,0x10(%rsp)
  jne    L172
L299:
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  cmpq   $0xf,0x8(%rsp)
  jbe    L195
  xor    %r8d,%r8d
  mov    0x38(%rsp),%rbx
  mov    %rbp,0x10(%rsp)
  mov    %r8,%rbp
  cs nopw 0x0(%rax,%rax,1)
L395:
  lea    0x1(%rbp),%eax
  mov    %ebp,%esi
  mov    %r15,%rdi
  mov    %eax,0x20(%rsp)
  call   <set_block_number_in_tweak@plt>
  mov    0x10(%rsp),%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    %rbx,%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  add    $0x40,%rbx
  call   <aesTweakEncrypt@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <xor_values@plt>
  mov    %rbp,%rax
  add    $0x1,%rbp
  add    $0x2,%rax
  shl    $0x4,%rax
  cmp    %rax,0x8(%rsp)
  jae    L395
  mov    0x20(%rsp),%ecx
  mov    0x10(%rsp),%rbp
  shl    $0x4,%ecx
  movslq %ecx,%rbx
L247:
  cmp    %rbx,0x8(%rsp)
  ja     L65
  mov    $0x10,%esi
  mov    %rbp,%rdi
  lea    0x160(%rsp),%rbx
  call   <set_stage_in_tweak@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    %rbx,%rcx
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    $0x180,%edi
  mov    %rbx,0x50(%rsp)
  call   <aesTweakEncrypt@plt>
  mov    $0x10,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    0x60(%rsp),%eax
  mov    %rbx,%rdi
  and    $0x7f,%eax
  xor    $0x80,%al
  mov    %eax,0x60(%rsp)
  call   <get_block_number_from_tag@plt>
  lea    0x180(%rsp),%rdi
  mov    %eax,0x20(%rsp)
  call   <get_block_number_from_tag@plt>
  cmpq   $0xf,0x8(%rsp)
  mov    %eax,%r8d
  jbe    L55
L222:
  mov    $0x1,%eax
  mov    $0x20,%r9d
  mov    %r13,0x58(%rsp)
  mov    0x40(%rsp),%rbx
  sub    %r8d,%eax
  mov    %r15,0x10(%rsp)
  mov    0x38(%rsp),%r14
  mov    %r8d,%r13d
  mov    %eax,0x30(%rsp)
  mov    %r9,%r15
  jmp    L332
  nopl   (%rax)
L28:
  add    $0x40,%rbx
  add    $0x40,%r14
  lea    0x10(%r15),%rax
  cmp    %r15,0x8(%rsp)
  jb     L136
  mov    %rax,%r15
L332:
  mov    0x30(%rsp),%eax
  mov    0x10(%rsp),%rdi
  mov    %r13d,%esi
  add    %r13d,%eax
  mov    %eax,0x2c(%rsp)
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    0x18(%rsp),%rsi
  mov    %rbx,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <xor_values@plt>
  add    $0x1,%r13d
  jne    L28
  addl   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%esi
  mov    %rbp,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    0x60(%rsp),%eax
  and    $0x7f,%eax
  xor    $0x80,%al
  mov    %eax,0x60(%rsp)
  jmp    L28
  nopw   0x0(%rax,%rax,1)
L136:
  mov    0x2c(%rsp),%ebx
  mov    %r13d,%r8d
  mov    0x10(%rsp),%r15
  mov    0x58(%rsp),%r13
  shl    $0x4,%ebx
  movslq %ebx,%r14
L281:
  cmp    %r14,0x8(%rsp)
  ja     L478
L145:
  mov    0x8(%rsp),%rbx
  mov    0x40(%rsp),%rax
  mov    $0x10,%edx
  mov    0x50(%rsp),%rsi
  lea    (%rax,%rbx,4),%rdi
  call   <memcpy@plt>
  mov    0x48(%rsp),%rdx
  lea    0x10(%rbx),%rax
  mov    %rax,(%rdx)
  mov    0x268(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L167
  add    $0x278,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L172:
  mov    $0x20,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  cmpq   $0xf,0x10(%rsp)
  jbe    L423
  xor    %r8d,%r8d
  mov    0x30(%rsp),%rbx
  mov    %rbp,0x20(%rsp)
  mov    %r8,%rbp
  nopl   0x0(%rax)
L188:
  lea    0x1(%rbp),%eax
  mov    %ebp,%esi
  mov    %r15,%rdi
  mov    %eax,0x2c(%rsp)
  call   <set_block_number_in_tweak@plt>
  mov    0x20(%rsp),%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    %rbx,%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  add    $0x40,%rbx
  call   <aesTweakEncrypt@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <xor_values@plt>
  mov    %rbp,%rax
  add    $0x1,%rbp
  add    $0x2,%rax
  shl    $0x4,%rax
  cmp    0x10(%rsp),%rax
  jbe    L188
  mov    0x2c(%rsp),%eax
  mov    0x20(%rsp),%rbp
  shl    $0x4,%eax
  movslq %eax,%rdx
  cmp    0x10(%rsp),%rdx
  jae    L299
  mov    %eax,%ecx
  mov    0x30(%rsp),%rax
  lea    (%rax,%rdx,4),%rax
  mov    %rax,0x30(%rsp)
  mov    0x10(%rsp),%rax
  sub    %rdx,%rax
  mov    %rax,0x20(%rsp)
L271:
  lea    0xe0(%rsp),%rbx
  xor    %esi,%esi
  mov    $0x10,%edx
  mov    %ecx,0x50(%rsp)
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    0x50(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %rbx,%rdi
  mov    0x30(%rsp),%rsi
  sub    %ecx,%edx
  call   <memcpy@plt>
  mov    0x20(%rsp),%rax
  mov    %rbp,%rdi
  mov    $0x60,%esi
  movl   $0x80,0xe0(%rsp,%rax,4)
  call   <set_stage_in_tweak@plt>
  mov    0x2c(%rsp),%esi
  mov    %r15,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    %rbx,%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <xor_values@plt>
  jmp    L299
  xchg   %ax,%ax
L65:
  lea    0xe0(%rsp),%r8
  xor    %esi,%esi
  mov    $0x10,%edx
  mov    %ecx,0x2c(%rsp)
  mov    %r8,%rdi
  mov    %r8,0x10(%rsp)
  call   <memset@plt>
  mov    0x2c(%rsp),%ecx
  mov    0x8(%rsp),%edx
  mov    0x10(%rsp),%rdi
  sub    %ecx,%edx
  mov    0x38(%rsp),%rcx
  lea    (%rcx,%rbx,4),%rsi
  call   <memcpy@plt>
  mov    0x8(%rsp),%rax
  mov    $0x40,%esi
  mov    %rbp,%rdi
  sub    %rbx,%rax
  lea    0x160(%rsp),%rbx
  movl   $0x80,0xe0(%rsp,%rax,4)
  call   <set_stage_in_tweak@plt>
  mov    0x20(%rsp),%esi
  mov    %r15,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    0x10(%rsp),%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <xor_values@plt>
  mov    $0x10,%esi
  mov    %rbp,%rdi
  call   <set_stage_in_tweak@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    %rbx,%rcx
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    $0x180,%edi
  mov    %rbx,0x50(%rsp)
  call   <aesTweakEncrypt@plt>
  mov    %rbx,%rsi
  mov    $0x10,%edx
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    0x60(%rsp),%edx
  mov    %rbx,%rdi
  and    $0x7f,%edx
  mov    %edx,%eax
  xor    $0x80,%al
  mov    %eax,0x60(%rsp)
  call   <get_block_number_from_tag@plt>
  lea    0x180(%rsp),%rdi
  mov    %eax,0x20(%rsp)
  call   <get_block_number_from_tag@plt>
  cmpq   $0xf,0x8(%rsp)
  mov    %eax,%r8d
  ja     L222
  mov    %eax,%esi
  mov    %r15,%rdi
  xor    %ebx,%ebx
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    0x18(%rsp),%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  mov    0x8(%rsp),%rax
  jmp    L83
L478:
  mov    %r8d,%esi
  mov    %r15,%rdi
  call   <set_block_number_in_tweak@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <set_tweak_in_tweakey@plt>
  mov    0x18(%rsp),%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    $0x180,%edi
  call   <aesTweakEncrypt@plt>
  mov    0x8(%rsp),%rax
  sub    %r14,%rax
  je     L145
L83:
  mov    0x40(%rsp),%rcx
  movslq %ebx,%rsi
  mov    0x38(%rsp),%r10
  lea    0x0(,%rsi,4),%rdx
  add    %rdx,%rcx
  lea    0x4(%r10,%rdx,1),%rdi
  mov    %rcx,%r8
  sub    %rdi,%r8
  cmp    $0x8,%r8
  jbe    L275
  cmp    $0x1,%rax
  je     L275
  lea    -0x1(%rax),%rdi
  cmp    $0x2,%rdi
  jbe    L291
  add    %r10,%rdx
  mov    %rax,%rdi
  movdqu (%rdx),%xmm0
  shr    $0x2,%rdi
  pxor   0x120(%rsp),%xmm0
  movups %xmm0,(%rcx)
  cmp    $0x1,%rdi
  je     L451
  movdqu 0x10(%rdx),%xmm0
  pxor   0x130(%rsp),%xmm0
  movups %xmm0,0x10(%rcx)
  cmp    $0x2,%rdi
  je     L451
  movdqu 0x20(%rdx),%xmm0
  pxor   0x140(%rsp),%xmm0
  movups %xmm0,0x20(%rcx)
  cmp    $0x3,%rdi
  je     L451
  movdqu 0x30(%rdx),%xmm0
  pxor   0x150(%rsp),%xmm0
  movups %xmm0,0x30(%rcx)
L451:
  mov    %rax,%rcx
  and    $0xfffffffffffffffc,%rcx
  mov    %ecx,%edx
  cmp    %rax,%rcx
  je     L145
  sub    %rcx,%rax
  cmp    $0x1,%rax
  je     L43
L75:
  mov    0x38(%rsp),%rdi
  add    %rcx,%rsi
  movq   0x120(%rsp,%rcx,4),%xmm1
  mov    0x40(%rsp),%rcx
  movq   (%rdi,%rsi,4),%xmm0
  pxor   %xmm1,%xmm0
  movq   %xmm0,(%rcx,%rsi,4)
  mov    %rax,%rcx
  and    $0xfffffffffffffffe,%rcx
  add    %ecx,%edx
  cmp    %rcx,%rax
  je     L145
L43:
  lea    (%rdx,%rbx,1),%eax
  mov    0x38(%rsp),%rcx
  movslq %edx,%rdx
  cltq
  mov    (%rcx,%rax,4),%ecx
  xor    0x120(%rsp,%rdx,4),%ecx
  mov    %ecx,%edx
  mov    0x40(%rsp),%rcx
  mov    %edx,(%rcx,%rax,4)
  jmp    L145
  nopw   0x0(%rax,%rax,1)
L195:
  movl   $0x0,0x20(%rsp)
  xor    %ebx,%ebx
  xor    %ecx,%ecx
  jmp    L247
L55:
  xor    %r14d,%r14d
  xor    %ebx,%ebx
  jmp    L281
L275:
  mov    0x38(%rsp),%rbx
  mov    (%rbx,%rsi,4),%esi
  xor    0x120(%rsp),%esi
  mov    %esi,(%rcx)
  cmp    $0x1,%rax
  je     L145
  mov    0x124(%rsp),%ecx
  xor    (%rdi),%ecx
  mov    0x40(%rsp),%rdi
  mov    %ecx,0x4(%rdi,%rdx,1)
  cmp    $0x2,%rax
  je     L145
  mov    0x8(%rbx,%rdx,1),%ecx
  xor    0x128(%rsp),%ecx
  mov    %ecx,0x8(%rdi,%rdx,1)
  cmp    $0x3,%rax
  je     L145
  mov    0xc(%rbx,%rdx,1),%ecx
  xor    0x12c(%rsp),%ecx
  mov    %ecx,0xc(%rdi,%rdx,1)
  cmp    $0x4,%rax
  je     L145
  mov    0x10(%rbx,%rdx,1),%ecx
  xor    0x130(%rsp),%ecx
  mov    %ecx,0x10(%rdi,%rdx,1)
  cmp    $0x5,%rax
  je     L145
  mov    0x14(%rbx,%rdx,1),%ecx
  xor    0x134(%rsp),%ecx
  mov    %ecx,0x14(%rdi,%rdx,1)
  cmp    $0x6,%rax
  je     L145
  mov    0x18(%rbx,%rdx,1),%ecx
  xor    0x138(%rsp),%ecx
  mov    %ecx,0x18(%rdi,%rdx,1)
  cmp    $0x7,%rax
  je     L145
  mov    0x1c(%rbx,%rdx,1),%ecx
  xor    0x13c(%rsp),%ecx
  mov    %ecx,0x1c(%rdi,%rdx,1)
  cmp    $0x8,%rax
  je     L145
  mov    0x20(%rbx,%rdx,1),%ecx
  xor    0x140(%rsp),%ecx
  mov    %ecx,0x20(%rdi,%rdx,1)
  cmp    $0x9,%rax
  je     L145
  mov    0x24(%rbx,%rdx,1),%ecx
  xor    0x144(%rsp),%ecx
  mov    %ecx,0x24(%rdi,%rdx,1)
  cmp    $0xa,%rax
  je     L145
  mov    0x28(%rbx,%rdx,1),%ecx
  xor    0x148(%rsp),%ecx
  mov    %ecx,0x28(%rdi,%rdx,1)
  cmp    $0xb,%rax
  je     L145
  mov    0x2c(%rbx,%rdx,1),%ecx
  xor    0x14c(%rsp),%ecx
  mov    %ecx,0x2c(%rdi,%rdx,1)
  cmp    $0xc,%rax
  je     L145
  mov    0x30(%rbx,%rdx,1),%ecx
  xor    0x150(%rsp),%ecx
  mov    %ecx,0x30(%rdi,%rdx,1)
  cmp    $0xd,%rax
  je     L145
  mov    0x34(%rbx,%rdx,1),%ecx
  xor    0x154(%rsp),%ecx
  mov    %ecx,0x34(%rdi,%rdx,1)
  cmp    $0xe,%rax
  je     L145
  mov    0x38(%rbx,%rdx,1),%ecx
  xor    0x158(%rsp),%ecx
  mov    %ecx,0x38(%rdi,%rdx,1)
  cmp    $0xf,%rax
  je     L145
  mov    0x3c(%rbx,%rdx,1),%eax
  xor    0x15c(%rsp),%eax
  mov    %eax,0x3c(%rdi,%rdx,1)
  jmp    L145
L423:
  mov    0x10(%rsp),%rax
  movl   $0x0,0x2c(%rsp)
  xor    %ecx,%ecx
  mov    %rax,0x20(%rsp)
  jmp    L271
L291:
  xor    %edx,%edx
  xor    %ecx,%ecx
  jmp    L75
L167:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void deoxys_aead_encrypt(const uint8_t *ass_data, size_t ass_data_len, const uint8_t *message, size_t m_len, const uint8_t *key, const uint8_t *nonce, uint8_t *ciphertext, size_t *c_len) {
  uint64_t i;
  uint64_t j;
  uint64_t hblock1, hblock2;
  uint8_t tweak[16];
  uint8_t tweakey[384 / 8];
  uint8_t Auth[16];
  uint8_t last_block[16];
  uint8_t Final[16];
  uint8_t zero_block[16];
  uint8_t Pad[16];
  uint8_t temp[16];
  uint8_t tag[16];
  memset(tweak, 0, sizeof(tweak));
  memcpy(tweakey, key, 32);
  memset(Auth, 0, 16);
  set_block_number_in_tweak(tweak + 0, 0);
  set_block_number_in_tweak(tweak + 8, 0);
  set_stage_in_tweak(tweak, (0x3 << 4));
  set_tweak_in_tweakey(tweakey, tweak);
  aesTweakEncrypt(384, nonce, tweakey, temp);
  xor_values(Auth, temp);
  set_stage_in_tweak(tweak, (0x7 << 4));
  set_tweak_in_tweakey(tweakey, tweak);
  aesTweakEncrypt(384, nonce, tweakey, temp);
  xor_values(Auth, temp);
  if (ass_data_len) {
    set_stage_in_tweak(tweak, (0x2 << 4));
    i = 0;
    while (16 * (i + 1) <= ass_data_len) {
      set_block_number_in_tweak(tweak + 8, i);
      set_tweak_in_tweakey(tweakey, tweak);
      aesTweakEncrypt(384, ass_data + 16 * i, tweakey, temp);
      xor_values(Auth, temp);
      i++;
    }
    if (ass_data_len > 16 * i) {
      memset(last_block, 0, 16);
      memcpy(last_block, ass_data + 16 * i, ass_data_len - 16 * i);
      last_block[ass_data_len - 16 * i] = 0x80;
      set_stage_in_tweak(tweak, (0x6 << 4));
      set_block_number_in_tweak(tweak + 8, i);
      set_tweak_in_tweakey(tweakey, tweak);
      aesTweakEncrypt(384, last_block, tweakey, temp);
      xor_values(Auth, temp);
    }
  }
  set_stage_in_tweak(tweak, (0x0 << 4));
  i = 0;
  while (16 * (i + 1) <= m_len) {
    set_block_number_in_tweak(tweak + 8, i);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(384, message + 16 * i, tweakey, temp);
    xor_values(Auth, temp);
    i++;
  }
  if (m_len > 16 * i) {
    memset(last_block, 0, 16);
    memcpy(last_block, message + 16 * i, m_len - 16 * i);
    last_block[m_len - 16 * i] = 0x80;
    set_stage_in_tweak(tweak, (0x4 << 4));
    set_block_number_in_tweak(tweak + 8, i);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(384, last_block, tweakey, temp);
    xor_values(Auth, temp);
  }
  set_stage_in_tweak(tweak, (0x1 << 4));
  set_block_number_in_tweak(tweak + 8, 0);
  set_tweak_in_tweakey(tweakey, tweak);
  aesTweakEncrypt(384, Auth, tweakey, tag);
  memcpy(tweak, tag, 16);
  tweak[0] = 0x80 ^ (tweak[0] & 0x7f);
  i = 0;
  hblock1 = get_block_number_from_tag(tag + 0);
  hblock2 = get_block_number_from_tag(tag + 8);
  while (16 * (i + 1) <= m_len) {
    set_block_number_in_tweak(tweak + 8, hblock2);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(384, nonce, tweakey, ciphertext + 16 * i);
    xor_values(ciphertext + 16 * i, message + 16 * i);
    i++;
    hblock2++;
    if (hblock2 == 0) {
      hblock1++;
      set_block_number_in_tweak(tweak, hblock1);
      tweak[0] = 0x80 ^ (tweak[0] & 0x7f);
    }
  }
  if (m_len > 16 * i) {
    set_block_number_in_tweak(tweak + 8, hblock2);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(384, nonce, tweakey, temp);
    for (j = 0; j < m_len - 16 * i; j++)
      ciphertext[16 * i + j] = message[16 * i + j] ^ temp[j];
  }
  memcpy(ciphertext + m_len, tag, 16);
  *c_len = m_len + 16;
}
```