user: What would the C source look like for the assembly code provided here:

```asm
<append_file>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  mov    %rdx,%rdi
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x138,%rsp
  mov    %rsi,0x8(%rsp)
  lea    D4(%rip),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L243
  mov    0x0(%r13),%rbx
  mov    %rax,%rbp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    0x8(%rsp),%rsi
  mov    $0x1,%ecx
  mov    %r13,%rdi
  cltq
  lea    (%rbx,%rax,1),%rdx
  call   <expand_string@plt>
  test   %rax,%rax
  je     L168
  lea    0x1(%rax),%rbx
  movb   $0x28,(%rax)
  lea    0x20(%rsp),%r15
  movabs $0xfffffffeffffd9ff,%r14
  mov    %rbx,(%rsp)
  lea    D11(%rip),%r12
L147:
  lea    0x18(%rsp),%rbx
  nopl   0x0(%rax)
L108:
  mov    %rbp,%rdx
  mov    $0x100,%esi
  mov    %r15,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L208
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    %r15,0x18(%rsp)
  call   <strsep@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%r15,%rax,1),%rax
  mov    %rax,0x18(%rsp)
  cmp    %r15,%rax
  jae    L164
  jmp    L108
  nopl   0x0(%rax)
L194:
  lea    -0x1(%rax),%rdx
  mov    %rdx,0x18(%rsp)
  movb   $0x0,(%rax)
  mov    0x18(%rsp),%rax
  cmp    %r15,%rax
  jb     L108
L164:
  movzbl (%rax),%edx
  mov    %edx,%ecx
  and    $0xfffffffb,%ecx
  cmp    $0x9,%cl
  je     L194
  cmp    $0x20,%dl
  je     L194
  cmp    %r15,%rax
  jb     L108
  movzbl 0x20(%rsp),%edx
  mov    %r15,0x18(%rsp)
  cmp    $0x20,%dl
  ja     L118
  bt     %rdx,%r14
  jb     L98
  lea    0x21(%rsp),%rax
  nopl   0x0(%rax,%rax,1)
L131:
  movzbl (%rax),%edx
  mov    %rax,%rdi
  cmp    $0x20,%dl
  jbe    L300
L56:
  mov    %rdi,0x18(%rsp)
L284:
  test   %dl,%dl
  je     L108
  jmp    L197
  nopw   0x0(%rax,%rax,1)
L300:
  add    $0x1,%rax
  bt     %rdx,%r14
  jae    L131
  jmp    L56
  nopl   0x0(%rax)
L118:
  mov    %r15,%rdi
L197:
  call   <strlen@plt>
  mov    (%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    %r13,%rdi
  lea    0x1(%rax,%rax,1),%ecx
  call   <expand_string@plt>
  test   %rax,%rax
  je     L168
  mov    0x18(%rsp),%rdx
  movzbl (%rdx),%edx
  test   %dl,%dl
  jne    L206
  jmp    L70
  nopl   0x0(%rax)
L46:
  lea    0x1(%rax),%rcx
  cmp    $0x3f,%dl
  je     L253
  mov    %dl,(%rax)
  mov    %rcx,%rax
L42:
  mov    0x18(%rsp),%rdx
  lea    0x1(%rdx),%rcx
  mov    %rcx,0x18(%rsp)
  movzbl 0x1(%rdx),%edx
  test   %dl,%dl
  je     L70
L206:
  cmp    $0x2e,%dl
  jne    L46
  mov    $0x2e5c,%ecx
  add    $0x2,%rax
  mov    %cx,-0x2(%rax)
  jmp    L42
L253:
  movb   $0x2e,(%rax)
  mov    %rcx,%rax
  jmp    L42
L70:
  lea    0x1(%rax),%rbx
  mov    $0x7c,%edx
  mov    %rbx,(%rsp)
  mov    %dx,(%rax)
  jmp    L147
L208:
  mov    (%rsp),%rax
  movzbl -0x1(%rax),%eax
  cmp    $0x28,%al
  jne    L301
  mov    (%rsp),%rax
  movb   $0x0,-0x1(%rax)
L304:
  mov    %rbp,%rdi
  call   <fclose@plt>
L168:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L249
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L301:
  cmp    $0x7c,%al
  jne    L304
  mov    (%rsp),%rax
  movb   $0x29,-0x1(%rax)
  jmp    L304
L243:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L249
  add    $0x138,%rsp
  mov    %r12,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1130 <perror@plt>
L98:
  mov    %r15,%rdi
  jmp    L284
L249:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D4
type: string
name: extract_symbolic_data
arguments: label: D11
type: string

tool: D4: r

tool: D11: #


assistant: ```c
void append_file(char **dst, int *len, char *filename) {
  FILE *fd;
  char line[256], *p, *tail;
  fd = fopen(filename, "r");
  if (!fd) {
    perror(filename);
    return;
  }
  tail = expand_string(dst, len, *dst + strlen(*dst), 1);
  if (!tail)
    return;
  *tail++ = '(';
  while (fgets(line, sizeof(line), fd)) {
    p = line;
    strsep(&p, "#\n");
    p = line + strlen(line) - 1;
    while (p >= line && (*p == ' ' || *p == '\t' || *p == '\r'))
      *p-- = 0;
    if (p < line)
      continue;
    p = line;
    while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n')
      ++p;
    if (*p == 0)
      continue;
    tail = expand_string(dst, len, tail, 2 * strlen(p) + 1);
    if (!tail)
      return;
    for (; *p; ++p) {
      if (*p == '.') {
        *tail++ = '\\';
        *tail++ = '.';
      } else if (*p == '?')
        *tail++ = '.';
      else
        *tail++ = *p;
    }
    *tail++ = '|';
    *tail = 0;
  }
  if (*(tail - 1) == '(')
    *--tail = 0;
  else if (*(tail - 1) == '|')
    *(tail - 1) = ')';
  fclose(fd);
}
```