#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ load_config();
int /*<<< orphan*/ parse_command_line();
int /*<<< orphan*/ parse_external_sources(char *);
int /*<<< orphan*/ pass1_parser();
int /*<<< orphan*/ pass2_parser();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ resolve_references();
int /*<<< orphan*/ write_buffers();
int main(int argc, char **argv) {
  printf("welcome to libido!\n");
  parse_command_line();
  load_config();
  pass1_parser();
  resolve_references();
  parse_external_sources("../examples/libido/shell_lib.bash");
  pass2_parser();
  write_buffers();
  exit(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    0xe53(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <parse_command_line@plt>
mov    $0x0,%al
call   10a0 <load_config@plt>
mov    $0x0,%al
call   1070 <pass1_parser@plt>
mov    $0x0,%al
call   1030 <resolve_references@plt>
lea    0xe3f(%rip),%rdi
call   1080 <parse_external_sources@plt>
mov    $0x0,%al
call   1050 <pass2_parser@plt>
mov    $0x0,%al
call   1060 <write_buffers@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe8a(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1090 <parse_command_line@plt>
xor    %eax,%eax
call   10a0 <load_config@plt>
xor    %eax,%eax
call   1070 <pass1_parser@plt>
xor    %eax,%eax
call   1030 <resolve_references@plt>
lea    0xe40(%rip),%rdi
call   1080 <parse_external_sources@plt>
xor    %eax,%eax
call   1050 <pass2_parser@plt>
xor    %eax,%eax
call   1060 <write_buffers@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"welcome to libido!\0A\00"
@.str.1 = [34 x i8] c"../examples/libido/shell_lib.bash\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 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @parse_command_line()
%8 = call i32 (...) @load_config()
%9 = call i32 (...) @pass1_parser()
%10 = call i32 (...) @resolve_references()
%11 = call i32 @parse_external_sources(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @pass2_parser()
%13 = call i32 (...) @write_buffers()
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [34 x i8] c"../examples/libido/shell_lib.bash\00"
@str = [19 x i8] c"welcome to libido!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @parse_command_line()
%5 = tail call i32 (...) @load_config()
%6 = tail call i32 (...) @pass1_parser()
%7 = tail call i32 (...) @resolve_references()
%8 = tail call i32 @parse_external_sources(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 (...) @pass2_parser()
%10 = tail call i32 (...) @write_buffers()
%11 = tail call i32 @exit(i32 0)
unreachable
}