user: 请将以下的汇编代码转换成C语言代码：

```asm
<__format_double>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x58,%rsp
  fldt   0x80(%rsp)
  fld    %st(0)
  fstpt  0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  fstpt  (%rsp)
  call   <isnan@plt>
  pop    %r13
  pop    %rdx
  test   %rax,%rax
  je     L165
  and    $0x10,%ebx
  jne    L227
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  lea    D119(%rip),%rdi
L39:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    11c0 <strdup@plt>
  xchg   %ax,%ax
L227:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  add    $0x48,%rsp
  lea    D106(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    11c0 <strdup@plt>
  nopw   0x0(%rax,%rax,1)
L165:
  push   0x8(%rsp)
  push   0x8(%rsp)
  call   <isinf@plt>
  pop    %r11
  pop    %r12
  test   %rax,%rax
  je     L108
  fldz
  test   $0x10,%bl
  je     L172
  fldt   (%rsp)
  fxch   %st(1)
  fcomip %st(1),%st
  fstp   %st(0)
  ja     L49
  and    $0x1,%ebx
  je     L86
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  lea    D16(%rip),%rdi
  jmp    L39
  nopl   0x0(%rax)
L108:
  test   $0x80,%bl
  jne    L12
  test   $0x1,%bh
  je     L189
  flds   0xc70(%rip)        # 2024 <_fini+0x9b4>
  fldt   (%rsp)
  fcomip %st(1),%st
  fstp   %st(0)
  jbe    L189
L12:
  push   0x8(%rsp)
  push   0x8(%rsp)
  call   <log10l@plt>
  sub    $0x10,%rsp
  fld    %st(0)
  fstpt  (%rsp)
  fstpt  0x30(%rsp)
  call   <floorl@plt>
  add    $0x20,%rsp
  mov    $0xa,%edi
  mov    %eax,%esi
  call   <powl@plt>
  fldt   (%rsp)
  mov    %ebx,%edi
  sub    $0x10,%rsp
  mov    %ebp,%esi
  and    $0x7f,%dil
  fdivp  %st,%st(1)
  fstpt  (%rsp)
  call   <__format_double>
  fldt   0x20(%rsp)
  mov    %ebx,%edi
  sub    $0x10,%rsp
  or     $0x1,%edi
  mov    %rax,%r13
  fstpt  (%rsp)
  call   <__format_int@plt>
  add    $0x20,%rsp
  and    $0x10,%ebx
  mov    %r13,%rdi
  mov    %rax,%rbp
  lea    D36(%rip),%rsi
  lea    D104(%rip),%rax
  cmove  %rax,%rsi
  mov    %rbp,%rdx
  xor    %ecx,%ecx
  xor    %eax,%eax
  call   <strvcat@plt>
L366:
  mov    %rax,%r12
L51:
  mov    %r13,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  add    $0x48,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L189:
  lea    0x20(%rsp),%rdi
  push   0x8(%rsp)
  push   0x8(%rsp)
  call   <modfl@plt>
  flds   0xb88(%rip)        # 2028 <_fini+0x9b8>
  fxch   %st(1)
  pop    %r9
  pop    %r10
  fld    %st(0)
  fstpt  (%rsp)
  fcomip %st(1),%st
  fstp   %st(0)
  ja     L104
  fldt   0x20(%rsp)
  mov    %ebx,%edi
  sub    $0x10,%rsp
  fld    %st(0)
  fstpt  0x20(%rsp)
  fstpt  (%rsp)
  call   <__format_int@plt>
  pop    %rcx
  pop    %rsi
  fldt   (%rsp)
  mov    %rax,%r13
L95:
  sub    $0x10,%rsp
  mov    %ebp,%esi
  mov    %ebx,%edi
  fld    %st(0)
  fstpt  (%rsp)
  fstpt  0x10(%rsp)
  call   <__format_double_frac@plt>
  mov    %rax,%rbp
  pop    %rax
  pop    %rdx
  fldz
  fldt   0x10(%rsp)
  fucomip %st(1),%st
  fldt   (%rsp)
  jp     L136
  jne    L123
  fxch   %st(1)
  fcomip %st(1),%st
  ja     L353
  jmp    L311
L136:
  fstp   %st(1)
  jmp    L311
  nop
L123:
  fstp   %st(1)
L311:
  fldz
  fxch   %st(1)
  fucomip %st(1),%st
  fstp   %st(0)
  jp     L184
  jne    L184
  and    $0x4,%ebx
  je     L358
L184:
  xor    %ecx,%ecx
  mov    %rbp,%rdx
  lea    D11(%rip),%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <strvcat@plt>
  mov    %rax,%r12
  jmp    L51
  nopl   (%rax)
L172:
  fldt   (%rsp)
  fxch   %st(1)
  fcomip %st(1),%st
  fstp   %st(0)
  ja     L357
  and    $0x1,%ebx
  je     L287
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  lea    D81(%rip),%rdi
  jmp    L39
  nopl   0x0(%rax)
L104:
  fldt   0x20(%rsp)
  mov    %ebx,%edi
  sub    $0x10,%rsp
  fld    %st(0)
  fstpt  0x20(%rsp)
  fstpt  (%rsp)
  call   <__format_double_int@plt>
  pop    %rdi
  pop    %r8
  fldt   (%rsp)
  mov    %rax,%r13
  jmp    L95
  cs nopw 0x0(%rax,%rax,1)
L86:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  lea    D40(%rip),%rdi
  jmp    L39
L287:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  lea    D115(%rip),%rdi
  jmp    L39
L358:
  mov    %r13,%rdi
  call   <strdup@plt>
  jmp    L366
  nopl   (%rax)
L357:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  lea    D73(%rip),%rdi
  jmp    L39
  nopl   0x0(%rax)
L49:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  lea    D28(%rip),%rdi
  jmp    L39
  nopl   0x0(%rax)
L353:
  fstp   %st(0)
  xor    %r8d,%r8d
  mov    %rbp,%rcx
  lea    D11(%rip),%rdx
  mov    %r13,%rsi
  lea    D74(%rip),%rdi
  xor    %eax,%eax
  call   <strvcat@plt>
  mov    %rax,%r12
  jmp    L51
L103:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D119
data_type: string
name: unpack_data
arguments: tag: D106
data_type: string
name: unpack_data
arguments: tag: D16
data_type: string
name: unpack_data
arguments: tag: D36
data_type: string
name: unpack_data
arguments: tag: D104
data_type: string
name: unpack_data
arguments: tag: D11
data_type: string
name: unpack_data
arguments: tag: D81
data_type: string
name: unpack_data
arguments: tag: D40
data_type: string
name: unpack_data
arguments: tag: D115
data_type: string
name: unpack_data
arguments: tag: D73
data_type: string
name: unpack_data
arguments: tag: D28
data_type: string
name: unpack_data
arguments: tag: D74
data_type: string

tool: D119: nan

tool: D106: NAN

tool: D16: +INF

tool: D36: E

tool: D104: e

tool: D11: .

tool: D81: +inf

tool: D40: INF

tool: D115: inf

tool: D73: -inf

tool: D28: -INF

tool: D74: -

assistant: ```c
char *__format_double(long double value, int flags, int precision) {
  char *int_part;
  char *dec_part;
  char *string;
  long double i;
  if (isnan(value)) {
    if (flags & 0x10) {
      return strdup("NAN");
    } else {
      return strdup("nan");
    }
  }
  if (isinf(value)) {
    if (flags & 0x10) {
      if (value < 0) {
        return strdup("-INF");
      } else {
        if (flags & 0x01) {
          return strdup("+INF");
        } else {
          return strdup("INF");
        }
      }
    } else {
      if (value < 0) {
        return strdup("-inf");
      } else {
        if (flags & 0x01) {
          return strdup("+inf");
        } else {
          return strdup("inf");
        }
      }
    }
  }
  if (flags & 0x80 || (flags & 0x100 && value > 1000000000)) {
    i = log10l(value);
    value /= powl(10, floorl(i));
    int_part = __format_double(value, flags & ~(0x80), precision);
    dec_part = __format_int(i, flags | 0x01);
    string = strvcat(int_part, (flags & 0x10) ? "E" : "e", dec_part, NULL);
    free(int_part);
    free(dec_part);
  } else {
    value = modfl(value, &i);
    if (value > 2000000000) {
      int_part = __format_double_int(i, flags);
    } else {
      int_part = __format_int(i, flags);
    }
    dec_part = __format_double_frac(value, flags, precision);
    if (i == 0.0 && value < 0) {
      if (value != 0.0 || flags & 0x04) {
        string = strvcat("-", int_part, ".", dec_part, NULL);
      } else {
        string = strvcat("-", int_part, NULL);
      }
    } else {
      if (value != 0.0 || flags & 0x04) {
        string = strvcat(int_part, ".", dec_part, NULL);
      } else {
        string = strdup(int_part);
      }
    }
    free(int_part);
    free(dec_part);
  }
  return string;
}
```