user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<exp_str>:
  endbr64
  push   %r15
  movq   %xmm0,%r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  lea    D1(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  mov    $0x1869f,%eax
  mov    %rsp,%r12
  mov    %r12,%rdi
  cmp    %eax,%esi
  cmovle %esi,%eax
  mov    %r13,%rsi
  test   %eax,%eax
  mov    %eax,%ebp
  mov    $0x1,%eax
  cmovle %eax,%ebp
  xor    %eax,%eax
  test   %edx,%edx
  cmovns %edx,%eax
  cvtsi2sd %ebp,%xmm0
  mov    %eax,%r14d
  mov    $0x1869f,%eax
  cmp    %eax,%r14d
  cmovg  %eax,%r14d
  mov    $0x1,%eax
  mov    %r14d,%edx
  call   <sprintf@plt>
  movq   %r15,%xmm0
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <sprintf@plt>
  movzbl (%rbx),%edx
  mov    $0x1,%eax
  mov    %edx,%ecx
  and    $0xffffffdf,%ecx
  cmp    $0x45,%cl
  jne    L122
  jmp    L13
  nopw   0x0(%rax,%rax,1)
L69:
  movzbl (%rbx,%rax,1),%edx
  mov    %eax,%ecx
  lea    0x1(%rax),%rdi
  mov    %edx,%esi
  and    $0xffffffdf,%esi
  cmp    $0x45,%sil
  je     L93
  mov    %rdi,%rax
L122:
  test   %dl,%dl
  jne    L69
L43:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L79
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  xor    %ecx,%ecx
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L93:
  cmpb   $0x0,0x1(%rbx,%rax,1)
  je     L43
  lea    0x2(%rcx),%esi
  movslq %esi,%rax
  movzbl (%rbx,%rax,1),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L43
  lea    0x3(%rcx),%eax
  cltq
  nopl   (%rax)
L162:
  movzbl (%rbx,%rax,1),%edi
  mov    %eax,%ecx
  add    $0x1,%rax
  lea    -0x30(%rdi),%edx
  cmp    $0x9,%dl
  jbe    L162
  sub    %esi,%ecx
  cmp    $0x2,%ecx
  jle    L43
  add    $0x1,%ebp
  pxor   %xmm0,%xmm0
  mov    %r14d,%edx
  mov    %r13,%rsi
  cvtsi2sd %ebp,%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <sprintf@plt>
  movq   %r15,%xmm0
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <sprintf@plt>
  movzbl (%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  je     L83
  test   %al,%al
  je     L83
  mov    $0x1,%eax
  jmp    L106
  nopl   0x0(%rax)
L73:
  test   %dl,%dl
  je     L44
L106:
  movzbl (%rbx,%rax,1),%edx
  mov    %eax,%ecx
  add    $0x1,%rax
  mov    %edx,%esi
  and    $0xffffffdf,%esi
  cmp    $0x45,%sil
  jne    L73
L44:
  add    $0x2,%ecx
  movslq %ecx,%rcx
  lea    0x1(%rcx),%rdx
  lea    0x2(%rcx),%rax
L40:
  add    %rbx,%rcx
  add    %rbx,%rdx
  add    %rbx,%rax
  cmpb   $0x30,(%rcx)
  je     L121
  movb   $0x39,(%rcx)
  mov    $0x39,%ecx
L151:
  mov    %cl,(%rdx)
  movb   $0x0,(%rax)
  jmp    L43
L121:
  movzbl (%rdx),%esi
  mov    %sil,(%rcx)
  movzbl (%rax),%ecx
  jmp    L151
L83:
  mov    $0x4,%eax
  mov    $0x3,%edx
  mov    $0x2,%ecx
  jmp    L40
L79:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D1
datatype: string

tool: D1: %%%d.%de

assistant: ```c
void exp_str(char *buf, int maxlen, int decimals, double value) {
  char fmt[16];
  int i, j, zero;
  if (maxlen < 1)
    maxlen = 1;
  if (maxlen > 99999)
    maxlen = 99999;
  if (decimals > 99999)
    decimals = 99999;
  if (decimals < 0)
    decimals = 0;
  sprintf(fmt, "%%%d.%de", maxlen, decimals);
  sprintf(buf, fmt, value);
  for (i = 0; buf[i] != 'e' && buf[i] != 'E' && buf[i] != '\0'; i++)
    ;
  if (buf[i] == '\0' || buf[i + 1] == '\0')
    return;
  for (i = i + 2, j = i; buf[i] >= '0' && buf[i] <= '9'; i++)
    ;
  if (i - j < 3)
    return;
  maxlen++;
  sprintf(fmt, "%%%d.%de", maxlen, decimals);
  sprintf(buf, fmt, value);
  for (i = 0; buf[i] != 'e' && buf[i] != 'E' && buf[i] != '\0'; i++)
    ;
  for (i = i + 2, j = i; buf[i] >= '0' && buf[i] <= '9'; i++)
    ;
  zero = (buf[j] == '0');
  if (!zero) {
    buf[j] = '9';
    buf[j + 1] = '9';
  } else {
    buf[j] = buf[j + 1];
    buf[j + 1] = buf[j + 2];
  }
  buf[j + 2] = '\0';
}
```