user: Converte this assembly snippet into its equivalent C code:

```asm
<time_rfc1123>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %edi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  lea    D23(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D47(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D147(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D31(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D46(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D88(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D13(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D72(%rip),%rax
  mov    %rax,0x50(%rsp)
  lea    D8(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D36(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    D1(%rip),%rax
  mov    %rax,0x68(%rsp)
  lea    D108(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    D176(%rip),%rax
  mov    %rax,0x78(%rsp)
  lea    D89(%rip),%rax
  mov    %rax,0x80(%rsp)
  lea    D42(%rip),%rax
  mov    %rax,0x88(%rsp)
  lea    D74(%rip),%rax
  mov    %rax,0x90(%rsp)
  lea    D130(%rip),%rax
  mov    %rax,0x98(%rsp)
  lea    D61(%rip),%rax
  mov    %rax,0xa0(%rsp)
  lea    D114(%rip),%rax
  mov    %rax,0xa8(%rsp)
  mov    $0x1e,%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  lea    0xc(%rsp),%rdi
  call   <gmtime@plt>
  mov    %rax,%rbp
  mov    %rax,%rcx
  lea    D194(%rip),%rdx
  mov    $0x1e,%esi
  mov    %rbx,%rdi
  call   <strftime@plt>
  mov    0x0(%rbp),%rax
  mov    0x10(%rsp,%rax,8),%rsi
  mov    $0x3,%edx
  mov    %rbx,%rdi
  call   <memcpy@plt>
  mov    0x8(%rbp),%rax
  mov    0x50(%rsp,%rax,8),%rsi
  lea    0x8(%rbx),%rdi
  mov    $0x3,%edx
  call   <memcpy@plt>
  movb   $0x0,0x1d(%rbx)
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  mov    %rbx,%rax
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D23
datatype: string
name: disassemble_data
arguments: data_tag: D47
datatype: string
name: disassemble_data
arguments: data_tag: D147
datatype: string
name: disassemble_data
arguments: data_tag: D31
datatype: string
name: disassemble_data
arguments: data_tag: D46
datatype: string
name: disassemble_data
arguments: data_tag: D88
datatype: string
name: disassemble_data
arguments: data_tag: D13
datatype: string
name: disassemble_data
arguments: data_tag: D72
datatype: string
name: disassemble_data
arguments: data_tag: D8
datatype: string
name: disassemble_data
arguments: data_tag: D36
datatype: string
name: disassemble_data
arguments: data_tag: D1
datatype: string
name: disassemble_data
arguments: data_tag: D108
datatype: string
name: disassemble_data
arguments: data_tag: D176
datatype: string
name: disassemble_data
arguments: data_tag: D89
datatype: string
name: disassemble_data
arguments: data_tag: D42
datatype: string
name: disassemble_data
arguments: data_tag: D74
datatype: string
name: disassemble_data
arguments: data_tag: D130
datatype: string
name: disassemble_data
arguments: data_tag: D61
datatype: string
name: disassemble_data
arguments: data_tag: D114
datatype: string
name: disassemble_data
arguments: data_tag: D194
datatype: string

tool: D23: Sun

tool: D47: Mon

tool: D147: Tue

tool: D31: Wed

tool: D46: Thu

tool: D88: Fri

tool: D13: Sat

tool: D72: Jan

tool: D8: Feb

tool: D36: Mar

tool: D1: Apr

tool: D108: May

tool: D176: Jun

tool: D89: Jul

tool: D42: Aug

tool: D74: Sep

tool: D130: Oct

tool: D61: Nov

tool: D114: Dec

tool: D194: ---, %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;
}
```