#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 */
scalar_t__ config_load(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int ac, char **av) {
  printf("\nOmega Security Services\n");
  printf(" Configuration Tester\n\n");
  printf("    Developers: \033[1;32m \n        * Twitch\n        * "
         "Jer\n\033[0m\n");
  printf("Loading Config: \033[1;31m%s\033[0m\n\n", av[1]);
  printf("\n Result:  \033[1;32m%s\033[0m\n",
         (config_load(av[1])) ? "Success" : "Error");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <config_load@plt>
mov    %rax,%rcx
lea    0xf25(%rip),%rsi
lea    0xf16(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rsi
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbx),%rdi
call   1040 <config_load@plt>
test   %rax,%rax
lea    0xec5(%rip),%rax
lea    0xeb6(%rip),%rsi
cmove  %rax,%rsi
lea    0xe91(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\0AOmega Security Services\0A\00"
@.str.1 = [24 x i8] c" Configuration Tester\0A\0A\00"
@.str.2 = [62 x i8] c" Developers: \1B[1;32m \0A * Twitch\0A * Jer\0A\1B[0m\0A\00"
@.str.3 = [32 x i8] c"Loading Config: \1B[1;31m%s\1B[0m\0A\0A\00"
@.str.4 = [26 x i8] c"\0A Result: \1B[1;32m%s\1B[0m\0A\00"
@.str.5 = [8 x i8] c"Success\00"
@.str.6 = [6 x i8] c"Error\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i64 @config_load(i8* %15)
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %19)
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [32 x i8] c"Loading Config: \1B[1;31m%s\1B[0m\0A\0A\00"
@.str.4 = [26 x i8] c"\0A Result: \1B[1;32m%s\1B[0m\0A\00"
@.str.5 = [8 x i8] c"Success\00"
@.str.6 = [6 x i8] c"Error\00"
@str = [25 x i8] c"\0AOmega Security Services\00"
@str.7 = [23 x i8] c" Configuration Tester\0A\00"
@str.8 = [61 x i8] c" Developers: \1B[1;32m \0A * Twitch\0A * Jer\0A\1B[0m\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.8, i64 0, i64 0))
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %6
%10 = tail call i64 @config_load(i8* %9)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %12)
ret i32 0
}