// File: /workspace/github_cpp_makefile_star2_O2/menhits[P]phplus/src/Actions/MakeTupleAction.cpp
// Function: GetElemFromTupleAction::addToProg(std::shared_ptr<ActionData>, std::shared_ptr<ActionData>, CppProgram*)
void addToProg(Action inLeft, Action inRight, CppProgram* prog)
	{
		if (typeIn->getAllSubTypes()->size()==1)
		{
			inLeft->addToProg(prog);
			return;
		}
		
		MakeTupleAction * makeTupleAction=nullptr;
		
		if (typeid(*inLeft)==typeid(MakeTupleAction))
		{
			makeTupleAction=(MakeTupleAction *)&*inLeft;
		}
		
		else if (typeid(*inLeft)==typeid(CppTupleCastAction))
		{
			Action castAction=((CppTupleCastAction *)&*inLeft)->action;
			
			if (typeid(*castAction)==typeid(MakeTupleAction))
			{
				makeTupleAction=(MakeTupleAction *)&*castAction;
			}
		}
		
		if (makeTupleAction)
		{
			auto types=*inLeft->getReturnType()->getAllSubTypes();
			
			for (int i=0; i<int(types.size()); i++)
			{
				if (types[i].name==name)
				{
					makeTupleAction->sourceActions[i]->addToProg(prog);
					break;
				}
			}
		}
		else
		{
			/*
			if (inLeft->nameHint=="in" || inLeft->nameHint=="me")
			{
				prog->code(name);
			}
			else
			*/
			{
				inLeft->addToProg(prog);
				prog->code("."+name);
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x78(%rdi), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x8(%rax), %rcx
subq (%rax), %rcx
movq (%r15), %rdi
cmpq $0x30, %rcx
jne 0x4cedf
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a606
movq (%rdi), %rax
movq -0x8(%rax), %rdi
leaq 0x2ca33(%rip), %rsi     # 0x79920
callq 0x21f04
movq (%r15), %rsi
testb %al, %al
je 0x4cf8c
movq %rsi, %r12
testq %r12, %r12
je 0x4cfe8
movq %r12, 0x20(%rsp)
movq 0x28(%rsi), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x3e7be
addq $0xa8, %r14
pushq $-0x10
popq %r15
pushq $-0x1
popq %r13
xorl %ebp, %ebp
pushq $0x30
popq %r12
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
cqto
idivq %r12
cltq
incq %r13
cmpq %rax, %r13
jge 0x4cf7f
addq $0x10, %r15
addq %rbp, %rdi
addq $0x30, %rbp
movq %r14, %rsi
callq 0xcdda
testb %al, %al
je 0x4cf38
movq 0x20(%rsp), %rax
movq 0x78(%rax), %rax
movq (%rax,%r15), %rdi
movq %rbx, %rsi
callq 0x3a606
movq %rsp, %rdi
callq 0x12f12
jmp 0x4d022
movq (%rsi), %rax
movq -0x8(%rax), %rdi
leaq 0x2c9f6(%rip), %rsi     # 0x79990
callq 0x21f04
movq (%r15), %rsi
testb %al, %al
je 0x4cfe8
addq $0x78, %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0x12c1e
movq (%r12), %rax
movq (%rax), %rax
movq -0x8(%rax), %rdi
leaq 0x2c959(%rip), %rsi     # 0x79920
callq 0x21f04
movl %eax, %ebp
movq (%r12), %r12
leaq 0x8(%rsp), %rdi
callq 0xc984
movq (%r15), %rsi
testb %bpl, %bpl
jne 0x4cf00
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x3a606
addq $0xa8, %r14
leaq 0xac23(%rip), %rsi      # 0x57c24
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xc8a1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x39d6c
movq %rsp, %rdi
callq 0xa558
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x12f12
jmp 0x4d049
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa558
movq %rbx, %rdi
callq 0xa500
nop