main(argc, argv) int argc;
char *argv[];
{
  char access_string[256], footer_file[256], header_file[256],
      home_directory[256], log_file[256], output_file[256], plan_name[256],
      plan_directory[256 + 2];
  int daemon_flag;
  daemon_flag =
      analize_args(argc, argv, access_string, plan_directory, header_file,
                   footer_file, log_file, home_directory, output_file);
  if (daemon_flag == 0) {
    test_args(header_file, footer_file);
    plan_select(home_directory, plan_directory, plan_name);
    replace_plan(access_string, footer_file, header_file, home_directory,
                 plan_directory, plan_name, output_file);
    exit(0);
  }
  daemon_mode(access_string, footer_file, header_file, log_file, home_directory,
              plan_directory, plan_name, output_file);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x110(%rbp),%rdx
lea    -0x820(%rbp),%rcx
lea    -0x310(%rbp),%r8
lea    -0x210(%rbp),%r9
lea    -0x510(%rbp),%r11
lea    -0x410(%rbp),%r10
lea    -0x610(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1060 <analize_args@plt>
mov    %eax,-0x824(%rbp)
cmpl   $0x0,-0x824(%rbp)
jne    1246 <main+0xe6>
lea    -0x310(%rbp),%rdi
lea    -0x210(%rbp),%rsi
mov    $0x0,%al
call   1030 <test_args@plt>
lea    -0x410(%rbp),%rdi
lea    -0x820(%rbp),%rsi
lea    -0x710(%rbp),%rdx
mov    $0x0,%al
call   1070 <plan_select@plt>
lea    -0x110(%rbp),%rdi
lea    -0x210(%rbp),%rsi
lea    -0x310(%rbp),%rdx
lea    -0x410(%rbp),%rcx
lea    -0x820(%rbp),%r8
lea    -0x710(%rbp),%r9
lea    -0x610(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <replace_plan@plt>
xor    %edi,%edi
call   1080 <exit@plt>
lea    -0x110(%rbp),%rdi
lea    -0x210(%rbp),%rsi
lea    -0x310(%rbp),%rdx
lea    -0x510(%rbp),%rcx
lea    -0x410(%rbp),%r8
lea    -0x820(%rbp),%r9
lea    -0x710(%rbp),%r10
lea    -0x610(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <daemon_mode@plt>
xor    %eax,%eax
add    $0x840,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
sub    $0x8,%rsp
lea    0x718(%rsp),%r14
lea    0x8(%rsp),%rbx
lea    0x618(%rsp),%rbp
lea    0x308(%rsp),%rdx
lea    0x408(%rsp),%rcx
lea    0x108(%rsp),%r8
lea    0x208(%rsp),%r9
xor    %eax,%eax
push   %r14
push   %rbx
push   %rbp
call   1060 <analize_args@plt>
add    $0x20,%rsp
test   %eax,%eax
je     1212 <main+0xb2>
lea    0x510(%rsp),%rbp
lea    0x300(%rsp),%rdi
lea    0x200(%rsp),%rsi
lea    0x100(%rsp),%rdx
lea    0x610(%rsp),%rcx
mov    %rsp,%r8
lea    0x400(%rsp),%r9
xor    %eax,%eax
push   %r14
push   %rbp
call   1040 <daemon_mode@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x100(%rsp),%rbp
lea    0x200(%rsp),%r15
mov    %rbp,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <test_args@plt>
mov    %rsp,%rbx
lea    0x400(%rsp),%r12
lea    0x510(%rsp),%r13
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1070 <plan_select@plt>
sub    $0x8,%rsp
lea    0x308(%rsp),%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r12,%r8
mov    %r13,%r9
xor    %eax,%eax
push   %r14
call   1050 <replace_plan@plt>
add    $0x10,%rsp
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [256 x i8]
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = alloca [256 x i8]
%10 = alloca [256 x i8]
%11 = alloca [256 x i8]
%12 = alloca [258 x i8]
%13 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%14 = load i32, i32* %3
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%17 = getelementptr inbounds [258 x i8], [258 x i8]* %12, i64 0, i64 0
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%20 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%23 = call i32 (i32, i8**, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @analize_args to i32 (i32, i8**, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i32 %14, i8** %15, i8* %16, i8* %17, i8* %18, i8* %19, i8* %20, i8* %21, i8* %22)
store i32 %23, i32* %13
%24 = load i32, i32* %13
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %42
26: ; preds = %2
%27 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%28 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%29 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @test_args to i32 (i8*, i8*, ...)*)(i8* %27, i8* %28)
%30 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%31 = getelementptr inbounds [258 x i8], [258 x i8]* %12, i64 0, i64 0
%32 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%33 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @plan_select to i32 (i8*, i8*, i8*, ...)*)(i8* %30, i8* %31, i8* %32)
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%36 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%37 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%38 = getelementptr inbounds [258 x i8], [258 x i8]* %12, i64 0, i64 0
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%40 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%41 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @replace_plan to i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %34, i8* %35, i8* %36, i8* %37, i8* %38, i8* %39, i8* %40)
unreachable
42: ; preds = %2
%43 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%44 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%46 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%47 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%48 = getelementptr inbounds [258 x i8], [258 x i8]* %12, i64 0, i64 0
%49 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%50 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%51 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @daemon_mode to i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %43, i8* %44, i8* %45, i8* %46, i8* %47, i8* %48, i8* %49, i8* %50)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = alloca [256 x i8]
%10 = alloca [258 x i8]
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%18 = getelementptr inbounds [258 x i8], [258 x i8]* %10, i64 0, i64 0
%19 = call i32 (i32, i8**, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @analize_args to i32 (i32, i8**, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i32 %0, i8** %1, i8* %11, i8* %18, i8* %13, i8* %12, i8* %15, i8* %14, i8* %16)
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %2
%22 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @test_args to i32 (i8*, i8*, ...)*)(i8* %13, i8* %12)
%23 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @plan_select to i32 (i8*, i8*, i8*, ...)*)(i8* %14, i8* %18, i8* %17)
%24 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @replace_plan to i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %11, i8* %12, i8* %13, i8* %14, i8* %18, i8* %17, i8* %16)
unreachable
25: ; preds = %2
%26 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @daemon_mode to i32 (i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %11, i8* %12, i8* %13, i8* %15, i8* %14, i8* %18, i8* %17, i8* %16)
ret i32 0
}