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

```asm
<do_title_expn>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x158,%rsp
  mov    %rdi,-0x148(%rbp)
  mov    %esi,-0x14c(%rbp)
  mov    %rdx,-0x158(%rbp)
  mov    %rcx,-0x160(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  subl   $0x1,-0x14c(%rbp)
  mov    -0x14c(%rbp),%eax
  mov    %eax,-0x130(%rbp)
  movw   $0x0,-0x132(%rbp)
  mov    -0x148(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L423
L287:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x25,%al
  jne    L45
  cmpw   $0x0,-0x132(%rbp)
  jne    L45
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L105
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L105:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x28,%al
  jne    L401
  movl   $0x0,-0x12c(%rbp)
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L443
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L443:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x160(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <title_expn_subs@plt>
  mov    %rax,-0x128(%rbp)
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L28
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L28:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x133(%rbp)
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L359
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L359:
  cmpq   $0x0,-0x128(%rbp)
  je     L252
  jmp    L467
L382:
  cmpl   $0xfe,-0x12c(%rbp)
  jne    L128
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L128:
  mov    -0x12c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x12c(%rbp)
  mov    -0x158(%rbp),%rdx
  movzbl (%rdx),%edx
  cltq
  mov    %dl,-0x120(%rbp,%rax,1)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L201
  movw   $0x1,-0x132(%rbp)
  jmp    L387
L201:
  movw   $0x0,-0x132(%rbp)
L387:
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L467
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L467:
  cmpw   $0x0,-0x132(%rbp)
  jne    L382
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x133(%rbp)
  jne    L382
  mov    -0x12c(%rbp),%eax
  cltq
  movb   $0x0,-0x120(%rbp,%rax,1)
  jmp    L36
L173:
  cmpw   $0x0,-0x132(%rbp)
  je     L241
  movw   $0x0,-0x132(%rbp)
  jmp    L412
L241:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L412
  movw   $0x1,-0x132(%rbp)
L412:
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L36
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L36:
  cmpw   $0x0,-0x132(%rbp)
  jne    L173
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  jne    L173
  jmp    L267
L142:
  cmpw   $0x0,-0x132(%rbp)
  je     L342
  movw   $0x0,-0x132(%rbp)
  jmp    L5
L342:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L5
  movw   $0x1,-0x132(%rbp)
L5:
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L252
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L252:
  cmpw   $0x0,-0x132(%rbp)
  jne    L142
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x133(%rbp)
  jne    L142
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L376
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
  jmp    L376
L118:
  cmpl   $0xfe,-0x12c(%rbp)
  jne    L341
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L341:
  mov    -0x12c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x12c(%rbp)
  mov    -0x158(%rbp),%rdx
  movzbl (%rdx),%edx
  cltq
  mov    %dl,-0x120(%rbp,%rax,1)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L104
  movw   $0x1,-0x132(%rbp)
  jmp    L460
L104:
  movw   $0x0,-0x132(%rbp)
L460:
  addq   $0x1,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L376
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L376:
  cmpw   $0x0,-0x132(%rbp)
  jne    L118
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  jne    L118
  mov    -0x12c(%rbp),%eax
  cltq
  movb   $0x0,-0x120(%rbp,%rax,1)
L267:
  mov    -0x14c(%rbp),%eax
  cltq
  mov    -0x130(%rbp),%edx
  movslq %edx,%rdx
  sub    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x148(%rbp),%rax
  lea    (%rcx,%rax,1),%rdi
  mov    -0x160(%rbp),%rcx
  lea    -0x120(%rbp),%rdx
  mov    -0x130(%rbp),%eax
  mov    %eax,%esi
  call   <do_title_expn>
  mov    -0x130(%rbp),%ebx
  mov    -0x14c(%rbp),%eax
  cltq
  mov    -0x130(%rbp),%edx
  movslq %edx,%rdx
  sub    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x148(%rbp),%rax
  add    %rcx,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
  mov    %eax,-0x130(%rbp)
  jmp    L76
L401:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x160(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <title_expn_subs@plt>
  mov    %rax,-0x128(%rbp)
  cmpq   $0x0,-0x128(%rbp)
  je     L76
  mov    -0x130(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x128(%rbp),%rcx
  mov    -0x148(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
  mov    -0x130(%rbp),%ebx
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
  mov    %eax,-0x130(%rbp)
  jmp    L76
L45:
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L370
  cmpw   $0x0,-0x132(%rbp)
  jne    L370
  movw   $0x1,-0x132(%rbp)
  jmp    L4
L370:
  mov    -0x14c(%rbp),%eax
  sub    -0x130(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x148(%rbp),%rax
  add    %rax,%rdx
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    -0x14c(%rbp),%eax
  sub    -0x130(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x148(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  subl   $0x1,-0x130(%rbp)
  movw   $0x0,-0x132(%rbp)
  jmp    L4
L76:
  nop
L4:
  addq   $0x1,-0x158(%rbp)
L423:
  cmpl   $0x0,-0x130(%rbp)
  jle    L79
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L287
L79:
  mov    -0x130(%rbp),%eax
  mov    $0x0,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  mov    %eax,-0x130(%rbp)
  mov    -0x14c(%rbp),%eax
  sub    -0x130(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x148(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L42
  call   <__stack_chk_fail@plt>
L42:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D100
type_guessed: string
name: parse_data
arguments: data_label: D63
type_guessed: string
name: parse_data
arguments: data_label: D28
type_guessed: string

tool: D100: Unexpected end of title expression

tool: D63: Nested ternary expression too long

tool: D28: Ternary expression too long

assistant: ```c
void do_title_expn(char *dest, int size, const char *fmt, const struct file_tags *tags) {
  const char *h;
  int free = --size;
  short escape = 0;
  dest[0] = 0;
  while (free > 0 && *fmt) {
    if (*fmt == '%' && !escape) {
      if ((*++fmt) == '\0')
        fatal("Unexpected end of title expression");
      if (*fmt == '(') {
        char separator, expr[256];
        int expr_pos = 0;
        if ((*++fmt) == '\0')
          fatal("Unexpected end of title expression");
        h = title_expn_subs(*fmt, tags);
        if ((*++fmt) == '\0')
          fatal("Unexpected end of title expression");
        separator = *fmt;
        if ((*++fmt) == '\0')
          fatal("Unexpected end of title expression");
        if (h) {
          while (escape || *fmt != separator) {
            if (expr_pos == sizeof(expr) - 2)
              fatal("Nested ternary expression too long");
            expr[expr_pos++] = *fmt;
            if (*fmt == '\\')
              escape = 1;
            else
              escape = 0;
            if ((*++fmt) == '\0')
              fatal("Unexpected end of title expression");
          }
          expr[expr_pos] = '\0';
          while (escape || *fmt != ')') {
            if (escape)
              escape = 0;
            else if (*fmt == '\\')
              escape = 1;
            if ((*++fmt) == '\0')
              fatal("Unexpected end of title expression");
          }
        } else {
          while (escape || *fmt != separator) {
            if (escape)
              escape = 0;
            else if (*fmt == '\\')
              escape = 1;
            if ((*++fmt) == '\0')
              fatal("Unexpected end of title expression");
          }
          if ((*++fmt) == '\0')
            fatal("Unexpected end of title expression");
          while (escape || *fmt != ')') {
            if (expr_pos == sizeof(expr) - 2)
              fatal("Ternary expression too long");
            expr[expr_pos++] = *fmt;
            if (*fmt == '\\')
              escape = 1;
            else
              escape = 0;
            if ((*++fmt) == '\0')
              fatal("Unexpected end of title expression");
          }
          expr[expr_pos] = '\0';
        }
        do_title_expn((dest + size - free), free, expr, tags);
        free -= strlen(dest + size - free);
      } else {
        h = title_expn_subs(*fmt, tags);
        if (h) {
          strncat(dest, h, free - 1);
          free -= strlen(h);
        }
      }
    } else if (*fmt == '\\' && !escape)
      escape = 1;
    else {
      dest[size - free] = *fmt;
      dest[size - free + 1] = 0;
      --free;
      escape = 0;
    }
    fmt++;
  }
  free = free < 0 ? 0 : free;
  dest[size - free] = '\0';
}
```