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

```asm
<get_eta>:
  endbr64
  sub    $0x18,%rsp
  mov    %edx,%ecx
  mov    %fs:0x28,%rdx
  mov    %rdx,0x8(%rsp)
  xor    %edx,%edx
  movq   $0x0,(%rsp)
  test   %ecx,%ecx
  je     L40
  mov    %esi,%eax
  sub    %edi,%eax
  cltd
  idiv   %ecx
  movslq %eax,%r8
  cltd
  imul   $0xffffffff88888889,%r8,%r8
  shr    $0x20,%r8
  add    %eax,%r8d
  sar    $0x5,%r8d
  sub    %edx,%r8d
  movslq %r8d,%rdi
  mov    %r8d,%edx
  imul   $0xffffffff88888889,%rdi,%rdi
  sar    $0x1f,%edx
  shr    $0x20,%rdi
  add    %r8d,%edi
  sar    $0x5,%edi
  sub    %edx,%edi
  movslq %edi,%rdx
  mov    %edi,%ecx
  imul   $0x2aaaaaab,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  mov    %edi,%ecx
  lea    (%rdx,%rdx,2),%esi
  shl    $0x3,%esi
  sub    %esi,%ecx
  test   %edx,%edx
  jne    L19
  imul   $0x3c,%edi,%edi
  mov    %r8d,%r9d
  sub    %edi,%r9d
  movslq %r9d,%r9
  test   %ecx,%ecx
  je     L103
  movslq %ecx,%rdx
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    %r9,%rcx
  lea    D17(%rip),%rsi
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  je     L44
L102:
  mov    (%rsp),%rax
L91:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L66
  add    $0x18,%rsp
  ret
  xchg   %ax,%ax
L19:
  xor    %eax,%eax
  movslq %ecx,%rcx
  movslq %edx,%rdx
  mov    %rsp,%rdi
  lea    D28(%rip),%rsi
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  jne    L102
L44:
  xor    %eax,%eax
  jmp    L91
L40:
  mov    %rsp,%rdi
  lea    D11(%rip),%rsi
  xor    %eax,%eax
  call   <asprintf@plt>
  mov    %eax,%r8d
  mov    (%rsp),%rax
  cmp    $0xffffffff,%r8d
  jne    L91
  xor    %eax,%eax
  jmp    L91
  nopw   0x0(%rax,%rax,1)
L103:
  imul   $0x3c,%r8d,%r8d
  mov    %rsp,%rdi
  mov    %r9,%rdx
  lea    D24(%rip),%rsi
  sub    %r8d,%eax
  movslq %eax,%rcx
  xor    %eax,%eax
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  jne    L102
  xor    %eax,%eax
  jmp    L91
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D17
data_type: string
name: extract_symbolic_data
arguments: label: D28
data_type: string
name: extract_symbolic_data
arguments: label: D11
data_type: string
name: extract_symbolic_data
arguments: label: D24
data_type: string

tool: D17: %lluh%llum ETA

tool: D28: %llud%lluh ETA

tool: D11: ??? ETA

tool: D24: %llum%llus ETA

assistant: ```c
char *get_eta(uint64_t done, uint64_t total, uint32_t byterate) {
  char *str = NULL;
  if (byterate == 0) {
    if (asprintf(&str, "??? ETA") == -1)
      return NULL;
    return str;
  }
  uint64_t seconds = (total - done) / byterate;
  uint64_t minutes = seconds / 60;
  uint64_t hours = minutes / 60;
  uint64_t days = hours / 24;
  hours %= 24;
  minutes %= 60;
  seconds %= 60;
  if (days) {
    if (asprintf(&str, "%llud%lluh ETA", (long long unsigned int)days, (long long unsigned int)hours) == -1)
      return NULL;
  } else if (hours) {
    if (asprintf(&str, "%lluh%llum ETA", (long long unsigned int)hours, (long long unsigned int)minutes) == -1)
      return NULL;
  } else {
    if (asprintf(&str, "%llum%llus ETA", (long long unsigned int)minutes, (long long unsigned int)seconds) == -1)
      return NULL;
  }
  return (str);
}
```