// File: /workspace/github_cpp_makefile_star2_O1/ryuichiueda[P]GlueLang/src/Environment.cc
// Function: Environment::removeFiles()
void Environment::removeFiles(void)
{
	/*
	for(auto le : m_local_env){
		le.second->removeFiles(true);
	}
	*/

	for(auto d : m_data){
		string *f = d.second->getFileName();
		if(f == NULL)
			continue;

		if(m_tmpdir + "/" != f->substr(0,m_tmpdir.size() + 1))
			continue;

		//if(f->substr(m_tmpdir.size()+1,6) != "local." && m_is_local)
		//	continue;

		remove(f->c_str());
		if(m_v_opt)
			cerr << "+ pid " << getpid() << " file " << f << " deleted" << endl;
	}
	

//	if(!local){
		struct stat buf;
		while(stat(m_tmpdir.c_str(), &buf) == 0){
			if(remove(m_tmpdir.c_str()) != 0){
				cerr << "cannot remove tmpdir" << endl;
				sleep(1);
			}
		}
//	}

	if(Element::m_signal != 0)
		kill(0,Element::m_signal);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq 0x80(%rdi), %r14
leaq 0x70(%rdi), %r12
cmpq %r12, %r14
je 0xb98d
leaq 0x58(%rsp), %r15
movq %r15, 0x48(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x7456
movq 0x40(%r14), %rdi
movq %rdi, 0x68(%rsp)
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, %r13
testq %rax, %rax
je 0xb962
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xc0(%rbx), %rsi
movq 0xc8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x7456
movq %rbp, %rdi
leaq 0x8ddd(%rip), %rsi      # 0x14611
callq 0x65d0
movq 0xc8(%rbx), %rcx
incq %rcx
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x6350
movq 0x10(%rsp), %rdx
movb $0x1, %bpl
cmpq 0x30(%rsp), %rdx
jne 0xb87f
testq %rdx, %rdx
je 0xb87d
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x6340
testl %eax, %eax
setne %bpl
jmp 0xb87f
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xb89b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xb8b7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
testb %bpl, %bpl
jne 0xb962
movq (%r13), %rdi
callq 0x65a0
cmpb $0x1, 0xe0(%rbx)
jne 0xb962
movl $0x6, %edx
movq 0x1070e(%rip), %rdi     # 0x1bff0
leaq 0x898a(%rip), %rsi      # 0x14273
callq 0x63a0
callq 0x6480
movq 0x106f6(%rip), %rdi     # 0x1bff0
movl %eax, %esi
callq 0x6560
movq %rax, %rbp
movl $0x6, %edx
movq %rax, %rdi
leaq 0x8967(%rip), %rsi      # 0x1427a
callq 0x63a0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6230
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
leaq 0x8b39(%rip), %rsi      # 0x1446e
callq 0x63a0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x6300
movsbl %al, %esi
movq %r13, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61e0
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xb979
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6330
movq %r14, %rdi
callq 0x61f0
movq %rax, %r14
cmpq %r12, %rax
jne 0xb7cd
movq 0xc0(%rbx), %rdi
leaq 0x48(%rsp), %rsi
callq 0x62b0
testl %eax, %eax
jne 0xba19
leaq 0x48(%rsp), %r14
movq 0x10642(%rip), %r15     # 0x1bff0
leaq 0x8ac2(%rip), %r12      # 0x14477
movq 0xc0(%rbx), %rdi
callq 0x65a0
testl %eax, %eax
je 0xba06
movl $0x14, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x63a0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6300
movsbl %al, %esi
movq %r15, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61e0
movl $0x1, %edi
callq 0x6220
movq 0xc0(%rbx), %rdi
movq %r14, %rsi
callq 0x62b0
testl %eax, %eax
je 0xb9b5
leaq 0x10958(%rip), %rax     # 0x1c378
movl (%rax), %esi
testl %esi, %esi
je 0xba2d
xorl %edi, %edi
callq 0x6450
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xba64
jmp 0xba43
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xba67
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
jmp 0xba67
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xba7e
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6330
movq %rbx, %rdi
callq 0x6580