// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: ForI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t ForI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	const std::vector<symbol_t> evalFor = fors->evaluate(scope, stack_trace).getVector(&token, stack_trace);
	for (auto &&e : evalFor)
	{
		const object_t newScope(scope, OBJECT_WEAK);
		newScope.createVariable(id, e, &token);
		bool cflag = false;
		for (auto &&i : body)
		{
			const symbol_t temp = i->evaluate(&newScope, stack_trace);
			switch (temp.getSymbolType())
			{
			case symbol_t::type_t::ID_REFER:
			case symbol_t::type_t::ID_RETURN:
				return temp;
			case symbol_t::type_t::ID_BREAK:
				return symbol_t();
			case symbol_t::type_t::ID_CONTINUE:
				cflag = true;
				break;
			default:
				break;
			}
			if (cflag)
				break;
		}
	}
	return symbol_t();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, (%rsp)
movq 0x98(%rsi), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rdx, 0x38(%rsp)
callq *(%rax)
movq %r14, 0x8(%rsp)
leaq 0x8(%r14), %rsi
movq %r15, %rdi
movq %rsi, 0x30(%rsp)
movq %rbx, 0x48(%rsp)
movq %rbx, %rdx
callq 0x40f46
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x43f8e
leaq 0x10(%rsp), %rdi
callq 0x404da
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq %rax, %r14
je 0x6fc75
movq 0x8(%rsp), %rax
addq $0x90, %rax
movq %rax, 0x20(%rsp)
leaq 0x10(%rsp), %rbp
leaq 0x68(%rsp), %r15
movq $0x0, 0x68(%rsp)
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
movq %r15, %rdx
callq 0x3cf90
movq %rbp, %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
movq 0x30(%rsp), %rcx
callq 0x3d512
movq 0x8(%rsp), %rax
movq 0xa8(%rax), %rbx
movq 0xb0(%rax), %r13
cmpq %r13, %rbx
je 0x6fc5e
movq %r14, 0x40(%rsp)
xorl %r12d, %r12d
movq (%rbx), %rsi
movq (%rsi), %rax
movq %r15, %rdi
movq %rbp, %rdx
movq 0x48(%rsp), %rcx
callq *(%rax)
movq %r15, %rdi
callq 0x40b02
cmpl $0x4, %eax
ja 0x6fbfd
movl %eax, %eax
leaq 0x18781(%rip), %rcx     # 0x88364
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x404c8
jmp 0x6fc1b
movb $0x1, %r12b
movl %r12d, %ebp
xorb $0x1, %bpl
movzbl %r12b, %r14d
andl $0x1, %r14d
shll $0x2, %r14d
jmp 0x6fc23
movq (%rsp), %rdi
callq 0x400a4
movl $0x1, %r14d
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x404da
testb $0x1, %bpl
leaq 0x10(%rsp), %rbp
je 0x6fc49
addq $0x10, %rbx
cmpq %r13, %rbx
jne 0x6fbba
movl $0x4, %r14d
movq %rbp, %rdi
callq 0x3d168
cmpl $0x4, %r14d
movq 0x40(%rsp), %r14
je 0x6fc66
jmp 0x6fc7e
movq %rbp, %rdi
callq 0x3d168
addq $0x10, %r14
cmpq 0x28(%rsp), %r14
jne 0x6fb68
movq (%rsp), %rdi
callq 0x400a4
leaq 0x50(%rsp), %rdi
callq 0x20a84
movq (%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6fcac
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x404da
jmp 0x6fcd9
movq %rax, %rbx
jmp 0x6fccf
jmp 0x6fcb3
movq %rax, %rbx
jmp 0x6fcc5
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x404da
leaq 0x10(%rsp), %rdi
callq 0x3d168
leaq 0x50(%rsp), %rdi
callq 0x20a84
movq %rbx, %rdi
callq 0x106f0
nop