// File: ryuichiueda[P]GlueLang/src/Script.cc
// Function: Script::exec(DefFile*, DefStr*)
int Script::exec(DefFile *f,  DefStr *s)
{
	int exit_status = 0;
	try{
		for(auto &c : m_nodes){
			exit_status = c->exec(NULL,NULL);
		}
		m_env->removeFiles();
		if(exit_status == 0)
			end(0);
	}catch(Element *e){
		printErrorMsg(e,"Execution error",m_silent);
		m_env->removeFiles();
		if(e->m_command_error)
			end(1);
		else
			end(e->getExitStatus());
	}catch(...){
		cerr << "\nExecution error\n"
		     << "unknown error" << endl;
		m_env->removeFiles();
		end(3);
	}
	cerr << "unknown error (uncatched)" << endl;
	m_env->removeFiles();
	end(3);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x1c(%rbp)
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xc010
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0xc040
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc070
testb $0x1, %al
jne 0x1b521
jmp 0x1b6b3
leaq -0x30(%rbp), %rdi
callq 0xc0b0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
movq %rdx, %rsi
callq *%rax
movl %eax, -0x8c(%rbp)
jmp 0x1b54d
movl -0x8c(%rbp), %eax
movl %eax, -0x1c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xc0d0
jmp 0x1b50b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x1b62e
movq -0x48(%rbp), %rdi
callq 0x6180
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x6710
movq -0x98(%rbp), %rdx
leaq 0x2207(%rip), %rsi      # 0x1d7ba
leaq -0x78(%rbp), %rdi
callq 0x7940
jmp 0x1b5be
movq -0xa0(%rbp), %rsi
movq -0x88(%rbp), %rdi
movzbl 0x85(%rdi), %ecx
andl $0x1, %ecx
leaq -0x78(%rbp), %rdx
callq 0x1b350
jmp 0x1b5e1
leaq -0x78(%rbp), %rdi
callq 0x6280
leaq -0x79(%rbp), %rdi
callq 0x6480
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xee00
jmp 0x1b605
movq -0x58(%rbp), %rax
testb $0x1, 0x84(%rax)
je 0x1b739
movq -0x88(%rbp), %rdi
movl $0x1, %esi
callq 0x1b2d0
jmp 0x1b629
jmp 0x1b760
movq -0x48(%rbp), %rdi
callq 0x6180
movq 0xd9aa(%rip), %rdi      # 0x28fe8
leaq 0x2163(%rip), %rsi      # 0x1d7a8
callq 0x6410
movq %rax, -0xa8(%rbp)
jmp 0x1b653
movq -0xa8(%rbp), %rdi
leaq 0x212b(%rip), %rsi      # 0x1d78c
callq 0x6410
movq %rax, -0xb0(%rbp)
jmp 0x1b66f
movq -0xb0(%rbp), %rdi
movq 0xd92b(%rip), %rsi      # 0x28fa8
callq 0x6460
jmp 0x1b684
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xee00
jmp 0x1b696
movq -0x88(%rbp), %rdi
movl $0x3, %esi
callq 0x1b2d0
jmp 0x1b6a9
callq 0x6690
jmp 0x1b765
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xee00
jmp 0x1b6c5
cmpl $0x0, -0x1c(%rbp)
jne 0x1b6dd
movq -0x88(%rbp), %rdi
xorl %esi, %esi
callq 0x1b2d0
jmp 0x1b6db
jmp 0x1b6dd
jmp 0x1b765
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x6690
jmp 0x1b6f5
jmp 0x1b7b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1b71d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x6280
leaq -0x79(%rbp), %rdi
callq 0x6480
jmp 0x1b7b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1b7b3
movq -0x58(%rbp), %rdi
callq 0x1b7d0
movl %eax, -0xb4(%rbp)
jmp 0x1b74a
movl -0xb4(%rbp), %esi
movq -0x88(%rbp), %rdi
callq 0x1b2d0
jmp 0x1b75e
jmp 0x1b760
callq 0x6690
movq 0xd87c(%rip), %rdi      # 0x28fe8
leaq 0x2057(%rip), %rsi      # 0x1d7ca
callq 0x6410
movq %rax, %rdi
movq 0xd826(%rip), %rsi      # 0x28fa8
callq 0x6460
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xee00
movq -0x88(%rbp), %rdi
movl $0x3, %esi
callq 0x1b2d0
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
callq 0x6690
movq -0x48(%rbp), %rdi
callq 0x6700
movq %rax, %rdi
callq 0x7f90
nopl (%rax)