user: Converte this assembly snippet into its equivalent C code:

```asm
<get_time_remain>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  cmpq   $0x1517f,-0x18(%rbp)
  ja     L0
  mov    -0x18(%rbp),%rax
  shr    $0x4,%rax
  movabs $0x91a2b3c4d5e6f81,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x3,%rax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  imul   $0xe10,%eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  sub    %rdx,%rax
  movabs $0x8888888888888889,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x5,%rax
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   $0xe10,%eax,%eax
  sub    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x3c,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%ecx
  mov    -0x8(%rbp),%edx
  mov    -0xc(%rbp),%eax
  mov    %ecx,%r9d
  mov    %edx,%r8d
  mov    %eax,%ecx
  lea    D20(%rip),%rax
  mov    %rax,%rdx
  mov    $0x40,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  jmp    L15
L0:
  mov    -0x18(%rbp),%rax
  movabs $0xc22e450672894ab7,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x10,%rax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  imul   $0x15180,%eax,%eax
  mov    %eax,%eax
  sub    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  shr    $0x4,%rax
  movabs $0x91a2b3c4d5e6f81,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x3,%rax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  imul   $0xe10,%eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  sub    %rdx,%rax
  movabs $0x8888888888888889,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x5,%rax
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   $0xe10,%eax,%eax
  sub    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x3c,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%esi
  mov    -0xc(%rbp),%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x8,%rsp
  mov    -0x4(%rbp),%edx
  push   %rdx
  mov    %esi,%r9d
  mov    %ecx,%r8d
  mov    %eax,%ecx
  lea    D43(%rip),%rax
  mov    %rax,%rdx
  mov    $0x40,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  add    $0x10,%rsp
L15:
  lea    D0(%rip),%rax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D20
type_guessed: string
name: read_data
arguments: data_tag: D43
type_guessed: string

tool: D20: %02u:%02u:%02u

tool: D43: %u days %02u:%02u:%02u

assistant: ```c
char *get_time_remain(unsigned long remain_second) {
  unsigned int day, hour, min, second;
  static char str_time_remain[64];
  if (remain_second < 24 * 3600) {
    hour = remain_second / 3600;
    min = (remain_second - 3600 * hour) / 60;
    second = remain_second - hour * 3600 - min * 60;
    snprintf(str_time_remain, sizeof(str_time_remain), "%02u:%02u:%02u", hour, min, second);
  } else {
    day = remain_second / 24 / 3600;
    remain_second = remain_second - day * 24 * 3600;
    hour = remain_second / 3600;
    min = (remain_second - 3600 * hour) / 60;
    second = remain_second - hour * 3600 - min * 60;
    snprintf(str_time_remain, sizeof(str_time_remain), "%u days %02u:%02u:%02u", day, hour, min, second);
  }
  return str_time_remain;
}
```