// File: menhits[P]phplus/src/AstNode.cpp
// Function: AstExpression::resolveAction()
void AstExpression::resolveAction()
{
	if (!inLeftType->isVoid() || !inRightType->isVoid())
	{
		throw PhplusError("AstExpression given non void input", INTERNAL_ERROR, getToken());
	}
	
	if (rightIn->isType())
	{
		throw PhplusError("types must be declared as constants", SOURCE_ERROR, rightIn->getToken());
	}
	else if (center->isType() || center->isFunctionWithOutput() || leftIn->isType())
	{
		throw PhplusError("a function implementation got into an expression node somehow", INTERNAL_ERROR, center->getToken());
	}
	else
	{
		leftIn->setInput(ns, dynamic, Void, Void);
		rightIn->setInput(ns, dynamic, Void, Void);
		
		center->setInput(ns, dynamic, leftIn->getReturnType(), rightIn->getReturnType());
		
		//error.log("left: " + leftIn->getString(), JSYK);
		//error.log("center: " + center->getString(), JSYK);
		//error.log("right: " + rightIn->getString(), JSYK);
		//error.log("", JSYK);
		
		action=branchAction(leftIn->getAction(), center->getAction(), rightIn->getAction());
	}
	
	if (action->nameHint.empty())
		action->nameHint=nameHint;
}

// Assembly:
subq $0x258, %rsp            # imm = 0x258
movq %rdi, 0x250(%rsp)
movq 0x250(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
addq $0x28, %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0x14807
jmp 0x14829
movq 0xa8(%rsp), %rdi
addq $0x38, %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0x14962
movb $0x1, 0x207(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq %rax, 0x98(%rsp)
leaq 0x22f(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0xb690
movq 0xa0(%rsp), %rdx
leaq 0xbc8e5(%rip), %rsi     # 0xd114c
leaq 0x230(%rsp), %rdi
callq 0xb4c0
jmp 0x14876
movq 0xa8(%rsp), %rsi
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq 0x208(%rsp), %rdi
callq *%rax
jmp 0x14891
movq 0x98(%rsp), %rdi
leaq 0x230(%rsp), %rsi
movl $0x3, %edx
leaq 0x208(%rsp), %rcx
callq 0x35600
jmp 0x148b5
movq 0x98(%rsp), %rdi
movb $0x0, 0x207(%rsp)
leaq 0x100cfc(%rip), %rsi    # 0x1155c8
leaq 0x5d9d(%rip), %rdx      # 0x1a670
callq 0xb640
jmp 0x15179
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x14937
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x1492a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
leaq 0x208(%rsp), %rdi
callq 0xfc00
leaq 0x230(%rsp), %rdi
callq 0xb6e8
leaq 0x22f(%rsp), %rdi
callq 0xb3f0
testb $0x1, 0x207(%rsp)
jne 0x14950
jmp 0x1495d
movq 0x98(%rsp), %rdi
callq 0xb2d0
jmp 0x1516c
movq 0xa8(%rsp), %rdi
addq $0x98, %rdi
callq 0x1a5f0
movq %rax, %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testb $0x1, %al
jne 0x14988
jmp 0x14acd
movb $0x1, 0x1c7(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq %rax, 0x88(%rsp)
leaq 0x1df(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xb690
movq 0x90(%rsp), %rdx
leaq 0xbc7a9(%rip), %rsi     # 0xd116f
leaq 0x1e0(%rsp), %rdi
callq 0xb4c0
jmp 0x149d5
movq 0xa8(%rsp), %rdi
addq $0x98, %rdi
callq 0x1a5f0
movq %rax, %rsi
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq 0x1c8(%rsp), %rdi
callq *%rax
jmp 0x149ff
movq 0x88(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
xorl %edx, %edx
leaq 0x1c8(%rsp), %rcx
callq 0x35600
jmp 0x14a20
movq 0x88(%rsp), %rdi
movb $0x0, 0x1c7(%rsp)
leaq 0x100b91(%rip), %rsi    # 0x1155c8
leaq 0x5c32(%rip), %rdx      # 0x1a670
callq 0xb640
jmp 0x15179
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x14aa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x14a95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0xfc00
leaq 0x1e0(%rsp), %rdi
callq 0xb6e8
leaq 0x1df(%rsp), %rdi
callq 0xb3f0
testb $0x1, 0x1c7(%rsp)
jne 0x14abb
jmp 0x14ac8
movq 0x88(%rsp), %rdi
callq 0xb2d0
jmp 0x1516c
movq 0xa8(%rsp), %rdi
addq $0x90, %rdi
callq 0x1a5f0
movq %rax, %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testb $0x1, %al
jne 0x14b35
movq 0xa8(%rsp), %rdi
addq $0x90, %rdi
callq 0x1a5f0
movq %rax, %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb $0x1, %al
jne 0x14b35
movq 0xa8(%rsp), %rdi
addq $0x88, %rdi
callq 0x1a5f0
movq %rax, %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testb $0x1, %al
jne 0x14b35
jmp 0x14c71
movb $0x1, 0x187(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq %rax, 0x78(%rsp)
leaq 0x19f(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0xb690
movq 0x80(%rsp), %rdx
leaq 0xbc623(%rip), %rsi     # 0xd1193
leaq 0x1a0(%rsp), %rdi
callq 0xb4c0
jmp 0x14b7f
movq 0xa8(%rsp), %rdi
addq $0x90, %rdi
callq 0x1a5f0
movq %rax, %rsi
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq 0x188(%rsp), %rdi
callq *%rax
jmp 0x14ba9
movq 0x78(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
movl $0x3, %edx
leaq 0x188(%rsp), %rcx
callq 0x35600
jmp 0x14bca
movq 0x78(%rsp), %rdi
movb $0x0, 0x187(%rsp)
leaq 0x1009ea(%rip), %rsi    # 0x1155c8
leaq 0x5a8b(%rip), %rdx      # 0x1a670
callq 0xb640
jmp 0x15179
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x14c49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x14c3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
leaq 0x188(%rsp), %rdi
callq 0xfc00
leaq 0x1a0(%rsp), %rdi
callq 0xb6e8
leaq 0x19f(%rsp), %rdi
callq 0xb3f0
testb $0x1, 0x187(%rsp)
jne 0x14c62
jmp 0x14c6c
movq 0x78(%rsp), %rdi
callq 0xb2d0
jmp 0x1516c
movq 0xa8(%rsp), %rdi
addq $0x88, %rdi
callq 0x1a5f0
movq 0xa8(%rsp), %rsi
movq %rax, 0x58(%rsp)
addq $0x70, %rsi
leaq 0x170(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x1a8f0
movq 0xa8(%rsp), %rax
movzbl 0x68(%rax), %eax
movl %eax, 0x54(%rsp)
leaq 0x1037e9(%rip), %rsi    # 0x1184a8
movq %rsi, 0x48(%rsp)
leaq 0x160(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x1a920
movq 0x48(%rsp), %rsi
leaq 0x150(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x1a920
movl 0x54(%rsp), %edx
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
andl $0x1, %edx
callq 0x1a6f0
jmp 0x14d0f
leaq 0x150(%rsp), %rdi
callq 0x1a950
leaq 0x160(%rsp), %rdi
callq 0x1a950
leaq 0x170(%rsp), %rdi
callq 0x1a6e0
movq 0xa8(%rsp), %rdi
addq $0x98, %rdi
callq 0x1a5f0
movq 0xa8(%rsp), %rsi
movq %rax, 0x28(%rsp)
addq $0x70, %rsi
leaq 0x140(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x1a8f0
movq 0xa8(%rsp), %rax
movzbl 0x68(%rax), %eax
movl %eax, 0x24(%rsp)
leaq 0x103724(%rip), %rsi    # 0x1184a8
movq %rsi, 0x18(%rsp)
leaq 0x130(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x1a920
movq 0x18(%rsp), %rsi
leaq 0x120(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x1a920
movl 0x24(%rsp), %edx
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
andl $0x1, %edx
callq 0x1a6f0
jmp 0x14dd4
leaq 0x120(%rsp), %rdi
callq 0x1a950
leaq 0x130(%rsp), %rdi
callq 0x1a950
leaq 0x140(%rsp), %rdi
callq 0x1a6e0
movq 0xa8(%rsp), %rdi
addq $0x90, %rdi
callq 0x1a5f0
movq 0xa8(%rsp), %rsi
movq %rax, 0x8(%rsp)
addq $0x70, %rsi
leaq 0x110(%rsp), %rdi
callq 0x1a8f0
movq 0xa8(%rsp), %rdi
movb 0x68(%rdi), %al
movb %al, 0x17(%rsp)
addq $0x88, %rdi
callq 0x1a5f0
movq %rax, %rsi
leaq 0x100(%rsp), %rdi
callq 0x1aec0
jmp 0x14e5a
movq 0xa8(%rsp), %rdi
addq $0x98, %rdi
callq 0x1a5f0
movq %rax, %rsi
leaq 0xf0(%rsp), %rdi
callq 0x1aec0
jmp 0x14e80
movq 0x8(%rsp), %rdi
movb 0x17(%rsp), %al
movzbl %al, %edx
andl $0x1, %edx
leaq 0x110(%rsp), %rsi
leaq 0x100(%rsp), %rcx
leaq 0xf0(%rsp), %r8
callq 0x1a6f0
jmp 0x14eae
leaq 0xf0(%rsp), %rdi
callq 0x1a950
leaq 0x100(%rsp), %rdi
callq 0x1a950
leaq 0x110(%rsp), %rdi
callq 0x1a6e0
movq 0xa8(%rsp), %rdi
addq $0x88, %rdi
callq 0x1a5f0
movq %rax, %rsi
leaq 0xd0(%rsp), %rdi
callq 0x1aaa0
movq 0xa8(%rsp), %rdi
addq $0x90, %rdi
callq 0x1a5f0
movq %rax, %rsi
leaq 0xc0(%rsp), %rdi
callq 0x1aaa0
jmp 0x14f1f
movq 0xa8(%rsp), %rdi
addq $0x98, %rdi
callq 0x1a5f0
movq %rax, %rsi
leaq 0xb0(%rsp), %rdi
callq 0x1aaa0
jmp 0x14f45
leaq 0xe0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0xb3840
jmp 0x14f6c
movq 0xa8(%rsp), %rdi
addq $0x48, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x1ac90
leaq 0xe0(%rsp), %rdi
callq 0x1acc0
leaq 0xb0(%rsp), %rdi
callq 0x1acc0
leaq 0xc0(%rsp), %rdi
callq 0x1acc0
leaq 0xd0(%rsp), %rdi
callq 0x1acc0
jmp 0x15113
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x1a950
leaq 0x160(%rsp), %rdi
callq 0x1a950
leaq 0x170(%rsp), %rdi
callq 0x1a6e0
jmp 0x1516c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x1a950
leaq 0x130(%rsp), %rdi
callq 0x1a950
leaq 0x140(%rsp), %rdi
callq 0x1a6e0
jmp 0x1516c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x15098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x1508b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x1a950
leaq 0x100(%rsp), %rdi
callq 0x1a950
leaq 0x110(%rsp), %rdi
callq 0x1a6e0
jmp 0x1516c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x15104
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
jmp 0x150f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x220(%rsp)
movl %eax, 0x21c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x1acc0
leaq 0xc0(%rsp), %rdi
callq 0x1acc0
leaq 0xd0(%rsp), %rdi
callq 0x1acc0
jmp 0x1516c
jmp 0x15115
movq 0xa8(%rsp), %rdi
addq $0x48, %rdi
callq 0x1bb50
movq %rax, %rdi
addq $0x8, %rdi
callq 0xb610
testb $0x1, %al
jne 0x15138
jmp 0x15164
movq 0xa8(%rsp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, (%rsp)
addq $0x48, %rdi
callq 0x1bb50
movq (%rsp), %rsi
movq %rax, %rdi
addq $0x8, %rdi
callq 0xb050
addq $0x258, %rsp            # imm = 0x258
retq
movq 0x220(%rsp), %rdi
callq 0xb680
nopl (%rax)