user: 请将以下的汇编代码转换成C语言代码:

```asm
<EVP_SealInit>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rsi,%r15
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %r9,%r12
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x38,%rsp
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %rsp,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  mov    D1(%rip),%rax
  movslq (%rax),%rax
  mov    %eax,-0x54(%rbp)
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L91
L23:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L23
L91:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L112
  mov    %rsp,%r14
  test   %r15,%r15
  je     L194
L153:
  mov    %rbx,%rdi
  call   <EVP_CIPHER_CTX_reset@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <EVP_EncryptInit_ex@plt>
  test   %eax,%eax
  je     L3
L194:
  mov    0x10(%rbp),%eax
  test   %eax,%eax
  jle    L66
  test   %r12,%r12
  je     L66
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <EVP_CIPHER_CTX_rand_key@plt>
  test   %rax,%rax
  jle    L3
  mov    %rbx,%rdi
  call   <EVP_CIPHER_CTX_iv_length@plt>
  test   %rax,%rax
  je     L119
  mov    %rbx,%rdi
  call   <EVP_CIPHER_CTX_iv_length@plt>
  mov    -0x48(%rbp),%rdi
  mov    %rax,%rsi
  call   <RAND_bytes@plt>
  test   %rax,%rax
  jle    L11
L119:
  mov    -0x48(%rbp),%r8
  mov    %r14,%rcx
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  xor    %r15d,%r15d
  call   <EVP_EncryptInit_ex@plt>
  test   %eax,%eax
  je     L11
L109:
  mov    (%r12,%r15,8),%rcx
  mov    %rbx,%rdi
  mov    %rcx,-0x48(%rbp)
  call   <EVP_CIPHER_CTX_key_length@plt>
  mov    0x0(%r13,%r15,8),%rdi
  mov    -0x48(%rbp),%rcx
  mov    %r14,%rsi
  mov    %eax,%edx
  call   <EVP_PKEY_encrypt_old@plt>
  mov    -0x50(%rbp),%rsi
  mov    %eax,(%rsi,%r15,4)
  test   %eax,%eax
  jle    L108
  add    $0x1,%r15
  cmp    %r15d,0x10(%rbp)
  jg     L109
  mov    0x10(%rbp),%r12d
  jmp    L67
  nop
L66:
  mov    $0x1,%r12d
L183:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  lea    -0x28(%rbp),%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L3:
  xor    %r12d,%r12d
  jmp    L183
  nopl   (%rax)
L112:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  mov    %rsp,%r14
  test   %r15,%r15
  jne    L153
  jmp    L194
  nop
L11:
  xor    %r12d,%r12d
L67:
  mov    -0x54(%rbp),%esi
  mov    %r14,%rdi
  call   <OPENSSL_cleanse@plt>
  jmp    L183
L108:
  mov    $0xffffffff,%r12d
  jmp    L67
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, int *ekl, unsigned char *iv, EVP_PKEY **pubk, int npubk) {
  unsigned char key[EVP_MAX_KEY_LENGTH];
  int i;
  int rv = 0;
  if (type) {
    EVP_CIPHER_CTX_reset(ctx);
    if (!EVP_EncryptInit_ex(ctx, type, NULL, NULL, NULL))
      return 0;
  }
  if ((npubk <= 0) || !pubk)
    return 1;
  if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0)
    return 0;
  if (EVP_CIPHER_CTX_iv_length(ctx) && RAND_bytes(iv, EVP_CIPHER_CTX_iv_length(ctx)) <= 0)
    goto err;
  if (!EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv))
    goto err;
  for (i = 0; i < npubk; i++) {
    ekl[i] = EVP_PKEY_encrypt_old(ek[i], key, EVP_CIPHER_CTX_key_length(ctx), pubk[i]);
    if (ekl[i] <= 0) {
      rv = -1;
      goto err;
    }
  }
  rv = npubk;
err:
  OPENSSL_cleanse(key, sizeof(key));
  return rv;
}
```