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

```asm
<time_rfc1123>:
  endbr64
  push   %r12
  push   %rbx
  sub    $0xc8,%rsp
  mov    %edi,0xc(%rsp)
  mov    $0x1e,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  lea    D51(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D196(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D72(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D11(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D125(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D32(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D9(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D157(%rip),%rax
  mov    %rax,0x50(%rsp)
  lea    D111(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D149(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    D26(%rip),%rax
  mov    %rax,0x68(%rsp)
  lea    D119(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    D10(%rip),%rax
  mov    %rax,0x78(%rsp)
  lea    D154(%rip),%rax
  mov    %rax,0x80(%rsp)
  lea    D150(%rip),%rax
  mov    %rax,0x88(%rsp)
  lea    D76(%rip),%rax
  mov    %rax,0x90(%rsp)
  lea    D191(%rip),%rax
  mov    %rax,0x98(%rsp)
  lea    D109(%rip),%rax
  mov    %rax,0xa0(%rsp)
  lea    D175(%rip),%rax
  mov    %rax,0xa8(%rsp)
  call   <malloc@plt>
  lea    0xc(%rsp),%rdi
  mov    %rax,%r12
  call   <gmtime@plt>
  lea    D132(%rip),%rdx
  mov    $0x1e,%esi
  mov    %r12,%rdi
  mov    %rax,%rbx
  mov    %rax,%rcx
  call   <strftime@plt>
  mov    (%rbx),%rax
  mov    $0x3,%edx
  mov    %r12,%rdi
  mov    0x10(%rsp,%rax,8),%rsi
  call   <memcpy@plt>
  mov    0x8(%rbx),%rax
  lea    0x8(%r12),%rdi
  mov    $0x3,%edx
  mov    0x50(%rsp,%rax,8),%rsi
  call   <memcpy@plt>
  movb   $0x0,0x1d(%r12)
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0xc8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D51
data_type: string
name: unpack_data
arguments: tag: D196
data_type: string
name: unpack_data
arguments: tag: D72
data_type: string
name: unpack_data
arguments: tag: D11
data_type: string
name: unpack_data
arguments: tag: D125
data_type: string
name: unpack_data
arguments: tag: D32
data_type: string
name: unpack_data
arguments: tag: D9
data_type: string
name: unpack_data
arguments: tag: D157
data_type: string
name: unpack_data
arguments: tag: D111
data_type: string
name: unpack_data
arguments: tag: D149
data_type: string
name: unpack_data
arguments: tag: D26
data_type: string
name: unpack_data
arguments: tag: D119
data_type: string
name: unpack_data
arguments: tag: D10
data_type: string
name: unpack_data
arguments: tag: D154
data_type: string
name: unpack_data
arguments: tag: D150
data_type: string
name: unpack_data
arguments: tag: D76
data_type: string
name: unpack_data
arguments: tag: D191
data_type: string
name: unpack_data
arguments: tag: D109
data_type: string
name: unpack_data
arguments: tag: D175
data_type: string
name: unpack_data
arguments: tag: D132
data_type: string

tool: D51: Sun

tool: D196: Mon

tool: D72: Tue

tool: D11: Wed

tool: D125: Thu

tool: D32: Fri

tool: D9: Sat

tool: D157: Jan

tool: D111: Feb

tool: D149: Mar

tool: D26: Apr

tool: D119: May

tool: D10: Jun

tool: D154: Jul

tool: D150: Aug

tool: D76: Sep

tool: D191: Oct

tool: D109: Nov

tool: D175: Dec

tool: D132: ---, %d --- %Y %H:%M:%S GMT

assistant: ```c
char *time_rfc1123(time_t t) {
  char *days_names[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
  char *month_names[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
  const int date_len = 29;
  struct tm *tmp;
  char *outstr = malloc(date_len + 1);
  tmp = gmtime(&t);
  strftime(outstr, date_len + 1, "---, %d --- %Y %H:%M:%S GMT", tmp);
  memcpy(outstr, days_names[tmp->tm_wday], 3);
  memcpy(outstr + 8, month_names[tmp->tm_mon], 3);
  outstr[date_len] = '\0';
  return outstr;
}
```