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

```asm
<generate_filename>:
  endbr64
  push   %r15
  lea    D23(%rip),%r10
  mov    %edx,%r15d
  lea    D71(%rip),%r11
  push   %r14
  lea    -0x1(%rdi),%rdx
  mov    %ecx,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  lea    0xffa(%rsi),%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rdi
  lea    -0x1(%rsi),%rax
  jmp    L44
  nop
L227:
  cmp    %rax,%rbp
  jbe    L174
  cmp    $0x25,%cl
  je     L292
L44:
  mov    %rdx,%r12
  movzbl 0x1(%rdx),%ecx
  mov    %rax,%rbx
  add    $0x1,%rdx
  add    $0x1,%rax
  mov    %cl,(%rax)
  test   %cl,%cl
  jne    L227
L174:
  movb   $0x0,(%rax)
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  add    $0x38,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L292:
  movzbl 0x1(%rdx),%ecx
  cmp    $0x65,%cl
  je     L178
  jg     L190
  cmp    $0x25,%cl
  je     L115
  cmp    $0x63,%cl
  jne    L277
  test   %r8d,%r8d
  jne    L181
  cs nopw 0x0(%rax,%rax,1)
L115:
  lea    0x2(%r12),%rdx
  mov    %rbx,%rax
  jmp    L44
  nopw   0x0(%rax,%rax,1)
L190:
  cmp    $0x78,%cl
  je     L38
  cmp    $0x79,%cl
  jne    L277
  test   %r8d,%r8d
  je     L115
  mov    %r14d,%edx
  mov    %r10,%rsi
  xor    %eax,%eax
  mov    %r9,0x18(%rsp)
  mov    %r8d,0x14(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <sprintf@plt>
  mov    0x14(%rsp),%r8d
  mov    0x18(%rsp),%r9
  lea    0x1f(%rsp),%rdx
  mov    0x8(%rsp),%rdi
  lea    D71(%rip),%r11
  lea    D23(%rip),%r10
  jmp    L293
L76:
  cmp    %rbx,%rbp
  jbe    L107
L293:
  movzbl 0x1(%rdx),%ecx
  mov    %rbx,%rax
  add    $0x1,%rdx
  add    $0x1,%rbx
  mov    %cl,(%rbx)
  test   %cl,%cl
  jne    L76
L107:
  movzbl 0x2(%r12),%ecx
  lea    0x2(%r12),%rdx
  jmp    L3
  nopw   0x0(%rax,%rax,1)
L38:
  test   %r8d,%r8d
  je     L115
  mov    %r15d,%edx
  mov    %r10,%rsi
  xor    %eax,%eax
  mov    %r9,0x18(%rsp)
  mov    %r8d,0x14(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <sprintf@plt>
  mov    0x14(%rsp),%r8d
  mov    0x18(%rsp),%r9
  lea    0x1f(%rsp),%rdx
  mov    0x8(%rsp),%rdi
  lea    D71(%rip),%r11
  lea    D23(%rip),%r10
  jmp    L180
L194:
  test   %cl,%cl
  je     L107
L180:
  movzbl 0x1(%rdx),%ecx
  mov    %rbx,%rax
  add    $0x1,%rbx
  add    $0x1,%rdx
  mov    %cl,(%rbx)
  cmp    %rbx,%rbp
  ja     L194
  jmp    L107
  nopl   (%rax)
L277:
  movzbl 0x1(%r12),%ecx
L3:
  test   %cl,%cl
  jne    L44
  jmp    L174
L178:
  lea    -0x1(%r9),%rdx
  jmp    L162
  nopl   0x0(%rax)
L144:
  test   %cl,%cl
  je     L202
L162:
  movzbl 0x1(%rdx),%ecx
  mov    %rbx,%rax
  add    $0x1,%rbx
  add    $0x1,%rdx
  mov    %cl,(%rbx)
  cmp    %rbx,%rbp
  ja     L144
L202:
  movzbl 0x2(%r12),%ecx
  lea    0x2(%r12),%rdx
  jmp    L3
L181:
  mov    %r15d,%edx
  mov    %r11,%rsi
  mov    %r14d,%ecx
  xor    %eax,%eax
  mov    %r9,0x18(%rsp)
  mov    %r8d,0x14(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <sprintf@plt>
  mov    0x14(%rsp),%r8d
  mov    0x18(%rsp),%r9
  lea    0x1f(%rsp),%rdx
  mov    0x8(%rsp),%rdi
  lea    D23(%rip),%r10
  lea    D71(%rip),%r11
  jmp    L209
L87:
  cmp    %rbx,%rbp
  jbe    L107
L209:
  movzbl 0x1(%rdx),%ecx
  mov    %rbx,%rax
  add    $0x1,%rdx
  add    $0x1,%rbx
  mov    %cl,(%rbx)
  test   %cl,%cl
  jne    L87
  jmp    L107
L95:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D23
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D71
type_guessed: string

tool: D23: %i

tool: D71: _%i_%i

assistant: ```c
char *generate_filename(const char *template, char *result, int x, int y, int pages, const char *extension) {
  char *a;
  const char *b;
  char *end = result + 4090;
  b = template - 1, a = result - 1;
  while ((*++a = *++b)) {
    if (a >= end)
      break;
    if (*b == '%') {
      switch (b[1]) {
      case 'x':
        a--;
        if (pages) {
          char text[8];
          char *e = text - 1;
          sprintf(text, "%i", x);
          while ((*++a = *++e))
            if (a >= end)
              break;
          a--;
        }
        b++;
        break;
      case 'y':
        a--;
        if (pages) {
          char text[8];
          char *e = text - 1;
          sprintf(text, "%i", y);
          while ((*++a = *++e))
            if (a >= end)
              break;
          a--;
        }
        b++;
        break;
      case 'c':
        a--;
        if (pages) {
          char text[8];
          char *e = text - 1;
          sprintf(text, "_%i_%i", x, y);
          while ((*++a = *++e))
            if (a >= end)
              break;
          a--;
        }
        b++;
        break;
      case 'e':
        a--;
        {
          const char *e = extension - 1;
          while ((*++a = *++e))
            if (a >= end)
              break;
          a--;
        }
        b++;
        break;
      case '%':
        a--;
        b++;
        break;
      }
      if (!*b)
        break;
    }
  }
  *a = 0;
  return result;
}
```