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

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

tool_calls: name: read_data
arguments: data_label: D49
type_infered: string
name: read_data
arguments: data_label: D4
type_infered: string
name: read_data
arguments: data_label: D2
type_infered: string
name: read_data
arguments: data_label: D26
type_infered: string
name: read_data
arguments: data_label: D33
type_infered: string
name: read_data
arguments: data_label: D37
type_infered: string

tool: D49: SunMonTueWedThuFriSat

tool: D4: , 

tool: D2:  

tool: D26: JanFebMarAprMayJunJulAugSepOctNovDec

tool: D33: :

tool: D37:  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;
}
```