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

```asm
<ASN1_TIME_adj_internal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1c(%rbp)
  lea    -0x20(%rbp),%rdx
  lea    -0x2c(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <gmtime_r@plt>
  test   %rax,%rax
  jne    L198
  mov    $0x0,%eax
  jmp    L160
L198:
  cmpl   $0x0,-0x30(%rbp)
  jne    L134
  cmpq   $0x0,-0x38(%rbp)
  je     L206
L134:
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%ecx
  lea    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <OPENSSL_gmtime_adj@plt>
  test   %eax,%eax
  jne    L206
  mov    $0x0,%eax
  jmp    L160
L206:
  cmpl   $0x81,-0x3c(%rbp)
  je     L156
  cmpl   $0x81,-0x3c(%rbp)
  jg     L204
  cmpl   $0x0,-0x3c(%rbp)
  je     L70
  cmpl   $0x80,-0x3c(%rbp)
  jne    L204
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <utctime_string_from_tm@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L37
L156:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <gentime_string_from_tm@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L37
L70:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <rfc5280_string_from_tm@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L37
L204:
  mov    $0x0,%eax
  jmp    L160
L37:
  cmpq   $0x0,-0x18(%rbp)
  jne    L28
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <ASN1error@plt>
  mov    $0x0,%eax
  jmp    L160
L28:
  cmpq   $0x0,-0x28(%rbp)
  jne    L3
  mov    $0x0,%eax
  call   <ASN1_TIME_new@plt>
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L136
  mov    $0x0,%eax
  jmp    L160
L136:
  movl   $0x1,-0x1c(%rbp)
L3:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0xd,-0x10(%rbp)
  je     L163
  cmpq   $0xf,-0x10(%rbp)
  jne    L245
  mov    -0x28(%rbp),%rax
  movl   $0x81,(%rax)
  jmp    L223
L163:
  mov    -0x28(%rbp),%rax
  movl   $0x80,(%rax)
  jmp    L223
L245:
  cmpl   $0x0,-0x1c(%rbp)
  je     L180
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <ASN1_TIME_free@plt>
L180:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L160
L223:
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,0x8(%rax)
  mov    -0x28(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,0x10(%rax)
  mov    -0x28(%rbp),%rax
L160:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L68
  call   <__stack_chk_fail@plt>
L68:
  leave
  ret
```

assistant: ```c
ASN1_TIME *ASN1_TIME_adj_internal(ASN1_TIME *s, time_t t, int offset_day, long offset_sec, int mode) {
  int allocated = 0;
  struct tm tm;
  size_t len;
  char *p;
  if (gmtime_r(&t, &tm) == NULL)
    return (NULL);
  if (offset_day || offset_sec) {
    if (!OPENSSL_gmtime_adj(&tm, offset_day, offset_sec))
      return (NULL);
  }
  switch (mode) {
  case V_ASN1_UTCTIME:
    p = utctime_string_from_tm(&tm);
    break;
  case V_ASN1_GENERALIZEDTIME:
    p = gentime_string_from_tm(&tm);
    break;
  case 0:
    p = rfc5280_string_from_tm(&tm);
    break;
  default:
    return (NULL);
  }
  if (p == NULL) {
    ASN1error(ASN1_R_ILLEGAL_TIME_VALUE);
    return (NULL);
  }
  if (s == NULL) {
    if ((s = ASN1_TIME_new()) == NULL)
      return (NULL);
    allocated = 1;
  }
  len = strlen(p);
  switch (len) {
  case 15:
    s->type = V_ASN1_GENERALIZEDTIME;
    break;
  case 13:
    s->type = V_ASN1_UTCTIME;
    break;
  default:
    if (allocated)
      ASN1_TIME_free(s);
    free(p);
    return (NULL);
  }
  free(s->data);
  s->data = p;
  s->length = len;
  return (s);
}
```