user: What is the c source code of the assembly code below?

```asm
<do_title_expn>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x138,%rsp
  mov    %rdi,%r14
  mov    %rdx,%rbx
  mov    %rcx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rsi),%eax
  mov    %eax,0xc(%rsp)
  movb   $0x0,(%rdi)
  mov    %eax,%r12d
  mov    $0x0,%edx
  test   %eax,%eax
  jg     L303
L484:
  test   %r12d,%r12d
  mov    $0x0,%eax
  cmovs  %eax,%r12d
  mov    0xc(%rsp),%eax
  sub    %r12d,%eax
  cltq
  movb   $0x0,(%r14,%rax,1)
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L278
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L452:
  lea    0x1(%rbx),%rbp
  cmpb   $0x0,0x1(%rbx)
  je     L106
L274:
  movzbl 0x1(%rbx),%edi
  cmp    $0x28,%dil
  jne    L183
  cmpb   $0x0,0x2(%rbx)
  je     L258
L200:
  movsbl 0x2(%rbx),%edi
  mov    0x10(%rsp),%rsi
  call   <title_expn_subs@plt>
  mov    %rax,0x18(%rsp)
  cmpb   $0x0,0x3(%rbx)
  je     L166
L5:
  movzbl 0x3(%rbx),%r15d
  lea    0x4(%rbx),%rbp
  cmpb   $0x0,0x4(%rbx)
  je     L219
L407:
  mov    $0x0,%ebx
  mov    $0x0,%r13d
  cmpq   $0x0,0x18(%rsp)
  jne    L210
  jmp    L213
L106:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L274
L258:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L200
L166:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L5
L219:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L407
L197:
  cmp    $0xfe,%ebx
  je     L39
L356:
  movzbl 0x0(%rbp),%eax
  mov    %al,0x20(%rsp,%rbx,1)
  cmp    $0x5c,%al
  sete   %r13b
  movzbl %r13b,%r13d
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  je     L23
L30:
  add    $0x1,%rbx
L210:
  mov    %ebx,%eax
  test   %r13w,%r13w
  jne    L197
  cmp    %r15b,0x0(%rbp)
  jne    L197
  cltq
  movb   $0x0,0x20(%rsp,%rax,1)
  mov    %r13d,%r15d
  mov    %rbp,%rbx
  jmp    L228
L39:
  lea    D104(%rip),%rdi
  call   <fatal@plt>
  jmp    L356
L23:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L30
L325:
  mov    %r13d,%r15d
L214:
  add    $0x1,%rbx
  cmpb   $0x0,(%rbx)
  je     L130
L228:
  test   %r15w,%r15w
  jne    L325
  movzbl (%rbx),%eax
  cmp    $0x29,%al
  je     L314
  cmp    $0x5c,%al
  sete   %r15b
  movzbl %r15b,%r15d
  jmp    L214
L130:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L228
L409:
  mov    $0x0,%r13d
L8:
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  je     L358
L213:
  test   %r13w,%r13w
  jne    L409
  movzbl 0x0(%rbp),%eax
  cmp    %r15b,%al
  je     L87
  cmp    $0x5c,%al
  sete   %r13b
  movzbl %r13b,%r13d
  jmp    L8
L358:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L213
L87:
  lea    0x1(%rbp),%rbx
  cmpb   $0x0,0x1(%rbp)
  je     L131
L22:
  mov    $0x0,%ebp
  jmp    L464
L131:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L22
L84:
  cmp    $0xfe,%ebp
  je     L275
L20:
  movzbl (%rbx),%eax
  mov    %al,0x20(%rsp,%rbp,1)
  cmp    $0x5c,%al
  sete   %r13b
  movzbl %r13b,%r13d
  add    $0x1,%rbx
  cmpb   $0x0,(%rbx)
  je     L137
L335:
  add    $0x1,%rbp
L464:
  mov    %ebp,%eax
  test   %r13w,%r13w
  jne    L84
  cmpb   $0x29,(%rbx)
  jne    L84
  cltq
  movb   $0x0,0x20(%rsp,%rax,1)
L314:
  movslq 0xc(%rsp),%rax
  movslq %r12d,%rdx
  sub    %rdx,%rax
  lea    (%r14,%rax,1),%rbp
  lea    0x20(%rsp),%rdx
  mov    0x10(%rsp),%rcx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <do_title_expn>
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    %eax,%r12d
  mov    $0x0,%edx
  jmp    L134
L275:
  lea    D72(%rip),%rdi
  call   <fatal@plt>
  jmp    L20
L137:
  lea    D48(%rip),%rdi
  call   <fatal@plt>
  jmp    L335
L183:
  movsbl %dil,%edi
  mov    0x10(%rsp),%rsi
  call   <title_expn_subs@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L121
  lea    -0x1(%r12),%edx
  mov    %rax,%rsi
  mov    %r14,%rdi
  call   <strncat@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  sub    %eax,%r12d
  mov    %rbp,%rbx
  mov    $0x0,%edx
  jmp    L134
L440:
  mov    0xc(%rsp),%edx
  sub    %r12d,%edx
  movslq %edx,%rdx
  mov    %al,(%r14,%rdx,1)
  movb   $0x0,0x1(%r14,%rdx,1)
  sub    $0x1,%r12d
  mov    $0x0,%edx
L134:
  add    $0x1,%rbx
  test   %r12d,%r12d
  jle    L484
L303:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L484
  test   %dx,%dx
  sete   %cl
  cmp    $0x25,%al
  jne    L422
  test   %cl,%cl
  jne    L452
L422:
  cmp    $0x5c,%al
  jne    L440
  mov    $0x1,%edx
  test   %cl,%cl
  je     L440
  jmp    L134
L121:
  mov    %rbp,%rbx
  mov    $0x0,%edx
  jmp    L134
L278:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D48
type: string
name: retrieve_data
arguments: data_tag: D104
type: string
name: retrieve_data
arguments: data_tag: D72
type: string

tool: D48: Unexpected end of title expression

tool: D104: nasted trenary expression too long

tool: D72: trenary 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("nasted trenary 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("trenary 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';
}
```