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

```asm
<do_title_expn>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x138,%rsp
  mov    %rcx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rsi),%eax
  movb   $0x0,(%rdi)
  mov    %eax,0x4(%rsp)
  mov    %eax,%r13d
  test   %eax,%eax
  jle    L268
L191:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L268
L518:
  lea    0x1(%rbx),%r12
  cmp    $0x25,%al
  je     L428
  cmp    $0x5c,%al
  jne    L260
  test   %r15w,%r15w
  je     L365
L260:
  mov    0x4(%rsp),%edx
  sub    %r13d,%edx
  sub    $0x1,%r13d
  movslq %edx,%rdx
  mov    %al,0x0(%rbp,%rdx,1)
  movb   $0x0,0x1(%rbp,%rdx,1)
L278:
  mov    %r12,%rbx
  test   %r13d,%r13d
  jle    L268
  movzbl (%rbx),%eax
  xor    %r15d,%r15d
  test   %al,%al
  jne    L518
L268:
  xor    %eax,%eax
  test   %r13d,%r13d
  mov    0x4(%rsp),%ebx
  cmovns %r13d,%eax
  sub    %eax,%ebx
  movslq %ebx,%rbx
  movb   $0x0,0x0(%rbp,%rbx,1)
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L428:
  test   %r15w,%r15w
  jne    L260
  movsbl 0x1(%rbx),%edi
  test   %dil,%dil
  je     L279
  cmp    $0x28,%dil
  jne    L294
L301:
  movsbl 0x2(%rbx),%edi
  test   %dil,%dil
  je     L149
L392:
  mov    0x18(%rsp),%rsi
  call   <title_expn_subs@plt>
  movzbl 0x3(%rbx),%esi
  mov    %rax,%r11
  test   %sil,%sil
  je     L508
L473:
  cmpb   $0x0,0x4(%rbx)
  lea    0x4(%rbx),%r14
  je     L424
L15:
  xor    %ecx,%ecx
  lea    0x20(%rsp),%r12
  test   %r11,%r11
  jne    L182
  jmp    L103
  nopl   0x0(%rax,%rax,1)
L390:
  add    $0x1,%rcx
L182:
  movslq %ecx,%rax
  test   %r15w,%r15w
  jne    L141
  cmp    %sil,(%r14)
  je     L195
L141:
  cmp    $0xfe,%rcx
  je     L170
L56:
  movzbl (%r14),%eax
  xor    %r15d,%r15d
  cmp    $0x5c,%al
  mov    %al,(%r12,%rcx,1)
  sete   %r15b
  add    $0x1,%r14
  cmpb   $0x0,(%r14)
  jne    L390
  lea    D9(%rip),%rdi
  mov    %rcx,0x10(%rsp)
  mov    %sil,0x8(%rsp)
  call   <fatal@plt>
  mov    0x10(%rsp),%rcx
  movzbl 0x8(%rsp),%esi
  jmp    L390
  nopl   0x0(%rax,%rax,1)
L365:
  mov    $0x1,%r15d
L237:
  mov    %r12,%rbx
  jmp    L191
  xchg   %ax,%ax
L294:
  mov    0x18(%rsp),%rsi
  call   <title_expn_subs@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L490
  lea    -0x1(%r13),%edx
  mov    %rax,%rsi
  mov    %rbp,%rdi
  add    $0x1,%r12
  call   <strncat@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  sub    %eax,%r13d
  jmp    L278
  nopl   0x0(%rax)
L279:
  lea    D9(%rip),%rdi
  call   <fatal@plt>
  movsbl 0x1(%rbx),%edi
  cmp    $0x28,%dil
  je     L301
  jmp    L294
  nopl   0x0(%rax)
L170:
  lea    D10(%rip),%rdi
  mov    %rcx,0x10(%rsp)
  mov    %sil,0x8(%rsp)
  call   <fatal@plt>
  mov    0x10(%rsp),%rcx
  movzbl 0x8(%rsp),%esi
  jmp    L56
  nopl   (%rax)
L195:
  mov    %r14,%rbx
  movb   $0x0,0x20(%rsp,%rax,1)
  lea    D9(%rip),%r14
  jmp    L379
  nopl   0x0(%rax)
L497:
  lea    0x1(%rbx),%r15
  test   %sil,%sil
  je     L484
L347:
  mov    %r15,%rbx
L379:
  cmp    $0x29,%sil
  je     L533
L327:
  cmpb   $0x5c,(%rbx)
  movzbl 0x1(%rbx),%esi
  jne    L497
  test   %sil,%sil
  je     L81
L496:
  movzbl 0x2(%rbx),%esi
  lea    0x2(%rbx),%r15
  test   %sil,%sil
  jne    L347
  mov    %r14,%rdi
  call   <fatal@plt>
  movzbl 0x2(%rbx),%esi
  jmp    L347
  nopl   0x0(%rax,%rax,1)
L484:
  mov    %r14,%rdi
  call   <fatal@plt>
  cmpb   $0x29,0x1(%rbx)
  mov    %r15,%rbx
  jne    L327
  nopl   0x0(%rax)
L533:
  movslq 0x4(%rsp),%r14
  movslq %r13d,%rax
  mov    0x18(%rsp),%rcx
  mov    %r12,%rdx
  mov    %r13d,%esi
  lea    0x1(%rbx),%r12
  sub    %rax,%r14
  add    %rbp,%r14
  mov    %r14,%rdi
  call   <do_title_expn>
  mov    %r14,%rdi
  call   <strlen@plt>
  sub    %eax,%r13d
  jmp    L278
  nopl   (%rax)
L81:
  mov    %r14,%rdi
  call   <fatal@plt>
  jmp    L496
  nopw   0x0(%rax,%rax,1)
L490:
  add    $0x1,%r12
  jmp    L237
  nopl   0x0(%rax)
L424:
  lea    D9(%rip),%rdi
  mov    %r11,0x10(%rsp)
  mov    %sil,0x8(%rsp)
  call   <fatal@plt>
  mov    0x10(%rsp),%r11
  movzbl 0x8(%rsp),%esi
  jmp    L15
  nopl   (%rax)
L508:
  lea    D9(%rip),%rdi
  mov    %rax,0x8(%rsp)
  call   <fatal@plt>
  movzbl 0x3(%rbx),%esi
  mov    0x8(%rsp),%r11
  jmp    L473
  nopw   0x0(%rax,%rax,1)
L149:
  lea    D9(%rip),%rdi
  call   <fatal@plt>
  movsbl 0x2(%rbx),%edi
  jmp    L392
  nopl   (%rax)
L103:
  movzbl 0x4(%rbx),%eax
  lea    D9(%rip),%r12
  jmp    L6
  nopl   (%rax)
L527:
  lea    0x1(%r14),%rbx
  test   %al,%al
  je     L217
L122:
  mov    %rbx,%r14
L6:
  cmp    %al,%sil
  je     L416
L401:
  cmpb   $0x5c,(%r14)
  movzbl 0x1(%r14),%eax
  jne    L527
  test   %al,%al
  je     L269
L18:
  movzbl 0x2(%r14),%eax
  lea    0x2(%r14),%rbx
  test   %al,%al
  jne    L122
  mov    %r12,%rdi
  mov    %sil,0x8(%rsp)
  call   <fatal@plt>
  movzbl 0x2(%r14),%eax
  movzbl 0x8(%rsp),%esi
  jmp    L122
  nopl   0x0(%rax)
L217:
  mov    %r12,%rdi
  mov    %sil,0x8(%rsp)
  call   <fatal@plt>
  movzbl 0x8(%rsp),%esi
  cmp    %sil,0x1(%r14)
  mov    %rbx,%r14
  jne    L401
L416:
  cmpb   $0x0,0x1(%r14)
  lea    0x1(%r14),%rbx
  je     L572
L155:
  movzbl 0x1(%r14),%ecx
  xor    %r15d,%r15d
  lea    0x20(%rsp),%r12
  jmp    L133
  nopl   0x0(%rax)
L292:
  test   %cl,%cl
  je     L462
L599:
  mov    %r14,%rbx
L133:
  cmp    $0x29,%cl
  je     L475
L505:
  movslq %r15d,%rdx
  add    %r12,%rdx
  cmp    $0xfe,%r15d
  je     L323
L360:
  movzbl (%rbx),%eax
  movzbl 0x1(%rbx),%ecx
  add    $0x1,%r15d
  lea    0x1(%rbx),%r14
  mov    %al,(%rdx)
  cmp    $0x5c,%al
  jne    L292
  add    $0x1,%rdx
  test   %cl,%cl
  je     L615
  mov    %r14,%rbx
  cmp    $0xfe,%r15d
  jne    L360
L323:
  lea    D44(%rip),%rdi
  mov    %rdx,0x8(%rsp)
  call   <fatal@plt>
  mov    0x8(%rsp),%rdx
  jmp    L360
  nopl   0x0(%rax,%rax,1)
L462:
  lea    D9(%rip),%rdi
  call   <fatal@plt>
  movzbl 0x1(%rbx),%ecx
  jmp    L599
  nopw   0x0(%rax,%rax,1)
L615:
  lea    D9(%rip),%rdi
  mov    %r14,%rbx
  call   <fatal@plt>
  jmp    L505
  nopl   0x0(%rax)
L475:
  movslq %r15d,%r15
  movb   $0x0,0x20(%rsp,%r15,1)
  jmp    L533
  xchg   %ax,%ax
L269:
  mov    %r12,%rdi
  mov    %sil,0x8(%rsp)
  call   <fatal@plt>
  movzbl 0x8(%rsp),%esi
  jmp    L18
L572:
  lea    D9(%rip),%rdi
  call   <fatal@plt>
  jmp    L155
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
data_type: string
name: retrieve_data
arguments: data_tag: D10
data_type: string
name: retrieve_data
arguments: data_tag: D44
data_type: string

tool: D9: Unexpected end of title expression

tool: D10: Nested ternary expression too long

tool: D44: 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';
}
```