user: 下面的汇编指令对应的C源代码是什么：

```asm
<generate_index>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <listdir@plt>
  mov    %rax,(%rsp)
  test   %rax,%rax
  je     L1
  mov    %rax,%rbp
  mov    (%rax),%rdi
  test   %rdi,%rdi
  je     L70
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0x0,%ebx
L36:
  add    $0x1,%r13d
  add    $0x8,%rbp
  call   <strlen@plt>
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  cltq
  add    %rax,%r12
  mov    0x0(%rbp),%rdi
  test   %rdi,%rdi
  jne    L36
L49:
  lea    0x1e(%rbx),%edi
  imul   %r13d,%edi
  add    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  mov    %rax,0x8(%rsp)
  lea    0xe(%rbx),%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %r14,%r14
  je     L16
  mov    (%rsp),%r12
  mov    (%r12),%rdi
  mov    %r14,%rbp
  lea    D12(%rip),%r15
  lea    D7(%rip),%r14
  test   %rdi,%rdi
  je     L39
L92:
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    (%r12),%rdx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  lea    0xe(%rbx),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  lea    0xd(%rbx),%eax
  cltq
  add    %rax,%rbp
  add    $0x8,%r12
  mov    -0x8(%r12),%rsi
  mov    %ebx,%edx
  mov    %rbp,%rdi
  call   <memcpy@plt>
  movslq %ebx,%rbx
  add    %rbx,%rbp
  mov    $0x9,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  add    $0x9,%rbp
  mov    (%r12),%rdi
  test   %rdi,%rdi
  jne    L92
L20:
  movb   $0x0,0x0(%rbp)
  mov    (%rsp),%rdi
  call   <freedirlist@plt>
  mov    %r13,%rdi
  call   <free@plt>
L11:
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L70:
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0x0,%ebx
  jmp    L49
L39:
  mov    0x8(%rsp),%rbp
  jmp    L20
L16:
  mov    (%rsp),%rdi
  call   <freedirlist@plt>
  jmp    L11
L1:
  mov    (%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L11
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D12
type_infered: string
name: extract_symbolic_data
arguments: data_label: D7
type_infered: string

tool: D12: <a href="/%s"/>

tool: D7: </a><br/>

assistant: ```c
char *generate_index(char *dir) {
  char **dirnames = listdir(dir);
  if (dirnames == NULL) {
    return NULL;
  }
  char **dirnamesp = dirnames;
  char *index;
  char *indexp;
  char *namebuffer;
  int len, maxlen;
  long charcount = 0;
  int dirs = 0;
  maxlen = 0;
  while (*dirnames) {
    ++dirs;
    len = strlen(*dirnames++);
    if (len > maxlen)
      maxlen = len;
    charcount += len;
  }
  index = malloc(sizeof(char) * charcount + (dirs * (30 + maxlen)));
  namebuffer = malloc(sizeof(char) * (14 + maxlen));
  indexp = index;
  if (index == NULL) {
    freedirlist(dirnamesp);
    return NULL;
  }
  dirnames = dirnamesp;
  while (*dirnames) {
    len = strlen(*dirnames);
    sprintf(namebuffer, "<a href=\"/%s\"/>", *dirnames);
    memcpy(index, namebuffer, 14 + len);
    index += (13 + len);
    memcpy(index, *dirnames++, len);
    index += len;
    memcpy(index, "</a><br/>", 9);
    index += 9;
  }
  *index = '\0';
  freedirlist(dirnamesp);
  free(namebuffer);
  return indexp;
}
```