user: 请从给定的汇编指令推导出C源代码:

```asm
<construct_include_directive_marker>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %rsi,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    %eax,%r15d
  lea    0x12(%rax),%edi
  call   <malloc@plt>
  mov    %rax,0x0(%r13)
  movzbl (%r14),%eax
  test   %al,%al
  je     L95
  test   %ebx,%ebx
  jle    L95
  mov    $0x1,%ebx
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  jmp    L14
L149:
  cmp    $0x40,%al
  je     L111
  jg     L4
  cmp    $0x25,%al
  je     L11
  cmp    $0x3f,%al
  jne    L18
L11:
  movslq %ebp,%rax
  mov    0x0(%r13),%rdx
  movb   $0x25,(%rdx,%rax,1)
  lea    0x1(%rbp),%eax
  cltq
  mov    0x0(%r13),%rdx
  movb   $0x73,(%rdx,%rax,1)
  add    $0x2,%ebp
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    $0x3,%eax
  jle    L64
  lea    D6(%rip),%rdi
  call   <bug@plt>
  jmp    L64
L4:
  cmp    $0x5c,%al
  jne    L18
  mov    $0x1,%r12d
L64:
  movzbl (%r14,%rbx,1),%eax
  test   %al,%al
  setne  %cl
  cmp    %ebx,%r15d
  setg   %dl
  add    $0x1,%rbx
  test   %dl,%cl
  je     L52
L14:
  test   %r12d,%r12d
  je     L149
  movslq %ebp,%rdx
  mov    0x0(%r13),%rcx
  mov    %al,(%rcx,%rdx,1)
  add    $0x1,%ebp
  mov    $0x0,%r12d
  jmp    L64
L111:
  movslq %ebp,%rax
  mov    0x0(%r13),%rdx
  movb   $0x20,(%rdx,%rax,1)
  add    $0x1,%ebp
  jmp    L64
L18:
  movslq %ebp,%rdx
  mov    0x0(%r13),%rcx
  mov    %al,(%rcx,%rdx,1)
  add    $0x1,%ebp
  jmp    L64
L95:
  mov    $0x0,%ebp
L52:
  movslq %ebp,%rax
  mov    0x0(%r13),%rdx
  movb   $0xa,(%rdx,%rax,1)
  add    $0x1,%ebp
  movslq %ebp,%rbp
  mov    0x0(%r13),%rax
  movb   $0x0,(%rax,%rbp,1)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D6
type_infered: string

tool: D6: only 3 substitutions allowed in -includemarker

assistant: ```c
void construct_include_directive_marker(char **include_directive_marker, char *includemarker_input) {
  int len = (int)strlen(includemarker_input);
  char ch;
  int in_idx = 0, out_idx = 0;
  int quoted = 0, num_repl = 0;
  *include_directive_marker = malloc(len + 18);
  ch = *includemarker_input;
  while (ch != '\0' && in_idx < len) {
    if (quoted) {
      *(*include_directive_marker + out_idx) = ch;
      out_idx++;
      quoted = 0;
    } else {
      switch (ch) {
      case '\\':
        quoted = 1;
        break;
      case '@':
        *(*include_directive_marker + out_idx) = ' ';
        out_idx++;
        break;
      case '%':
      case '?':
        *(*include_directive_marker + out_idx) = '%';
        out_idx++;
        *(*include_directive_marker + out_idx) = 's';
        out_idx++;
        if (++num_repl > 3)
          bug("only 3 substitutions allowed in -includemarker");
        break;
      default:
        *(*include_directive_marker + out_idx) = ch;
        out_idx++;
      }
    }
    in_idx++;
    ch = *(includemarker_input + in_idx);
  }
  *(*include_directive_marker + out_idx) = '\n';
  out_idx++;
  *(*include_directive_marker + out_idx) = '\0';
}
```