#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 *string_pipe_fetch(char *);
char *process_generic_value_folder_name(char *process_name,
                                        char *process_set_name) {
  char system_string[1024];
  char where[128];
  sprintf(where, "process = '%s' or process_set = '%s'", process_name,
          process_set_name);
  sprintf(system_string, "select.sh value_folder process_generic \"%s\"",
          where);
  return string_pipe_fetch(system_string);
}


x86 assembly (clang, -O0):
<process_generic_value_folder_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x490(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
lea    -0x490(%rbp),%rdx
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <string_pipe_fetch@plt>
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_generic_value_folder_name>:
push   %r14
push   %rbx
sub    $0x488,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xec9(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
lea    0xeda(%rip),%rsi
lea    0x80(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <string_pipe_fetch@plt>
add    $0x488,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [37 x i8] c"process = '%s' or process_set = '%s'\00"
@.str.1 = [44 x i8] c"select.sh value_folder process_generic \22%s\22\00"
define i8* @process_generic_value_folder_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
%6 = alloca [128 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%13 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %11, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%15 = call i8* @string_pipe_fetch(i8* %14)
ret i8* %15
}

LLVM IR (-O2):
@.str = [37 x i8] c"process = '%s' or process_set = '%s'\00"
@.str.1 = [44 x i8] c"select.sh value_folder process_generic \22%s\22\00"
define i8* @process_generic_value_folder_name(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = alloca [128 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%8 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%9 = call i8* @string_pipe_fetch(i8* %5)
ret i8* %9
}