user: What would the C source look like for the assembly code provided here:

```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     L56
  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    L25
  imul   $0x3c,%edi,%edi
  mov    %r8d,%r9d
  sub    %edi,%r9d
  movslq %r9d,%r9
  test   %ecx,%ecx
  je     L76
  movslq %ecx,%rdx
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    %r9,%rcx
  lea    D31(%rip),%rsi
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  je     L45
L31:
  mov    (%rsp),%rax
L27:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L30
  add    $0x18,%rsp
  ret
  xchg   %ax,%ax
L25:
  xor    %eax,%eax
  movslq %ecx,%rcx
  movslq %edx,%rdx
  mov    %rsp,%rdi
  lea    D2(%rip),%rsi
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  jne    L31
L45:
  xor    %eax,%eax
  jmp    L27
L56:
  mov    %rsp,%rdi
  lea    D26(%rip),%rsi
  xor    %eax,%eax
  call   <asprintf@plt>
  mov    %eax,%r8d
  mov    (%rsp),%rax
  cmp    $0xffffffff,%r8d
  jne    L27
  xor    %eax,%eax
  jmp    L27
  nopw   0x0(%rax,%rax,1)
L76:
  imul   $0x3c,%r8d,%r8d
  mov    %rsp,%rdi
  mov    %r9,%rdx
  lea    D5(%rip),%rsi
  sub    %r8d,%eax
  movslq %eax,%rcx
  xor    %eax,%eax
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  jne    L31
  xor    %eax,%eax
  jmp    L27
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D31
data_type: string
name: parse_data
arguments: data_label: D2
data_type: string
name: parse_data
arguments: data_label: D26
data_type: string
name: parse_data
arguments: data_label: D5
data_type: string

tool: D31: %lluh%llum ETA

tool: D2: %llud%lluh ETA

tool: D26: ??? ETA

tool: D5: %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);
}
```