user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<fmt_httpdate>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  lea    0xc(%rsp),%rdi
  mov    %esi,0xc(%rsp)
  call   <gmtime@plt>
  test   %rbx,%rbx
  je     L2
  mov    %rax,%rbp
  mov    (%rax),%eax
  mov    %rbx,%rdi
  mov    $0x3,%esi
  lea    D5(%rip),%r12
  lea    (%rax,%rax,2),%edx
  lea    D24(%rip),%rax
  movslq %edx,%rdx
  add    %rax,%rdx
  call   <byte_copy@plt>
  lea    0x3(%rbx),%rdi
  lea    D22(%rip),%rsi
  call   <fmt_str@plt>
  mov    0x4(%rbp),%esi
  lea    0x3(%rax),%r13
  lea    (%rbx,%r13,1),%rdi
  call   <fmt_2digits@plt>
  mov    %r12,%rsi
  add    %rax,%r13
  lea    (%rbx,%r13,1),%rdi
  call   <fmt_str@plt>
  mov    $0x3,%esi
  add    %rax,%r13
  mov    0x8(%rbp),%eax
  lea    (%rbx,%r13,1),%rdi
  add    $0x3,%r13
  lea    (%rax,%rax,2),%edx
  lea    D6(%rip),%rax
  movslq %edx,%rdx
  add    %rax,%rdx
  call   <byte_copy@plt>
  lea    (%rbx,%r13,1),%rdi
  mov    %r12,%rsi
  call   <fmt_str@plt>
  add    %rax,%r13
  mov    0xc(%rbp),%eax
  lea    (%rbx,%r13,1),%rdi
  add    $0x76c,%eax
  movslq %eax,%rsi
  sar    $0x1f,%eax
  imul   $0x51eb851f,%rsi,%rsi
  sar    $0x25,%rsi
  sub    %eax,%esi
  call   <fmt_2digits@plt>
  add    %rax,%r13
  mov    0xc(%rbp),%eax
  lea    (%rbx,%r13,1),%rdi
  lea    0x76c(%rax),%esi
  movslq %esi,%rax
  mov    %esi,%edx
  imul   $0x51eb851f,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x25,%rax
  sub    %edx,%eax
  imul   $0x64,%eax,%eax
  sub    %eax,%esi
  call   <fmt_2digits@plt>
  mov    %r12,%rsi
  add    %rax,%r13
  lea    (%rbx,%r13,1),%rdi
  call   <fmt_str@plt>
  mov    0x10(%rbp),%esi
  lea    (%rax,%r13,1),%r12
  lea    D9(%rip),%r13
  lea    (%rbx,%r12,1),%rdi
  call   <fmt_2digits@plt>
  mov    %r13,%rsi
  add    %rax,%r12
  lea    (%rbx,%r12,1),%rdi
  call   <fmt_str@plt>
  mov    0x14(%rbp),%esi
  add    %rax,%r12
  lea    (%rbx,%r12,1),%rdi
  call   <fmt_2digits@plt>
  mov    %r13,%rsi
  add    %rax,%r12
  lea    (%rbx,%r12,1),%rdi
  call   <fmt_str@plt>
  mov    0x18(%rbp),%esi
  add    %rax,%r12
  lea    (%rbx,%r12,1),%rdi
  call   <fmt_2digits@plt>
  lea    D18(%rip),%rsi
  add    %rax,%r12
  lea    (%rbx,%r12,1),%rdi
  call   <fmt_str@plt>
  add    $0x18,%rsp
  pop    %rbx
  add    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L2:
  add    $0x18,%rsp
  mov    $0x1d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: read_data
arguments: data_label: D5
type_infered: string
name: read_data
arguments: data_label: D24
type_infered: string
name: read_data
arguments: data_label: D22
type_infered: string
name: read_data
arguments: data_label: D6
type_infered: string
name: read_data
arguments: data_label: D9
type_infered: string
name: read_data
arguments: data_label: D18
type_infered: string

tool: D5:  

tool: D24: SunMonTueWedThuFriSat

tool: D22: , 

tool: D6: JanFebMarAprMayJunJulAugSepOctNovDec

tool: D9: :

tool: D18:  GMT

assistant: ```c
size_t fmt_httpdate(char *dest, time_t t) {
  static const char days[] = "SunMonTueWedThuFriSat";
  static const char months[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
  struct tm *x = gmtime(&t);
  size_t i;
  if (dest == 0)
    return 29;
  byte_copy(dest, 3, days + 3 * x->tm_wday);
  i = 3;
  i += fmt_str(dest + i, ", ");
  i += fmt_2digits(dest + i, x->tm_mday);
  i += fmt_str(dest + i, " ");
  byte_copy(dest + i, 3, months + 3 * x->tm_mon);
  i += 3;
  i += fmt_str(dest + i, " ");
  i += fmt_2digits(dest + i, (x->tm_year + 1900) / 100);
  i += fmt_2digits(dest + i, (x->tm_year + 1900) % 100);
  i += fmt_str(dest + i, " ");
  i += fmt_2digits(dest + i, x->tm_hour);
  i += fmt_str(dest + i, ":");
  i += fmt_2digits(dest + i, x->tm_min);
  i += fmt_str(dest + i, ":");
  i += fmt_2digits(dest + i, x->tm_sec);
  i += fmt_str(dest + i, " GMT");
  return i;
}
```