user: 下面的汇编指令对应的C源代码是什么：

```asm
<wcshdo_format>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,0x1c(%rsp)
  mov    %esi,0x18(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  cmp    $0x47,%edi
  je     L23
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jle    L123
L98:
  lea    0x42(%rsp),%rax
  xor    %r14d,%r14d
  mov    $0xfffffc19,%ebx
  mov    %rax,0x28(%rsp)
  mov    %rax,%r13
  lea    0x3c(%rsp),%rax
  lea    0x40(%rsp),%r15
  mov    %rax,0x8(%rsp)
  lea    0x52(%rsp),%rax
  lea    0x50(%rsp),%rbp
  mov    %rax,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L158:
  movsd  (%r12,%r14,8),%xmm0
  lea    D54(%rip),%rsi
  mov    %r15,%rdi
  call   <wcsutil_double2str@plt>
  mov    %rbp,%rax
  cmp    %rbp,%r13
  jb     L27
  jmp    L170
  nopw   0x0(%rax,%rax,1)
L99:
  sub    $0x1,%rax
  cmp    %r13,%rax
  je     L45
L27:
  cmpb   $0x30,(%rax)
  je     L99
  mov    %rax,%r13
L45:
  mov    0x8(%rsp),%rdx
  mov    0x10(%rsp),%rdi
  lea    D40(%rip),%rsi
  call   <sscanf@plt>
  mov    0x3c(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  add    $0x1,%r14
  cmp    %r14d,0x18(%rsp)
  jg     L158
  mov    %r13,%rcx
  sub    0x28(%rsp),%rcx
  cmpl   $0x66,0x1c(%rsp)
  lea    0x1(%rcx),%edx
  je     L198
  mov    %ecx,%edx
  test   %ecx,%ecx
  jle    L124
  cmp    $0xd,%ecx
  jle    L108
  mov    0x20(%rsp),%rdi
  mov    $0xe,%edx
  lea    D17(%rip),%rsi
  call   <sprintf@plt>
L36:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L186
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L123:
  cmpl   $0x66,0x1c(%rsp)
  je     L84
L124:
  mov    $0x1,%edx
L108:
  mov    0x20(%rsp),%rdi
  lea    D57(%rip),%rsi
  call   <sprintf@plt>
  jmp    L36
L170:
  mov    %rbp,%r13
  jmp    L45
L23:
  mov    %esi,%eax
  test   %esi,%esi
  jle    L53
  sub    $0x1,%eax
  mov    %rdx,%rbx
  lea    0x8(%rdx,%rax,8),%rbp
  jmp    L12
  nopl   0x0(%rax,%rax,1)
L218:
  movsd  (%rbx),%xmm0
  comisd D10(%rip),%xmm0
  ja     L17
  add    $0x8,%rbx
  cmp    %rbx,%rbp
  je     L93
L12:
  movsd  (%rbx),%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L218
L17:
  movl   $0x45,0x1c(%rsp)
  jmp    L98
L84:
  mov    $0x1,%edx
  mov    $0xfffffc19,%ebx
L198:
  add    $0x1,%ebx
  mov    $0x11,%eax
  sub    %ebx,%edx
  cmp    %eax,%edx
  cmovg  %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  cmovle %eax,%edx
L177:
  mov    0x20(%rsp),%rdi
  lea    D36(%rip),%rsi
  call   <sprintf@plt>
  jmp    L36
L93:
  movl   $0x66,0x1c(%rsp)
  jmp    L98
L53:
  mov    $0x11,%edx
  jmp    L177
L186:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D54
type_infered: string
name: retrieve_data
arguments: tag: D40
type_infered: string
name: retrieve_data
arguments: tag: D17
type_infered: string
name: retrieve_data
arguments: tag: D57
type_infered: string
name: retrieve_data
arguments: tag: D10
type_infered: f64
name: retrieve_data
arguments: tag: D36
type_infered: string

tool: D54: %21.14E

tool: D40: %d

tool: D17: %%21.%dE

tool: D57: %%20.%dE

tool: D10: 1000000000000

tool: D36: %%20.%df

assistant: ```c
void wcshdo_format(int fmt, int nval, const double val[], char *format) {
  char *cp, *cp0, cval[24];
  int i, expmax, expon, nsig, precision;
  if (fmt == 'G') {
    fmt = 'f';
    for (i = 0; i < nval; i++) {
      if (fabs(val[i]) < 1e-4 || 1e12 < val[i]) {
        fmt = 'E';
        break;
      }
    }
  }
  cp0 = cval + 2;
  expmax = -999;
  for (i = 0; i < nval; i++) {
    wcsutil_double2str(cval, "%21.14E", val[i]);
    cp = cval + 16;
    while (cp0 < cp && *cp == '0')
      cp--;
    cp0 = cp;
    sscanf(cval + 18, "%d", &expon);
    if (expmax < expon)
      expmax = expon;
  }
  nsig = cp0 - (cval + 2) + 1;
  if (fmt == 'f') {
    precision = nsig - (expmax + 1);
    if (precision < 1)
      precision = 1;
    if (17 < precision)
      precision = 17;
    sprintf(format, "%%20.%df", precision);
  } else {
    precision = nsig - 1;
    if (precision < 1)
      precision = 1;
    if (14 < precision)
      precision = 14;
    if (precision < 14) {
      sprintf(format, "%%20.%dE", precision);
    } else {
      sprintf(format, "%%21.%dE", precision);
    }
  }
}
```