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

```asm
<ephcom_cal2jd>:
  endbr64
  mov    %rdi,%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0x14(%rdi),%xmm1
  movsd  D26(%rip),%xmm0
  divsd  %xmm0,%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sdl 0x10(%rdi),%xmm2
  addsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0xc(%rdi),%xmm0
  addsd  %xmm0,%xmm1
  divsd  D15(%rip),%xmm1
  subsd  D4(%rip),%xmm1
  cmp    $0xffffffff,%esi
  je     L20
  test   %esi,%esi
  jne    L54
  mov    (%rdi),%eax
  cmp    $0x62d,%eax
  jle    L20
  cmp    $0x62e,%eax
  je     L75
L54:
  mov    (%rdx),%r8d
  mov    0x4(%rdx),%esi
  lea    -0xe(%rsi),%eax
  movslq %eax,%rcx
  imul   $0x2aaaaaab,%rcx,%rcx
  sar    $0x21,%rcx
  sar    $0x1f,%eax
  sub    %eax,%ecx
  lea    0x0(,%rcx,4),%edi
  mov    %ecx,%eax
  sub    %edi,%eax
  lea    -0x2(%rsi,%rax,4),%esi
  imul   $0x16f,%esi,%esi
  movslq %esi,%rax
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x21,%rax
  sar    $0x1f,%esi
  sub    %esi,%eax
  lea    0x12c0(%r8,%rcx,1),%edi
  imul   $0x5b5,%edi,%edi
  lea    0x3(%rdi),%esi
  test   %edi,%edi
  cmovns %edi,%esi
  sar    $0x2,%esi
  add    %esi,%eax
  lea    0x1324(%r8,%rcx,1),%esi
  movslq %esi,%rcx
  imul   $0x51eb851f,%rcx,%rcx
  sar    $0x25,%rcx
  sar    $0x1f,%esi
  sub    %esi,%ecx
  lea    (%rcx,%rcx,2),%esi
  lea    0x3(%rsi),%ecx
  test   %esi,%esi
  cmovns %esi,%ecx
  sar    $0x2,%ecx
  sub    %ecx,%eax
  add    0x8(%rdx),%eax
  sub    $0x7d4b,%eax
  jmp    L3
L75:
  mov    0x4(%rdi),%eax
  cmp    $0x9,%eax
  jle    L20
  cmp    $0xa,%eax
  jne    L54
  cmpl   $0xe,0x8(%rdi)
  jg     L54
L20:
  mov    (%rdx),%eax
  mov    0x4(%rdx),%esi
  lea    -0x9(%rsi),%edi
  movslq %edi,%rcx
  imul   $0xffffffff92492493,%rcx,%rcx
  shr    $0x20,%rcx
  add    %edi,%ecx
  sar    $0x2,%ecx
  sar    $0x1f,%edi
  sub    %edi,%ecx
  lea    0x1389(%rax,%rcx,1),%ecx
  lea    0x0(,%rcx,8),%edi
  sub    %ecx,%edi
  lea    0x3(%rdi),%ecx
  cmovns %edi,%ecx
  sar    $0x2,%ecx
  imul   $0x16f,%eax,%eax
  sub    %ecx,%eax
  imul   $0x113,%esi,%esi
  movslq %esi,%rcx
  imul   $0x38e38e39,%rcx,%rcx
  sar    $0x21,%rcx
  sar    $0x1f,%esi
  sub    %esi,%ecx
  add    %ecx,%eax
  add    0x8(%rdx),%eax
  add    $0x1a64f1,%eax
L3:
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm1,%xmm0
  ret
```

tool_calls: name: parse_data
arguments: tag: D26
type_infered: f64
name: parse_data
arguments: tag: D15
type_infered: f64
name: parse_data
arguments: tag: D4
type_infered: f64

tool: D26: 60

tool: D15: 24

tool: D4: 0.5

assistant: ```c
double ephcom_cal2jd(int idate[6], int calendar_type) {
  double tjd;
  int jd;
  tjd = (idate[3] + (idate[4] + idate[5] / 60.0) / 60.0) / 24.0 - 0.5;
  if (calendar_type == -1 || (calendar_type == 0 && (idate[0] < 1582 || (idate[0] == 1582 && (idate[1] < 10 || (idate[1] == 10 && idate[2] < 15)))))) {
    jd = 367 * idate[0] - (7 * (idate[0] + 5001 + (idate[1] - 9) / 7)) / 4 + (275 * idate[1]) / 9 + idate[2] + 1729777;
  } else {
    jd = (1461 * (idate[0] + 4800 + (idate[1] - 14) / 12)) / 4 + (367 * (idate[1] - 2 - 12 * ((idate[1] - 14) / 12))) / 12 - (3 * ((idate[0] + 4900 + (idate[1] - 14) / 12) / 100)) / 4 + idate[2] - 32075;
  }
  tjd += (double)jd;
  return (tjd);
}
```