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

```asm
<G_LayoutList>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x3b8,%rsp
  mov    %rdi,%rbx
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %edx,0x14(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x3a8(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x120(%rsp)
  movq   $0x0,0x128(%rsp)
  lea    0x130(%rsp),%rdi
  mov    $0x4e,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x38(%rsp)
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  movq   $0x0,0x58(%rsp)
  movq   $0x0,0x60(%rsp)
  movq   $0x0,0x68(%rsp)
  movq   $0x0,0x70(%rsp)
  movq   $0x0,0x78(%rsp)
  movq   $0x0,0x80(%rsp)
  movq   $0x0,0x88(%rsp)
  movq   $0x0,0x90(%rsp)
  movq   $0x0,0x98(%rsp)
  movq   $0x0,0xa0(%rsp)
  movq   $0x0,0xa8(%rsp)
  movq   $0x0,0xb0(%rsp)
  movq   $0x0,0xb8(%rsp)
  movq   $0x0,0xc0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xd8(%rsp)
  movq   $0x0,0xe0(%rsp)
  movq   $0x0,0xe8(%rsp)
  movq   $0x0,0xf0(%rsp)
  movq   $0x0,0xf8(%rsp)
  movq   $0x0,0x100(%rsp)
  movq   $0x0,0x108(%rsp)
  movq   $0x0,0x110(%rsp)
  movq   $0x0,0x118(%rsp)
  lea    0x20(%rsp),%rdi
  lea    D33(%rip),%rdx
  mov    $0x100,%esi
  call   <Q_strcat@plt>
  mov    %rbx,%rsi
  lea    D7(%rip),%rdi
  mov    $0x0,%eax
  call   <va@plt>
  mov    %eax,%edi
  lea    0x120(%rsp),%rdx
  mov    $0x280,%ecx
  lea    D17(%rip),%rsi
  mov    $0x0,%eax
  call   <trap_FS_GetFileList@plt>
  mov    %eax,%r15d
  test   %eax,%eax
  jle    L20
  lea    0x120(%rsp),%rbp
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  lea    0x20(%rsp),%r13
  jmp    L54
L26:
  mov    %rbp,%rdx
  mov    $0x100,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <Q_strcat@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  lea    -0x4(%rax),%edx
  movslq %edx,%rdx
  movb   $0x20,0x20(%rsp,%rdx,1)
  sub    $0x3,%eax
  cltq
  movb   $0x0,0x20(%rsp,%rax,1)
  add    $0x1,%r14d
L8:
  add    $0x1,%r12d
  movslq %ebx,%rbx
  lea    0x1(%rbp,%rbx,1),%rbp
  cmp    %r12d,%r15d
  je     L14
L54:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    $0x4,%ebx
  jle    L8
  add    %ebx,%eax
  cmp    $0xff,%eax
  jbe    L26
L14:
  cmp    %r14d,%r15d
  jne    L19
L51:
  lea    0x20(%rsp),%rsi
  mov    0x14(%rsp),%edx
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <Q_strncpyz@plt>
  lea    0x1(%r14),%eax
  mov    0x3a8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L50
  add    $0x3b8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L20:
  mov    $0x0,%r14d
  jmp    L14
L19:
  mov    0x18(%rsp),%rcx
  mov    %r15d,%edx
  mov    %r14d,%esi
  lea    D27(%rip),%rdi
  mov    $0x0,%eax
  call   <G_Printf@plt>
  jmp    L51
L50:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D33
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D7
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D17
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D27
type_guessed: string

tool: D33: *BUILTIN* 

tool: D7: layouts/%s

tool: D17: .dat

tool: D27: ^3WARNING: layout list was truncated to %d layouts, but %d layout files exist in layouts/%s/.


assistant: ```c
int G_LayoutList(const char *map, char *list, int len) {
  char fileList[(256 / 2) * 5] = {""};
  char layouts[256] = {""};
  int numFiles, i, fileLen = 0, listLen;
  int count = 0;
  char *filePtr;
  Q_strcat(layouts, sizeof(layouts), "*BUILTIN* ");
  numFiles = trap_FS_GetFileList(va("layouts/%s", map), ".dat", fileList, sizeof(fileList));
  filePtr = fileList;
  for (i = 0; i < numFiles; i++, filePtr += fileLen + 1) {
    fileLen = strlen(filePtr);
    listLen = strlen(layouts);
    if (fileLen < 5)
      continue;
    if ((listLen + fileLen) >= sizeof(layouts))
      break;
    Q_strcat(layouts, sizeof(layouts), filePtr);
    listLen = strlen(layouts);
    layouts[listLen - 4] = ' ';
    layouts[listLen - 3] = '\0';
    count++;
  }
  if (count != numFiles) {
    G_Printf("^3"
             "WARNING: layout list was truncated to %d "
             "layouts, but %d layout files exist in layouts/%s/.\n",
             count, numFiles, map);
  }
  Q_strncpyz(list, layouts, len);
  return count + 1;
}
```