user: 请从给定的汇编指令推导出C源代码：

```asm
<ASN1_TIME_adj_internal>:
  endbr64
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x20,%rsp
  mov    %esi,0xc(%rsp)
  lea    0x14(%rsp),%r14
  lea    0xc(%rsp),%rdi
  mov    %r14,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <gmtime_r@plt>
  test   %rax,%rax
  je     L153
  test   %r12d,%r12d
  jne    L45
  test   %r13,%r13
  jne    L45
  cmp    $0x80,%ebx
  je     L48
L3:
  cmp    $0x81,%ebx
  je     L167
  test   %ebx,%ebx
  je     L130
L153:
  xor    %r13d,%r13d
L216:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L99
  add    $0x20,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L45:
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <OPENSSL_gmtime_adj@plt>
  test   %eax,%eax
  je     L153
  cmp    $0x80,%ebx
  jne    L3
L48:
  mov    %r14,%rdi
  call   <utctime_string_from_tm@plt>
  mov    %rax,%r12
  jmp    L40
  nopw   0x0(%rax,%rax,1)
L130:
  mov    %r14,%rdi
  call   <rfc5280_string_from_tm@plt>
  mov    %rax,%r12
L40:
  test   %r12,%r12
  je     L49
  test   %rbp,%rbp
  je     L28
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    $0xd,%rax
  je     L35
  cmp    $0xf,%rax
  jne    L114
L161:
  movl   $0x81,0x0(%rbp)
  mov    %rbp,%r13
  mov    $0xf,%ebx
L93:
  mov    0x8(%rbp),%rdi
  call   <free@plt>
  mov    %r12,0x8(%rbp)
  mov    %rbx,0x10(%rbp)
  jmp    L216
  cs nopw 0x0(%rax,%rax,1)
L167:
  mov    %r14,%rdi
  call   <gentime_string_from_tm@plt>
  mov    %rax,%r12
  jmp    L40
  nopl   (%rax)
L28:
  xor    %eax,%eax
  call   <ASN1_TIME_new@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L153
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    $0xd,%rax
  je     L35
  cmp    $0xf,%rax
  je     L161
  mov    %rbp,%rdi
  call   <ASN1_TIME_free@plt>
L114:
  mov    %r12,%rdi
  call   <free@plt>
  jmp    L153
  nopl   0x0(%rax)
L35:
  movl   $0x80,0x0(%rbp)
  mov    %rbp,%r13
  mov    $0xd,%ebx
  jmp    L93
  nopl   0x0(%rax)
L49:
  mov    D6(%rip),%rax
  xor    %r13d,%r13d
  mov    (%rax),%edi
  call   <ASN1error@plt>
  jmp    L216
L99:
  call   <__stack_chk_fail@plt>
```

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