// File: /workspace/github_cpp_makefile_star2_O2/ryuichiueda[P]GlueLang/src/main.cc
// Function: main
int main(int argc, char const* argv[])
{
	if(setpgid(0,0) != 0)
		exit(1);

	if(argc <= 1)
		usage();

///////////////////////////////////////////
// set signals
//////////////////////////////////////////
	struct sigaction sig;
	memset(&sig,'\0',sizeof(sig));

	sig.sa_handler = sig_int;
	sigaction(SIGINT,&sig,NULL);
	sig.sa_handler = sig_hup;
	sigaction(SIGHUP,&sig,NULL);
	sig.sa_handler = sig_term;
	sigaction(SIGTERM,&sig,NULL);

///////////////////////////////////////////
// initialization of top level objects 
//////////////////////////////////////////
	int script_pos = scriptPos(argc,argv);

	ifstream ifs(argv[script_pos]);
	Environment env(argc,argv,script_pos);

	if(!setFlags(argc,argv,&env))
		exit(1);//flags are invalid.

	// create the feeder
	Feeder feeder(&ifs);
	// set tmpdir
	string tmp_k = "tmpdir";
	string tmp_v = "/tmp/";
	env.setImportPath(&tmp_k,&tmp_v);
	Script s(&feeder,&env,NULL);

//////////////////////////////////////////
//execution
//////////////////////////////////////////
	s.parse();
	s.exec(NULL,NULL);
	//do not write something here because
	//a subshell cannot execute this part.
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x4a0, %rsp            # imm = 0x4A0
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
xorl %esi, %esi
callq 0x6510
testl %eax, %eax
jne 0xfe1d
cmpl $0x1, %ebp
jle 0xfe25
leaq 0x208(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x61d0
leaq 0x20d(%rip), %rax       # 0xfeb9
movq %rax, -0x8(%r14)
pushq $0x2
popq %rdi
leaq 0x200(%rsp), %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x63e0
leaq 0x1f7(%rip), %rax       # 0xfec3
movq %rax, (%r14)
pushq $0x1
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x63e0
leaq 0x1ea(%rip), %rax       # 0xfecd
movq %rax, (%r14)
pushq $0xf
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x63e0
movl %ebp, %edi
movq %rbx, %rsi
callq 0xfed7
movslq %eax, %r14
movq (%rbx,%r14,8), %rsi
leaq 0x298(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x6590
leaq 0x110(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x94fc
leaq 0x110(%rsp), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0xffaa
leaq 0x40(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0xc95c
leaq 0x16f3(%rip), %rsi      # 0x11447
leaq 0x20(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x708c
leaq 0x1b42(%rip), %rsi      # 0x118af
movq %rsp, %rdi
leaq 0x88(%rsp), %rdx
callq 0x708c
leaq 0x110(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x9a20
leaq 0x88(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x110(%rsp), %rdx
xorl %ecx, %ecx
callq 0xf490
leaq 0x88(%rsp), %rdi
callq 0xf504
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf8b8
leaq 0x88(%rsp), %rdi
callq 0xf4ac
movq %rsp, %rdi
callq 0x6150
leaq 0x20(%rsp), %rdi
callq 0x6150
leaq 0x40(%rsp), %rdi
callq 0xca02
leaq 0x110(%rsp), %rdi
callq 0x96d6
leaq 0x298(%rsp), %rdi
callq 0x60c0
xorl %eax, %eax
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x63a0
callq 0xfe95
jmp 0xfe2c
movq %rax, %rbx
jmp 0xfe57
movq %rax, %rbx
jmp 0xfe5f
movq %rax, %rbx
jmp 0xfe69
jmp 0xfe3d
movq %rax, %rbx
jmp 0xfe73
movq %rax, %rbx
jmp 0xfe80
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xf4ac
movq %rsp, %rdi
callq 0x6150
leaq 0x20(%rsp), %rdi
callq 0x6150
leaq 0x40(%rsp), %rdi
callq 0xca02
leaq 0x110(%rsp), %rdi
callq 0x96d6
leaq 0x298(%rsp), %rdi
callq 0x60c0
movq %rbx, %rdi
callq 0x6560