user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ElapsedStr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x28(%rbp)
  mov    %rdi,-0x30(%rbp)
  mov    %rsi,-0x38(%rbp)
  movsd  -0x28(%rbp),%xmm1
  movsd  D21(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L17
  movl   $0x0,-0x14(%rbp)
L17:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff88888889,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x3c,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff88888889,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  movslq %eax,%rdx
  imul   $0xffffffff88888889,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  imul   $0x3c,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff91a2b3c5,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0xb,%edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  mov    %edx,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffffc22e4507,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x10,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jle    L46
  mov    -0xc(%rbp),%r8d
  mov    -0x8(%rbp),%edi
  mov    -0x4(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x30(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x10(%rbp),%ecx
  push   %rcx
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %edx,%ecx
  lea    D19(%rip),%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  add    $0x10,%rsp
  jmp    L1
L46:
  cmpl   $0x0,-0x8(%rbp)
  jle    L14
  mov    -0x10(%rbp),%edi
  mov    -0xc(%rbp),%ecx
  mov    -0x8(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x30(%rbp),%rax
  mov    %edi,%r9d
  mov    %ecx,%r8d
  mov    %edx,%ecx
  lea    D37(%rip),%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  jmp    L1
L14:
  mov    -0x10(%rbp),%ecx
  mov    -0xc(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x30(%rbp),%rax
  mov    %ecx,%r8d
  mov    %edx,%ecx
  lea    D10(%rip),%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
L1:
  mov    -0x30(%rbp),%rax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D21
datatype: f64
name: extract_symbolic_data
arguments: tag: D19
datatype: string
name: extract_symbolic_data
arguments: tag: D37
datatype: string
name: extract_symbolic_data
arguments: tag: D10
datatype: string

tool: D21: 0.5

tool: D19: %d:%02d:%02d:%02d

tool: D37: %d:%02d:%02d

tool: D10: %d:%02d

assistant: ```c
char *ElapsedStr(double elap, char *const s, const size_t siz) {
  int ielap, day, sec, min, hr;
  ielap = (int)(elap + 0.5);
  if (ielap < 0)
    ielap = 0;
  sec = ielap % 60;
  min = (ielap / 60) % 60;
  hr = (ielap / 3600) % 24;
  day = (ielap / 86400);
  if (day > 0) {
    snprintf(s, siz, "%d:%02d:%02d:%02d", day, hr, min, sec);
  } else if (hr > 0) {
    snprintf(s, siz, "%d:%02d:%02d", hr, min, sec);
  } else {
    snprintf(s, siz, "%d:%02d", min, sec);
  }
  return (s);
}
```