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

```asm
<fillintext>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x170,%rsp
  mov    %rdi,-0x168(%rbp)
  mov    %rsi,-0x170(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x168(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x140(%rbp)
  movl   $0x0,-0x150(%rbp)
  movl   $0x0,-0x14c(%rbp)
L81:
  mov    -0x150(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x152(%rbp)
  cmpb   $0x5c,-0x152(%rbp)
  jne    L116
  mov    -0x150(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x151(%rbp)
  cmpb   $0x7b,-0x151(%rbp)
  jne    L125
  cmpb   $0x7b,-0x151(%rbp)
  jne    L120
  movl   $0x0,-0x148(%rbp)
  addl   $0x2,-0x150(%rbp)
L72:
  mov    -0x150(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x151(%rbp)
  cmpb   $0x7d,-0x151(%rbp)
  jne    L47
  mov    -0x148(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x138(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <do_calc@plt>
  mov    %eax,-0x13c(%rbp)
  cmpl   $0xffffffff,-0x13c(%rbp)
  je     L0
  mov    -0x138(%rbp),%rdx
  lea    -0x130(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D1(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  movl   $0x0,-0x144(%rbp)
  jmp    L20
L158:
  mov    -0x14c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x170(%rbp),%rax
  add    %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  movzbl -0x130(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x14c(%rbp)
  addl   $0x1,-0x144(%rbp)
L20:
  lea    -0x130(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x144(%rbp)
  jl     L158
  jmp    L97
L0:
  mov    -0x14c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3f,(%rax)
  addl   $0x1,-0x14c(%rbp)
  jmp    L106
L47:
  mov    -0x148(%rbp),%eax
  cltq
  movzbl -0x151(%rbp),%edx
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x148(%rbp)
L106:
  addl   $0x1,-0x150(%rbp)
  mov    -0x150(%rbp),%eax
  cmp    -0x140(%rbp),%eax
  jl     L72
  mov    -0x14c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3f,(%rax)
  mov    -0x14c(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L82
L97:
  jmp    L120
L116:
  nop
  jmp    L1
L125:
  nop
L1:
  mov    -0x14c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x170(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x152(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x14c(%rbp)
  jmp    L108
L120:
  nop
L108:
  addl   $0x1,-0x150(%rbp)
  mov    -0x150(%rbp),%eax
  cmp    -0x140(%rbp),%eax
  jge    L62
  jmp    L81
L62:
  nop
  mov    -0x14c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  nop
L82:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L93
  call   <__stack_chk_fail@plt>
L93:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D1
type: string

tool: D1: %g

assistant: ```c
void fillintext(char *old, char *new) {
  int i, l = strlen(old);
  int j, m, k, ans;
  char name[256], c, c2;
  double z;
  char val[25];
  i = 0;
  j = 0;
  while (1) {
    c = old[i];
    if (c == '\\') {
      c2 = old[i + 1];
      if (c2 != '{')
        goto na;
      if (c2 == '{') {
        m = 0;
        i = i + 2;
        while (1) {
          c2 = old[i];
          if (c2 == '}') {
            name[m] = 0;
            ans = do_calc(name, &z);
            if (ans != -1) {
              sprintf(val, "%g", z);
              for (k = 0; k < strlen(val); k++) {
                new[j] = val[k];
                j++;
              }
              break;
            } else {
              new[j] = '?';
              j++;
            }
          } else {
            name[m] = c2;
            m++;
          }
          i++;
          if (i >= l) {
            new[j] = '?';
            new[j + 1] = 0;
            return;
          }
        }
      }
      goto nc;
    }
  na:
    new[j] = c;
    j++;
  nc:
    i++;
    if (i >= l)
      break;
  }
  new[j] = 0;
  return;
}
```