user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<prettyprint>:
  endbr64
  push   %r12
  test   %rdi,%rdi
  js     L5
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdi,%xmm0
L59:
  movsd  D20(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  cvttsd2si %xmm1,%esi
  pxor   %xmm1,%xmm1
  cvtsi2sd %esi,%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  D69(%rip),%xmm1
  comisd %xmm1,%xmm0
  jae    L125
  cvttsd2si %xmm0,%rax
  test   %rax,%rax
  js     L102
L108:
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L78:
  movsd  D82(%rip),%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  cvttsd2si %xmm2,%r10d
  pxor   %xmm2,%xmm2
  cvtsi2sd %r10d,%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jae    L156
  cvttsd2si %xmm0,%rax
  test   %rax,%rax
  js     L95
L107:
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L60:
  movsd  D44(%rip),%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  cvttsd2si %xmm2,%r12d
  pxor   %xmm2,%xmm2
  cvtsi2sd %r12d,%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jae    L119
  cvttsd2si %xmm0,%rax
  test   %rax,%rax
  js     L128
L164:
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L160:
  movsd  D46(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  cvttsd2si %xmm1,%r11d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r11d,%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%r9d
  test   %esi,%esi
  jne    L162
  test   %r10d,%r10d
  jne    L104
  test   %r12d,%r12d
  jne    L31
  test   %r11d,%r11d
  je     L147
  mov    %r9d,%edx
  mov    %r11d,%esi
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  pop    %r12
  jmp    1050 <printf@plt>
  nopw   0x0(%rax,%rax,1)
L125:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  btc    $0x3f,%rax
  test   %rax,%rax
  jns    L108
L102:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L78
  nopl   (%rax)
L119:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  btc    $0x3f,%rax
  test   %rax,%rax
  jns    L164
L128:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L160
  nopl   (%rax)
L156:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  btc    $0x3f,%rax
  test   %rax,%rax
  jns    L107
L95:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L60
  nopl   (%rax)
L104:
  mov    %r12d,%edx
  mov    %r9d,%r8d
  mov    %r11d,%ecx
  mov    %r10d,%esi
  lea    D59(%rip),%rdi
  xor    %eax,%eax
  pop    %r12
  jmp    1050 <printf@plt>
  nopl   0x0(%rax)
L5:
  mov    %rdi,%rax
  and    $0x1,%edi
  pxor   %xmm0,%xmm0
  shr    %rax
  or     %rdi,%rax
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L59
  cs nopw 0x0(%rax,%rax,1)
L162:
  mov    %r12d,%ecx
  mov    %r11d,%r8d
  mov    %r10d,%edx
  xor    %eax,%eax
  lea    D57(%rip),%rdi
  pop    %r12
  jmp    1050 <printf@plt>
  nopl   0x0(%rax)
L147:
  mov    %r9d,%esi
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  pop    %r12
  jmp    1050 <printf@plt>
  nopl   0x0(%rax,%rax,1)
L31:
  mov    %r12d,%esi
  mov    %r9d,%ecx
  mov    %r11d,%edx
  xor    %eax,%eax
  lea    D58(%rip),%rdi
  pop    %r12
  jmp    1050 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D20
type: f64
name: extract_symbolic_data
arguments: tag: D69
type: byte[8]
name: extract_symbolic_data
arguments: tag: D82
type: f64
name: extract_symbolic_data
arguments: tag: D44
type: f64
name: extract_symbolic_data
arguments: tag: D46
type: f64
name: extract_symbolic_data
arguments: tag: D16
type: string
name: extract_symbolic_data
arguments: tag: D59
type: string
name: extract_symbolic_data
arguments: tag: D57
type: string
name: extract_symbolic_data
arguments: tag: D28
type: string
name: extract_symbolic_data
arguments: tag: D58
type: string

tool: D20: 1000000000000

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

tool: D82: 1000000000

tool: D44: 1000000

tool: D46: 1000

tool: D16:               %3d,%03d

tool: D59:       %3d,%03d,%03d,%03d

tool: D57: %5d,%03d,%03d,%03d,%03d

tool: D28:                   %3d

tool: D58:           %3d,%03d,%03d

assistant: ```c
void prettyprint(unsigned long long int x) {
  int t, g, m, k, u;
  t = x / 1e12;
  x = x - t * 1e12;
  g = x / 1e9;
  x = x - g * 1e9;
  m = x / 1e6;
  x = x - m * 1e6;
  k = x / 1e3;
  u = x - k * 1e3;
  if (t)
    printf("%5d,%03d,%03d,%03d,%03d", t, g, m, k, u);
  else if (g)
    printf("      %3d,%03d,%03d,%03d", g, m, k, u);
  else if (m)
    printf("          %3d,%03d,%03d", m, k, u);
  else if (k)
    printf("              %3d,%03d", k, u);
  else
    printf("                  %3d", u);
}
```