// File: /workspace/github_cpp_makefile_star2_O3/ryuichiueda[P]GlueLang/src/Environment.cc
// Function: Environment::Environment(int, char const**, int)
Environment::Environment(int argc, char const* argv[],int script_pos)
{
	// set cwd (this directory is never changed)
	char tmp[MAXPATHLEN];
	if (getcwd(tmp,sizeof(tmp)) == NULL){
		cerr << "Initizalization error" << endl;
		perror ("getcwd");
		exit(5);
	}

	m_dir = tmp;	
	m_pid = getpid();
	m_ppid = getppid();

	//set arguments 
	for(int i=script_pos;i<argc;i++)
		m_args.push_back(argv[i]);

	m_v_opt = false;
	m_level = 0;
	//m_job_counter = 0;
	//m_is_local = false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1058, %rsp           # imm = 0x1058
movl %ecx, %ebp
movq %rdx, 0x28(%rsp)
movl %esi, %r15d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
leaq 0x20(%rdi), %rcx
movl %eax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
movq %rcx, 0x38(%rdi)
movq %rax, 0x40(%rdi)
leaq 0x48(%rdi), %r12
leaq 0x58(%rdi), %rcx
movq %rcx, 0x18(%rsp)
movq %rcx, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movb %al, 0x58(%rdi)
leaq 0x70(%rdi), %rcx
movl %eax, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movq %rcx, 0x80(%rdi)
movq %rcx, 0x88(%rdi)
movq %rax, 0x90(%rdi)
leaq 0xb0(%rdi), %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, 0xa0(%rdi)
movq %rax, 0xa8(%rdi)
movb %al, 0xb0(%rdi)
leaq 0xd0(%rdi), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0xc0(%rdi)
movq %rax, 0xc8(%rdi)
movb %al, 0xd0(%rdi)
leaq 0x50(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x61a0
testq %rax, %rax
movq %r12, 0x20(%rsp)
je 0xa6f8
movq 0x50(%rbx), %r13
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x6140
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x64c0
callq 0x6480
movl %eax, 0xe4(%rbx)
callq 0x6430
movl %eax, 0xe8(%rbx)
subl %ebp, %r15d
jle 0xa6d5
movslq %ebp, %rax
movq 0x28(%rsp), %rcx
leaq (%rcx,%rax,8), %rbp
xorl %r14d, %r14d
leaq 0x30(%rsp), %r12
leaq 0x7(%rsp), %r13
movq (%rbp,%r14,8), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0xbc72
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc136
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa6cd
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6330
incq %r14
cmpl %r14d, %r15d
jne 0xa696
movb $0x0, 0xe0(%rbx)
movl $0x0, 0x9c(%rbx)
addq $0x1058, %rsp           # imm = 0x1058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x118f1(%rip), %rdi     # 0x1bff0
leaq 0x9d15(%rip), %rsi      # 0x1441b
movl $0x15, %edx
callq 0x63a0
movq 0x118d9(%rip), %rdi     # 0x1bff0
callq 0x6180
callq 0x6632
jmp 0xa723
movq %rax, %r15
jmp 0xa747
movq %rax, %r15
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa747
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0xc0(%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0xa765
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6330
leaq 0x68(%rbx), %r12
movq 0xa0(%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0xa787
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6330
movq %r12, %rdi
callq 0xc03a
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0x18(%rsp), %rdi
je 0xa7ae
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6330
leaq 0x18(%rbx), %rdi
callq 0xc0b2
movq %rbx, %rdi
callq 0xbcb0
movq %r15, %rdi
callq 0x6580
nop