user: Please show me the C implementation that matches the assembly code listed below:

```asm
<misc_getuptimestr>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rdi
  call   <time@plt>
  mov    0xc(%rsp),%r12d
  xor    %esi,%esi
  mov    %ebx,%edx
  mov    %r13,%rdi
  sub    %ebp,%r12d
  call   <memset@plt>
  cmp    $0x15180,%r12d
  jg     L67
L51:
  cmp    $0xe10,%r12d
  jg     L53
L73:
  cmp    $0x3c,%r12d
  jg     L5
L16:
  test   %r12d,%r12d
  jle    L39
  lea    0x10(%rsp),%rbp
  lea    D3(%rip),%rdx
  mov    $0x1f,%esi
  mov    %r12d,%ecx
  mov    %rbp,%rdi
  call   <snprintf@plt>
  lea    -0x1(%rbx),%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strncat@plt>
L39:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x40,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L5:
  movslq %r12d,%rbp
  mov    %r12d,%eax
  lea    0x10(%rsp),%r14
  mov    $0x1f,%esi
  imul   $0xffffffff88888889,%rbp,%rbp
  sar    $0x1f,%eax
  mov    %r14,%rdi
  lea    D5(%rip),%rdx
  shr    $0x20,%rbp
  add    %r12d,%ebp
  sar    $0x5,%ebp
  sub    %eax,%ebp
  mov    %ebp,%ecx
  imul   $0x3c,%ebp,%ebp
  call   <snprintf@plt>
  lea    -0x1(%rbx),%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  sub    %ebp,%r12d
  call   <strncat@plt>
  jmp    L16
L53:
  movslq %r12d,%rbp
  mov    %r12d,%eax
  lea    0x10(%rsp),%r14
  mov    $0x1f,%esi
  imul   $0xffffffff91a2b3c5,%rbp,%rbp
  sar    $0x1f,%eax
  mov    %r14,%rdi
  lea    D13(%rip),%rdx
  shr    $0x20,%rbp
  add    %r12d,%ebp
  sar    $0xb,%ebp
  sub    %eax,%ebp
  mov    %ebp,%ecx
  imul   $0xe10,%ebp,%ebp
  call   <snprintf@plt>
  lea    -0x1(%rbx),%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  sub    %ebp,%r12d
  call   <strncat@plt>
  jmp    L73
  nopl   0x0(%rax,%rax,1)
L67:
  movslq %r12d,%rbp
  mov    %r12d,%eax
  lea    0x10(%rsp),%r14
  mov    $0x1f,%esi
  imul   $0xffffffffc22e4507,%rbp,%rbp
  sar    $0x1f,%eax
  mov    %r14,%rdi
  lea    D29(%rip),%rdx
  shr    $0x20,%rbp
  add    %r12d,%ebp
  sar    $0x10,%ebp
  sub    %eax,%ebp
  mov    %ebp,%ecx
  imul   $0x15180,%ebp,%ebp
  call   <snprintf@plt>
  lea    -0x1(%rbx),%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  sub    %ebp,%r12d
  call   <strncpy@plt>
  jmp    L51
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D3
datatype: string
name: extract_symbolic_data
arguments: data_tag: D5
datatype: string
name: extract_symbolic_data
arguments: data_tag: D13
datatype: string
name: extract_symbolic_data
arguments: data_tag: D29
datatype: string

tool: D3: %d saniye

tool: D5: %d dakika 

tool: D13: %d saat 

tool: D29: %d days 

assistant: ```c
char *misc_getuptimestr(char *uptime_str, int len, time_t firetime) {
  char fmt[32];
  time_t now;
  time_t diff;
  time(&now);
  diff = now - firetime;
  memset(uptime_str, 0, len);
  if (diff > 86400) {
    snprintf(fmt, 31, "%d days ", (int)(diff / 86400));
    diff -= (diff / 86400) * 86400;
    strncpy(uptime_str, fmt, len - 1);
  }
  if (diff > 3600) {
    snprintf(fmt, 31, "%d saat ", (int)(diff / 3600));
    diff -= (diff / 3600) * 3600;
    strncat(uptime_str, fmt, len - 1);
  }
  if (diff > 60) {
    snprintf(fmt, 31, "%d dakika ", (int)(diff / 60));
    diff -= (diff / 60) * 60;
    strncat(uptime_str, fmt, len - 1);
  }
  if (diff > 0) {
    snprintf(fmt, 31, "%d saniye", (int)diff);
    strncat(uptime_str, fmt, len - 1);
  }
  return uptime_str;
}
```