user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<make_revoked>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0xffffffff,0xc(%rsp)
  movq   $0x0,0x10(%rsp)
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  lea    0x18(%rsp),%rcx
  lea    0x10(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  call   <unpack_revinfo@plt>
  test   %eax,%eax
  je     L41
  test   %rbp,%rbp
  je     L13
  mov    0x20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <X509_REVOKED_set_revocationDate@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  je     L136
  mov    D23(%rip),%rax
  mov    (%rax),%eax
  mov    $0x0,%r12d
  cmp    %eax,0xc(%rsp)
  jne    L183
L30:
  mov    0x18(%rsp),%rdx
  test   %rdx,%rdx
  je     L101
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    D6(%rip),%rax
  mov    (%rax),%esi
  mov    %rbp,%rdi
  call   <X509_REVOKED_add1_ext_i2d@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  je     L130
L101:
  mov    0x10(%rsp),%rdx
  test   %rdx,%rdx
  je     L24
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    D36(%rip),%rax
  mov    (%rax),%esi
  mov    %rbp,%rdi
  call   <X509_REVOKED_add1_ext_i2d@plt>
  mov    %eax,%ebx
  mov    %r12,%rbp
  test   %eax,%eax
  jne    L13
  jmp    L163
L183:
  mov    $0x0,%eax
  call   <ASN1_ENUMERATED_new@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L33
  mov    0xc(%rsp),%esi
  mov    %rax,%rdi
  call   <ASN1_ENUMERATED_set@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jne    L45
  mov    %r12,%rbp
  jmp    L163
L45:
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %r12,%rdx
  mov    D48(%rip),%rax
  mov    (%rax),%esi
  mov    %rbp,%rdi
  call   <X509_REVOKED_add1_ext_i2d@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jne    L30
  mov    %r12,%rbp
  jmp    L163
L41:
  mov    %eax,%ebx
  mov    $0x0,%ebp
L163:
  mov    0x10(%rsp),%rdi
  call   <ASN1_OBJECT_free@plt>
  mov    0x18(%rsp),%rdi
  call   <ASN1_GENERALIZEDTIME_free@plt>
  mov    %rbp,%rdi
  call   <ASN1_ENUMERATED_free@plt>
  mov    0x20(%rsp),%rdi
  call   <ASN1_TIME_free@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L117
  mov    %ebx,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L136:
  mov    $0x0,%ebp
  jmp    L163
L33:
  mov    %rax,%rbp
  mov    $0x0,%ebx
  jmp    L163
L130:
  mov    %r12,%rbp
  jmp    L163
L24:
  mov    %r12,%rbp
L13:
  mov    D23(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,0xc(%rsp)
  setne  %bl
  movzbl %bl,%ebx
  add    $0x1,%ebx
  jmp    L163
L117:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int make_revoked(X509_REVOKED *rev, const char *str) {
  char *tmp = NULL;
  int reason_code = -1;
  int i, ret = 0;
  ASN1_OBJECT *hold = NULL;
  ASN1_GENERALIZEDTIME *comp_time = NULL;
  ASN1_ENUMERATED *rtmp = NULL;
  ASN1_TIME *revDate = NULL;
  i = unpack_revinfo(&revDate, &reason_code, &hold, &comp_time, str);
  if (i == 0)
    goto err;
  if (rev && !X509_REVOKED_set_revocationDate(rev, revDate))
    goto err;
  if (rev && (reason_code != OCSP_REVOKED_STATUS_NOSTATUS)) {
    rtmp = ASN1_ENUMERATED_new();
    if (!rtmp || !ASN1_ENUMERATED_set(rtmp, reason_code))
      goto err;
    if (!X509_REVOKED_add1_ext_i2d(rev, NID_crl_reason, rtmp, 0, 0))
      goto err;
  }
  if (rev && comp_time) {
    if (!X509_REVOKED_add1_ext_i2d(rev, NID_invalidity_date, comp_time, 0, 0))
      goto err;
  }
  if (rev && hold) {
    if (!X509_REVOKED_add1_ext_i2d(rev, NID_hold_instruction_code, hold, 0, 0))
      goto err;
  }
  if (reason_code != OCSP_REVOKED_STATUS_NOSTATUS)
    ret = 2;
  else
    ret = 1;
err:
  if (tmp)
    OPENSSL_free(tmp);
  ASN1_OBJECT_free(hold);
  ASN1_GENERALIZEDTIME_free(comp_time);
  ASN1_ENUMERATED_free(rtmp);
  ASN1_TIME_free(revDate);
  return ret;
}
```