user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<PS2_FormatMemoryUnit>:
  endbr64
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  cmp    $0x3ff,%edi
  ja     L136
  pxor   %xmm0,%xmm0
  test   %esi,%esi
  lea    D62(%rip),%rbx
  cvtsi2ss %edi,%xmm0
  lea    D27(%rip),%rax
  cmove  %rax,%rbx
L175:
  movslq D121(%rip),%r12
  lea    D40(%rip),%rdx
  mov    %rsp,%r13
  mov    $0x64,%esi
  mov    %r13,%rdi
  cvtss2sd %xmm0,%xmm0
  mov    %r12,%rax
  shl    $0x7,%r12
  add    $0x1,%eax
  add    %rdx,%r12
  lea    D104(%rip),%rdx
  and    $0x7,%eax
  mov    %eax,D33(%rip)
  mov    $0x1,%eax
  call   <snprintf@plt>
  test   %eax,%eax
  jle    L32
  movzbl (%rsp),%edx
  mov    %r13,%rax
  test   %dl,%dl
  jne    L29
  jmp    L114
  xchg   %ax,%ax
L130:
  test   %dl,%dl
  je     L114
L29:
  mov    %edx,%esi
  mov    %rax,%rcx
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x2e,%sil
  jne    L130
  nopw   0x0(%rax,%rax,1)
L6:
  mov    %rcx,%rax
  lea    0x1(%rcx),%rcx
  cmpb   $0x0,0x1(%rax)
  jne    L6
  movzbl -0x1(%rcx),%edx
  cmp    $0x30,%dl
  jne    L139
  cs nopw 0x0(%rax,%rax,1)
L182:
  movb   $0x0,(%rax)
  movzbl -0x1(%rax),%edx
  sub    $0x1,%rax
  cmp    $0x30,%dl
  je     L182
L139:
  cmp    $0x2e,%dl
  je     L172
L114:
  xor    %eax,%eax
  mov    %rbx,%r8
  mov    %r13,%rcx
  mov    $0x80,%esi
  lea    D33(%rip),%rdx
  mov    %r12,%rdi
  call   <snprintf@plt>
  test   %eax,%eax
  jle    L32
L93:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L44
  add    $0x70,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L136:
  cmp    $0xfffff,%edi
  ja     L63
  test   %esi,%esi
  lea    D59(%rip),%rbx
  lea    D154(%rip),%rax
  pxor   %xmm0,%xmm0
  cmove  %rax,%rbx
  cvtsi2ss %edi,%xmm0
  mulss  D20(%rip),%xmm0
  jmp    L175
  nopl   0x0(%rax)
L63:
  cmp    $0x3fffffff,%edi
  ja     L102
  pxor   %xmm0,%xmm0
  test   %esi,%esi
  movss  D20(%rip),%xmm1
  lea    D158(%rip),%rbx
  cvtsi2ss %edi,%xmm0
  lea    D89(%rip),%rax
  cmove  %rax,%rbx
  mulss  %xmm1,%xmm0
  mulss  %xmm1,%xmm0
  jmp    L175
  nopl   0x0(%rax)
L32:
  movl   $0x3f3f3f,(%r12)
  jmp    L93
  nopl   (%rax)
L102:
  mov    %edi,%edi
  pxor   %xmm0,%xmm0
  movss  D20(%rip),%xmm1
  test   %esi,%esi
  cvtsi2ss %rdi,%xmm0
  lea    D93(%rip),%rbx
  lea    D72(%rip),%rax
  cmove  %rax,%rbx
  mulss  %xmm1,%xmm0
  mulss  %xmm1,%xmm0
  mulss  %xmm1,%xmm0
  jmp    L175
L172:
  movb   $0x0,(%rax)
  jmp    L114
L44:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D62
type_infered: string
name: retrieve_data
arguments: data_label: D27
type_infered: string
name: retrieve_data
arguments: data_label: D104
type_infered: string
name: retrieve_data
arguments: data_label: D33
type_infered: string
name: retrieve_data
arguments: data_label: D59
type_infered: string
name: retrieve_data
arguments: data_label: D154
type_infered: string
name: retrieve_data
arguments: data_label: D20
type_infered: byte[4]
name: retrieve_data
arguments: data_label: D158
type_infered: string
name: retrieve_data
arguments: data_label: D89
type_infered: string
name: retrieve_data
arguments: data_label: D93
type_infered: string
name: retrieve_data
arguments: data_label: D72
type_infered: string

tool: D62: B

tool: D27: Bytes

tool: D104: %.2f

tool: D33: %s %s

tool: D59: KB

tool: D154: Kilobytes

tool: {"D20": [0x00,0x00,0x80,0x3a]}

tool: D158: MB

tool: D89: Megabytes

tool: D93: GB

tool: D72: Gigabytes

assistant: ```c
const char *PS2_FormatMemoryUnit(unsigned int size_bytes, int abbreviated) {
  enum { KILOBYTE = 1024, MEGABYTE = 1024 * KILOBYTE, GIGABYTE = 1024 * MEGABYTE };
  const char *mem_unit_str;
  float adjusted_size;
  if (size_bytes < KILOBYTE) {
    mem_unit_str = abbreviated ? "B" : "Bytes";
    adjusted_size = (float)size_bytes;
  } else if (size_bytes < MEGABYTE) {
    mem_unit_str = abbreviated ? "KB" : "Kilobytes";
    adjusted_size = size_bytes / 1024.0f;
  } else if (size_bytes < GIGABYTE) {
    mem_unit_str = abbreviated ? "MB" : "Megabytes";
    adjusted_size = size_bytes / 1024.0f / 1024.0f;
  } else {
    mem_unit_str = abbreviated ? "GB" : "Gigabytes";
    adjusted_size = size_bytes / 1024.0f / 1024.0f / 1024.0f;
  }
  char *fmtbuf;
  int chars_written;
  char num_str_buf[100];
  enum { MEM_UNIT_STR_MAXLEN = sizeof(num_str_buf) + 28 };
  static int bufnum = 0;
  static char local_str_buf[8][MEM_UNIT_STR_MAXLEN];
  fmtbuf = local_str_buf[bufnum];
  bufnum = (bufnum + 1) & 7;
  chars_written = snprintf(num_str_buf, 100, "%.2f", adjusted_size);
  if (chars_written <= 0) {
    fmtbuf[0] = '?';
    fmtbuf[1] = '?';
    fmtbuf[2] = '?';
    fmtbuf[3] = '\0';
    return fmtbuf;
  }
  char *p = num_str_buf;
  for (; *p; ++p) {
    if (*p == '.') {
      while (*++p) {
      }
      while (*--p == '0') {
        *p = '\0';
      }
      if (*p == '.') {
        *p = '\0';
      }
      break;
    }
  }
  chars_written = snprintf(fmtbuf, MEM_UNIT_STR_MAXLEN, "%s %s", num_str_buf, mem_unit_str);
  if (chars_written <= 0) {
    fmtbuf[0] = '?';
    fmtbuf[1] = '?';
    fmtbuf[2] = '?';
    fmtbuf[3] = '\0';
    return fmtbuf;
  }
  return fmtbuf;
}
```