// File: menhits[P]phplus/src/Actions/Action.cpp
// Function: LambdaAction::LambdaAction(std::shared_ptr<TypeBase>, std::shared_ptr<TypeBase>, std::shared_ptr<TypeBase>, std::function<void* (void*, void*)>, std::function<void (std::shared_ptr<ActionData>, std::shared_ptr<ActionData>, CppProgram*)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
LambdaAction(Type inLeftTypeIn, Type inRightTypeIn, Type returnTypeIn,
		function<void*(void*,void*)> lambdaIn,
		function<void(Action inLeft, Action inRight, CppProgram* prog)> cppWriterIn,
		string textIn)
			: ActionData(returnTypeIn, inLeftTypeIn, inRightTypeIn)
	{
		if (cppWriterIn==nullptr)
		{
			cppWriter=[=](Action inLeft, Action inRight, CppProgram* prog)
			{
				prog->comment("lambda action '"+textIn+"' has not yet been implemented for C++");
			};
		}
		else
		{
			cppWriter=cppWriterIn;
		}
		
		if (lambdaIn==nullptr)
		{
			lambdaIn=[=](void* inLeft, void* inRight)->void*
			{
				throw PhplusError("action '"+textIn+"' has not yet been implemented for the interpreter", RUNTIME_ERROR);
			};
		}
		else
		{
			lambda=lambdaIn;
		}
		
		setDescription(textIn);
	}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %r9, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, %rax
movq 0x28(%rsp), %rsi
movq %rax, 0x38(%rsp)
movq 0x140(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq %rdi, 0x130(%rsp)
movq %rax, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %r8, 0x110(%rsp)
movq %r9, 0x108(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x1a920
movq 0x38(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x1a920
movq 0x40(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x1a920
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0xaf570
jmp 0xafe0d
leaq 0xd8(%rsp), %rdi
callq 0x1a950
leaq 0xe8(%rsp), %rdi
callq 0x1a950
leaq 0xf8(%rsp), %rdi
callq 0x1a950
movq 0x48(%rsp), %rdi
leaq 0x67290(%rip), %rax     # 0x1170d0
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x78, %rdi
movq %rdi, (%rsp)
callq 0xb0440
movq 0x48(%rsp), %rdi
addq $0x98, %rdi
movq %rdi, 0x8(%rsp)
callq 0xb0480
movq 0x48(%rsp), %rdi
addq $0xb8, %rdi
movq %rdi, 0x10(%rsp)
callq 0xb4e0
movq 0x18(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb04c0
testb $0x1, %al
jne 0xafe97
jmp 0xaff57
movq 0x30(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0xb1a0
jmp 0xafeab
movq 0x48(%rsp), %rdi
addq $0x98, %rdi
leaq 0xa8(%rsp), %rsi
callq 0xb04f0
jmp 0xafec6
leaq 0xa8(%rsp), %rdi
callq 0xb0540
jmp 0xaff71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x1a950
leaq 0xe8(%rsp), %rdi
callq 0x1a950
leaq 0xf8(%rsp), %rdi
callq 0x1a950
jmp 0xb006f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0xb0048
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xb0540
jmp 0xb0048
movq 0x18(%rsp), %rsi
movq 0x48(%rsp), %rdi
addq $0x98, %rdi
callq 0xb0550
jmp 0xaff6f
jmp 0xaff71
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb05a0
testb $0x1, %al
jne 0xaff85
jmp 0xaffdf
movq 0x30(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0xb1a0
jmp 0xaff99
movq 0x20(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xb05d0
jmp 0xaffad
leaq 0x88(%rsp), %rdi
callq 0xb0620
jmp 0xafff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xb0620
jmp 0xb0048
movq 0x20(%rsp), %rsi
movq 0x48(%rsp), %rdi
addq $0x78, %rdi
callq 0xb0630
jmp 0xafff4
jmp 0xafff6
movq 0x30(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0xb1a0
jmp 0xb0007
movq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xb0680
jmp 0xb0018
leaq 0x68(%rsp), %rdi
callq 0xb6e8
addq $0x138, %rsp            # imm = 0x138
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xb6e8
movq 0x10(%rsp), %rdi
callq 0xb6e8
movq 0x8(%rsp), %rdi
callq 0x95bf0
movq (%rsp), %rdi
callq 0x95c00
movq 0x48(%rsp), %rdi
callq 0xb0270
movq 0xd0(%rsp), %rdi
callq 0xb680
nopl (%rax)