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

```asm
<G_admin_duration>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x8(%rbp)
  cmpl   $0x5dfc0f00,-0x4(%rbp)
  jg     L12
  cmpl   $0x0,-0x4(%rbp)
  jns    L122
L12:
  mov    -0x8(%rbp),%edx
  mov    -0x10(%rbp),%rax
  lea    D109(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <Q_strncpyz@plt>
  jmp    L28
L122:
  cmpl   $0x1e1337f,-0x4(%rbp)
  jle    L65
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x4(%rbp),%xmm0
  movss  D44(%rip),%xmm1
  divss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x8(%rbp),%esi
  mov    -0x10(%rbp),%rax
  mov    %edx,%ecx
  lea    D110(%rip),%rdx
  mov    %rax,%rdi
  call   <Com_sprintf@plt>
  jmp    L28
L65:
  cmpl   $0x76a6ff,-0x4(%rbp)
  jle    L1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x4(%rbp),%xmm0
  movss  D105(%rip),%xmm1
  divss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x8(%rbp),%esi
  mov    -0x10(%rbp),%rax
  mov    %edx,%ecx
  lea    D80(%rip),%rdx
  mov    %rax,%rdi
  call   <Com_sprintf@plt>
  jmp    L28
L1:
  cmpl   $0x1517f,-0x4(%rbp)
  jle    L87
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x4(%rbp),%xmm0
  movss  D30(%rip),%xmm1
  divss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x8(%rbp),%esi
  mov    -0x10(%rbp),%rax
  mov    %edx,%ecx
  lea    D115(%rip),%rdx
  mov    %rax,%rdi
  call   <Com_sprintf@plt>
  jmp    L28
L87:
  cmpl   $0xe0f,-0x4(%rbp)
  jle    L100
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x4(%rbp),%xmm0
  movss  D53(%rip),%xmm1
  divss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x8(%rbp),%esi
  mov    -0x10(%rbp),%rax
  mov    %edx,%ecx
  lea    D101(%rip),%rdx
  mov    %rax,%rdi
  call   <Com_sprintf@plt>
  jmp    L28
L100:
  cmpl   $0x3b,-0x4(%rbp)
  jle    L10
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x4(%rbp),%xmm0
  movss  D64(%rip),%xmm1
  divss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x8(%rbp),%esi
  mov    -0x10(%rbp),%rax
  mov    %edx,%ecx
  lea    D34(%rip),%rdx
  mov    %rax,%rdi
  call   <Com_sprintf@plt>
  jmp    L28
L10:
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%esi
  mov    -0x10(%rbp),%rax
  mov    %edx,%ecx
  lea    D59(%rip),%rdx
  mov    %rax,%rdi
  call   <Com_sprintf@plt>
L28:
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D109
type: string
name: unpack_data
arguments: tag: D44
type: byte[4]
name: unpack_data
arguments: tag: D110
type: string
name: unpack_data
arguments: tag: D105
type: byte[4]
name: unpack_data
arguments: tag: D80
type: string
name: unpack_data
arguments: tag: D30
type: byte[4]
name: unpack_data
arguments: tag: D115
type: string
name: unpack_data
arguments: tag: D53
type: byte[4]
name: unpack_data
arguments: tag: D101
type: string
name: unpack_data
arguments: tag: D64
type: byte[4]
name: unpack_data
arguments: tag: D34
type: string
name: unpack_data
arguments: tag: D59
type: string

tool: D109: PERMANENT

tool: {"D44": [0xc0,0x99,0xf0,0x4b]}

tool: D110: %1.1f years

tool: {"D105": [0x00,0xa8,0x13,0x49]}

tool: D80: %1.1f weeks

tool: {"D30": [0x00,0xc0,0xa8,0x47]}

tool: D115: %1.1f days

tool: {"D53": [0x00,0x00,0x61,0x45]}

tool: D101: %1.1f hours

tool: {"D64": [0x00,0x00,0x70,0x42]}

tool: D34: %1.1f minutes

tool: D59: %i seconds

assistant: ```c
void G_admin_duration(int secs, char *duration, int dursize) {
  if (secs > (60 * 60 * 24 * 365 * 50) || secs < 0) {
    Q_strncpyz(duration, "PERMANENT", dursize);
  } else if (secs >= (60 * 60 * 24 * 365))
    Com_sprintf(duration, dursize, "%1.1f years", (secs / (60 * 60 * 24 * 365.0f)));
  else if (secs >= (60 * 60 * 24 * 90))
    Com_sprintf(duration, dursize, "%1.1f weeks", (secs / (60 * 60 * 24 * 7.0f)));
  else if (secs >= (60 * 60 * 24))
    Com_sprintf(duration, dursize, "%1.1f days", (secs / (60 * 60 * 24.0f)));
  else if (secs >= (60 * 60))
    Com_sprintf(duration, dursize, "%1.1f hours", (secs / (60 * 60.0f)));
  else if (secs >= 60)
    Com_sprintf(duration, dursize, "%1.1f minutes", (secs / 60.0f));
  else {
    Com_sprintf(duration, dursize, "%i seconds", secs);
  }
}
```