user: Translate the below assembly code into C programming language:

```asm
<humanize_bytes>:
  endbr64
  push   %r13
  mov    %rdx,%r13
  mov    %esi,%edx
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %esi,%ebp
  xor    %esi,%esi
  call   <memset@plt>
  test   %r13,%r13
  js     L85
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13,%xmm0
  comisd D40(%rip),%xmm0
  ja     L11
L40:
  comisd D146(%rip),%xmm0
  ja     L70
  comisd D24(%rip),%xmm0
  ja     L91
  comisd D37(%rip),%xmm0
  mov    %r13,%rcx
  lea    D4(%rip),%rdx
  jbe    L7
  mulsd  D70(%rip),%xmm0
  movsd  D41(%rip),%xmm1
  comisd %xmm1,%xmm0
  jae    L80
  cvttsd2si %xmm0,%rcx
L29:
  lea    D142(%rip),%rdx
L7:
  mov    %ebp,%esi
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1060 <snprintf@plt>
  nopl   0x0(%rax,%rax,1)
L70:
  mulsd  D167(%rip),%xmm0
  movsd  D41(%rip),%xmm1
  comisd %xmm1,%xmm0
  jae    L136
  cvttsd2si %xmm0,%rcx
L103:
  mov    %ebp,%esi
  mov    %r12,%rdi
  lea    D85(%rip),%rdx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1060 <snprintf@plt>
  nopl   (%rax)
L85:
  mov    %r13,%rax
  mov    %r13,%rdx
  pxor   %xmm0,%xmm0
  shr    %rax
  and    $0x1,%edx
  or     %rdx,%rax
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  comisd D40(%rip),%xmm0
  jbe    L40
L11:
  mulsd  D22(%rip),%xmm0
  movsd  D41(%rip),%xmm1
  comisd %xmm1,%xmm0
  jae    L57
  cvttsd2si %xmm0,%rcx
L43:
  mov    %ebp,%esi
  mov    %r12,%rdi
  lea    D84(%rip),%rdx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1060 <snprintf@plt>
  nopl   0x0(%rax,%rax,1)
L57:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rcx
  btc    $0x3f,%rcx
  jmp    L43
  nopl   0x0(%rax,%rax,1)
L136:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rcx
  btc    $0x3f,%rcx
  jmp    L103
  nopl   0x0(%rax,%rax,1)
L91:
  mulsd  D64(%rip),%xmm0
  movsd  D41(%rip),%xmm1
  comisd %xmm1,%xmm0
  jae    L98
  cvttsd2si %xmm0,%rcx
L121:
  mov    %ebp,%esi
  mov    %r12,%rdi
  lea    D23(%rip),%rdx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1060 <snprintf@plt>
  nopl   0x0(%rax)
L80:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rcx
  btc    $0x3f,%rcx
  jmp    L29
  nopl   0x0(%rax,%rax,1)
L98:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rcx
  btc    $0x3f,%rcx
  jmp    L121
```

tool_calls: name: retrieve_data
arguments: data_tag: D40
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D146
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D24
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D37
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D4
data_type: string
name: retrieve_data
arguments: data_tag: D70
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D41
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D142
data_type: string
name: retrieve_data
arguments: data_tag: D167
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D85
data_type: string
name: retrieve_data
arguments: data_tag: D22
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D84
data_type: string
name: retrieve_data
arguments: data_tag: D64
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D23
data_type: string

tool: {"D40": [1099511627776.0,9.094947017729282e-13]}

tool: {"D146": [1073741824.0,9.313225746154785e-10]}

tool: {"D24": [1048576.0,9.5367431640625e-7]}

tool: {"D37": [1024.0,0.0009765625]}

tool: D4: %llu Bytes

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

tool: {"D41": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x43]}

tool: D142: %.2f KiB

tool: {"D167": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x3e]}

tool: D85: %.2f GiB

tool: {"D22": [0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x3d]}

tool: D84: %.2f TiB

tool: {"D64": [0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x3e]}

tool: D23: %.2f MiB

assistant: ```c
void humanize_bytes(char buf[], int bufsize, unsigned long long n) {
  double b;
  memset(buf, 0, bufsize);
  b = (double)n;
  if (b > 1099511627776.0)
    snprintf(buf, bufsize, "%.2f TiB", b / 1099511627776.0);
  else if (b > 1073741824.0)
    snprintf(buf, bufsize, "%.2f GiB", b / 1073741824.0);
  else if (b > 1048576.0)
    snprintf(buf, bufsize, "%.2f MiB", b / 1048576.0);
  else if (b > 1024.0)
    snprintf(buf, bufsize, "%.2f KiB", b / 1024.0);
  else
    snprintf(buf, bufsize, "%llu Bytes", n);
}
```