user: What is the c source code of the assembly code below:

```asm
<calc_time>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    $0x3,%edi
  push   %rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x78,%rsp
  movdqa D60(%rip),%xmm0
  movdqa D32(%rip),%xmm2
  mov    %rsi,0x8(%rsp)
  lea    0x4c(%rsp),%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x10(%rsp)
  movdqa D86(%rip),%xmm0
  movaps %xmm2,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  call   <malloc@plt>
  mov    $0x18,%edx
  mov    %r12,%rsi
  lea    0x50(%rsp),%rdi
  mov    %rax,%r14
  call   <strncpy@plt>
  mov    %r12,%rdi
  call   <atoi@plt>
  lea    0x3(%r12),%rsi
  mov    $0x3,%edx
  mov    %rbp,%rdi
  mov    %eax,%r13d
  call   <strncpy@plt>
  mov    $0x3,%edx
  lea    D68(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D52(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D79(%rip),%rsi
  mov    %rbp,%rdi
  cmp    $0x1,%eax
  adc    $0x0,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D48(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0x3,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D93(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0x4,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D17(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0x5,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D14(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0x6,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D30(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0x7,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D5(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0x8,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D142(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0x9,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    $0x3,%edx
  lea    D99(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  mov    $0xa,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  mov    %rbp,%rdi
  mov    $0x3,%edx
  test   %eax,%eax
  lea    D63(%rip),%rsi
  mov    $0xb,%eax
  cmove  %eax,%ebx
  call   <strncmp@plt>
  lea    0x9(%r12),%rdi
  test   %eax,%eax
  je     L27
  call   <atoi@plt>
  mov    %eax,%ebp
  test   $0x3,%al
  jne    L5
  imul   $0xc28f5c29,%eax,%eax
  add    $0x51eb850,%eax
  ror    $0x2,%eax
  cmp    $0x28f5c28,%eax
  jbe    L60
  movl   $0x1d,0x14(%rsp)
L5:
  cmp    $0x1,%ebx
  je     L91
  lea    -0x1(%rbx),%edi
  sub    $0x2,%ebx
  mov    %edi,%esi
  cmp    $0x2,%ebx
  jbe    L87
L3:
  mov    %esi,%edx
  movdqa 0x10(%rsp),%xmm0
  shr    $0x2,%edx
  cmp    $0x2,%edx
  je     L67
L147:
  movdqa %xmm0,%xmm1
  shl    $0x2,%edx
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  cmp    %esi,%edx
  je     L56
L94:
  movslq %edx,%rsi
  add    0x10(%rsp,%rsi,4),%eax
  lea    0x1(%rdx),%esi
  cmp    %edi,%esi
  jge    L56
  movslq %esi,%rsi
  add    $0x2,%edx
  add    0x10(%rsp,%rsi,4),%eax
  cmp    %edi,%edx
  jge    L56
  movslq %edx,%rdx
  add    0x10(%rsp,%rdx,4),%eax
L56:
  add    %eax,%r13d
L91:
  lea    0xc(%r12),%rdi
  call   <atoi@plt>
  lea    0xf(%r12),%rdi
  mov    %eax,%ebx
  call   <atoi@plt>
  lea    0x12(%r12),%rdi
  mov    %eax,0x4(%rsp)
  call   <atoi@plt>
  mov    $0x3,%edx
  lea    0x65(%rsp),%rsi
  mov    %r14,%rdi
  mov    %eax,%r12d
  call   <strncpy@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  cmp    $0x54,%ebp
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  mov    %eax,%r8d
  lea    0x7d0(%rbp),%edx
  lea    0x76c(%rbp),%eax
  mov    0x8(%rsp),%rcx
  cmovle %edx,%eax
  imul   $0x36ee80,%ebx,%ebx
  imul   $0xea60,0x4(%rsp),%ebp
  imul   $0x3e8,%r12d,%r12d
  cvtsi2sd %r13d,%xmm1
  add    %ebp,%ebx
  imul   $0x3e8,%eax,%eax
  add    %r12d,%ebx
  add    %r8d,%ebx
  cvtsi2sd %ebx,%xmm0
  divsd  D162(%rip),%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  %xmm0,(%rcx)
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%r15)
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L54
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L27:
  call   <atoi@plt>
  mov    %eax,%ebp
  test   $0x3,%al
  je     L173
  movdqa 0x10(%rsp),%xmm0
  mov    $0xb,%edi
  mov    $0xb,%esi
  mov    $0x2,%edx
L67:
  paddd  D32(%rip),%xmm0
  jmp    L147
  nopl   (%rax)
L173:
  imul   $0xc28f5c29,%eax,%eax
  add    $0x51eb850,%eax
  ror    $0x2,%eax
  cmp    $0x28f5c28,%eax
  jbe    L128
L62:
  movl   $0x1d,0x14(%rsp)
  mov    $0xc,%ebx
  jmp    L5
  nopw   0x0(%rax,%rax,1)
L128:
  test   %ebp,%ebp
  je     L62
  mov    $0xb,%edi
  mov    $0xb,%esi
  jmp    L3
  nopl   0x0(%rax,%rax,1)
L60:
  test   %ebp,%ebp
  jne    L5
  movl   $0x1d,0x14(%rsp)
  jmp    L5
  nopl   (%rax)
L87:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L94
L54:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D60
type: byte[16]
name: retrieve_data
arguments: data_tag: D32
type: byte[16]
name: retrieve_data
arguments: data_tag: D86
type: byte[16]
name: retrieve_data
arguments: data_tag: D68
type: string
name: retrieve_data
arguments: data_tag: D52
type: string
name: retrieve_data
arguments: data_tag: D79
type: string
name: retrieve_data
arguments: data_tag: D48
type: string
name: retrieve_data
arguments: data_tag: D93
type: string
name: retrieve_data
arguments: data_tag: D17
type: string
name: retrieve_data
arguments: data_tag: D14
type: string
name: retrieve_data
arguments: data_tag: D30
type: string
name: retrieve_data
arguments: data_tag: D5
type: string
name: retrieve_data
arguments: data_tag: D142
type: string
name: retrieve_data
arguments: data_tag: D99
type: string
name: retrieve_data
arguments: data_tag: D63
type: string
name: retrieve_data
arguments: data_tag: D162
type: byte[8]

tool: {"D60": [0x1f,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1e,0x00,0x00,0x00]}

tool: {"D32": [0x1f,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00]}

tool: {"D86": [0x1e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00]}

tool: D68: JAN

tool: D52: FEB

tool: D79: MAR

tool: D48: APR

tool: D93: MAY

tool: D17: JUN

tool: D14: JUL

tool: D30: AUG

tool: D5: SEP

tool: D142: OCT

tool: D99: NOV

tool: D63: DEC

tool: {"D162": [0x00,0x00,0x00,0x00,0x70,0x99,0x94,0x41]}

assistant: ```c
void calc_time(char time_string[], double *clock_time, double *SC_clock_time) {
  int day_of_month, hour, minute, second, msec, jday, i, month, year, leap;
  int mon_nday[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  char c_month[4], tmp_time_string[24];
  char *string_tmp = (char *)malloc(3);
  strncpy(tmp_time_string, &time_string[0], 24);
  day_of_month = atoi(&time_string[0]);
  strncpy(c_month, &time_string[3], 3);
  if (!strncmp(c_month, "JAN", 3)) {
    month = 1;
  }
  if (!strncmp(c_month, "FEB", 3)) {
    month = 2;
  }
  if (!strncmp(c_month, "MAR", 3)) {
    month = 3;
  }
  if (!strncmp(c_month, "APR", 3)) {
    month = 4;
  }
  if (!strncmp(c_month, "MAY", 3)) {
    month = 5;
  }
  if (!strncmp(c_month, "JUN", 3)) {
    month = 6;
  }
  if (!strncmp(c_month, "JUL", 3)) {
    month = 7;
  }
  if (!strncmp(c_month, "AUG", 3)) {
    month = 8;
  }
  if (!strncmp(c_month, "SEP", 3)) {
    month = 9;
  }
  if (!strncmp(c_month, "OCT", 3)) {
    month = 10;
  }
  if (!strncmp(c_month, "NOV", 3)) {
    month = 11;
  }
  if (!strncmp(c_month, "DEC", 3)) {
    month = 12;
  }
  year = atoi(&time_string[9]);
  if (year % 4 == 0 && year % 100 != 0) {
    leap = 1;
  } else if (year == 00) {
    leap = 1;
  } else {
    leap = 0;
  }
  if (leap) {
    mon_nday[1] = 29;
  }
  jday = 0;
  if (month > 1) {
    for (i = 0; i < month - 1; i++)
      jday = jday + mon_nday[i];
  }
  jday = jday + day_of_month;
  hour = atoi(&time_string[12]);
  minute = atoi(&time_string[15]);
  second = atoi(&time_string[18]);
  msec = atoi(strncpy(string_tmp, tmp_time_string + 21, 3));
  if (year < 85.) {
    year = year + 2000;
  } else {
    year = year + 1900;
  }
  *clock_time = (double)(jday) + ((double)(hour * 3600 * 1000 + minute * 60 * 1000 + second * 1000 + msec) / (double)(24 * 3600 * 1000));
  *SC_clock_time = (double)(year * 1000) + *clock_time;
}
```