// File: /workspace/github_cpp_makefile_star2_O3/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), %r12
cmpq $0x30, %rcx
jne 0x6bac0
movq %r12, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ff7c
movq (%r12), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %r13
leaq 0x115a7(%rip), %rbp     # 0x7d07a
cmpq %rbp, %r13
je 0x6bb4c
cmpb $0x2a, (%r13)
jne 0x6baf1
leaq 0x115bf(%rip), %rax     # 0x7d0a5
cmpq %rax, %r13
jne 0x6bc25
jmp 0x6bb27
leaq 0x11582(%rip), %rsi     # 0x7d07a
movq %r13, %rdi
callq 0xa3f0
testl %eax, %eax
je 0x6bb4c
leaq 0x1159a(%rip), %rax     # 0x7d0a5
cmpq %rax, %r13
je 0x6bb27
leaq 0x1158e(%rip), %rsi     # 0x7d0a5
movq %r13, %rdi
callq 0xa3f0
testl %eax, %eax
jne 0x6bc25
movq 0x78(%r12), %r13
movq 0x80(%r12), %r12
testq %r12, %r12
je 0x6bb57
movq 0x2e468(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x6bb51
incl 0x8(%r12)
jmp 0x6bb57
movq %r12, %r13
jmp 0x6bb99
lock
incl 0x8(%r12)
movq (%r13), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rdi
cmpq %rbp, %rdi
je 0x6bb80
cmpb $0x2a, (%rdi)
je 0x6bb7d
leaq 0x11506(%rip), %rsi     # 0x7d07a
callq 0xa3f0
testl %eax, %eax
je 0x6bb80
xorl %r13d, %r13d
testq %r12, %r12
je 0x6bb8d
movq %r12, %rdi
callq 0xdce4
movq (%r15), %r12
testq %r13, %r13
je 0x6bc25
movq %r13, (%rsp)
movq 0x28(%r12), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x56106
movq (%r15), %r12
movq 0x8(%r15), %rax
subq %r12, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbp
testl %ebp, %ebp
jle 0x6bc86
movq 0xa8(%r14), %r15
movq 0xb0(%r14), %r14
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
addq $0x8, %r12
xorl %r13d, %r13d
cmpq %r14, (%r12)
jne 0x6bc16
testq %r14, %r14
je 0x6bc72
movq -0x8(%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xa2e0
testl %eax, %eax
je 0x6bc72
addq $0x10, %r13
addq $0x30, %r12
decq %rbp
jne 0x6bbf7
jmp 0x6bc86
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4ff7c
addq $0xa8, %r14
leaq 0xef11(%rip), %rsi      # 0x7ab4f
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xdc11
movq 0xa0(%rbx), %rdi
movq %r15, %rsi
callq 0x1861a
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bc90
callq 0xa2b0
jmp 0x6bc90
movq (%rsp), %rax
movq 0x78(%rax), %rax
movq (%rax,%r13), %rdi
movq %rbx, %rsi
callq 0x4ff7c
leaq 0x8(%rsp), %rdi
callq 0x16c9e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x16c9e
jmp 0x6bcc4
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bcc4
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510