user: 这段汇编代码用C语言表示是什么样的：

```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     L73
  mov    %esi,%eax
  sub    %edi,%eax
  cltd
  idiv   %ecx
  movslq %eax,%rdi
  imul   $0xffffffff88888889,%rdi,%rdi
  shr    $0x20,%rdi
  add    %eax,%edi
  sar    $0x5,%edi
  cltd
  sub    %edx,%edi
  movslq %edi,%rcx
  imul   $0xffffffff88888889,%rcx,%rcx
  shr    $0x20,%rcx
  add    %edi,%ecx
  sar    $0x5,%ecx
  mov    %edi,%edx
  sar    $0x1f,%edx
  sub    %edx,%ecx
  movslq %ecx,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%edx
  lea    (%rdx,%rdx,2),%esi
  shl    $0x3,%esi
  sub    %esi,%ecx
  test   %edx,%edx
  jne    L66
  movslq %edi,%rdx
  imul   $0xffffffff88888889,%rdx,%rdx
  shr    $0x20,%rdx
  add    %edi,%edx
  sar    $0x5,%edx
  mov    %edi,%esi
  sar    $0x1f,%esi
  sub    %esi,%edx
  imul   $0x3c,%edx,%esi
  sub    %esi,%edi
  test   %ecx,%ecx
  je     L31
  movslq %edi,%rax
  movslq %ecx,%rdx
  mov    %rsp,%rdi
  mov    %rax,%rcx
  lea    D8(%rip),%rsi
  mov    $0x0,%eax
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  je     L28
L95:
  mov    (%rsp),%rax
L0:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L103
  add    $0x18,%rsp
  ret
L73:
  mov    %rsp,%rdi
  lea    D24(%rip),%rsi
  mov    $0x0,%eax
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  mov    $0x0,%eax
  cmovne (%rsp),%rax
  jmp    L0
L66:
  movslq %ecx,%rcx
  movslq %edx,%rdx
  mov    %rsp,%rdi
  lea    D3(%rip),%rsi
  mov    $0x0,%eax
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  jne    L95
  mov    $0x0,%eax
  jmp    L0
L31:
  movslq %eax,%rcx
  imul   $0xffffffff88888889,%rcx,%rcx
  shr    $0x20,%rcx
  add    %eax,%ecx
  sar    $0x5,%ecx
  mov    %eax,%esi
  sar    $0x1f,%esi
  sub    %esi,%ecx
  imul   $0x3c,%ecx,%ecx
  sub    %ecx,%eax
  movslq %eax,%rcx
  movslq %edi,%rdx
  mov    %rsp,%rdi
  lea    D13(%rip),%rsi
  mov    $0x0,%eax
  call   <asprintf@plt>
  cmp    $0xffffffff,%eax
  jne    L95
  mov    $0x0,%eax
  jmp    L0
L28:
  mov    $0x0,%eax
  jmp    L0
L103:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D8
data_type: string
name: read_data
arguments: data_tag: D24
data_type: string
name: read_data
arguments: data_tag: D3
data_type: string
name: read_data
arguments: data_tag: D13
data_type: string

tool: D8: %lluh%llum ETA

tool: D24: ??? ETA

tool: D3: %llud%lluh ETA

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