// File: /workspace/github_cpp_makefile_star2_O2/melop[P]admixem/testexpression.cpp
// Function: UITestExpression()
void UITestExpression() {

	Parser p("");
	
	
	p["chr1_30"] = 1;
	p["chr1_20"] = 0;
	
	
	double result = p.Evaluate ("if(chr1_30==chr1_20, 10000 , chr1_30 + chr1_20 * 2)");   // use in expression 
    
	cout << ( p.symbols_.find("chr1_31") == p.symbols_.end()? "true": "false") << endl;
	
	cout << result << endl;
	
	result = p.Evaluate ("if(chr1_30==0, sqrt(20000) , chr1_30 + chr1_10 * 2)");   // use in expression 
    
	cout << result << endl;

	result = p.Evaluate ("(chr1_30 == chr1_20)*3");   // use in expression 
    
	cout << result << endl;
	
	
	for(std::map<std::string,double>::iterator it = p.symbols_.begin(); it != p.symbols_.end(); ++it) 
	{
		
		cout << (it->first) << "\n"; //list all keys
	}


}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x1624(%rip), %rsi      # 0x2dfe9
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9512
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1714c
leaq 0x8(%rsp), %rdi
callq 0x71a0
leaq 0x3905(%rip), %rsi      # 0x302f9
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9512
leaq 0x98(%rsp), %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x94ac
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax)
leaq 0x8(%rsp), %rdi
callq 0x71a0
leaq 0x38cb(%rip), %rsi      # 0x30301
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9512
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x94ac
andq $0x0, (%rax)
leaq 0x8(%rsp), %rdi
callq 0x71a0
leaq 0x38a2(%rip), %rsi      # 0x30309
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9512
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x92d0
movsd %xmm0, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x71a0
leaq 0x38a1(%rip), %rsi      # 0x3033d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9512
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1fb0c
leaq 0xa0(%rsp), %r12
cmpq %r12, %rax
leaq 0x387b(%rip), %rax      # 0x30345
leaq 0x2494(%rip), %rsi      # 0x2ef65
cmoveq %rax, %rsi
movq 0x184b4(%rip), %rdi     # 0x44f90
callq 0x73d0
movq %rax, %rdi
callq 0x71c0
leaq 0x8(%rsp), %rdi
callq 0x71a0
movq 0x18496(%rip), %rdi     # 0x44f90
movsd 0x28(%rsp), %xmm0
callq 0x7620
movq %rax, %rdi
callq 0x71c0
leaq 0x3836(%rip), %rsi      # 0x3034a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9512
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x92d0
movsd %xmm0, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x71a0
movq 0x18447(%rip), %rdi     # 0x44f90
movsd 0x28(%rsp), %xmm0
callq 0x7620
movq %rax, %rdi
callq 0x71c0
leaq 0x381b(%rip), %rsi      # 0x3037e
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9512
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x92d0
movsd %xmm0, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x71a0
movq 0x183f8(%rip), %rdi     # 0x44f90
movsd 0x28(%rsp), %xmm0
callq 0x7620
movq %rax, %rdi
callq 0x71c0
movq 0xb0(%rsp), %r15
movq 0x183d6(%rip), %rbx     # 0x44f90
leaq 0x1386(%rip), %r14      # 0x2df47
cmpq %r12, %r15
je 0x2cbea
leaq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x7370
movq %rax, %rdi
movq %r14, %rsi
callq 0x73d0
movq %r15, %rdi
callq 0x72d0
movq %rax, %r15
jmp 0x2cbc1
leaq 0x30(%rsp), %rdi
callq 0x17850
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2cc2f
jmp 0x2cc40
jmp 0x2cc2f
jmp 0x2cc40
jmp 0x2cc2f
jmp 0x2cc40
jmp 0x2cc2f
jmp 0x2cc40
jmp 0x2cc2f
jmp 0x2cc40
jmp 0x2cc2f
jmp 0x2cc40
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x71a0
jmp 0x2cc4d
movq %rax, %rbx
jmp 0x2cc4d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x71a0
jmp 0x2cc43
jmp 0x2cc40
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x17850
movq %rbx, %rdi
callq 0x76d0