user: Please show me the C implementation that matches the assembly code listed below:

```asm
<make_revoked>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x10(%rbp)
  movl   $0xffffffff,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x20(%rbp)
  mov    -0x50(%rbp),%rdi
  lea    -0x28(%rbp),%rcx
  lea    -0x30(%rbp),%rdx
  lea    -0x3c(%rbp),%rsi
  lea    -0x20(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <unpack_revinfo@plt>
  mov    %eax,-0x34(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L45
  cmpq   $0x0,-0x48(%rbp)
  je     L226
  mov    -0x20(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <X509_REVOKED_set_revocationDate@plt>
  test   %eax,%eax
  je     L188
L226:
  cmpq   $0x0,-0x48(%rbp)
  je     L99
  mov    -0x3c(%rbp),%edx
  mov    D10(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L99
  mov    $0x0,%eax
  call   <ASN1_ENUMERATED_new@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L229
  mov    -0x3c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <ASN1_ENUMERATED_set@plt>
  test   %eax,%eax
  je     L229
  mov    D1(%rip),%rax
  mov    (%rax),%esi
  mov    -0x18(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <X509_REVOKED_add1_ext_i2d@plt>
  test   %eax,%eax
  je     L142
L99:
  cmpq   $0x0,-0x48(%rbp)
  je     L22
  mov    -0x28(%rbp),%rax
  test   %rax,%rax
  je     L22
  mov    -0x28(%rbp),%rdx
  mov    D8(%rip),%rax
  mov    (%rax),%esi
  mov    -0x48(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <X509_REVOKED_add1_ext_i2d@plt>
  test   %eax,%eax
  je     L194
L22:
  cmpq   $0x0,-0x48(%rbp)
  je     L13
  mov    -0x30(%rbp),%rax
  test   %rax,%rax
  je     L13
  mov    -0x30(%rbp),%rdx
  mov    D25(%rip),%rax
  mov    (%rax),%esi
  mov    -0x48(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <X509_REVOKED_add1_ext_i2d@plt>
  test   %eax,%eax
  je     L187
L13:
  mov    -0x3c(%rbp),%edx
  mov    D10(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L75
  movl   $0x2,-0x38(%rbp)
  jmp    L179
L75:
  movl   $0x1,-0x38(%rbp)
  jmp    L179
L45:
  nop
  jmp    L179
L188:
  nop
  jmp    L179
L229:
  nop
  jmp    L179
L142:
  nop
  jmp    L179
L194:
  nop
  jmp    L179
L187:
  nop
L179:
  cmpq   $0x0,-0x10(%rbp)
  je     L183
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <OPENSSL_free@plt>
L183:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <ASN1_OBJECT_free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <ASN1_GENERALIZEDTIME_free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <ASN1_ENUMERATED_free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ASN1_TIME_free@plt>
  mov    -0x38(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L196
  call   <__stack_chk_fail@plt>
L196:
  leave
  ret
```

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;
}
```