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     L365
  and    $0x10,%ebx
  jne    L255
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  lea    D113(%rip),%rdi
L93:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    11c0 <strdup@plt>
  xchg   %ax,%ax
L255:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  add    $0x48,%rsp
  lea    D40(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    11c0 <strdup@plt>
  nopw   0x0(%rax,%rax,1)
L365:
  push   0x8(%rsp)
  push   0x8(%rsp)
  call   <isinf@plt>
  pop    %r11
  pop    %r12
  test   %rax,%rax
  je     L56
  fldz
  test   $0x10,%bl
  je     L72
  fldt   (%rsp)
  fxch   %st(1)
  fcomip %st(1),%st
  fstp   %st(0)
  ja     L295
  and    $0x1,%ebx
  je     L275
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  lea    D103(%rip),%rdi
  jmp    L93
  nopl   0x0(%rax)
L56:
  test   $0x80,%bl
  jne    L73
  test   $0x1,%bh
  je     L190
  flds   0xc70(%rip)        # 2024 <_fini+0x9b4>
  fldt   (%rsp)
  fcomip %st(1),%st
  fstp   %st(0)
  jbe    L190
L73:
  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    D51(%rip),%rsi
  lea    D19(%rip),%rax
  cmove  %rax,%rsi
  mov    %rbp,%rdx
  xor    %ecx,%ecx
  xor    %eax,%eax
  call   <strvcat@plt>
L352:
  mov    %rax,%r12
L385:
  mov    %r13,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  add    $0x48,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L190:
  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     L369
  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
L123:
  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     L199
  jne    L98
  fxch   %st(1)
  fcomip %st(1),%st
  ja     L78
  jmp    L331
L199:
  fstp   %st(1)
  jmp    L331
  nop
L98:
  fstp   %st(1)
L331:
  fldz
  fxch   %st(1)
  fucomip %st(1),%st
  fstp   %st(0)
  jp     L343
  jne    L343
  and    $0x4,%ebx
  je     L51
L343:
  xor    %ecx,%ecx
  mov    %rbp,%rdx
  lea    D46(%rip),%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <strvcat@plt>
  mov    %rax,%r12
  jmp    L385
  nopl   (%rax)
L72:
  fldt   (%rsp)
  fxch   %st(1)
  fcomip %st(1),%st
  fstp   %st(0)
  ja     L266
  and    $0x1,%ebx
  je     L333
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  lea    D85(%rip),%rdi
  jmp    L93
  nopl   0x0(%rax)
L369:
  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    L123
  cs nopw 0x0(%rax,%rax,1)
L275:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  lea    D63(%rip),%rdi
  jmp    L93
L333:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  lea    D76(%rip),%rdi
  jmp    L93
L51:
  mov    %r13,%rdi
  call   <strdup@plt>
  jmp    L352
  nopl   (%rax)
L266:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  lea    D8(%rip),%rdi
  jmp    L93
  nopl   0x0(%rax)
L295:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L165
  lea    D53(%rip),%rdi
  jmp    L93
  nopl   0x0(%rax)
L78:
  fstp   %st(0)
  xor    %r8d,%r8d
  mov    %rbp,%rcx
  lea    D46(%rip),%rdx
  mov    %r13,%rsi
  lea    D62(%rip),%rdi
  xor    %eax,%eax
  call   <strvcat@plt>
  mov    %rax,%r12
  jmp    L385
L165:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D113
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D40
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D103
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D51
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D19
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D46
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D85
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D63
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D76
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D8
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D53
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D62
type_guessed: string

tool: D113: nan

tool: D40: NAN

tool: D103: +INF

tool: D51: E

tool: D19: e

tool: D46: .

tool: D85: +inf

tool: D63: INF

tool: D76: inf

tool: D8: -inf

tool: D53: -INF

tool: D62: -

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;
}
```