// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
xorl %esi, %esi
callq 0x6510
testl %eax, %eax
jne 0x133f4
cmpl $0x1, %ebp
jle 0x133fe
leaq 0x410(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x61d0
leaq 0x25e(%rip), %rax       # 0x134b0
movq %rax, (%r14)
movl $0x2, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6400
leaq 0x24f(%rip), %rax       # 0x134ba
movq %rax, (%r14)
movl $0x1, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6400
leaq 0x240(%rip), %rax       # 0x134c4
movq %rax, (%r14)
movl $0xf, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6400
movl %ebp, %edi
movq %rbx, %rsi
callq 0x134ce
movslq %eax, %r14
movq (%rbx,%r14,8), %rsi
leaq 0x208(%rsp), %rdi
movl $0x8, %edx
callq 0x65b0
leaq 0x118(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0xa584
leaq 0x118(%rsp), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x135cd
leaq 0x48(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0xefd4
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x112b(%rip), %rsi      # 0x1442d
leaq 0x112a(%rip), %rdx      # 0x14433
leaq 0x28(%rsp), %rdi
callq 0x74e6
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x15b2(%rip), %rsi      # 0x148d5
leaq 0x15b0(%rip), %rdx      # 0x148da
leaq 0x8(%rsp), %rdi
callq 0x74e6
leaq 0x118(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xaf8a
leaq 0x90(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x118(%rsp), %rdx
xorl %ecx, %ecx
callq 0x128ac
leaq 0x90(%rsp), %rdi
callq 0x12920
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x12dce
leaq 0x90(%rsp), %rdi
callq 0x128c8
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x133a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x133c0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6330
leaq 0x48(%rsp), %rdi
callq 0xf0b6
leaq 0x118(%rsp), %rdi
callq 0xa7e4
leaq 0x208(%rsp), %rdi
callq 0x60b0
xorl %eax, %eax
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x63c0
callq 0x1348a
jmp 0x13405
movq %rax, %rbx
jmp 0x13430
movq %rax, %rbx
jmp 0x13447
movq %rax, %rbx
jmp 0x1345e
jmp 0x13416
movq %rax, %rbx
jmp 0x13468
movq %rax, %rbx
jmp 0x13475
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x128c8
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x13447
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1345e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6330
leaq 0x48(%rsp), %rdi
callq 0xf0b6
leaq 0x118(%rsp), %rdi
callq 0xa7e4
leaq 0x208(%rsp), %rdi
callq 0x60b0
movq %rbx, %rdi
callq 0x6580