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

```asm
<construct_include_directive_marker>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  mov    -0x4(%rbp),%eax
  add    $0x12,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x28(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x15(%rbp)
  jmp    L72
L71:
  cmpl   $0x0,-0xc(%rbp)
  je     L105
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rax,%rdx
  movzbl -0x15(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L142
L105:
  movsbl -0x15(%rbp),%eax
  cmp    $0x5c,%eax
  je     L52
  cmp    $0x5c,%eax
  jg     L126
  cmp    $0x40,%eax
  je     L157
  cmp    $0x40,%eax
  jg     L126
  cmp    $0x25,%eax
  je     L69
  cmp    $0x3f,%eax
  je     L69
  jmp    L126
L52:
  movl   $0x1,-0xc(%rbp)
  jmp    L142
L157:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  movb   $0x20,(%rax)
  addl   $0x1,-0x10(%rbp)
  jmp    L142
L69:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  movb   $0x25,(%rax)
  addl   $0x1,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  movb   $0x73,(%rax)
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0x8(%rbp)
  cmpl   $0x3,-0x8(%rbp)
  jle    L57
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <bug@plt>
  jmp    L57
L126:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rax,%rdx
  movzbl -0x15(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x10(%rbp)
  jmp    L142
L57:
  nop
L142:
  addl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x15(%rbp)
L72:
  cmpb   $0x0,-0x15(%rbp)
  je     L85
  mov    -0x14(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L71
L85:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  movb   $0xa,(%rax)
  addl   $0x1,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  movb   $0x0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D6
type: 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';
}
```