user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<decrypt>:
  endbr64
  push   %r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%r15
  mov    0x78(%rsp),%rbx
  mov    %esi,0xc(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r9,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x24(%rsp)
  call   <EVP_CIPHER_CTX_new@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L137
L197:
  xor    %eax,%eax
  call   <EVP_aes_256_gcm@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    %rax,%rsi
  mov    %rbp,%rdi
  call   <EVP_DecryptInit_ex@plt>
  test   %eax,%eax
  je     L106
L118:
  mov    D2(%rip),%rax
  xor    %ecx,%ecx
  mov    $0x10,%edx
  mov    %rbp,%rdi
  mov    (%rax),%esi
  call   <EVP_CIPHER_CTX_ctrl@plt>
  test   %eax,%eax
  je     L181
L199:
  mov    0x18(%rsp),%rcx
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %r15,%r8
  mov    %rbp,%rdi
  call   <EVP_DecryptInit_ex@plt>
  test   %eax,%eax
  je     L61
L98:
  lea    0x24(%rsp),%r15
  xor    %esi,%esi
  mov    %r14d,%r8d
  mov    %r13,%rcx
  mov    %r15,%rdx
  mov    %rbp,%rdi
  call   <EVP_DecryptUpdate@plt>
  test   %eax,%eax
  je     L89
  mov    0xc(%rsp),%eax
  lea    -0xf(%rax),%r14d
  test   %r14d,%r14d
  jle    L172
L152:
  xor    %r13d,%r13d
  nopl   (%rax)
L195:
  movslq %r13d,%rsi
  mov    $0x10,%r8d
  mov    %r15,%rdx
  mov    %rbp,%rdi
  lea    (%r12,%rsi,1),%rcx
  add    %rbx,%rsi
  call   <EVP_DecryptUpdate@plt>
  cmp    $0x1,%eax
  je     L148
  xor    %eax,%eax
  call   <handleErrors@plt>
L148:
  add    0x24(%rsp),%r13d
  cmp    %r14d,%r13d
  jl     L195
  sub    %r13d,0xc(%rsp)
  movslq %r13d,%rsi
  add    %rsi,%r12
  add    %rbx,%rsi
L161:
  mov    0xc(%rsp),%r8d
  mov    %r12,%rcx
  mov    %r15,%rdx
  mov    %rbp,%rdi
  call   <EVP_DecryptUpdate@plt>
  cmp    $0x1,%eax
  je     L145
  xor    %eax,%eax
  call   <handleErrors@plt>
L145:
  mov    D14(%rip),%rax
  mov    0x24(%rsp),%r12d
  mov    $0x10,%edx
  mov    %rbp,%rdi
  mov    0x10(%rsp),%rcx
  mov    (%rax),%esi
  add    %r13d,%r12d
  call   <EVP_CIPHER_CTX_ctrl@plt>
  test   %eax,%eax
  je     L155
L7:
  movslq %r12d,%rax
  mov    %rbp,%rdi
  mov    %r15,%rdx
  lea    (%rbx,%rax,1),%rsi
  call   <EVP_DecryptFinal_ex@plt>
  mov    %rbp,%rdi
  mov    %eax,%ebx
  call   <EVP_CIPHER_CTX_free@plt>
  test   %ebx,%ebx
  jle    L171
  mov    0x24(%rsp),%eax
  add    %r12d,%eax
L75:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L27
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L89:
  call   <handleErrors@plt>
  mov    0xc(%rsp),%eax
  lea    -0xf(%rax),%r14d
  test   %r14d,%r14d
  jg     L152
L172:
  mov    %rbx,%rsi
  xor    %r13d,%r13d
  jmp    L161
  nopl   0x0(%rax)
L155:
  call   <handleErrors@plt>
  jmp    L7
  nopw   0x0(%rax,%rax,1)
L61:
  call   <handleErrors@plt>
  jmp    L98
  nopw   0x0(%rax,%rax,1)
L181:
  call   <handleErrors@plt>
  jmp    L199
  nopw   0x0(%rax,%rax,1)
L106:
  call   <handleErrors@plt>
  jmp    L118
  nopw   0x0(%rax,%rax,1)
L137:
  xor    %eax,%eax
  call   <handleErrors@plt>
  jmp    L197
L171:
  mov    $0xffffffff,%eax
  jmp    L75
L27:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int decrypt(unsigned char *ciphertext, int ciphertext_len, unsigned char *aad, int aad_len, unsigned char *tag, unsigned char *key, unsigned char *iv, unsigned char *plaintext) {
  EVP_CIPHER_CTX *ctx;
  int len = 0, plaintext_len = 0, ret;
  if (!(ctx = EVP_CIPHER_CTX_new()))
    handleErrors();
  if (!EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL))
    handleErrors();
  if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, 16, NULL))
    handleErrors();
  if (!EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv))
    handleErrors();
  if (!EVP_DecryptUpdate(ctx, NULL, &len, aad, aad_len))
    handleErrors();
  while (plaintext_len <= ciphertext_len - 16) {
    if (1 != EVP_DecryptUpdate(ctx, plaintext + plaintext_len, &len, ciphertext + plaintext_len, 16))
      handleErrors();
    plaintext_len += len;
  }
  if (1 != EVP_DecryptUpdate(ctx, plaintext + plaintext_len, &len, ciphertext + plaintext_len, ciphertext_len - plaintext_len))
    handleErrors();
  plaintext_len += len;
  if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag))
    handleErrors();
  ret = EVP_DecryptFinal_ex(ctx, plaintext + plaintext_len, &len);
  EVP_CIPHER_CTX_free(ctx);
  if (ret > 0) {
    plaintext_len += len;
    return plaintext_len;
  } else {
    return -1;
  }
}
```