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

```asm
<save_makefile_install_scripts>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x218,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x1208(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  lea    D205(%rip),%rdi
  call   <get_setting@plt>
  lea    0x200(%rsp),%r12
  mov    %r12,%rsi
  lea    D157(%rip),%rdi
  call   <get_setting@plt>
  lea    0x400(%rsp),%rsi
  lea    D105(%rip),%rdi
  call   <get_setting@plt>
  lea    0xa00(%rsp),%rsi
  lea    D67(%rip),%rdi
  call   <get_setting@plt>
  lea    0xc00(%rsp),%rsi
  lea    D52(%rip),%rdi
  call   <get_setting@plt>
  mov    %r12,%rdi
  call   <is_library@plt>
  test   %rax,%rax
  je     L167
L124:
  mov    0x1208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L128
  add    $0x1218,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L167:
  lea    0x400(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L124
  mov    %rsp,%rdi
  call   <is_script_language@plt>
  test   %rax,%rax
  je     L124
  lea    D246(%rip),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  lea    D34(%rip),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  lea    0xa00(%rsp),%rcx
  lea    0x600(%rsp),%r12
  lea    D226(%rip),%rdx
  lea    D158(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  lea    0x800(%rsp),%r13
  movabs $0x4944545345447b24,%rax
  movabs $0x464552507b247d52,%rdx
  mov    %rax,0x800(%rsp)
  mov    %rdx,0x808(%rsp)
  movabs $0x2f6e69622f7d5849,%rax
  mov    %rax,0x810(%rsp)
  movl   $0x50417b24,0x818(%rsp)
  movw   $0x7d50,0x81c(%rsp)
  movb   $0x0,0x81e(%rsp)
  mov    %r13,%rdx
  lea    D164(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  mov    %r13,%rdx
  lea    D216(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  mov    %r13,%rdx
  lea    D56(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  mov    %r13,%rdx
  lea    D207(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  mov    %r13,%rdx
  lea    D173(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  mov    %r13,%rdx
  lea    D121(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  mov    %rsp,%rdi
  call   <is_script_language@plt>
  test   %rax,%rax
  jne    L15
L8:
  mov    %rsp,%rdi
  lea    D213(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L176
L27:
  lea    0x800(%rsp),%rdx
  lea    0x600(%rsp),%r12
  lea    D84(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  jmp    L124
L15:
  movb   $0x0,0xe00(%rsp)
  mov    %rsp,%rdi
  lea    D213(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L109
L113:
  mov    %rsp,%rdi
  lea    D50(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L97
L165:
  lea    0xe00(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L8
  lea    0xc00(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L95
  lea    0xe00(%rsp),%rcx
  lea    0xc00(%rsp),%rdx
  lea    0x600(%rsp),%rdi
  lea    0x800(%rsp),%r9
  lea    0x400(%rsp),%r8
  lea    D172(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L78:
  lea    0x600(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  jmp    L8
L109:
  movl   $0x6c726570,0xe00(%rsp)
  movb   $0x0,0xe04(%rsp)
  jmp    L113
L97:
  lea    0x1000(%rsp),%r12
  mov    %r12,%rsi
  lea    D186(%rip),%rdi
  call   <get_setting@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L51
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    $0x1,%eax
  je     L129
  lea    0x1000(%rsp),%rsi
  lea    0xe00(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L165
L129:
  mov    %r12,%rdx
  lea    0xe00(%rsp),%rdi
  lea    D13(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L165
L51:
  movl   $0x68747970,0xe00(%rsp)
  movw   $0x6e6f,0xe04(%rsp)
  movb   $0x0,0xe06(%rsp)
  jmp    L165
L95:
  lea    0x400(%rsp),%rcx
  lea    0xe00(%rsp),%rdx
  lea    0x600(%rsp),%rdi
  lea    0x800(%rsp),%r8
  lea    D61(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L78
L176:
  lea    0xc00(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L219
  lea    0x400(%rsp),%rcx
  lea    0xc00(%rsp),%rdx
  lea    0x600(%rsp),%rdi
  lea    0x800(%rsp),%r8
  lea    D106(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L107:
  lea    0x600(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <add_makefile_entry_to_file@plt>
  jmp    L27
L219:
  lea    0x800(%rsp),%rcx
  lea    0x400(%rsp),%rdx
  lea    0x600(%rsp),%rdi
  lea    D86(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L107
L128:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D205
data_type: string
name: extract_symbolic_data
arguments: tag: D157
data_type: string
name: extract_symbolic_data
arguments: tag: D105
data_type: string
name: extract_symbolic_data
arguments: tag: D67
data_type: string
name: extract_symbolic_data
arguments: tag: D52
data_type: string
name: extract_symbolic_data
arguments: tag: D246
data_type: string
name: extract_symbolic_data
arguments: tag: D34
data_type: string
name: extract_symbolic_data
arguments: tag: D226
data_type: string
name: extract_symbolic_data
arguments: tag: D158
data_type: string
name: extract_symbolic_data
arguments: tag: D164
data_type: string
name: extract_symbolic_data
arguments: tag: D216
data_type: string
name: extract_symbolic_data
arguments: tag: D56
data_type: string
name: extract_symbolic_data
arguments: tag: D207
data_type: string
name: extract_symbolic_data
arguments: tag: D173
data_type: string
name: extract_symbolic_data
arguments: tag: D121
data_type: string
name: extract_symbolic_data
arguments: tag: D213
data_type: string
name: extract_symbolic_data
arguments: tag: D84
data_type: string
name: extract_symbolic_data
arguments: tag: D50
data_type: string
name: extract_symbolic_data
arguments: tag: D172
data_type: string
name: extract_symbolic_data
arguments: tag: D186
data_type: string
name: extract_symbolic_data
arguments: tag: D13
data_type: string
name: extract_symbolic_data
arguments: tag: D61
data_type: string
name: extract_symbolic_data
arguments: tag: D106
data_type: string
name: extract_symbolic_data
arguments: tag: D86
data_type: string

tool: D205: project type

tool: D157: project name

tool: D105: main script

tool: D67: source dir

tool: D52: library path

tool: D246: mkdir -m 755 -p ${DESTDIR}${PREFIX}/share

tool: D34: mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP}

tool: D226: cp

tool: D158: %s -rf %s/* ${DESTDIR}${PREFIX}/share/${APP}

tool: D164: echo '#!/bin/sh' > %s

tool: D216: echo 'if [ -d ${DESTDIR}${PREFIX}/share/${APP} ]; then' >> %s

tool: D56: echo '  cd ${DESTDIR}${PREFIX}/share/${APP}' >> %s

tool: D207: echo 'else' >> %s

tool: D173: echo '  cd /usr/share/${APP}' >> %s

tool: D121: echo 'fi' >> %s

tool: D213: pl

tool: D84: chmod +x %s

tool: D50: py

tool: D172: echo 'LD_LIBRARY_PATH="%s" exec %s %s' >> %s

tool: D186: python version

tool: D13: python%s

tool: D61: echo 'exec %s %s' >> %s

tool: D106: echo 'LD_LIBRARY_PATH="%s" exec perl %s' >> %s

tool: D86: echo 'exec perl %s' >> %s

assistant: ```c
void save_makefile_install_scripts(char *filename, char *section) {
  char project_type[512];
  char project_name[512];
  char mainscript[512];
  char str[512];
  char runscript[512];
  char sourcedir[512];
  char library_path[512];
  char progname[512];
  char python_version[512];
  get_setting("project type", project_type);
  get_setting("project name", project_name);
  get_setting("main script", mainscript);
  get_setting("source dir", sourcedir);
  get_setting("library path", library_path);
  if (is_library(project_name) != 0)
    return;
  if (strlen(mainscript) == 0)
    return;
  if (is_script_language(project_type) == 0)
    return;
  add_makefile_entry_to_file(filename, section, "mkdir -m 755 -p ${DESTDIR}${PREFIX}/share");
  add_makefile_entry_to_file(filename, section, "mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP}");
  sprintf(str, "%s -rf %s/* ${DESTDIR}${PREFIX}/share/${APP}", "cp", sourcedir);
  add_makefile_entry_to_file(filename, section, str);
  sprintf(runscript, "${DESTDIR}${PREFIX}/bin/${APP}");
  sprintf(str, "echo '#!/bin/sh' > %s", runscript);
  add_makefile_entry_to_file(filename, section, str);
  sprintf(str, "echo 'if [ -d ${DESTDIR}${PREFIX}/share/${APP} ]; then' >> %s", runscript);
  add_makefile_entry_to_file(filename, section, str);
  sprintf(str, "echo '  cd ${DESTDIR}${PREFIX}/share/${APP}' >> %s", runscript);
  add_makefile_entry_to_file(filename, section, str);
  sprintf(str, "echo 'else' >> %s", runscript);
  add_makefile_entry_to_file(filename, section, str);
  sprintf(str, "echo '  cd /usr/share/${APP}' >> %s", runscript);
  add_makefile_entry_to_file(filename, section, str);
  sprintf(str, "echo 'fi' >> %s", runscript);
  add_makefile_entry_to_file(filename, section, str);
  if (is_script_language(project_type) != 0) {
    sprintf(progname, "%s", "");
    if (strcmp(project_type, "pl") == 0) {
      sprintf(progname, "%s", "perl");
    }
    if (strcmp(project_type, "py") == 0) {
      get_setting("python version", python_version);
      if (strlen(python_version) > 0) {
        if (strlen(python_version) == 1) {
          sprintf(progname, "python%s", python_version);
        } else {
          sprintf(progname, "%s", python_version);
        }
      } else {
        sprintf(progname, "%s", "python");
      }
    }
    if (strlen(progname) > 0) {
      if (strlen(library_path) > 0) {
        sprintf(str,
                "echo 'LD_LIBRARY_PATH=\"%s\" "
                "exec %s %s' >> %s",
                library_path, progname, mainscript, runscript);
      } else {
        sprintf(str, "echo 'exec %s %s' >> %s", progname, mainscript, runscript);
      }
      add_makefile_entry_to_file(filename, section, str);
    }
  }
  if (strcmp(project_type, "pl") == 0) {
    if (strlen(library_path) > 0) {
      sprintf(str,
              "echo 'LD_LIBRARY_PATH=\"%s\" "
              "exec perl %s' >> %s",
              library_path, mainscript, runscript);
    } else {
      sprintf(str, "echo 'exec perl %s' >> %s", mainscript, runscript);
    }
    add_makefile_entry_to_file(filename, section, str);
  }
  sprintf(str, "chmod +x %s", runscript);
  add_makefile_entry_to_file(filename, section, str);
}
```