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

```asm
<pretty_freespace>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    D130(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D5(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D138(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D74(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D114(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D75(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D136(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D92(%rip),%rax
  mov    %rax,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  mov    (%rsi),%rax
  test   %rax,%rax
  js     L3
  pxor   %xmm6,%xmm6
  cvtsi2sd %rax,%xmm6
  movsd  %xmm6,0x8(%rsp)
L14:
  mov    0x0(%r13),%rax
  test   %rax,%rax
  js     L36
  pxor   %xmm7,%xmm7
  cvtsi2sd %rax,%xmm7
  movq   %xmm7,%r15
L26:
  mov    $0x400,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  movq   %r15,%xmm4
  ucomisd D26(%rip),%xmm4
  jp     L51
  je     L78
L51:
  lea    0x10(%rsp),%rbx
  movsd  D137(%rip),%xmm0
  movsd  D35(%rip),%xmm1
  movq   %r15,%xmm5
  comisd %xmm1,%xmm5
  jbe    L109
L22:
  add    $0x8,%rbx
  movsd  0x8(%rsp),%xmm3
  mulsd  %xmm0,%xmm3
  movsd  %xmm3,0x8(%rsp)
  movq   %r15,%xmm2
  mulsd  %xmm0,%xmm2
  movq   %xmm2,%r15
  comisd %xmm1,%xmm2
  jbe    L109
  cmpq   $0x0,0x8(%rbx)
  jne    L22
L109:
  mov    $0x0,%eax
  call   <sysinfo_get_percent@plt>
  test   %eax,%eax
  je     L11
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <percentage@plt>
  mov    %eax,%r9d
  mov    (%rbx),%r8
  movq   %r15,%xmm0
  mov    %r14,%rcx
  lea    D27(%rip),%rdx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <snprintf@plt>
L90:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  mov    %rbp,%rax
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L3:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,0x8(%rsp)
  jmp    L14
L36:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  movq   %xmm0,%r15
  jmp    L26
L78:
  mov    %r14,%rcx
  lea    D103(%rip),%rdx
  mov    $0x400,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  jmp    L90
L11:
  mov    (%rbx),%r8
  mov    %r8,%r9
  movq   %r15,%xmm1
  movsd  0x8(%rsp),%xmm0
  mov    %r14,%rcx
  lea    D78(%rip),%rdx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  mov    $0x2,%eax
  call   <snprintf@plt>
  jmp    L90
L61:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D130
data_type: string
name: unpack_data
arguments: tag: D5
data_type: string
name: unpack_data
arguments: tag: D138
data_type: string
name: unpack_data
arguments: tag: D74
data_type: string
name: unpack_data
arguments: tag: D114
data_type: string
name: unpack_data
arguments: tag: D75
data_type: string
name: unpack_data
arguments: tag: D136
data_type: string
name: unpack_data
arguments: tag: D92
data_type: string
name: unpack_data
arguments: tag: D26
data_type: byte[8]
name: unpack_data
arguments: tag: D137
data_type: byte[8]
name: unpack_data
arguments: tag: D35
data_type: byte[8]
name: unpack_data
arguments: tag: D27
data_type: string
name: unpack_data
arguments: tag: D103
data_type: string
name: unpack_data
arguments: tag: D78
data_type: string

tool: D130: KiB

tool: D5: MiB

tool: D138: GiB

tool: D74: TiB

tool: D114: PiB

tool: D75: EiB

tool: D136: ZiB

tool: D92: YiB

tool: {"D26": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D137": [0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x3f]}

tool: {"D35": [0x00,0x00,0x00,0x00,0x00,0xf8,0x8f,0x40]}

tool: D27: %s: %.1f%s, %.1f%% free

tool: D103: %s: none

tool: D78: %s: %.1f%s/%.1f%s free

assistant: ```c
char *pretty_freespace(const char *desc, unsigned long long *free_k, unsigned long long *total_k) {
  char *quantities[] = {"KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", 0};
  char *result, **quantity;
  double free_space, total_space;
  free_space = *free_k;
  total_space = *total_k;
  result = malloc(1024 * sizeof(char));
  if (total_space == 0) {
    snprintf(result, 1024, "%s: none", desc);
    return result;
  }
  quantity = quantities;
  while (total_space > 1023 && *(quantity + 1)) {
    quantity++;
    free_space = free_space / 1024;
    total_space = total_space / 1024;
  }
  if (sysinfo_get_percent() != 0)
    snprintf(result, 1024, "%s: %.1f%s, %.1f%% free", desc, total_space, *quantity, percentage(free_k, total_k));
  else
    snprintf(result, 1024, "%s: %.1f%s/%.1f%s free", desc, free_space, *quantity, total_space, *quantity);
  return result;
}
```