#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*/ sprintf(char *, char *, char *, char *, char *);
char *strdup(char *);
char *folder_sys_string(char *where) {
  char sys_string[1024];
  sprintf(sys_string, "select.sh '%s' %s \"%s\"",
          "folder,"
          "form,"
          "insert_rows_number,"
          "lookup_email_output_yn,"
          "notepad,"
          "populate_drop_down_process,"
          "post_change_process,"
          "html_help_file_anchor,"
          "post_change_javascript,"
          "sudirhema,"
          "exclude_application_export_yn,"
          "lookup_before_drop_down_yn,"
          "no_initial_capital_yn,"
          "index_directory,"
          "data_directory,"
          "create_view_statement,"
          "appaserver_yn",
          "folder", where);
  return strdup(sys_string);
}


x86 assembly (clang, -O0):
<folder_sys_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%r8
lea    0xebf(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xffe(%rip),%rcx
call   1030 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<folder_sys_string>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%r8
lea    0xece(%rip),%rsi
lea    0xede(%rip),%rdx
lea    0x100d(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"select.sh '%s' %s \22%s\22\00"
@.str.1 = [310 x i8] c"folder,form,insert_rows_number,lookup_email_output_yn,notepad,populate_drop_down_process,post_change_process,html_help_file_anchor,post_change_javascript,sudirhema,exclude_application_export_yn,lookup_before_drop_down_yn,no_initial_capital_yn,index_directory,data_directory,create_view_statement,appaserver_yn\00"
@.str.2 = [7 x i8] c"folder\00"
define i8* @folder_sys_string(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([310 x i8], [310 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i8* @strdup(i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [23 x i8] c"select.sh '%s' %s \22%s\22\00"
@.str.1 = [310 x i8] c"folder,form,insert_rows_number,lookup_email_output_yn,notepad,populate_drop_down_process,post_change_process,html_help_file_anchor,post_change_javascript,sudirhema,exclude_application_export_yn,lookup_before_drop_down_yn,no_initial_capital_yn,index_directory,data_directory,create_view_statement,appaserver_yn\00"
@.str.2 = [7 x i8] c"folder\00"
define noalias i8* @folder_sys_string(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([310 x i8], [310 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = call i8* @strdup(i8* %3)
ret i8* %5
}