// File: /workspace/github_cpp_makefile_star2_O3/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 0x131d1
cmpl $0x1, %ebp
jle 0x131db
leaq 0x210(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x61d0
leaq 0x267(%rip), %rax       # 0x1328d
movq %rax, -0x8(%r14)
leaq 0x208(%rsp), %r14
movl $0x2, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6400
leaq 0x24f(%rip), %rax       # 0x13297
movq %rax, (%r14)
movl $0x1, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6400
leaq 0x240(%rip), %rax       # 0x132a1
movq %rax, (%r14)
movl $0xf, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6400
movl %ebp, %edi
movq %rbx, %rsi
callq 0x132ab
movslq %eax, %r14
movq (%rbx,%r14,8), %rsi
leaq 0x2a0(%rsp), %rdi
movl $0x8, %edx
callq 0x65b0
leaq 0x118(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0xa568
leaq 0x118(%rsp), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x133aa
leaq 0x48(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
callq 0xefcc
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1368(%rip), %rsi      # 0x14447
leaq 0x1367(%rip), %rdx      # 0x1444d
leaq 0x28(%rsp), %rdi
callq 0x74f0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x17ef(%rip), %rsi      # 0x148ef
leaq 0x17ed(%rip), %rdx      # 0x148f4
leaq 0x8(%rsp), %rdi
callq 0x74f0
leaq 0x118(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xaf68
leaq 0x90(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x118(%rsp), %rdx
xorl %ecx, %ecx
callq 0x12680
leaq 0x90(%rsp), %rdi
callq 0x126f4
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x12ba2
leaq 0x90(%rsp), %rdi
callq 0x1269c
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x13186
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1319d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6330
leaq 0x48(%rsp), %rdi
callq 0xf0ae
leaq 0x118(%rsp), %rdi
callq 0xa7c8
leaq 0x2a0(%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 0x13267
jmp 0x131e2
movq %rax, %rbx
jmp 0x1320d
movq %rax, %rbx
jmp 0x13224
movq %rax, %rbx
jmp 0x1323b
jmp 0x131f3
movq %rax, %rbx
jmp 0x13245
movq %rax, %rbx
jmp 0x13252
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1269c
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x13224
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1323b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6330
leaq 0x48(%rsp), %rdi
callq 0xf0ae
leaq 0x118(%rsp), %rdi
callq 0xa7c8
leaq 0x2a0(%rsp), %rdi
callq 0x60b0
movq %rbx, %rdi
callq 0x6580