// File: /workspace/github_cpp_makefile_star2_O1/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 0x6abb8
movq %r12, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4f248
movq (%r12), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %r13
leaq 0x114ef(%rip), %rbp     # 0x7c0ba
cmpq %rbp, %r13
je 0x6ac15
cmpb $0x2a, (%r13)
je 0x6abea
leaq 0x114dc(%rip), %rsi     # 0x7c0ba
movq %r13, %rdi
callq 0xa3f0
testl %eax, %eax
je 0x6ac15
leaq 0x114f4(%rip), %rax     # 0x7c0e5
cmpq %rax, %r13
je 0x6ac1a
cmpb $0x2a, (%r13)
je 0x6ac10
leaq 0x114e1(%rip), %rsi     # 0x7c0e5
movq %r13, %rdi
callq 0xa3f0
testl %eax, %eax
je 0x6ac1a
xorl %r13d, %r13d
jmp 0x6ac81
movq %r12, %r13
jmp 0x6ac81
movq 0x78(%r12), %r13
movq 0x80(%r12), %r12
testq %r12, %r12
je 0x6ac45
movq 0x2e375(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x6ac3f
incl 0x8(%r12)
jmp 0x6ac45
lock
incl 0x8(%r12)
movq (%r13), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rdi
cmpq %rbp, %rdi
je 0x6ac74
cmpb $0x2a, (%rdi)
jne 0x6ac60
xorl %r13d, %r13d
jmp 0x6ac74
leaq 0x11453(%rip), %rsi     # 0x7c0ba
callq 0xa3f0
xorl %ecx, %ecx
testl %eax, %eax
cmovneq %rcx, %r13
testq %r12, %r12
je 0x6ac81
movq %r12, %rdi
callq 0xdcba
testq %r13, %r13
je 0x6ad17
movq %rbx, (%rsp)
movq (%r15), %rax
movq 0x28(%rax), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x554f8
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 0x6ad75
movq 0xa8(%r14), %r15
movq 0xb0(%r14), %r14
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
addq $0x8, %r12
xorl %ebx, %ebx
movq (%r12), %rdx
cmpq %r14, %rdx
jne 0x6ad08
testq %rdx, %rdx
je 0x6ad64
movq -0x8(%r12), %rdi
movq %r15, %rsi
callq 0xa2e0
testl %eax, %eax
je 0x6ad64
addq $0x10, %rbx
addq $0x30, %r12
decq %rbp
jne 0x6ace9
jmp 0x6ad75
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x4f248
addq $0xa8, %r14
leaq 0xee5f(%rip), %rsi      # 0x79b8f
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xdbef
movq 0xa0(%rbx), %rdi
movq %r15, %rsi
callq 0x1834e
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ad7f
callq 0xa2b0
jmp 0x6ad7f
movq 0x78(%r13), %rax
movq (%rax,%rbx), %rdi
movq (%rsp), %rsi
callq 0x4f248
leaq 0x8(%rsp), %rdi
callq 0x16a16
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x16a16
jmp 0x6adb3
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6adb3
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510
nop