// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_ast_node::eval_number(pugi::impl::(anonymous namespace)::xpath_context const&, pugi::impl::(anonymous namespace)::xpath_stack const&)
double eval_number(const xpath_context& c, const xpath_stack& stack)
		{
			switch (_type)
			{
			case ast_op_add:
				return _left->eval_number(c, stack) + _right->eval_number(c, stack);

			case ast_op_subtract:
				return _left->eval_number(c, stack) - _right->eval_number(c, stack);

			case ast_op_multiply:
				return _left->eval_number(c, stack) * _right->eval_number(c, stack);

			case ast_op_divide:
				return _left->eval_number(c, stack) / _right->eval_number(c, stack);

			case ast_op_mod:
				return fmod(_left->eval_number(c, stack), _right->eval_number(c, stack));

			case ast_op_negate:
				return -_left->eval_number(c, stack);

			case ast_number_constant:
				return _data.number;

			case ast_func_last:
				return static_cast<double>(c.size);

			case ast_func_position:
				return static_cast<double>(c.position);

			case ast_func_count:
			{
				xpath_allocator_capture cr(stack.result);

				return static_cast<double>(_left->eval_node_set(c, stack, nodeset_eval_all).size());
			}

			case ast_func_string_length_0:
			{
				xpath_allocator_capture cr(stack.result);

				return static_cast<double>(string_value(c.n, stack.result).length());
			}

			case ast_func_string_length_1:
			{
				xpath_allocator_capture cr(stack.result);

				return static_cast<double>(_left->eval_string(c, stack).length());
			}

			case ast_func_number_0:
			{
				xpath_allocator_capture cr(stack.result);

				return convert_string_to_number(string_value(c.n, stack.result).c_str());
			}

			case ast_func_number_1:
				return _left->eval_number(c, stack);

			case ast_func_sum:
			{
				xpath_allocator_capture cr(stack.result);

				double r = 0;

				xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_all);

				for (const xpath_node* it = ns.begin(); it != ns.end(); ++it)
				{
					xpath_allocator_capture cri(stack.result);

					r += convert_string_to_number(string_value(*it, stack.result).c_str());
				}

				return r;
			}

			case ast_func_floor:
			{
				double r = _left->eval_number(c, stack);

				return r == r ? floor(r) : r;
			}

			case ast_func_ceiling:
			{
				double r = _left->eval_number(c, stack);

				return r == r ? ceil(r) : r;
			}

			case ast_func_round:
				return round_nearest_nzero(_left->eval_number(c, stack));

			case ast_variable:
			{
				assert(_rettype == _data.variable->type());

				if (_rettype == xpath_type_number)
					return _data.variable->get_number();
			}

			// fallthrough
			default:
			{
				switch (_rettype)
				{
				case xpath_type_boolean:
					return eval_boolean(c, stack) ? 1 : 0;

				case xpath_type_string:
				{
					xpath_allocator_capture cr(stack.result);

					return convert_string_to_number(eval_string(c, stack).c_str());
				}

				case xpath_type_node_set:
				{
					xpath_allocator_capture cr(stack.result);

					return convert_string_to_number(eval_string(c, stack).c_str());
				}

				default:
					assert(false && "Wrong expression for return type number"); // unreachable
					return 0;
				}

			}
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x230(%rbp)
movsbl (%rax), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x228(%rbp)
subl $0x2e, %eax
ja 0x4c9df
movq -0x228(%rbp), %rax
leaq 0x1e778(%rip), %rcx     # 0x6a960
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movq -0x230(%rbp), %rax
movsd %xmm0, -0x238(%rbp)
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movaps %xmm0, %xmm1
movsd -0x238(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movq -0x230(%rbp), %rax
movsd %xmm0, -0x240(%rbp)
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movaps %xmm0, %xmm1
movsd -0x240(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movq -0x230(%rbp), %rax
movsd %xmm0, -0x248(%rbp)
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movaps %xmm0, %xmm1
movsd -0x248(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movq -0x230(%rbp), %rax
movsd %xmm0, -0x250(%rbp)
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movaps %xmm0, %xmm1
movsd -0x250(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movq -0x230(%rbp), %rax
movsd %xmm0, -0x258(%rbp)
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movaps %xmm0, %xmm1
movsd -0x258(%rbp), %xmm0
callq 0x7800
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x18(%rbp), %rax
movq 0x18(%rax), %xmm0
movaps 0x1ef1a(%rip), %xmm1    # 0x6b300
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1ef1e(%rip), %xmm1    # 0x6b310
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x18(%rbp), %rax
movq 0x10(%rax), %xmm0
movaps 0x1eee5(%rip), %xmm1    # 0x6b300
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1eee9(%rip), %xmm1    # 0x6b310
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x607e0
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x60(%rbp), %rdi
xorl %r8d, %r8d
callq 0x4e6d0
jmp 0x4c471
leaq -0x60(%rbp), %rdi
callq 0x61380
movq %rax, -0x260(%rbp)
jmp 0x4c483
movq -0x260(%rbp), %rax
movq %rax, %xmm0
movaps 0x1ee6a(%rip), %xmm1    # 0x6b300
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1ee6e(%rip), %xmm1    # 0x6b310
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x60890
jmp 0x4cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x60890
jmp 0x4cb9d
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x90(%rbp), %rdi
callq 0x607e0
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x60a90
jmp 0x4c50a
leaq -0xa8(%rbp), %rdi
callq 0x4e200
movq %rax, -0x268(%rbp)
jmp 0x4c51f
movq -0x268(%rbp), %rax
movq %rax, %xmm0
movaps 0x1edce(%rip), %xmm1    # 0x6b300
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1edd2(%rip), %xmm1    # 0x6b310
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x60890
jmp 0x4cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x60890
jmp 0x4cb9d
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x607e0
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0xe0(%rbp), %rdi
callq 0x4cd60
jmp 0x4c5b4
leaq -0xe0(%rbp), %rdi
callq 0x4e200
movq %rax, -0x270(%rbp)
jmp 0x4c5c9
movq -0x270(%rbp), %rax
movq %rax, %xmm0
movaps 0x1ed24(%rip), %xmm1    # 0x6b300
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1ed28(%rip), %xmm1    # 0x6b310
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x60890
jmp 0x4cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x60890
jmp 0x4cb9d
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x100(%rbp), %rdi
callq 0x607e0
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
leaq -0x118(%rbp), %rdi
callq 0x60a90
jmp 0x4c656
leaq -0x118(%rbp), %rdi
callq 0x4e1e0
movq %rax, -0x278(%rbp)
jmp 0x4c66b
movq -0x278(%rbp), %rdi
callq 0x5cfa0
movsd %xmm0, -0x280(%rbp)
jmp 0x4c681
movsd -0x280(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x60890
jmp 0x4cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x60890
jmp 0x4cb9d
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x138(%rbp), %rdi
callq 0x607e0
movq -0x230(%rbp), %rax
movq $0x0, -0x140(%rbp)
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x160(%rbp), %rdi
xorl %r8d, %r8d
callq 0x4e6d0
jmp 0x4c720
leaq -0x160(%rbp), %rdi
callq 0x4ed40
movq %rax, -0x288(%rbp)
jmp 0x4c735
movq -0x288(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x4ed60
movq %rax, -0x290(%rbp)
jmp 0x4c766
movq -0x298(%rbp), %rax
movq -0x290(%rbp), %rcx
cmpq %rcx, %rax
je 0x4c83c
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x188(%rbp), %rdi
callq 0x607e0
jmp 0x4c792
movq -0x168(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
leaq -0x1a0(%rbp), %rdi
callq 0x60a90
jmp 0x4c7ae
leaq -0x1a0(%rbp), %rdi
callq 0x4e1e0
movq %rax, -0x2a0(%rbp)
jmp 0x4c7c3
movq -0x2a0(%rbp), %rdi
callq 0x5cfa0
movsd %xmm0, -0x2a8(%rbp)
jmp 0x4c7d9
movsd -0x2a8(%rbp), %xmm0
addsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x140(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x60890
movq -0x168(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x168(%rbp)
jmp 0x4c743
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x4c85a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x60890
jmp 0x4c85a
movsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x60890
jmp 0x4cb8f
leaq -0x138(%rbp), %rdi
callq 0x60890
jmp 0x4cb9d
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movsd %xmm0, -0x1a8(%rbp)
movsd -0x1a8(%rbp), %xmm0
ucomisd -0x1a8(%rbp), %xmm0
jne 0x4c8b6
jp 0x4c8b6
movsd -0x1a8(%rbp), %xmm0
callq 0x7140
movsd %xmm0, -0x2b0(%rbp)
jmp 0x4c8c6
movsd -0x1a8(%rbp), %xmm0
movsd %xmm0, -0x2b0(%rbp)
movsd -0x2b0(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
movsd %xmm0, -0x1b0(%rbp)
movsd -0x1b0(%rbp), %xmm0
ucomisd -0x1b0(%rbp), %xmm0
jne 0x4c923
jp 0x4c923
movsd -0x1b0(%rbp), %xmm0
callq 0x7a10
movsd %xmm0, -0x2b8(%rbp)
jmp 0x4c933
movsd -0x1b0(%rbp), %xmm0
movsd %xmm0, -0x2b8(%rbp)
movsd -0x2b8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4c1a0
callq 0x613a0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %ecx
movl %ecx, -0x2bc(%rbp)
movq 0x20(%rax), %rdi
callq 0x4a1d0
movl %eax, %ecx
movl -0x2bc(%rbp), %eax
cmpl %ecx, %eax
jne 0x4c994
jmp 0x4c9b3
leaq 0x21373(%rip), %rdi     # 0x6dd0e
leaq 0x1e9b3(%rip), %rsi     # 0x6b355
movl $0x28a8, %edx           # imm = 0x28A8
leaq 0x218a0(%rip), %rcx     # 0x6e24e
callq 0x7180
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2, %eax
jne 0x4c9dd
movq -0x230(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4a210
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
jmp 0x4c9df
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x2c0(%rbp)
subl $0x1, %eax
je 0x4cae0
jmp 0x4c9fb
movl -0x2c0(%rbp), %eax
subl $0x3, %eax
je 0x4ca4a
jmp 0x4ca08
movl -0x2c0(%rbp), %eax
subl $0x4, %eax
jne 0x4cb70
jmp 0x4ca19
movq -0x230(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4b6c0
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4cb8f
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x607e0
movq -0x230(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x1e8(%rbp), %rdi
callq 0x4cd60
jmp 0x4ca7a
leaq -0x1e8(%rbp), %rdi
callq 0x4e1e0
movq %rax, -0x2c8(%rbp)
jmp 0x4ca8f
movq -0x2c8(%rbp), %rdi
callq 0x5cfa0
movsd %xmm0, -0x2d0(%rbp)
jmp 0x4caa5
movsd -0x2d0(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x60890
jmp 0x4cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x60890
jmp 0x4cb9d
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x208(%rbp), %rdi
callq 0x607e0
movq -0x230(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x220(%rbp), %rdi
callq 0x4cd60
jmp 0x4cb10
leaq -0x220(%rbp), %rdi
callq 0x4e1e0
movq %rax, -0x2d8(%rbp)
jmp 0x4cb25
movq -0x2d8(%rbp), %rdi
callq 0x5cfa0
movsd %xmm0, -0x2e0(%rbp)
jmp 0x4cb3b
movsd -0x2e0(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x60890
jmp 0x4cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x60890
jmp 0x4cb9d
leaq 0x21749(%rip), %rdi     # 0x6e2c0
leaq 0x1e7d7(%rip), %rsi     # 0x6b355
movl $0x28c5, %edx           # imm = 0x28C5
leaq 0x216c4(%rip), %rcx     # 0x6e24e
callq 0x7180
movsd -0x8(%rbp), %xmm0
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x7600
nopw %cs:(%rax,%rax)