user: 请从给定的汇编指令推导出C源代码:

```asm
<grib_datetime_to_julian>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  mov    -0x50(%rbp),%rax
  imul   $0xe10,%rax,%rcx
  mov    -0x58(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  lea    (%rcx,%rax,1),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  D68(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdq -0x48(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  cmpq   $0x2,-0x40(%rbp)
  jg     L97
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0xc,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L99
L97:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L99:
  pxor   %xmm0,%xmm0
  cvtsi2sdq -0x20(%rbp),%xmm0
  movsd  D44(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  cmpq   $0x62e,-0x20(%rbp)
  jle    L45
  movsd  D12(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  movsd  D10(%rip),%xmm2
  divsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L110
L45:
  cmpq   $0x62e,-0x20(%rbp)
  jne    L76
  cmpq   $0xa,-0x18(%rbp)
  jle    L30
  movsd  D12(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  movsd  D10(%rip),%xmm2
  divsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L110
L30:
  cmpq   $0xa,-0x18(%rbp)
  jne    L67
  cmpq   $0xe,-0x48(%rbp)
  jle    L116
  movsd  D12(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  movsd  D10(%rip),%xmm2
  divsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L110
L116:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L110
L67:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L110
L76:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L110:
  mov    -0x20(%rbp),%rax
  add    $0x126c,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movsd  D31(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rdx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movsd  D81(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  -0x10(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  movsd  D36(%rip),%xmm1
  subsd  %xmm1,%xmm0
  mov    0x10(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    $0x0,%eax
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D68
type_guessed: f64
name: disassemble_data
arguments: data_tag: D44
type_guessed: byte[8]
name: disassemble_data
arguments: data_tag: D12
type_guessed: byte[8]
name: disassemble_data
arguments: data_tag: D10
type_guessed: byte[8]
name: disassemble_data
arguments: data_tag: D31
type_guessed: f64
name: disassemble_data
arguments: data_tag: D81
type_guessed: f64
name: disassemble_data
arguments: data_tag: D36
type_guessed: f64

tool: D68: 86400

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

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

tool: {"D10": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: D31: 365.25

tool: D81: 30.6001

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