user: Translate the below assembly code into C programming language:

```asm
<grib_datetime_to_julian>:
  endbr64
  mov    %rdi,%rax
  imul   $0xe10,%rcx,%rcx
  mov    %r8,%rdi
  shl    $0x4,%rdi
  sub    %r8,%rdi
  lea    (%rcx,%rdi,4),%rcx
  add    %r9,%rcx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rcx,%xmm1
  divsd  D107(%rip),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm1
  cmp    $0x2,%rsi
  jg     L38
  sub    $0x1,%rax
  add    $0xc,%rsi
L38:
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  divsd  D75(%rip),%xmm0
  cvttsd2si %xmm0,%rcx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rcx,%xmm0
  cmp    $0x62e,%rax
  jle    L6
  movapd %xmm0,%xmm2
  mulsd  D2(%rip),%xmm2
  cvttsd2si %xmm2,%rdx
  pxor   %xmm2,%xmm2
  cvtsi2sd %rdx,%xmm2
  movsd  D54(%rip),%xmm3
  subsd  %xmm0,%xmm3
  addsd  %xmm3,%xmm2
L64:
  add    $0x126c,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mulsd  D33(%rip),%xmm0
  cvttsd2si %xmm0,%rax
  add    $0x1,%rsi
  pxor   %xmm0,%xmm0
  cvtsi2sd %rsi,%xmm0
  mulsd  D12(%rip),%xmm0
  cvttsd2si %xmm0,%rdx
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  subsd  D39(%rip),%xmm0
  mov    0x8(%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    $0x0,%eax
  ret
L6:
  pxor   %xmm2,%xmm2
  jne    L64
  cmp    $0xa,%rsi
  jle    L62
  movapd %xmm0,%xmm2
  mulsd  D2(%rip),%xmm2
  cvttsd2si %xmm2,%rdx
  pxor   %xmm2,%xmm2
  cvtsi2sd %rdx,%xmm2
  movsd  D54(%rip),%xmm3
  subsd  %xmm0,%xmm3
  addsd  %xmm3,%xmm2
  jmp    L64
L62:
  cmp    $0xe,%rdx
  jle    L37
  cmp    $0xa,%rsi
  je     L65
L37:
  pxor   %xmm2,%xmm2
  jmp    L64
L65:
  movapd %xmm0,%xmm2
  mulsd  D2(%rip),%xmm2
  cvttsd2si %xmm2,%rdx
  pxor   %xmm2,%xmm2
  cvtsi2sd %rdx,%xmm2
  movsd  D54(%rip),%xmm3
  subsd  %xmm0,%xmm3
  addsd  %xmm3,%xmm2
  jmp    L64
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D107
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D75
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D2
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D54
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D33
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D12
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D39
type_infered: f64

tool: D107: 86400

tool: {"D75": [0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x40]}

tool: {"D2": [0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f]}

tool: {"D54": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

tool: D33: 365.25

tool: D12: 30.6001

tool: D39: 1524.5

assistant: ```c
int grib_datetime_to_julian(long year, long month, long day, long hour, long minute, long second, double *jd) {
  double a, b, dday;
  long y, m;
  dday = (double)(hour * 3600 + minute * 60 + second) / 86400.0 + day;
  if (month < 3) {
    y = year - 1;
    m = month + 12;
  } else {
    y = year;
    m = month;
  }
  a = (long)(((double)y) / 100);
  if (y > 1582)
    b = 2 - a + (long)(a / 4);
  else if (y == 1582) {
    if (m > 10)
      b = 2 - a + (long)(a / 4);
    else if (m == 10) {
      if (day > 14)
        b = 2 - a + (long)(a / 4);
      else
        b = 0;
    } else
      b = 0;
  } else
    b = 0;
  *jd = (long)(365.25 * (y + 4716)) + (long)(30.6001 * (m + 1)) + dday + b - 1524.5;
  return 0;
}
```