// File: menhits[P]phplus/src/Actions/VarAction.cpp
// Function: ConstGetAction::addToProg(std::shared_ptr<ActionData>, std::shared_ptr<ActionData>, CppProgram*)
void addToProg(Action inLeft, Action inRight, CppProgram* prog)
	{
		if (getReturnType()==String)
		{
			//addToProgPnStr(prog);
			//prog->name("$pnStr");
			prog->code(prog->getTypeCode(String));
			prog->pushExpr();
				
				auto sizeInfo=getReturnType()->getSubType("_size");
				auto dataInfo=getReturnType()->getSubType("_data");
				if (sizeInfo.type!=Int || dataInfo.type!=Byte->getPtr())
				{
					throw PhplusError("ConstGetAction::addToProg failed to access string properties", INTERNAL_ERROR);
				}
			
				prog->code(Int->getCppLiteral((char*)data+sizeInfo.offset, prog));
				prog->code(", ");
				//prog->code(Int->getCppLiteral((char*)data+sizeInfo.offset, prog));
				//prog->code(", (unsigned char*)\"");
				prog->code("(unsigned char*)\"");
				int len=*(int*)((char*)data+sizeInfo.offset);
				for (int i=0; i<len; i++)
				{
					char c=*((*(char**)((char*)data+dataInfo.offset))+i);
					
					if (c=='"')
					{
						prog->code("\\\"");
					}
					else if (c=='\\')
					{
						prog->code("\\\\");
					}
					else if (c>=32 && c<=126)
					{
						prog->code(string()+c);
					}
					else if (c=='\n')
					{
						prog->code("\\n");
					}
					else
					{
						prog->code(str::charToCppStringLiteralEscaped(c));
					}
					
				}
				prog->code("\"");
				
			prog->popExpr();
		}
		else
		{
			prog->code(getReturnType()->getCppLiteral(data, prog));
		}
	}

// Assembly:
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rdi, 0x3c0(%rsp)
movq %rsi, 0x3b8(%rsp)
movq %rdx, 0x3b0(%rsp)
movq %rcx, 0x3a8(%rsp)
movq 0x3c0(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
callq 0x1bed0
movq %rax, %rdi
leaq 0x51f42(%rip), %rsi     # 0x118508
callq 0x9b670
testb $0x1, %al
jne 0xc65d4
jmp 0xc7161
movq 0x3a8(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x51f1d(%rip), %rsi     # 0x118508
leaq 0x378(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x1a920
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
leaq 0x388(%rsp), %rdi
callq 0x285b0
jmp 0xc661f
movq 0xe0(%rsp), %rdi
leaq 0x388(%rsp), %rsi
callq 0x96750
jmp 0xc6636
leaq 0x388(%rsp), %rdi
callq 0xb6e8
leaq 0x378(%rsp), %rdi
callq 0x1a950
movq 0x3a8(%rsp), %rdi
callq 0x97930
movq 0xf0(%rsp), %rdi
callq 0x1bed0
movq %rax, %rdi
callq 0x1a660
movq %rax, 0xd0(%rsp)
leaq 0x32f(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0xb690
movq 0xd8(%rsp), %rdx
leaq 0xecd3(%rip), %rsi      # 0xd5371
leaq 0x330(%rsp), %rdi
callq 0xb4c0
jmp 0xc66ad
movq 0xd0(%rsp), %rsi
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq 0x350(%rsp), %rdi
leaq 0x330(%rsp), %rdx
callq *%rax
jmp 0xc66d0
leaq 0x330(%rsp), %rdi
callq 0xb6e8
leaq 0x32f(%rsp), %rdi
callq 0xb3f0
movq 0xf0(%rsp), %rdi
callq 0x1bed0
movq %rax, %rdi
callq 0x1a660
movq %rax, 0xc0(%rsp)
leaq 0x2ef(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0xb690
movq 0xc8(%rsp), %rdx
leaq 0xefe1(%rip), %rsi      # 0xd570c
leaq 0x2f0(%rsp), %rdi
callq 0xb4c0
jmp 0xc673a
movq 0xc0(%rsp), %rsi
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq 0x310(%rsp), %rdi
leaq 0x2f0(%rsp), %rdx
callq *%rax
jmp 0xc675d
leaq 0x2f0(%rsp), %rdi
callq 0xb6e8
leaq 0x2ef(%rsp), %rdi
callq 0xb3f0
leaq 0x350(%rsp), %rdi
addq $0x8, %rdi
leaq 0x51d5e(%rip), %rsi     # 0x1184e8
callq 0x1be90
movb %al, %cl
movb $0x0, 0x2d7(%rsp)
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xbf(%rsp)
jne 0xc67f9
leaq 0x318(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x51d1a(%rip), %rdi     # 0x1184d8
callq 0x1a660
movq %rax, %rsi
leaq 0x2d8(%rsp), %rdi
callq 0x9ed40
jmp 0xc67d5
movq 0xb0(%rsp), %rdi
movb $0x1, 0x2d7(%rsp)
leaq 0x2d8(%rsp), %rsi
callq 0x1be90
movb %al, 0xbf(%rsp)
movb 0xbf(%rsp), %al
movb %al, 0xaf(%rsp)
testb $0x1, 0x2d7(%rsp)
jne 0xc6813
jmp 0xc6820
leaq 0x2d8(%rsp), %rdi
callq 0x1a950
movb 0xaf(%rsp), %al
testb $0x1, %al
jne 0xc6830
jmp 0xc6a45
movb $0x1, 0x297(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq %rax, 0x98(%rsp)
leaq 0x2af(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0xb690
movq 0xa0(%rsp), %rdx
leaq 0x112aa(%rip), %rsi     # 0xd7b18
leaq 0x2b0(%rsp), %rdi
callq 0xb4c0
jmp 0xc687d
xorl %eax, %eax
movl %eax, %esi
leaq 0x298(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xfbe0
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rcx
leaq 0x2b0(%rsp), %rsi
movl $0x3, %edx
callq 0x35600
jmp 0xc68ba
movq 0x98(%rsp), %rdi
movb $0x0, 0x297(%rsp)
leaq 0x4ecf7(%rip), %rsi     # 0x1155c8
leaq -0xac268(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0xc7206
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6919
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x388(%rsp), %rdi
callq 0xb6e8
leaq 0x378(%rsp), %rdi
callq 0x1a950
jmp 0xc71f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6962
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x330(%rsp), %rdi
callq 0xb6e8
leaq 0x32f(%rsp), %rdi
callq 0xb3f0
jmp 0xc71f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc69ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x2f0(%rsp), %rdi
callq 0xb6e8
leaq 0x2ef(%rsp), %rdi
callq 0xb3f0
jmp 0xc714f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc7142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6a1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x298(%rsp), %rdi
callq 0xfc00
leaq 0x2b0(%rsp), %rdi
callq 0xb6e8
leaq 0x2af(%rsp), %rdi
callq 0xb3f0
testb $0x1, 0x297(%rsp)
jne 0xc6a33
jmp 0xc6a40
movq 0x98(%rsp), %rdi
callq 0xb2d0
jmp 0xc7142
movq 0x3a8(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x51a8c(%rip), %rdi     # 0x1184e8
callq 0x1a660
movq %rax, %rsi
movq 0xf0(%rsp), %rax
movq 0x78(%rax), %rdx
movq 0x350(%rsp), %rax
addq %rax, %rdx
movq 0x3a8(%rsp), %rcx
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq 0x270(%rsp), %rdi
callq *%rax
jmp 0xc6a96
movq 0x88(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x96750
jmp 0xc6aad
leaq 0x270(%rsp), %rdi
callq 0xb6e8
movq 0x3a8(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x24f(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0xb690
movq 0x80(%rsp), %rdx
leaq 0xebff(%rip), %rsi      # 0xd56ea
leaq 0x250(%rsp), %rdi
callq 0xb4c0
jmp 0xc6afa
movq 0x78(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x96750
jmp 0xc6b0e
leaq 0x250(%rsp), %rdi
callq 0xb6e8
leaq 0x24f(%rsp), %rdi
callq 0xb3f0
movq 0x3a8(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x227(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0xb690
movq 0x70(%rsp), %rdx
leaq 0x11002(%rip), %rsi     # 0xd7b55
leaq 0x228(%rsp), %rdi
callq 0xb4c0
jmp 0xc6b62
movq 0x68(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x96750
jmp 0xc6b76
leaq 0x228(%rsp), %rdi
callq 0xb6e8
leaq 0x227(%rsp), %rdi
callq 0xb3f0
movq 0xf0(%rsp), %rax
movq 0x78(%rax), %rax
movq 0x350(%rsp), %rcx
movl (%rax,%rcx), %eax
movl %eax, 0x220(%rsp)
movl $0x0, 0x21c(%rsp)
movl 0x21c(%rsp), %eax
cmpl 0x220(%rsp), %eax
jge 0xc7068
movq 0xf0(%rsp), %rax
movq 0x78(%rax), %rax
movq 0x310(%rsp), %rcx
movq (%rax,%rcx), %rax
movslq 0x21c(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x21b(%rsp)
movsbl 0x21b(%rsp), %eax
cmpl $0x22, %eax
jne 0xc6d76
movq 0x3a8(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x1f7(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xb690
movq 0x60(%rsp), %rdx
leaq 0x10f34(%rip), %rsi     # 0xd7b67
leaq 0x1f8(%rsp), %rdi
callq 0xb4c0
jmp 0xc6c42
movq 0x58(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x96750
jmp 0xc6c56
leaq 0x1f8(%rsp), %rdi
callq 0xb6e8
leaq 0x1f7(%rsp), %rdi
callq 0xb3f0
jmp 0xc7050
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x270(%rsp), %rdi
callq 0xb6e8
jmp 0xc7142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6cd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x250(%rsp), %rdi
callq 0xb6e8
leaq 0x24f(%rsp), %rdi
callq 0xb3f0
jmp 0xc7142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6d1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x228(%rsp), %rdi
callq 0xb6e8
leaq 0x227(%rsp), %rdi
callq 0xb3f0
jmp 0xc7142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6d64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xb6e8
leaq 0x1f7(%rsp), %rdi
callq 0xb3f0
jmp 0xc7142
movsbl 0x21b(%rsp), %eax
cmpl $0x5c, %eax
jne 0xc6e3d
movq 0x3a8(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x1cf(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xb690
movq 0x50(%rsp), %rdx
leaq 0x10db8(%rip), %rsi     # 0xd7b6a
leaq 0x1d0(%rsp), %rdi
callq 0xb4c0
jmp 0xc6dc1
movq 0x48(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x96750
jmp 0xc6dd5
leaq 0x1d0(%rsp), %rdi
callq 0xb6e8
leaq 0x1cf(%rsp), %rdi
callq 0xb3f0
jmp 0xc704e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6e2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0xb6e8
leaq 0x1cf(%rsp), %rdi
callq 0xb3f0
jmp 0xc7142
movsbl 0x21b(%rsp), %eax
cmpl $0x20, %eax
jl 0xc6f16
movsbl 0x21b(%rsp), %eax
cmpl $0x7e, %eax
jg 0xc6f16
movq 0x3a8(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x188(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xb4e0
movq 0x40(%rsp), %rsi
movsbl 0x21b(%rsp), %edx
leaq 0x1a8(%rsp), %rdi
callq 0x37040
jmp 0xc6e9a
movq 0x38(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x96750
jmp 0xc6eae
leaq 0x1a8(%rsp), %rdi
callq 0xb6e8
leaq 0x188(%rsp), %rdi
callq 0xb6e8
jmp 0xc704c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6f04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0xb6e8
leaq 0x188(%rsp), %rdi
callq 0xb6e8
jmp 0xc7142
movsbl 0x21b(%rsp), %eax
cmpl $0xa, %eax
jne 0xc6fdd
movq 0x3a8(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x167(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xb690
movq 0x30(%rsp), %rdx
leaq 0x10c1b(%rip), %rsi     # 0xd7b6d
leaq 0x168(%rsp), %rdi
callq 0xb4c0
jmp 0xc6f61
movq 0x28(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x96750
jmp 0xc6f75
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x167(%rsp), %rdi
callq 0xb3f0
jmp 0xc704a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc6fcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0x167(%rsp), %rdi
callq 0xb3f0
jmp 0xc7142
movq 0x3a8(%rsp), %rax
movq %rax, 0x20(%rsp)
movzbl 0x21b(%rsp), %esi
leaq 0x140(%rsp), %rdi
callq 0xcfac0
jmp 0xc7001
movq 0x20(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x96750
jmp 0xc7015
leaq 0x140(%rsp), %rdi
callq 0xb6e8
jmp 0xc704a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x140(%rsp), %rdi
callq 0xb6e8
jmp 0xc7142
jmp 0xc704c
jmp 0xc704e
jmp 0xc7050
jmp 0xc7052
movl 0x21c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x21c(%rsp)
jmp 0xc6bb9
movq 0x3a8(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xb690
movq 0x18(%rsp), %rdx
leaq 0xe628(%rip), %rsi      # 0xd56bb
leaq 0x120(%rsp), %rdi
callq 0xb4c0
jmp 0xc70a2
movq 0x10(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x96750
jmp 0xc70b6
leaq 0x120(%rsp), %rdi
callq 0xb6e8
leaq 0x11f(%rsp), %rdi
callq 0xb3f0
movq 0x3a8(%rsp), %rdi
callq 0x97a00
jmp 0xc70df
leaq 0x310(%rsp), %rdi
callq 0x3eec0
leaq 0x350(%rsp), %rdi
callq 0x3eec0
jmp 0xc71f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
jmp 0xc7135
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0x120(%rsp), %rdi
callq 0xb6e8
leaq 0x11f(%rsp), %rdi
callq 0xb3f0
leaq 0x310(%rsp), %rdi
callq 0x3eec0
leaq 0x350(%rsp), %rdi
callq 0x3eec0
jmp 0xc71f9
movq 0xf0(%rsp), %rdi
movq 0x3a8(%rsp), %rax
movq %rax, (%rsp)
callq 0x1bed0
movq %rax, %rdi
callq 0x1a660
movq %rax, %rsi
movq 0xf0(%rsp), %rax
movq 0x78(%rax), %rdx
movq 0x3a8(%rsp), %rcx
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq *%rax
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x96750
jmp 0xc71bf
leaq 0xf8(%rsp), %rdi
callq 0xb6e8
jmp 0xc71f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x370(%rsp)
movl %eax, 0x36c(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0xb6e8
jmp 0xc71f9
addq $0x3c8, %rsp            # imm = 0x3C8
retq
movq 0x370(%rsp), %rdi
callq 0xb680
nopw %cs:(%rax,%rax)