#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ add_makefile_entry_to_file(char *, char *, char *);
int /*<<< orphan*/ get_setting(char *, char *);
scalar_t__ is_library(char *);
scalar_t__ is_script_language(char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
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);
}


x86 assembly (clang, -O0):
<save_makefile_install_scripts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rsi
lea    0xe6f(%rip),%rdi
call   1060 <get_setting@plt>
lea    -0x410(%rbp),%rsi
lea    0xe69(%rip),%rdi
call   1060 <get_setting@plt>
lea    -0x610(%rbp),%rsi
lea    0xe63(%rip),%rdi
call   1060 <get_setting@plt>
lea    -0xc10(%rbp),%rsi
lea    0xe5c(%rip),%rdi
call   1060 <get_setting@plt>
lea    -0xe10(%rbp),%rsi
lea    0xe54(%rip),%rdi
call   1060 <get_setting@plt>
lea    -0x410(%rbp),%rdi
call   1070 <is_library@plt>
cmp    $0x0,%rax
je     11fd <save_makefile_install_scripts+0x8d>
jmp    1659 <save_makefile_install_scripts+0x4e9>
lea    -0x610(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jne    1217 <save_makefile_install_scripts+0xa7>
jmp    1659 <save_makefile_install_scripts+0x4e9>
lea    -0x210(%rbp),%rdi
call   1040 <is_script_language@plt>
cmp    $0x0,%rax
jne    1232 <save_makefile_install_scripts+0xc2>
jmp    1659 <save_makefile_install_scripts+0x4e9>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xdfd(%rip),%rdx
call   1090 <add_makefile_entry_to_file@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe13(%rip),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x810(%rbp),%rdi
lea    -0xc10(%rbp),%rcx
lea    0xe2a(%rip),%rsi
lea    0xe50(%rip),%rdx
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0xa10(%rbp),%rdi
lea    0xe2a(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x810(%rbp),%rdi
lea    -0xa10(%rbp),%rdx
lea    0xe2d(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x810(%rbp),%rdi
lea    -0xa10(%rbp),%rdx
lea    0xe13(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x810(%rbp),%rdi
lea    -0xa10(%rbp),%rdx
lea    0xe21(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x810(%rbp),%rdi
lea    -0xa10(%rbp),%rdx
lea    0xe24(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x810(%rbp),%rdi
lea    -0xa10(%rbp),%rdx
lea    0xe06(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x810(%rbp),%rdi
lea    -0xa10(%rbp),%rdx
lea    0xdfa(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x210(%rbp),%rdi
call   1040 <is_script_language@plt>
cmp    $0x0,%rax
je     1591 <save_makefile_install_scripts+0x421>
lea    -0x1010(%rbp),%rdi
lea    0xd11(%rip),%rsi
lea    0xc28(%rip),%rdx
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x210(%rbp),%rdi
lea    0xdaf(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1431 <save_makefile_install_scripts+0x2c1>
lea    -0x1010(%rbp),%rdi
lea    0xcd8(%rip),%rsi
lea    0xd8e(%rip),%rdx
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x210(%rbp),%rdi
lea    0xd7e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    14ee <save_makefile_install_scripts+0x37e>
lea    -0x1210(%rbp),%rsi
lea    0xd64(%rip),%rdi
call   1060 <get_setting@plt>
lea    -0x1210(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jle    14cd <save_makefile_install_scripts+0x35d>
lea    -0x1210(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jne    14ac <save_makefile_install_scripts+0x33c>
lea    -0x1010(%rbp),%rdi
lea    -0x1210(%rbp),%rdx
lea    0xd2f(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
jmp    14c8 <save_makefile_install_scripts+0x358>
lea    -0x1010(%rbp),%rdi
lea    -0x1210(%rbp),%rdx
lea    0xc3a(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
jmp    14e9 <save_makefile_install_scripts+0x379>
lea    -0x1010(%rbp),%rdi
lea    0xc20(%rip),%rsi
lea    0xcf6(%rip),%rdx
mov    $0x0,%al
call   1080 <sprintf@plt>
jmp    14ee <save_makefile_install_scripts+0x37e>
lea    -0x1010(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jle    158c <save_makefile_install_scripts+0x41c>
lea    -0xe10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jle    154e <save_makefile_install_scripts+0x3de>
lea    -0x810(%rbp),%rdi
lea    -0xe10(%rbp),%rdx
lea    -0x1010(%rbp),%rcx
lea    -0x610(%rbp),%r8
lea    -0xa10(%rbp),%r9
lea    0xc9d(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
jmp    1578 <save_makefile_install_scripts+0x408>
lea    -0x810(%rbp),%rdi
lea    -0x1010(%rbp),%rdx
lea    -0x610(%rbp),%rcx
lea    -0xa10(%rbp),%r8
lea    0xc9b(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
jmp    1591 <save_makefile_install_scripts+0x421>
lea    -0x210(%rbp),%rdi
lea    0xc16(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1629 <save_makefile_install_scripts+0x4b9>
lea    -0xe10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jle    15f2 <save_makefile_install_scripts+0x482>
lea    -0x810(%rbp),%rdi
lea    -0xe10(%rbp),%rdx
lea    -0x610(%rbp),%rcx
lea    -0xa10(%rbp),%r8
lea    0xc3e(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
jmp    1615 <save_makefile_install_scripts+0x4a5>
lea    -0x810(%rbp),%rdi
lea    -0x610(%rbp),%rdx
lea    -0xa10(%rbp),%rcx
lea    0xc45(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
lea    -0x810(%rbp),%rdi
lea    -0xa10(%rbp),%rdx
lea    0xc2f(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%rdx
call   1090 <add_makefile_entry_to_file@plt>
add    $0x1210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_makefile_install_scripts>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1208,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xe65(%rip),%rdi
lea    0x800(%rsp),%rsi
call   1070 <get_setting@plt>
lea    0xe5e(%rip),%rdi
lea    0x1000(%rsp),%rbx
mov    %rbx,%rsi
call   1070 <get_setting@plt>
lea    0xe54(%rip),%rdi
lea    0x600(%rsp),%rsi
call   1070 <get_setting@plt>
lea    0xe4c(%rip),%rdi
lea    0xe00(%rsp),%rsi
call   1070 <get_setting@plt>
lea    0xe43(%rip),%rdi
lea    0xa00(%rsp),%rsi
call   1070 <get_setting@plt>
mov    %rbx,%rdi
call   1080 <is_library@plt>
test   %rax,%rax
je     1217 <save_makefile_install_scripts+0x97>
add    $0x1208,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0x600(%rsp),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
je     1208 <save_makefile_install_scripts+0x88>
lea    0x800(%rsp),%rdi
call   1050 <is_script_language@plt>
test   %rax,%rax
je     1208 <save_makefile_install_scripts+0x88>
lea    0xdfd(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xe15(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xe34(%rip),%rsi
lea    0xe5a(%rip),%rdx
lea    0x400(%rsp),%rbx
lea    0xe00(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
movups 0xe2e(%rip),%xmm0
movaps %xmm0,0x200(%rsp)
movups 0xe2e(%rip),%xmm0
movups %xmm0,0x20f(%rsp)
lea    0xe2f(%rip),%rsi
lea    0x200(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xe1b(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xe37(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xe48(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xe38(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xe3a(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
lea    0x800(%rsp),%rdi
call   1050 <is_script_language@plt>
test   %rax,%rax
je     14d0 <save_makefile_install_scripts+0x350>
movb   $0x0,(%rsp)
lea    0xe0e(%rip),%rsi
lea    0x800(%rsp),%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    13c5 <save_makefile_install_scripts+0x245>
movb   $0x0,0x4(%rsp)
movl   $0x6c726570,(%rsp)
lea    0xdf1(%rip),%rsi
lea    0x800(%rsp),%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1439 <save_makefile_install_scripts+0x2b9>
mov    %rsp,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    14d0 <save_makefile_install_scripts+0x350>
lea    0xa00(%rsp),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1494 <save_makefile_install_scripts+0x314>
lea    0xdd5(%rip),%rsi
lea    0x400(%rsp),%rdi
lea    0xa00(%rsp),%rdx
mov    %rsp,%rcx
lea    0x600(%rsp),%r8
lea    0x200(%rsp),%r9
xor    %eax,%eax
call   1090 <sprintf@plt>
jmp    14bd <save_makefile_install_scripts+0x33d>
lea    0xd80(%rip),%rdi
lea    0xc00(%rsp),%rbx
mov    %rbx,%rsi
call   1070 <get_setting@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1597 <save_makefile_install_scripts+0x417>
lea    0xc00(%rsp),%rdi
call   1040 <strlen@plt>
cmp    $0x1,%eax
jne    15ab <save_makefile_install_scripts+0x42b>
lea    0xd52(%rip),%rsi
mov    %rsp,%rdi
lea    0xc00(%rsp),%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
jmp    13de <save_makefile_install_scripts+0x25e>
lea    0xd71(%rip),%rsi
lea    0x400(%rsp),%rdi
mov    %rsp,%rdx
lea    0x600(%rsp),%rcx
lea    0x200(%rsp),%r8
xor    %eax,%eax
call   1090 <sprintf@plt>
lea    0x400(%rsp),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xcde(%rip),%rsi
lea    0x800(%rsp),%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1563 <save_makefile_install_scripts+0x3e3>
lea    0xa00(%rsp),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    152a <save_makefile_install_scripts+0x3aa>
lea    0xd23(%rip),%rsi
lea    0x400(%rsp),%rdi
lea    0xa00(%rsp),%rdx
lea    0x600(%rsp),%rcx
lea    0x200(%rsp),%r8
xor    %eax,%eax
call   1090 <sprintf@plt>
jmp    1550 <save_makefile_install_scripts+0x3d0>
lea    0xd22(%rip),%rsi
lea    0x400(%rsp),%rdi
lea    0x600(%rsp),%rdx
lea    0x200(%rsp),%rcx
xor    %eax,%eax
call   1090 <sprintf@plt>
lea    0x400(%rsp),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   10a0 <add_makefile_entry_to_file@plt>
lea    0xd03(%rip),%rsi
lea    0x400(%rsp),%rbx
lea    0x200(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <add_makefile_entry_to_file@plt>
jmp    1208 <save_makefile_install_scripts+0x88>
movl   $0x6e6f68,0x3(%rsp)
movl   $0x68747970,(%rsp)
jmp    13de <save_makefile_install_scripts+0x25e>
mov    %rsp,%rdi
lea    0xc00(%rsp),%rsi
call   1030 <strcpy@plt>
jmp    13de <save_makefile_install_scripts+0x25e>

LLVM IR (-O0):
@.str = [13 x i8] c"project type\00"
@.str.1 = [13 x i8] c"project name\00"
@.str.2 = [12 x i8] c"main script\00"
@.str.3 = [11 x i8] c"source dir\00"
@.str.4 = [13 x i8] c"library path\00"
@.str.5 = [42 x i8] c"mkdir -m 755 -p ${DESTDIR}${PREFIX}/share\00"
@.str.6 = [49 x i8] c"mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP}\00"
@.str.7 = [45 x i8] c"%s -rf %s/* ${DESTDIR}${PREFIX}/share/${APP}\00"
@.str.8 = [3 x i8] c"cp\00"
@.str.9 = [31 x i8] c"${DESTDIR}${PREFIX}/bin/${APP}\00"
@.str.10 = [22 x i8] c"echo '#!/bin/sh' > %s\00"
@.str.11 = [62 x i8] c"echo 'if [ -d ${DESTDIR}${PREFIX}/share/${APP} ]; then' >> %s\00"
@.str.12 = [51 x i8] c"echo ' cd ${DESTDIR}${PREFIX}/share/${APP}' >> %s\00"
@.str.13 = [18 x i8] c"echo 'else' >> %s\00"
@.str.14 = [36 x i8] c"echo ' cd /usr/share/${APP}' >> %s\00"
@.str.15 = [16 x i8] c"echo 'fi' >> %s\00"
@.str.16 = [3 x i8] c"%s\00"
@.str.17 = [1 x i8] zeroinitializer
@.str.18 = [3 x i8] c"pl\00"
@.str.19 = [5 x i8] c"perl\00"
@.str.20 = [3 x i8] c"py\00"
@.str.21 = [15 x i8] c"python version\00"
@.str.22 = [9 x i8] c"python%s\00"
@.str.23 = [7 x i8] c"python\00"
@.str.24 = [45 x i8] c"echo 'LD_LIBRARY_PATH=\22%s\22 exec %s %s' >> %s\00"
@.str.25 = [24 x i8] c"echo 'exec %s %s' >> %s\00"
@.str.26 = [47 x i8] c"echo 'LD_LIBRARY_PATH=\22%s\22 exec perl %s' >> %s\00"
@.str.27 = [26 x i8] c"echo 'exec perl %s' >> %s\00"
@.str.28 = [12 x i8] c"chmod +x %s\00"
define void @save_makefile_install_scripts(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = alloca [512 x i8]
%11 = alloca [512 x i8]
%12 = alloca [512 x i8]
%13 = alloca [512 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%15 = call i32 @get_setting(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%17 = call i32 @get_setting(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%19 = call i32 @get_setting(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%21 = call i32 @get_setting(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%23 = call i32 @get_setting(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %22)
%24 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%25 = call i64 @is_library(i8* %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %2
br label %194
28: ; preds = %2
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%30 = call i32 @strlen(i8* %29)
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %28
br label %194
33: ; preds = %28
%34 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%35 = call i64 @is_script_language(i8* %34)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %33
br label %194
38: ; preds = %33
%39 = load i8*, i8** %3
%40 = load i8*, i8** %4
%41 = call i32 @add_makefile_entry_to_file(i8* %39, i8* %40, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
%42 = load i8*, i8** %3
%43 = load i8*, i8** %4
%44 = call i32 @add_makefile_entry_to_file(i8* %42, i8* %43, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%45 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%46 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%47 = call i32 (i8*, i8*, ...) @sprintf(i8* %45, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %46)
%48 = load i8*, i8** %3
%49 = load i8*, i8** %4
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%51 = call i32 @add_makefile_entry_to_file(i8* %48, i8* %49, i8* %50)
%52 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%53 = call i32 (i8*, i8*, ...) @sprintf(i8* %52, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0))
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%55 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%56 = call i32 (i8*, i8*, ...) @sprintf(i8* %54, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* %55)
%57 = load i8*, i8** %3
%58 = load i8*, i8** %4
%59 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%60 = call i32 @add_makefile_entry_to_file(i8* %57, i8* %58, i8* %59)
%61 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%62 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%63 = call i32 (i8*, i8*, ...) @sprintf(i8* %61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0), i8* %62)
%64 = load i8*, i8** %3
%65 = load i8*, i8** %4
%66 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%67 = call i32 @add_makefile_entry_to_file(i8* %64, i8* %65, i8* %66)
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%69 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%70 = call i32 (i8*, i8*, ...) @sprintf(i8* %68, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0), i8* %69)
%71 = load i8*, i8** %3
%72 = load i8*, i8** %4
%73 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%74 = call i32 @add_makefile_entry_to_file(i8* %71, i8* %72, i8* %73)
%75 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%76 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%77 = call i32 (i8*, i8*, ...) @sprintf(i8* %75, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i8* %76)
%78 = load i8*, i8** %3
%79 = load i8*, i8** %4
%80 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%81 = call i32 @add_makefile_entry_to_file(i8* %78, i8* %79, i8* %80)
%82 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%83 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%84 = call i32 (i8*, i8*, ...) @sprintf(i8* %82, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0), i8* %83)
%85 = load i8*, i8** %3
%86 = load i8*, i8** %4
%87 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%88 = call i32 @add_makefile_entry_to_file(i8* %85, i8* %86, i8* %87)
%89 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%90 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%91 = call i32 (i8*, i8*, ...) @sprintf(i8* %89, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8* %90)
%92 = load i8*, i8** %3
%93 = load i8*, i8** %4
%94 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%95 = call i32 @add_makefile_entry_to_file(i8* %92, i8* %93, i8* %94)
%96 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%97 = call i64 @is_script_language(i8* %96)
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %162
99: ; preds = %38
%100 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%101 = call i32 (i8*, i8*, ...) @sprintf(i8* %100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%102 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%103 = call i64 @strcmp(i8* %102, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%104 = icmp eq i64 %103, 0
br i1 %104, label %105, label %108
105: ; preds = %99
%106 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%107 = call i32 (i8*, i8*, ...) @sprintf(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
br label %108
108: ; preds = %105, %99
%109 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%110 = call i64 @strcmp(i8* %109, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %135
112: ; preds = %108
%113 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%114 = call i32 @get_setting(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i64 0, i64 0), i8* %113)
%115 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%116 = call i32 @strlen(i8* %115)
%117 = icmp sgt i32 %116, 0
br i1 %117, label %118, label %131
118: ; preds = %112
%119 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%120 = call i32 @strlen(i8* %119)
%121 = icmp eq i32 %120, 1
br i1 %121, label %122, label %126
122: ; preds = %118
%123 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%124 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%125 = call i32 (i8*, i8*, ...) @sprintf(i8* %123, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i64 0, i64 0), i8* %124)
br label %130
126: ; preds = %118
%127 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%128 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%129 = call i32 (i8*, i8*, ...) @sprintf(i8* %127, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %128)
br label %130
130: ; preds = %126, %122
br label %134
131: ; preds = %112
%132 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%133 = call i32 (i8*, i8*, ...) @sprintf(i8* %132, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %134
134: ; preds = %131, %130
br label %135
135: ; preds = %134, %108
%136 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%137 = call i32 @strlen(i8* %136)
%138 = icmp sgt i32 %137, 0
br i1 %138, label %139, label %161
139: ; preds = %135
%140 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%141 = call i32 @strlen(i8* %140)
%142 = icmp sgt i32 %141, 0
br i1 %142, label %143, label %150
143: ; preds = %139
%144 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%145 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%146 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%147 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%148 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%149 = call i32 (i8*, i8*, ...) @sprintf(i8* %144, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.24, i64 0, i64 0), i8* %145, i8* %146, i8* %147, i8* %148)
br label %156
150: ; preds = %139
%151 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%153 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%154 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%155 = call i32 (i8*, i8*, ...) @sprintf(i8* %151, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.25, i64 0, i64 0), i8* %152, i8* %153, i8* %154)
br label %156
156: ; preds = %150, %143
%157 = load i8*, i8** %3
%158 = load i8*, i8** %4
%159 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%160 = call i32 @add_makefile_entry_to_file(i8* %157, i8* %158, i8* %159)
br label %161
161: ; preds = %156, %135
br label %162
162: ; preds = %161, %38
%163 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%164 = call i64 @strcmp(i8* %163, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%165 = icmp eq i64 %164, 0
br i1 %165, label %166, label %186
166: ; preds = %162
%167 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%168 = call i32 @strlen(i8* %167)
%169 = icmp sgt i32 %168, 0
br i1 %169, label %170, label %176
170: ; preds = %166
%171 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%172 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%173 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%174 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%175 = call i32 (i8*, i8*, ...) @sprintf(i8* %171, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.26, i64 0, i64 0), i8* %172, i8* %173, i8* %174)
br label %181
176: ; preds = %166
%177 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%178 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%179 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%180 = call i32 (i8*, i8*, ...) @sprintf(i8* %177, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0), i8* %178, i8* %179)
br label %181
181: ; preds = %176, %170
%182 = load i8*, i8** %3
%183 = load i8*, i8** %4
%184 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%185 = call i32 @add_makefile_entry_to_file(i8* %182, i8* %183, i8* %184)
br label %186
186: ; preds = %181, %162
%187 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%188 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%189 = call i32 (i8*, i8*, ...) @sprintf(i8* %187, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i8* %188)
%190 = load i8*, i8** %3
%191 = load i8*, i8** %4
%192 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%193 = call i32 @add_makefile_entry_to_file(i8* %190, i8* %191, i8* %192)
br label %194
194: ; preds = %186, %37, %32, %27
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"project type\00"
@.str.1 = [13 x i8] c"project name\00"
@.str.2 = [12 x i8] c"main script\00"
@.str.3 = [11 x i8] c"source dir\00"
@.str.4 = [13 x i8] c"library path\00"
@.str.5 = [42 x i8] c"mkdir -m 755 -p ${DESTDIR}${PREFIX}/share\00"
@.str.6 = [49 x i8] c"mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP}\00"
@.str.7 = [45 x i8] c"%s -rf %s/* ${DESTDIR}${PREFIX}/share/${APP}\00"
@.str.8 = [3 x i8] c"cp\00"
@.str.9 = [31 x i8] c"${DESTDIR}${PREFIX}/bin/${APP}\00"
@.str.10 = [22 x i8] c"echo '#!/bin/sh' > %s\00"
@.str.11 = [62 x i8] c"echo 'if [ -d ${DESTDIR}${PREFIX}/share/${APP} ]; then' >> %s\00"
@.str.12 = [51 x i8] c"echo ' cd ${DESTDIR}${PREFIX}/share/${APP}' >> %s\00"
@.str.13 = [18 x i8] c"echo 'else' >> %s\00"
@.str.14 = [36 x i8] c"echo ' cd /usr/share/${APP}' >> %s\00"
@.str.15 = [16 x i8] c"echo 'fi' >> %s\00"
@.str.18 = [3 x i8] c"pl\00"
@.str.19 = [5 x i8] c"perl\00"
@.str.20 = [3 x i8] c"py\00"
@.str.21 = [15 x i8] c"python version\00"
@.str.22 = [9 x i8] c"python%s\00"
@.str.23 = [7 x i8] c"python\00"
@.str.24 = [45 x i8] c"echo 'LD_LIBRARY_PATH=\22%s\22 exec %s %s' >> %s\00"
@.str.25 = [24 x i8] c"echo 'exec %s %s' >> %s\00"
@.str.26 = [47 x i8] c"echo 'LD_LIBRARY_PATH=\22%s\22 exec perl %s' >> %s\00"
@.str.27 = [26 x i8] c"echo 'exec perl %s' >> %s\00"
@.str.28 = [12 x i8] c"chmod +x %s\00"
define void @save_makefile_install_scripts(i8* %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = alloca [512 x i8]
%11 = alloca [512 x i8]
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%21 = call i32 @get_setting(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %12)
%22 = call i32 @get_setting(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%23 = call i32 @get_setting(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %14)
%24 = call i32 @get_setting(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%25 = call i32 @get_setting(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %18)
%26 = call i64 @is_library(i8* %13)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %99
28: ; preds = %2
%29 = call i32 @strlen(i8* %14)
%30 = icmp eq i32 %29, 0
br i1 %30, label %99, label %31
31: ; preds = %28
%32 = call i64 @is_script_language(i8* %12)
%33 = icmp eq i64 %32, 0
br i1 %33, label %99, label %34
34: ; preds = %31
%35 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
%36 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%37 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %17)
%38 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
%39 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* %16)
%40 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
%41 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0), i8* %16)
%42 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
%43 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0), i8* %16)
%44 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
%45 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i8* %16)
%46 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
%47 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0), i8* %16)
%48 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
%49 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8* %16)
%50 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
%51 = call i64 @is_script_language(i8* %12)
%52 = icmp eq i64 %51, 0
br i1 %52, label %84, label %53
53: ; preds = %34
store i8 0, i8* %19
%54 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %53
br label %57
57: ; preds = %56, %53
%58 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %72
60: ; preds = %57
%61 = call i32 @get_setting(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i64 0, i64 0), i8* %20)
%62 = call i32 @strlen(i8* %20)
%63 = icmp sgt i32 %62, 0
br i1 %63, label %64, label %71
64: ; preds = %60
%65 = call i32 @strlen(i8* %20)
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %69
67: ; preds = %64
%68 = call i32 (i8*, i8*, ...) @sprintf(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i64 0, i64 0), i8* %20)
br label %72
69: ; preds = %64
%70 = call i8* @strcpy(i8* %19, i8* %20)
br label %72
71: ; preds = %60
br label %72
72: ; preds = %71, %69, %67, %57
%73 = call i32 @strlen(i8* %19)
%74 = icmp sgt i32 %73, 0
br i1 %74, label %75, label %84
75: ; preds = %72
%76 = call i32 @strlen(i8* %18)
%77 = icmp sgt i32 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %75
%79 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.24, i64 0, i64 0), i8* %18, i8* %19, i8* %14, i8* %16)
br label %82
80: ; preds = %75
%81 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.25, i64 0, i64 0), i8* %19, i8* %14, i8* %16)
br label %82
82: ; preds = %80, %78
%83 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
br label %84
84: ; preds = %72, %82, %34
%85 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %96
87: ; preds = %84
%88 = call i32 @strlen(i8* %18)
%89 = icmp sgt i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.26, i64 0, i64 0), i8* %18, i8* %14, i8* %16)
br label %94
92: ; preds = %87
%93 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0), i8* %14, i8* %16)
br label %94
94: ; preds = %92, %90
%95 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
br label %96
96: ; preds = %94, %84
%97 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i8* %16)
%98 = call i32 @add_makefile_entry_to_file(i8* %0, i8* %1, i8* %15)
br label %99
99: ; preds = %31, %28, %2, %96
ret void
}