// File: /workspace/github_cpp_makefile_star2_O2/ryuichiueda[P]GlueLang/src/DefProc.cc
// Function: DefProc::parse()
bool DefProc::parse(void)
{
	m_feeder->getPos(&m_start_line, &m_start_char);

	if(!m_feeder->str("proc")){
		m_feeder->setPos(m_start_line, m_start_char);
		return false;
	}

	if(!m_feeder->path(&m_name)){
		m_feeder->setPos(m_start_line, m_start_char);
		return false;
	}
	m_feeder->blank();

	if(!m_feeder->str("=")){
		m_feeder->setPos(m_start_line, m_start_char);
		return false;
	}

	string scr;
	bool scr_exist = m_feeder->doBlock(&scr) || m_feeder->lineResidual(&scr);
	if(!scr_exist){
		m_feeder->setPos(m_start_line, m_start_char);
		return false;
	}

	//create a file
	string tmpdir = m_env->m_tmpdir + "/" + m_name;
	ofstream ofs(tmpdir.c_str());
	ofs << scr;
	ofs.close();

	auto *p = new DataProc();
	p->setFileName(&tmpdir);
	m_env->setData(m_scopes.back(),&m_name,p);

	m_feeder->getPos(&m_end_line, &m_end_char);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x30(%rbx), %r12
leaq 0x34(%rbx), %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0xd614
movq 0x8(%rbx), %r14
leaq 0x8d69(%rip), %rsi      # 0x11369
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x708c
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0xd6ae
movl %eax, %ebp
leaq 0x60(%rsp), %rdi
callq 0x6150
movq 0x8(%rbx), %rdi
testb %bpl, %bpl
je 0x87a2
leaq 0x88(%rbx), %r14
movq %r14, %rsi
callq 0xcaac
movq 0x8(%rbx), %rdi
testb %al, %al
je 0x87a2
callq 0xcc02
movq 0x8(%rbx), %r15
leaq 0x90ad(%rip), %rsi      # 0x11710
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x708c
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0xd6ae
movl %eax, %ebp
leaq 0x40(%rsp), %rdi
callq 0x6150
testb %bpl, %bpl
je 0x87c2
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x8(%rbx), %rdi
movq %rsp, %rsi
callq 0xdae8
testb %al, %al
jne 0x86cc
movq 0x8(%rbx), %rdi
movq %rsp, %rsi
callq 0xd620
testb %al, %al
je 0x87ce
movl $0xc0, %esi
addq 0x10(%rbx), %rsi
leaq 0x8f12(%rip), %rdx      # 0x115ee
leaq 0x80(%rsp), %rdi
callq 0x70c7
leaq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movq %r14, %rdx
callq 0x75a1
leaq 0x80(%rsp), %rdi
callq 0x6150
movq 0x20(%rsp), %rsi
leaq 0x80(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x6360
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x62b0
leaq 0x80(%rsp), %rdi
callq 0x6460
pushq $0x68
popq %rdi
callq 0x6320
movq %rax, %r15
movq %rax, %rdi
callq 0x7cdc
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x7d3e
movq 0x10(%rbx), %rdi
movq 0x50(%rbx), %rax
movl -0x4(%rax), %esi
movq %r14, %rdx
movq %r15, %rcx
callq 0xa180
movq 0x8(%rbx), %rdi
leaq 0x38(%rbx), %rsi
addq $0x3c, %rbx
movq %rbx, %rdx
callq 0xd614
leaq 0x80(%rsp), %rdi
callq 0x6490
leaq 0x20(%rsp), %rdi
callq 0x6150
movb $0x1, %bl
jmp 0x87df
movl (%r12), %esi
movl (%r15), %edx
callq 0xd0a2
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rdi
movl 0x30(%rbx), %esi
movl 0x34(%rbx), %edx
jmp 0x87a9
movq 0x8(%rbx), %rdi
movl 0x30(%rbx), %esi
movl 0x34(%rbx), %edx
callq 0xd0a2
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x6150
jmp 0x87b0
movq %rax, %rbx
pushq $0x68
popq %rsi
movq %r15, %rdi
callq 0x6330
jmp 0x8823
movq %rax, %rbx
jmp 0x8830
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x8835
jmp 0x880f
jmp 0x8820
movq %rax, %rbx
jmp 0x883a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x8847
jmp 0x884e
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x6490
leaq 0x20(%rsp), %rdi
callq 0x6150
movq %rsp, %rdi
jmp 0x8847
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x6150
jmp 0x8851
movq %rax, %rbx
movq %rbx, %rdi
callq 0x6560
nopl (%rax)