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

```asm
<Printfloat10>:
  endbr64
  sub    $0x18,%rsp
  fldt   0x20(%rsp)
  fstpt  (%rsp)
  mov    (%rsp),%r9
  mov    0x8(%rsp),%rax
  mov    %r9,%rdx
  movzwl %ax,%eax
  shr    $0x30,%rdx
  shl    $0x10,%rax
  or     %rdx,%rax
  test   %r9d,%r9d
  jne    L136
  mov    %r9,%rdx
  shr    $0x20,%rdx
  test   %dx,%dx
  je     L132
L136:
  mov    %eax,%edx
  and    $0x7fff8000,%edx
  cmp    $0x7fff8000,%edx
  je     L228
  mov    %eax,%edx
  and    $0x7fff0000,%edx
  cmp    $0x7fff0000,%edx
  je     L160
  test   %edx,%edx
  je     L39
  test   $0x80,%ah
  jne    L39
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%r8
  lea    D77(%rip),%rsi
  xor    %eax,%eax
  movzwl %dx,%ecx
  sar    $0x8,%dx
  shr    $0x6,%edx
  shr    $0x20,%r8
  and    $0x2,%edx
  add    $0x2b,%edx
  call   <sprintf@plt>
  mov    $0x21,%eax
  jmp    L185
  nopl   (%rax)
L132:
  movdqa D29(%rip),%xmm0
  cmp    $0x7fff8000,%eax
  je     L278
  cmp    $0xffff8000,%eax
  jne    L136
  movdqa D57(%rip),%xmm0
L278:
  movabs $0x3030303030203030,%rax
  movl   $0x303030,0x18(%rdi)
  mov    %rax,0x10(%rdi)
  mov    $0x1b,%eax
  movups %xmm0,(%rdi)
  jmp    L185
  nopl   0x0(%rax)
L160:
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%r8
  lea    D47(%rip),%rsi
  xor    %eax,%eax
  movzwl %dx,%ecx
  sar    $0x8,%dx
  shr    $0x6,%edx
  shr    $0x20,%r8
  and    $0x2,%edx
  add    $0x2b,%edx
  call   <sprintf@plt>
  mov    $0x1f,%eax
L185:
  add    $0x18,%rsp
  ret
  nopl   (%rax)
L39:
  test   %r9d,%r9d
  jne    L199
  cmp    $0x80000000,%eax
  jne    L199
  mov    (%rsp),%rax
  shr    $0x20,%rax
  test   %ax,%ax
  je     L157
L199:
  fldz
  fldt   (%rsp)
  fucomip %st(1),%st
  fstp   %st(0)
  jp     L71
  je     L80
L71:
  flds   0xdec(%rip)        # 2068 <_fini+0xca4>
  fldt   (%rsp)
  fcomi  %st(1),%st
  fstp   %st(1)
  jb     L218
  fld1
  fchs
  fcomip %st(1),%st
  fstp   %st(0)
  ja     L255
  jmp    L254
  nopl   (%rax)
L218:
  fstp   %st(0)
L254:
  fld1
  fldt   (%rsp)
  fcomi  %st(1),%st
  fstp   %st(1)
  jbe    L150
  flds   0xdc1(%rip)        # 206c <_fini+0xca8>
  fcomip %st(1),%st
  fstp   %st(0)
  jae    L255
  jmp    L83
  nopw   0x0(%rax,%rax,1)
L150:
  fstp   %st(0)
L83:
  fld1
  fchs
  fldt   (%rsp)
  fcomi  %st(1),%st
  fstp   %st(1)
  jb     L182
  fldl   0xd97(%rip)        # 2070 <_fini+0xcac>
  fcomip %st(1),%st
  fstp   %st(0)
  jb     L206
L44:
  fldt   (%rsp)
  lea    D13(%rip),%rsi
  xor    %eax,%eax
  fstpt  0x20(%rsp)
  add    $0x18,%rsp
  jmp    1050 <sprintf@plt>
  nopl   0x0(%rax)
L228:
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%r8
  lea    D53(%rip),%rsi
  xor    %eax,%eax
  movzwl %dx,%ecx
  sar    $0x8,%dx
  shr    $0x6,%edx
  shr    $0x20,%r8
  and    $0x2,%edx
  add    $0x2b,%edx
  call   <sprintf@plt>
  mov    $0x1f,%eax
  add    $0x18,%rsp
  ret
  nopl   (%rax)
L80:
  movl   $0x302e30,(%rdi)
  mov    $0x3,%eax
  jmp    L185
  nopl   0x0(%rax,%rax,1)
L255:
  fldt   (%rsp)
  lea    D49(%rip),%rsi
  xor    %eax,%eax
  fstpt  0x20(%rsp)
  add    $0x18,%rsp
  jmp    1050 <sprintf@plt>
  nopl   0x0(%rax)
L182:
  fstp   %st(0)
L206:
  fldl   0xd00(%rip)        # 2078 <_fini+0xcb4>
  fldt   (%rsp)
  fcomi  %st(1),%st
  fstp   %st(1)
  jb     L69
  fld1
  fcomip %st(1),%st
  fstp   %st(0)
  jae    L44
  jmp    L65
  nop
L69:
  fstp   %st(0)
L65:
  fldt   (%rsp)
  lea    D18(%rip),%rsi
  xor    %eax,%eax
  fstpt  0x20(%rsp)
  add    $0x18,%rsp
  jmp    1050 <sprintf@plt>
  nopl   0x0(%rax,%rax,1)
L157:
  movl   $0x302e302d,(%rdi)
  mov    $0x4,%eax
  movb   $0x0,0x4(%rdi)
  jmp    L185
```

tool_calls: name: unpack_data
arguments: label: D77
type: string
name: unpack_data
arguments: label: D29
type: byte[16]
name: unpack_data
arguments: label: D57
type: byte[16]
name: unpack_data
arguments: label: D47
type: string
name: unpack_data
arguments: label: D13
type: string
name: unpack_data
arguments: label: D53
type: string
name: unpack_data
arguments: label: D49
type: string
name: unpack_data
arguments: label: D18
type: string

tool: D77: %cUNORM %04X 0x%08X 0x%08X

tool: {"D29": [0x2b,0x49,0x4e,0x46,0x20,0x37,0x46,0x46,0x46,0x20,0x38,0x30,0x30,0x30,0x30,0x30]}

tool: {"D57": [0x2d,0x49,0x4e,0x46,0x20,0x46,0x46,0x46,0x46,0x20,0x38,0x30,0x30,0x30,0x30,0x30]}

tool: D47: %c??? %04X 0x%08X 0x%08X

tool: D13: %#.19Lf

tool: D53: %cNAN %04X 0x%08X 0x%08X

tool: D49: %#.20Lg

tool: D18: %#.19Le

assistant: ```c
int Printfloat10(char *s, long double ext) {
  int k;
  char *e = (char *)&ext;
  if (*(unsigned int *)e == 0 && *(unsigned short *)(e + 4) == 0 && *(unsigned int *)(e + 6) == 0x7FFF8000L)
    k = sprintf(s, "+INF 7FFF 80000000 00000000");
  else if (*(unsigned int *)e == 0 && *(unsigned short *)(e + 4) == 0 && *(unsigned int *)(e + 6) == 0xFFFF8000L)
    k = sprintf(s, "-INF FFFF 80000000 00000000");
  else if ((*(unsigned int *)(e + 6) & 0x7FFF8000L) == 0x7FFF8000L)
    k = sprintf(s,
                "%cNAN %04X "
                "0x%08X"
                " "
                "0x%08X",
                (e[9] & 0x80) == 0 ? '+' : '-', (int)(*(unsigned short *)(e + 8)), *(unsigned int *)(e + 4), *(unsigned int *)e);
  else if ((*(unsigned int *)(e + 6) & 0x7FFF0000L) == 0x7FFF0000L)
    k = sprintf(s,
                "%c??? %04X "
                "0x%08X"
                " "
                "0x%08X",
                (e[9] & 0x80) == 0 ? '+' : '-', (int)(*(unsigned short *)(e + 8)), *(unsigned int *)(e + 4), *(unsigned int *)e);
  else if ((*(unsigned int *)(e + 6) & 0x7FFF0000L) != 0 && (*(unsigned int *)(e + 6) & 0x00008000) == 0)
    k = sprintf(s,
                "%cUNORM %04X "
                "0x%08X"
                " "
                "0x%08X",
                (e[9] & 0x80) == 0 ? '+' : '-', (int)(*(unsigned short *)(e + 8)), *(unsigned int *)(e + 4), *(unsigned int *)e);
  else if (*(unsigned int *)e == 0 && *(unsigned short *)(e + 4) == 0 && *(unsigned int *)(e + 6) == 0x80000000L)
    k = sprintf(s, "-0.0");
  else if (ext == 0.0)
    k = sprintf(s, "0.0");
  else if ((ext >= -1.e10 && ext < -1.0) || (ext > 1.0 && ext <= 1.e10))
    k = sprintf(s, "%#.20Lg", ext);
  else if ((ext >= -1.0 && ext <= -1.e-5) || (ext >= 1.e-5 && ext <= 1.0))
    k = sprintf(s, "%#.19Lf", ext);
  else
    k = sprintf(s, "%#.19Le", ext);
  return k;
}
```