user: 下面的汇编指令对应的C源代码是什么:

```asm
<is_immediate_ca>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x40(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  test   %rax,%rax
  je     L85
  mov    -0x48(%rbp),%rax
  test   %rax,%rax
  jne    L2
L85:
  mov    $0x0,%eax
  jmp    L127
L2:
  mov    $0x0,%eax
  call   <EVP_md5@plt>
  mov    %eax,%edi
  call   <EVP_add_digest@plt>
  test   %rax,%rax
  jne    L48
  mov    $0x0,%eax
  jmp    L127
L48:
  mov    $0x0,%eax
  call   <EVP_sha1@plt>
  mov    %eax,%edi
  call   <EVP_add_digest@plt>
  test   %rax,%rax
  jne    L140
  mov    $0x0,%eax
  jmp    L127
L140:
  mov    $0x0,%eax
  call   <EVP_sha256@plt>
  mov    %eax,%edi
  call   <EVP_add_digest@plt>
  test   %rax,%rax
  jne    L193
  mov    $0x0,%eax
  jmp    L127
L193:
  mov    -0x3c(%rbp),%edx
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <d2i_X509@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L1
  mov    $0x0,%eax
  jmp    L127
L1:
  mov    -0x40(%rbp),%edx
  lea    -0x48(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <d2i_X509@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L0
  mov    $0x0,%eax
  call   <X509_STORE_new@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L33
  mov    -0x8(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <X509_STORE_add_cert@plt>
  test   %rax,%rax
  je     L78
  mov    D6(%rip),%rax
  mov    (%rax),%edx
  mov    D5(%rip),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <X509_STORE_set_flags@plt>
  mov    $0x0,%eax
  call   <X509_STORE_CTX_new@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L257
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <X509_STORE_CTX_init@plt>
  test   %rax,%rax
  je     L24
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <X509_verify_cert@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jns    L249
  movl   $0x0,-0x24(%rbp)
L249:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <X509_STORE_CTX_cleanup@plt>
  jmp    L209
L0:
  nop
  jmp    L209
L33:
  nop
  jmp    L209
L78:
  nop
  jmp    L209
L257:
  nop
  jmp    L209
L24:
  nop
L209:
  cmpq   $0x0,-0x10(%rbp)
  je     L235
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <X509_free@plt>
L235:
  cmpq   $0x0,-0x8(%rbp)
  je     L61
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <X509_free@plt>
L61:
  cmpq   $0x0,-0x20(%rbp)
  je     L199
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <X509_STORE_free@plt>
L199:
  cmpq   $0x0,-0x20(%rbp)
  je     L197
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <X509_STORE_CTX_free@plt>
L197:
  mov    -0x24(%rbp),%eax
L127:
  leave
  ret
```

assistant: ```c
int is_immediate_ca(const uint8_t *cert, const uint32_t cert_size, const uint8_t *ca_cert, const uint32_t ca_cert_size) {
  X509 *X509cert = NULL;
  X509 *X509ca = NULL;
  X509_STORE *cert_store = NULL;
  X509_STORE_CTX *cert_ctx = NULL;
  int ret = 0;
  if (cert == NULL || ca_cert == NULL)
    return 0;
  if (EVP_add_digest(EVP_md5()) == 0)
    return 0;
  if (EVP_add_digest(EVP_sha1()) == 0)
    return 0;
  if (EVP_add_digest(EVP_sha256()) == 0)
    return 0;
  X509cert = d2i_X509(NULL, &cert, cert_size);
  if (X509cert == NULL)
    return 0;
  X509ca = d2i_X509(NULL, &ca_cert, ca_cert_size);
  if (X509ca == NULL)
    goto err;
  cert_store = X509_STORE_new();
  if (cert_store == NULL)
    goto err;
  if (X509_STORE_add_cert(cert_store, X509ca) == 0)
    goto err;
  X509_STORE_set_flags(cert_store, X509_V_FLAG_PARTIAL_CHAIN | X509_V_FLAG_NO_CHECK_TIME);
  cert_ctx = X509_STORE_CTX_new();
  if (cert_ctx == NULL)
    goto err;
  if (X509_STORE_CTX_init(cert_ctx, cert_store, X509cert, NULL) == 0)
    goto err;
  ret = X509_verify_cert(cert_ctx);
  if (ret < 0)
    ret = 0;
  X509_STORE_CTX_cleanup(cert_ctx);
err:
  if (X509cert)
    X509_free(X509cert);
  if (X509ca)
    X509_free(X509ca);
  if (cert_store)
    X509_STORE_free(cert_store);
  if (cert_store)
    X509_STORE_CTX_free(cert_ctx);
  return ret;
}
```