user: Demonstrate the C code that generates the assembly output below:

```asm
<fillintext>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x178,%rsp
  mov    %rdi,%r14
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x168(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %eax,%r15d
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  lea    0x38(%rsp),%rax
  mov    %rax,0x10(%rsp)
  lea    0x60(%rsp),%rax
  mov    %rax,0x18(%rsp)
  jmp    L135
L72:
  movslq %r13d,%rax
  movb   $0x0,0x60(%rsp,%rax,1)
  mov    0x10(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <do_calc@plt>
  cmp    $0xffffffff,%eax
  jne    L10
  movslq %r12d,%rax
  mov    0x8(%rsp),%rsi
  movb   $0x3f,(%rsi,%rax,1)
  add    $0x1,%r12d
L59:
  add    $0x1,%rbx
  cmp    %ebx,%r15d
  jle    L80
L46:
  mov    %ebx,%ebp
  movzbl (%r14,%rbx,1),%eax
  cmp    $0x7d,%al
  je     L72
  movslq %r13d,%rdx
  mov    %al,0x60(%rsp,%rdx,1)
  add    $0x1,%r13d
  jmp    L59
L10:
  lea    0x40(%rsp),%rdi
  movsd  0x38(%rsp),%xmm0
  lea    D1(%rip),%rsi
  call   <sprintf@plt>
  mov    $0x0,%ebx
  lea    0x40(%rsp),%r13
  movslq %r12d,%rax
  add    0x8(%rsp),%rax
  mov    %rax,0x28(%rsp)
  jmp    L124
L98:
  movzbl (%rbx,%r13,1),%eax
  mov    0x28(%rsp),%rdi
  mov    %al,(%rdi,%rbx,1)
  add    $0x1,%rbx
L124:
  lea    (%r12,%rbx,1),%eax
  mov    %eax,0x24(%rsp)
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L98
  mov    0x24(%rsp),%r12d
  jmp    L38
L80:
  movslq %r12d,%r12
  mov    0x8(%rsp),%rax
  movb   $0x3f,(%rax,%r12,1)
  movb   $0x0,0x1(%rax,%r12,1)
L52:
  mov    0x168(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x178,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  movslq %r12d,%rdx
  mov    0x8(%rsp),%rcx
  mov    %al,(%rcx,%rdx,1)
  add    $0x1,%r12d
L38:
  add    $0x1,%ebp
  cmp    %ebp,%r15d
  jle    L129
L135:
  movslq %ebp,%rdx
  movzbl (%r14,%rdx,1),%eax
  cmp    $0x5c,%al
  jne    L102
  cmpb   $0x7b,0x1(%r14,%rdx,1)
  jne    L102
  add    $0x2,%ebp
  movslq %ebp,%rbx
  mov    $0x0,%r13d
  jmp    L46
L129:
  movslq %r12d,%r12
  mov    0x8(%rsp),%rax
  movb   $0x0,(%rax,%r12,1)
  jmp    L52
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D1
type_guessed: 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;
}
```