#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 */
char *application_first_relative_source_directory(char *);
char *pipe2string(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *, char *);
char appaserver_get_aggregation_sum_yn(char *application,
                                       char *appaserver_mount_point,
                                       char *datatype) {
  char sys_string[1024];
  char *results;
  sprintf(sys_string, "%s/%s/get_aggregation_sum_yn '%s' '%s'",
          appaserver_mount_point,
          application_first_relative_source_directory(application), application,
          datatype);
  if (!(results = pipe2string(sys_string))) {
    return 'n';
  } else {
    return *results;
  }
}


x86 assembly (clang, -O0):
<appaserver_get_aggregation_sum_yn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x438(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x430(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <application_first_relative_source_directory@plt>
mov    -0x438(%rbp),%rdi
mov    -0x430(%rbp),%rdx
mov    %rax,%rcx
mov    -0x10(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xe77(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1040 <pipe2string@plt>
mov    %rax,-0x428(%rbp)
cmp    $0x0,%rax
jne    11b4 <appaserver_get_aggregation_sum_yn+0x84>
movb   $0x6e,-0x1(%rbp)
jmp    11c0 <appaserver_get_aggregation_sum_yn+0x90>
mov    -0x428(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appaserver_get_aggregation_sum_yn>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <application_first_relative_source_directory@plt>
lea    0xead(%rip),%rsi
mov    %rsp,%r12
mov    %r12,%rdi
mov    %r15,%rdx
mov    %rax,%rcx
mov    %rbx,%r8
mov    %r14,%r9
call   1050 <sprintf@plt>
mov    %r12,%rdi
call   1040 <pipe2string@plt>
test   %rax,%rax
je     117b <appaserver_get_aggregation_sum_yn+0x4b>
mov    (%rax),%al
jmp    117d <appaserver_get_aggregation_sum_yn+0x4d>
mov    $0x6e,%al
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [39 x i8] c"%s/%s/get_aggregation_sum_yn '%s' '%s'\00"
define signext i8 @appaserver_get_aggregation_sum_yn(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [1024 x i8]
%9 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%11 = load i8*, i8** %6
%12 = load i8*, i8** %5
%13 = call i8* @application_first_relative_source_directory(i8* %12)
%14 = load i8*, i8** %5
%15 = load i8*, i8** %7
%16 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %13, i8* %14, i8* %15)
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%18 = call i8* @pipe2string(i8* %17)
store i8* %18, i8** %9
%19 = icmp ne i8* %18, null
br i1 %19, label %21, label %20
20: ; preds = %3
store i8 110, i8* %4
br label %24
21: ; preds = %3
%22 = load i8*, i8** %9
%23 = load i8, i8* %22
store i8 %23, i8* %4
br label %24
24: ; preds = %21, %20
%25 = load i8, i8* %4
ret i8 %25
}

LLVM IR (-O2):
@.str = [39 x i8] c"%s/%s/get_aggregation_sum_yn '%s' '%s'\00"
define signext i8 @appaserver_get_aggregation_sum_yn(i8* %0, i8* %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = tail call i8* @application_first_relative_source_directory(i8* %0)
%7 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %6, i8* %0, i8* %2)
%8 = call i8* @pipe2string(i8* %5)
%9 = icmp eq i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = load i8, i8* %8
br label %12
12: ; preds = %3, %10
%13 = phi i8 [ %11, %10 ], [ 110, %3 ]
ret i8 %13
}