#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 *appaserver_parameter_file_get_appaserver_data_directory();
char *appaserver_parameter_file_get_appaserver_error_directory();
char *appaserver_parameter_file_get_appaserver_mount_point();
char *appaserver_parameter_file_get_document_root();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  char *output;
  if (argc) {
  };
  if (strcmp(*argv, "get_appaserver_data_directory") == 0 ||
      strcmp(*argv, "get_appaserver_data_directory.e") == 0) {
    output = appaserver_parameter_file_get_appaserver_data_directory();
  } else if (strcmp(*argv, "get_document_root") == 0 ||
             strcmp(*argv, "get_document_root.e") == 0) {
    output = appaserver_parameter_file_get_document_root();
  } else if (strcmp(*argv, "get_appaserver_error_directory") == 0 ||
             strcmp(*argv, "get_appaserver_error_directory.e") == 0) {
    output = appaserver_parameter_file_get_appaserver_error_directory();
  } else {
    output = appaserver_parameter_file_get_appaserver_mount_point();
  }
  if (!output) {
    fprintf(stderr, "%s failed: Check appaserver.config\n", argv[0]);
    exit(1);
  }
  printf("%s\n", output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11a5 <main+0x25>
jmp    11a5 <main+0x25>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe4d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11df <main+0x5f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe4e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11ef <main+0x6f>
mov    $0x0,%al
call   1070 <appaserver_parameter_file_get_appaserver_data_directory@plt>
mov    %rax,-0x18(%rbp)
jmp    1298 <main+0x118>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe41(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1229 <main+0xa9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe36(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1239 <main+0xb9>
mov    $0x0,%al
call   1080 <appaserver_parameter_file_get_document_root@plt>
mov    %rax,-0x18(%rbp)
jmp    1293 <main+0x113>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe1d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1273 <main+0xf3>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe1f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1283 <main+0x103>
mov    $0x0,%al
call   1030 <appaserver_parameter_file_get_appaserver_error_directory@plt>
mov    %rax,-0x18(%rbp)
jmp    128e <main+0x10e>
mov    $0x0,%al
call   1090 <appaserver_parameter_file_get_appaserver_mount_point@plt>
mov    %rax,-0x18(%rbp)
jmp    1293 <main+0x113>
jmp    1298 <main+0x118>
cmpq   $0x0,-0x18(%rbp)
jne    12c9 <main+0x149>
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdea(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x18(%rbp),%rsi
lea    0xdf4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rdi
lea    0xe72(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     120a <main+0x8a>
mov    (%rbx),%rdi
lea    0xe7c(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     120a <main+0x8a>
mov    (%rbx),%rdi
lea    0xe88(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1218 <main+0x98>
mov    (%rbx),%rdi
lea    0xe86(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1218 <main+0x98>
mov    (%rbx),%rdi
lea    0xe86(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1237 <main+0xb7>
mov    (%rbx),%rdi
lea    0xe91(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1237 <main+0xb7>
xor    %eax,%eax
call   1090 <appaserver_parameter_file_get_appaserver_mount_point@plt>
test   %rax,%rax
jne    1224 <main+0xa4>
jmp    1243 <main+0xc3>
xor    %eax,%eax
call   1070 <appaserver_parameter_file_get_appaserver_data_directory@plt>
test   %rax,%rax
jne    1224 <main+0xa4>
jmp    1243 <main+0xc3>
xor    %eax,%eax
call   1080 <appaserver_parameter_file_get_document_root@plt>
test   %rax,%rax
je     1243 <main+0xc3>
lea    0xe9d(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <appaserver_parameter_file_get_appaserver_error_directory@plt>
test   %rax,%rax
jne    1224 <main+0xa4>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe4e(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"get_appaserver_data_directory\00"
@.str.1 = [32 x i8] c"get_appaserver_data_directory.e\00"
@.str.2 = [18 x i8] c"get_document_root\00"
@.str.3 = [20 x i8] c"get_document_root.e\00"
@.str.4 = [31 x i8] c"get_appaserver_error_directory\00"
@.str.5 = [33 x i8] c"get_appaserver_error_directory.e\00"
@stderr = global i32 0
@.str.6 = [36 x i8] c"%s failed: Check appaserver.config\0A\00"
@.str.7 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %2
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %20, label %15
15: ; preds = %10
%16 = load i8**, i8*** %5
%17 = load i8*, i8** %16
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %15, %10
%21 = call i8* (...) @appaserver_parameter_file_get_appaserver_data_directory()
store i8* %21, i8** %6
br label %50
22: ; preds = %15
%23 = load i8**, i8*** %5
%24 = load i8*, i8** %23
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %32, label %27
27: ; preds = %22
%28 = load i8**, i8*** %5
%29 = load i8*, i8** %28
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %27, %22
%33 = call i8* (...) @appaserver_parameter_file_get_document_root()
store i8* %33, i8** %6
br label %49
34: ; preds = %27
%35 = load i8**, i8*** %5
%36 = load i8*, i8** %35
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %44, label %39
39: ; preds = %34
%40 = load i8**, i8*** %5
%41 = load i8*, i8** %40
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %39, %34
%45 = call i8* (...) @appaserver_parameter_file_get_appaserver_error_directory()
store i8* %45, i8** %6
br label %48
46: ; preds = %39
%47 = call i8* (...) @appaserver_parameter_file_get_appaserver_mount_point()
store i8* %47, i8** %6
br label %48
48: ; preds = %46, %44
br label %49
49: ; preds = %48, %32
br label %50
50: ; preds = %49, %20
%51 = load i8*, i8** %6
%52 = icmp ne i8* %51, null
br i1 %52, label %60, label %53
53: ; preds = %50
%54 = load i32, i32* @stderr
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 0
%57 = load i8*, i8** %56
%58 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %57)
%59 = call i32 @exit(i32 1)
unreachable
60: ; preds = %50
%61 = load i8*, i8** %6
%62 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %61)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"get_appaserver_data_directory\00"
@.str.1 = [32 x i8] c"get_appaserver_data_directory.e\00"
@.str.2 = [18 x i8] c"get_document_root\00"
@.str.3 = [20 x i8] c"get_document_root.e\00"
@.str.4 = [31 x i8] c"get_appaserver_error_directory\00"
@.str.5 = [33 x i8] c"get_appaserver_error_directory.e\00"
@stderr = global i32 0
@.str.6 = [36 x i8] c"%s failed: Check appaserver.config\0A\00"
@.str.7 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6, %2
%11 = tail call i8* (...) @appaserver_parameter_file_get_appaserver_data_directory()
br label %34
12: ; preds = %6
%13 = load i8*, i8** %1
%14 = tail call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %12
%17 = load i8*, i8** %1
%18 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16, %12
%21 = tail call i8* (...) @appaserver_parameter_file_get_document_root()
br label %34
22: ; preds = %16
%23 = load i8*, i8** %1
%24 = tail call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %30, label %26
26: ; preds = %22
%27 = load i8*, i8** %1
%28 = tail call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %26, %22
%31 = tail call i8* (...) @appaserver_parameter_file_get_appaserver_error_directory()
br label %34
32: ; preds = %26
%33 = tail call i8* (...) @appaserver_parameter_file_get_appaserver_mount_point()
br label %34
34: ; preds = %20, %32, %30, %10
%35 = phi i8* [ %11, %10 ], [ %21, %20 ], [ %31, %30 ], [ %33, %32 ]
%36 = icmp eq i8* %35, null
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load i32, i32* @stderr
%39 = load i8*, i8** %1
%40 = tail call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %39)
%41 = tail call i32 @exit(i32 1)
unreachable
42: ; preds = %34
%43 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %35)
ret i32 0
}