// File: menhits[P]phplus/src/Actions/FunctionAction.cpp
// Function: FunctionAction::resolveAction()
void resolveAction()
	{
		if (!node || action)
		{
			throw PhplusError("FunctionAction::resolveAction called when this action is in the wrong state", INTERNAL_ERROR);
		}
		
		action=node->getAction();
		
		if (!returnType->isVoid() && !returnType->matches(action->getReturnType()))
		{
			// the objects that are being returned are being destroyed before the function exits
			// also another problem: if a function returns a thing but nothing accepts the output, the destructor is not called
			//throw PhplusError("function body returns "+action->getReturnType()->getString()+" instead of "+returnType->getString(), SOURCE_ERROR, node->getToken());
			throw PhplusError("function body returns "+action->getReturnType()->getString()+" instead of "+returnType->getString()+"\n"+action->getDescription(), SOURCE_ERROR, node->getToken());
		}
		
		if (!action->getInLeftType()->isVoid() || !action->getInRightType()->isVoid())
		{
			throw PhplusError(action->getDescription() + " put into function even though its inputs are not void", INTERNAL_ERROR);
		}
	}

// Assembly:
subq $0x248, %rsp            # imm = 0x248
movq %rdi, 0x240(%rsp)
movq 0x240(%rsp), %rdi
movq %rdi, 0x50(%rsp)
addq $0x98, %rdi
callq 0x3f020
testb $0x1, %al
jne 0xb942e
jmp 0xb9448
movq 0x50(%rsp), %rdi
addq $0x88, %rdi
callq 0x1be40
testb $0x1, %al
jne 0xb9448
jmp 0xb9551
movb $0x1, 0x1f7(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq %rax, 0x40(%rsp)
leaq 0x21f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xb690
movq 0x48(%rsp), %rdx
leaq 0x1ddb3(%rip), %rsi     # 0xd7230
leaq 0x220(%rsp), %rdi
callq 0xb4c0
jmp 0xb948c
xorl %eax, %eax
movl %eax, %esi
leaq 0x1f8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xfbe0
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rcx
leaq 0x220(%rsp), %rsi
movl $0x3, %edx
callq 0x35600
jmp 0xb94c0
movq 0x40(%rsp), %rdi
movb $0x0, 0x1f7(%rsp)
leaq 0x5c0f4(%rip), %rsi     # 0x1155c8
leaq -0x9ee6b(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0xb9b34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9529
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xfc00
leaq 0x220(%rsp), %rdi
callq 0xb6e8
leaq 0x21f(%rsp), %rdi
callq 0xb3f0
testb $0x1, 0x1f7(%rsp)
jne 0xb9542
jmp 0xb954c
movq 0x40(%rsp), %rdi
callq 0xb2d0
jmp 0xb9b27
movq 0x50(%rsp), %rdi
addq $0x98, %rdi
callq 0x1a5f0
movq %rax, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x1aaa0
movq 0x50(%rsp), %rdi
addq $0x88, %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x1ac90
leaq 0x1e0(%rsp), %rdi
callq 0x1acc0
movq 0x50(%rsp), %rdi
addq $0x28, %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movb %al, %cl
movb $0x0, 0x1cf(%rsp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x37(%rsp)
jne 0xb962c
movq 0x50(%rsp), %rdi
addq $0x28, %rdi
callq 0x1a660
movq 0x50(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x88, %rdi
callq 0x1bb50
movq %rax, %rdi
callq 0x1bed0
movq %rax, %rsi
leaq 0x1d0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x1a920
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movb $0x1, 0x1cf(%rsp)
callq 0x9f1a0
movb %al, 0x36(%rsp)
jmp 0xb9622
movb 0x36(%rsp), %al
xorb $-0x1, %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
movb %al, 0x1f(%rsp)
testb $0x1, 0x1cf(%rsp)
jne 0xb9640
jmp 0xb964d
leaq 0x1d0(%rsp), %rdi
callq 0x1a950
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0xb965a
jmp 0xb99a3
movb $0x1, 0xb7(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq 0x50(%rsp), %rdi
movq %rax, 0x10(%rsp)
addq $0x88, %rdi
callq 0x1bb50
movq %rax, %rdi
callq 0x1bed0
movq %rax, %rdi
callq 0x1a660
movq %rax, %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq 0x108(%rsp), %rdi
callq *%rax
jmp 0xb96a8
leaq 0x1dbcd(%rip), %rsi     # 0xd727c
leaq 0x128(%rsp), %rdi
leaq 0x108(%rsp), %rdx
callq 0x1bcf0
jmp 0xb96c6
leaq 0x1dbc6(%rip), %rdx     # 0xd7293
leaq 0x148(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0xfa60
jmp 0xb96e4
movq 0x50(%rsp), %rdi
addq $0x28, %rdi
callq 0x1a660
movq %rax, %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq 0xe8(%rsp), %rdi
callq *%rax
jmp 0xb9708
leaq 0x168(%rsp), %rdi
leaq 0x148(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x1bf20
jmp 0xb9727
leaq 0x187ca(%rip), %rdx     # 0xd1ef8
leaq 0x188(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0xfa60
jmp 0xb9745
movq 0x50(%rsp), %rdi
addq $0x88, %rdi
callq 0x1bb50
movq %rax, %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq 0xc8(%rsp), %rdi
callq *%rax
jmp 0xb976c
leaq 0x1a8(%rsp), %rdi
leaq 0x188(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0x1bf20
jmp 0xb978b
movq 0x50(%rsp), %rdi
addq $0x98, %rdi
callq 0x1a5f0
movq %rax, %rsi
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq 0xb8(%rsp), %rdi
callq *%rax
jmp 0xb97b2
movq 0x10(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
xorl %edx, %edx
leaq 0xb8(%rsp), %rcx
callq 0x35600
jmp 0xb97d0
movq 0x10(%rsp), %rdi
movb $0x0, 0xb7(%rsp)
leaq 0x5bde4(%rip), %rsi     # 0x1155c8
leaq -0x9f17b(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0xb9b34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
testb $0x1, 0x1cf(%rsp)
jne 0xb9815
jmp 0xb9822
leaq 0x1d0(%rsp), %rdi
callq 0x1a950
jmp 0xb9b27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb997b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb996e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9961
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9947
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb993a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb992d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9920
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0xfc00
leaq 0x1a8(%rsp), %rdi
callq 0xb6e8
leaq 0xc8(%rsp), %rdi
callq 0xb6e8
leaq 0x188(%rsp), %rdi
callq 0xb6e8
leaq 0x168(%rsp), %rdi
callq 0xb6e8
leaq 0xe8(%rsp), %rdi
callq 0xb6e8
leaq 0x148(%rsp), %rdi
callq 0xb6e8
leaq 0x128(%rsp), %rdi
callq 0xb6e8
leaq 0x108(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0xb7(%rsp)
jne 0xb9994
jmp 0xb999e
movq 0x10(%rsp), %rdi
callq 0xb2d0
jmp 0xb9b27
movq 0x50(%rsp), %rdi
addq $0x88, %rdi
callq 0x1bb50
movq %rax, %rdi
callq 0x3f060
movq %rax, %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0xb99d3
jmp 0xb9a05
movq 0x50(%rsp), %rdi
addq $0x88, %rdi
callq 0x1bb50
movq %rax, %rdi
callq 0x3f070
movq %rax, %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0xb9b1f
movb $0x1, 0x5f(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq 0x50(%rsp), %rdi
movq %rax, 0x8(%rsp)
addq $0x88, %rdi
callq 0x1bb50
movq %rax, %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq 0x70(%rsp), %rdi
callq *%rax
jmp 0xb9a3d
leaq 0x1d7aa(%rip), %rdx     # 0xd71ee
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xfa60
jmp 0xb9a58
xorl %eax, %eax
movl %eax, %esi
leaq 0x60(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xfbe0
movq 0x8(%rsp), %rdi
movq (%rsp), %rcx
leaq 0x90(%rsp), %rsi
movl $0x3, %edx
callq 0x35600
jmp 0xb9a87
movq 0x8(%rsp), %rdi
movb $0x0, 0x5f(%rsp)
leaq 0x5bb30(%rip), %rsi     # 0x1155c8
leaq -0x9f42f(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0xb9b34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9b0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0xb9b00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xfc00
leaq 0x90(%rsp), %rdi
callq 0xb6e8
leaq 0x70(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0x5f(%rsp)
jne 0xb9b13
jmp 0xb9b1d
movq 0x8(%rsp), %rdi
callq 0xb2d0
jmp 0xb9b27
addq $0x248, %rsp            # imm = 0x248
retq
movq 0x210(%rsp), %rdi
callq 0xb680
nopw %cs:(%rax,%rax)
nop