// File: Silica[P]PSL/./PSL/environment.h
// Function: PSL::variable::Variable::Code::optimize(PSL::variable::Variable::OpCode*)
bool optimize(OpCode *c)
	{
		size_t s = code.size();
		OpCode::MNEMONIC::mnemonic cn = c->get();
		if (cn == OpCode::MNEMONIC::PLUS)
		{
			delete c;
			return false;
		}
		if (s < 1)
			return true;
		if (cn == OpCode::MNEMONIC::POP)
		{
			OpCode::MNEMONIC::mnemonic n = code[s-1]->get();
			#ifdef PSL_OPTIMIZE_IMMEDIATELY_POP
			if (n == OpCode::MNEMONIC::CONSTANT || n == OpCode::MNEMONIC::VARIABLE)
			{
				if (s < 2 || code[s-2]->get() != OpCode::MNEMONIC::JR)
				{
					delete c;
					delete code[--s];
					code.resize(s);
					return false;
				}
			}
			#endif
			#ifdef PSL_OPTIMIZE_SUFFIX_INCREMENT
			if (n == OpCode::MNEMONIC::INC)
			{
				delete code[--s];
				code[s] = new PINC();
				return true;
			}
			if (n == OpCode::MNEMONIC::DEC)
			{
				delete code[--s];
				code[s] = new PDEC();
				return true;
			}
			#endif
		}
		#ifdef PSL_OPTIMIZE_CONSTANT_CALCULATION
		if (cn == OpCode::MNEMONIC::UNARY || cn == OpCode::MNEMONIC::INC || cn == OpCode::MNEMONIC::DEC)
		{
			if (code[s-1]->get() == OpCode::MNEMONIC::CONSTANT)
			{
				if (s < 2 || code[s-2]->get() != OpCode::MNEMONIC::JR)
				{
					PSL_TEMPORARY_ENV0(optimizer);
					code[s-1]->Execute(optimizer);
					variable v = optimizer.pop();
					optimizer.push(v);
					c->Execute(optimizer);
					delete c;
					variable a = optimizer.pop();
					v = a;
					return false;
				}
			}
		}
		if (cn == OpCode::MNEMONIC::BINARY && s >= 2)
		{
			if ((code[s-1]->get() == OpCode::MNEMONIC::CONSTANT) && (code[s-2]->get() == OpCode::MNEMONIC::CONSTANT))
			{
				if (s < 3 || code[s-3]->get() != OpCode::MNEMONIC::JR)
				{
					PSL_TEMPORARY_ENV0(optimizer);
					code[s-2]->Execute(optimizer);
					code[--s]->Execute(optimizer);
					variable r = optimizer.pop();
					variable l = optimizer.pop();
					optimizer.push(l);
					optimizer.push(r);
					c->Execute(optimizer);
					delete c;
					variable a = optimizer.pop();
					l = a;
					delete code[s];
					code.resize(s);
					return false;
				}
			}
		}
		#endif
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x1a3c0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, -0x24(%rbp)
cmpl $0x22, -0x24(%rbp)
jne 0x1e6c1
movq -0x18(%rbp), %rax
movq %rax, -0x100(%rbp)
cmpq $0x0, %rax
je 0x1e6b8
movq -0x100(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x1edf7
cmpq $0x1, -0x20(%rbp)
jae 0x1e6d1
movb $0x1, -0x1(%rbp)
jmp 0x1edf7
cmpl $0x9, -0x24(%rbp)
jne 0x1e819
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq $0x1, %rsi
callq 0x1a3e0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, -0x28(%rbp)
cmpl $0x28, -0x28(%rbp)
jne 0x1e789
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $-0x1, %rsi
movq %rsi, -0x20(%rbp)
callq 0x1a3e0
movq (%rax), %rax
movq %rax, -0x108(%rbp)
cmpq $0x0, %rax
je 0x1e73a
movq -0x108(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x8, %edi
callq 0x1ee10
movq %rax, %rdi
movq %rdi, -0x110(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0xc0e0
movq -0x110(%rbp), %rdi
callq 0x1ee30
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1a3e0
movq -0x110(%rbp), %rcx
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1edf7
cmpl $0x29, -0x28(%rbp)
jne 0x1e817
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $-0x1, %rsi
movq %rsi, -0x20(%rbp)
callq 0x1a3e0
movq (%rax), %rax
movq %rax, -0x118(%rbp)
cmpq $0x0, %rax
je 0x1e7c8
movq -0x118(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x8, %edi
callq 0x1ee10
movq %rax, %rdi
movq %rdi, -0x120(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0xc0e0
movq -0x120(%rbp), %rdi
callq 0x1ee70
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1a3e0
movq -0x120(%rbp), %rcx
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1edf7
jmp 0x1e819
cmpl $0x21, -0x24(%rbp)
je 0x1e82f
cmpl $0x28, -0x24(%rbp)
je 0x1e82f
cmpl $0x29, -0x24(%rbp)
jne 0x1ea32
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq $0x1, %rsi
callq 0x1a3e0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x1, %eax
jne 0x1ea30
cmpq $0x2, -0x20(%rbp)
jb 0x1e882
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq $0x2, %rsi
callq 0x1a3e0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x4d, %eax
je 0x1ea2e
leaq -0x50(%rbp), %rdi
movq %rdi, -0x128(%rbp)
xorl %esi, %esi
callq 0xcfb0
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
decq %rsi
callq 0x1a3e0
movq -0x128(%rbp), %rsi
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x1e8bc
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11950
jmp 0x1e8cb
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xcd50
jmp 0x1e8da
leaq -0x70(%rbp), %rdi
callq 0xcd90
leaq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x11b10
jmp 0x1e8f2
leaq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x11aa0
jmp 0x1e901
leaq -0x78(%rbp), %rdi
callq 0xcd90
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
leaq -0x50(%rbp), %rsi
callq *%rax
jmp 0x1e91d
movq -0x18(%rbp), %rax
movq %rax, -0x130(%rbp)
cmpq $0x0, %rax
je 0x1e93b
movq -0x130(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11950
jmp 0x1e94d
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xcd50
jmp 0x1e95f
leaq -0x88(%rbp), %rdi
callq 0xcd90
leaq -0x68(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1d200
jmp 0x1e97a
movb $0x0, -0x1(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xcdc0
leaq -0x68(%rbp), %rdi
callq 0xcdc0
leaq -0x50(%rbp), %rdi
callq 0x19b40
jmp 0x1edf7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1ea20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xcd90
jmp 0x1ea20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1ea17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xcd90
jmp 0x1ea17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xcd90
jmp 0x1ea17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xcdc0
leaq -0x68(%rbp), %rdi
callq 0xcdc0
leaq -0x50(%rbp), %rdi
callq 0x19b40
jmp 0x1ee05
jmp 0x1ea30
jmp 0x1ea32
cmpl $0x2d, -0x24(%rbp)
jne 0x1edf3
cmpq $0x2, -0x20(%rbp)
jb 0x1edf3
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq $0x1, %rsi
callq 0x1a3e0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x1, %eax
jne 0x1edf1
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq $0x2, %rsi
callq 0x1a3e0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x1, %eax
jne 0x1edf1
cmpq $0x3, -0x20(%rbp)
jb 0x1eac0
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq $0x3, %rsi
callq 0x1a3e0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x4d, %eax
je 0x1edef
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x138(%rbp)
xorl %esi, %esi
callq 0xcfb0
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $-0x2, %rsi
callq 0x1a3e0
movq -0x138(%rbp), %rsi
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x1eafe
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
decq %rsi
movq %rsi, -0x20(%rbp)
callq 0x1a3e0
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
leaq -0xb0(%rbp), %rsi
callq *%rax
jmp 0x1eb2a
leaq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x11950
jmp 0x1eb3f
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xcd50
jmp 0x1eb54
leaq -0xc0(%rbp), %rdi
callq 0xcd90
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x11950
jmp 0x1eb75
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xcd50
jmp 0x1eb8a
leaq -0xd0(%rbp), %rdi
callq 0xcd90
leaq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x11b10
jmp 0x1ebab
leaq -0xb0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x11aa0
jmp 0x1ebc0
leaq -0xd8(%rbp), %rdi
callq 0xcd90
leaq -0xe0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x11b10
jmp 0x1ebe1
leaq -0xb0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x11aa0
jmp 0x1ebf6
leaq -0xe0(%rbp), %rdi
callq 0xcd90
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
leaq -0xb0(%rbp), %rsi
callq *%rax
jmp 0x1ec18
movq -0x18(%rbp), %rax
movq %rax, -0x140(%rbp)
cmpq $0x0, %rax
je 0x1ec36
movq -0x140(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0xf0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x11950
jmp 0x1ec4b
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xcd50
jmp 0x1ec60
leaq -0xf0(%rbp), %rdi
callq 0xcd90
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x1d200
jmp 0x1ec81
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1a3e0
movq (%rax), %rax
movq %rax, -0x148(%rbp)
cmpq $0x0, %rax
je 0x1ecae
movq -0x148(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0xf8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1bc20
jmp 0x1ecc0
movb $0x0, -0x1(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xcdc0
leaq -0xc8(%rbp), %rdi
callq 0xcdc0
leaq -0xb8(%rbp), %rdi
callq 0xcdc0
leaq -0xb0(%rbp), %rdi
callq 0x19b40
jmp 0x1edf7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1ede1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xcd90
jmp 0x1ede1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1edd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0xcd90
jmp 0x1edd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1edc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xcd90
jmp 0x1edc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xcd90
jmp 0x1edc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xcd90
jmp 0x1edc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xcdc0
leaq -0xc8(%rbp), %rdi
callq 0xcdc0
leaq -0xb8(%rbp), %rdi
callq 0xcdc0
leaq -0xb0(%rbp), %rdi
callq 0x19b40
jmp 0x1ee05
jmp 0x1edf1
jmp 0x1edf3
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0xc280
nop