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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc0(%rsp)
  xor    %eax,%eax
  mov    D8(%rip),%rax
  mov    %rax,0x48(%rsp)
  mov    D104(%rip),%rax
  mov    %rax,0x50(%rsp)
  mov    D25(%rip),%rax
  mov    %rax,0x58(%rsp)
  mov    D89(%rip),%rax
  mov    %rax,0x60(%rsp)
  mov    D47(%rip),%rax
  mov    %rax,0x68(%rsp)
  mov    D125(%rip),%rax
  mov    %rax,0x70(%rsp)
  mov    D85(%rip),%rax
  mov    %rax,0x78(%rsp)
  mov    D58(%rip),%rax
  mov    %rax,0x80(%rsp)
  mov    D65(%rip),%rax
  mov    %rax,0x88(%rsp)
  mov    D126(%rip),%rax
  mov    %rax,0x90(%rsp)
  mov    D175(%rip),%rax
  mov    %rax,0x98(%rsp)
  mov    D57(%rip),%rax
  mov    %rax,0xa0(%rsp)
  mov    D74(%rip),%rax
  mov    %rax,0xa8(%rsp)
  movq   $0x0,0xb0(%rsp)
  movq   $0x7a5,0x10(%rsp)
  movq   $0xa,0x18(%rsp)
  movq   $0x4,0x20(%rsp)
  movq   $0x13,0x28(%rsp)
  movq   $0x1a,0x30(%rsp)
  movq   $0x18,0x38(%rsp)
  lea    0x40(%rsp),%rax
  push   %rax
  mov    $0x18,%r9d
  mov    $0x1a,%r8d
  mov    $0x13,%ecx
  mov    $0x4,%edx
  mov    $0xa,%esi
  mov    $0x7a5,%edi
  call   <grib_datetime_to_julian@plt>
  add    $0x8,%rsp
  push   0x38(%rsp)
  movsd  0x48(%rsp),%xmm0
  mov    0x38(%rsp),%r9
  mov    0x30(%rsp),%r8
  mov    0x28(%rsp),%rcx
  mov    0x20(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  lea    D109(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  lea    0x30(%rsp),%rcx
  lea    0x28(%rsp),%rdx
  lea    0x20(%rsp),%rsi
  lea    0x18(%rsp),%rdi
  lea    0x40(%rsp),%r9
  lea    0x38(%rsp),%r8
  movsd  0x48(%rsp),%xmm0
  call   <grib_julian_to_datetime@plt>
  add    $0x8,%rsp
  push   0x38(%rsp)
  movsd  0x48(%rsp),%xmm0
  mov    0x38(%rsp),%r9
  mov    0x30(%rsp),%r8
  mov    0x28(%rsp),%rcx
  mov    0x20(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x50(%rsp),%rbp
  lea    0xc0(%rsp),%r15
  add    $0x10,%rsp
  lea    D39(%rip),%r14
  lea    D75(%rip),%r13
L9:
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm0,0x38(%rsp)
  lea    0x20(%rsp),%rcx
  lea    0x18(%rsp),%rdx
  lea    0x10(%rsp),%rsi
  lea    0x8(%rsp),%rdi
  lea    0x30(%rsp),%r9
  lea    0x28(%rsp),%r8
  call   <grib_julian_to_datetime@plt>
  sub    $0x8,%rsp
  push   0x38(%rsp)
  movsd  0x48(%rsp),%xmm0
  mov    0x38(%rsp),%r9
  mov    0x30(%rsp),%r8
  mov    0x28(%rsp),%rcx
  mov    0x20(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %r14,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x8,%rsp
  lea    0x40(%rsp),%rax
  push   %rax
  mov    0x40(%rsp),%r9
  mov    0x38(%rsp),%r8
  mov    0x30(%rsp),%rcx
  mov    0x28(%rsp),%rdx
  mov    0x20(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <grib_datetime_to_julian@plt>
  add    $0x8,%rsp
  push   0x38(%rsp)
  movsd  0x48(%rsp),%xmm0
  mov    0x38(%rsp),%r9
  mov    0x30(%rsp),%r8
  mov    0x28(%rsp),%rcx
  mov    0x20(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %r13,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  D19(%rip),%xmm0
  addsd  0x48(%rsp),%xmm0
  cvttsd2si %xmm0,%r12
  mov    %r12,%rdi
  call   <grib_julian_to_date@plt>
  mov    %rax,%rbx
  mov    %r12,%rdx
  mov    %rax,%rsi
  lea    D18(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <grib_date_to_julian@plt>
  mov    %rax,%rdx
  mov    %rbx,%rsi
  lea    D143(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x8,%rbp
  add    $0x10,%rsp
  cmp    %r15,%rbp
  jne    L9
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  mov    $0x0,%eax
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D8
type_infered: f64
name: read_data
arguments: data_label: D104
type_infered: f64
name: read_data
arguments: data_label: D25
type_infered: f64
name: read_data
arguments: data_label: D89
type_infered: f64
name: read_data
arguments: data_label: D47
type_infered: f64
name: read_data
arguments: data_label: D125
type_infered: f64
name: read_data
arguments: data_label: D85
type_infered: f64
name: read_data
arguments: data_label: D58
type_infered: f64
name: read_data
arguments: data_label: D65
type_infered: f64
name: read_data
arguments: data_label: D126
type_infered: f64
name: read_data
arguments: data_label: D175
type_infered: f64
name: read_data
arguments: data_label: D57
type_infered: f64
name: read_data
arguments: data_label: D74
type_infered: f64
name: read_data
arguments: data_label: D109
type_infered: string
name: read_data
arguments: data_label: D39
type_infered: string
name: read_data
arguments: data_label: D75
type_infered: string
name: read_data
arguments: data_label: D19
type_infered: f64
name: read_data
arguments: data_label: D18
type_infered: string
name: read_data
arguments: data_label: D143
type_infered: string

tool: D8: 2451545

tool: D104: 2446822.5

tool: D25: 2446966

tool: D89: 2447187.5

tool: D47: 2447332

tool: D125: 2415020.5

tool: D85: 2305447.5

tool: D58: 2305812.5

tool: D65: 2205512.5

tool: D126: 2026871.8

tool: D175: 1356001

tool: D57: 1355866.5

tool: D74: 1355671.4

tool: D109: %ld %ld %ld %ld:%ld:%ld -> %f


tool: D39: + %ld %ld %ld %ld:%ld:%ld -> %f


tool: D75: - %ld %ld %ld %ld:%ld:%ld -> %f


tool: D19: 0.5

tool: D18: + %ld -> %ld


tool: D143: - %ld -> %ld


assistant: ```c
int main(int argc, char *argv[]) {
  long year, month, day, hour, minute, second;
  int i, last;
  double jd;
  long jdl, date;
  double jds[] = {2451545.0, 2446822.5, 2446966.0, 2447187.5, 2447332.0, 2415020.5, 2305447.5, 2305812.5, 2205512.5, 2026871.8, 1356001.0, 1355866.5, 1355671.4, 0.0};
  last = sizeof(jds) / sizeof(double);
  year = 1957;
  month = 10;
  day = 4;
  hour = 19;
  minute = 26;
  second = 24;
  grib_datetime_to_julian(year, month, day, hour, minute, second, &jd);
  printf("%ld %ld %ld %ld:%ld:%ld -> %f\n", year, month, day, hour, minute, second, jd);
  grib_julian_to_datetime(jd, &year, &month, &day, &hour, &minute, &second);
  printf("%ld %ld %ld %ld:%ld:%ld -> %f\n", year, month, day, hour, minute, second, jd);
  printf("\n");
  for (i = 0; i < last; i++) {
    jd = jds[i];
    grib_julian_to_datetime(jd, &year, &month, &day, &hour, &minute, &second);
    printf("+ %ld %ld %ld %ld:%ld:%ld -> %f\n", year, month, day, hour, minute, second, jd);
    grib_datetime_to_julian(year, month, day, hour, minute, second, &jd);
    printf("- %ld %ld %ld %ld:%ld:%ld -> %f\n", year, month, day, hour, minute, second, jd);
    jdl = (long)(jd + 0.5);
    date = grib_julian_to_date(jdl);
    printf("+ %ld -> %ld\n", date, jdl);
    jdl = grib_date_to_julian(date);
    printf("- %ld -> %ld\n", date, jdl);
    printf("\n");
  }
  return 0;
}
```