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

```asm
<diffdays>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %esi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  mov    -0x58(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x68db8bad,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xc,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  imul   $0xffffd8f0,%eax,%eax
  add    %eax,-0x58(%rbp)
  mov    -0x58(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  imul   $0xffffff9c,%eax,%eax
  add    %eax,-0x58(%rbp)
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x76c,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x68db8bad,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xc,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  imul   $0xffffd8f0,%eax,%eax
  add    %eax,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  imul   $0xffffff9c,%eax,%eax
  add    %eax,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x76c,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %eax,-0x38(%rbp)
  mov    -0x3c(%rbp),%edx
  mov    -0x38(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <difftime@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x34(%rbp)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x34(%rbp),%xmm0
  movsd  D4(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x40(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D4
data_type: f64

tool: D4: 86400

assistant: ```c
int diffdays(int newd, int oldd) {
  int ano, mes, dia;
  float fsec;
  time_t ttnew, ttold;
  struct tm tmnew = {0}, tmold = {0};
  ano = oldd / 10000;
  oldd -= ano * 10000;
  mes = oldd / 100;
  oldd -= mes * 100;
  dia = oldd;
  tmold.tm_year = ano - 1900;
  tmold.tm_mon = mes - 1;
  tmold.tm_mday = dia;
  ttold = mktime(&tmold);
  ano = newd / 10000;
  newd -= ano * 10000;
  mes = newd / 100;
  newd -= mes * 100;
  dia = newd;
  tmnew.tm_year = ano - 1900;
  tmnew.tm_mon = mes - 1;
  tmnew.tm_mday = dia;
  ttnew = mktime(&tmnew);
  fsec = difftime(ttnew, ttold);
  dia = fsec / 86400.0;
  return dia;
}
```