// File: /workspace/github_cpp_makefile_star2_O3/nikhilYadala[P]Python_to_cpp/Source/src/convert_to_cpp.cpp
// Function: expr_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
std::string expr_type(std::string& expr,std::map< std::string,std::string >& variables)
{	

	if(expr[0]=='[')
		return "list";
	if(expr.substr(0,17)=="artificial_string")
		return "artificial_string";
	if(isdigit(expr[0]) || expr[0]=='-')
	{
		for(std::string::iterator i=expr.begin();i!=expr.end();++i)
			if(*i=='.')
				return "double";
		return "long int";
	}	
	std::string::iterator itr=expr.begin();
	std::string first_variable;
	while(itr!=expr.end()){
		if(is_symbol(*itr)&&*itr!='.')
			break;
		first_variable.push_back(*(itr++));
	}
	
	if(variables.count(first_variable))
		return variables[first_variable];	//Implicit type casting to be taken care of later on(small fix)
	else return "";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
cmpb $0x5b, (%rax)
jne 0x295e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x86c9(%rip), %rsi      # 0xb01b
leaq 0x86c6(%rip), %rdx      # 0xb01f
jmp 0x2af4
movq %rsi, %r15
movq %rdx, -0x50(%rbp)
leaq -0x48(%rbp), %r13
movl $0x11, %ecx
movq %r13, %rdi
xorl %edx, %edx
callq 0x2210
leaq 0x86a1(%rip), %rsi      # 0xb020
movq %r13, %rdi
callq 0x2080
movl %eax, %r12d
movq (%r13), %rdi
leaq -0x38(%rbp), %r14
cmpq %r14, %rdi
je 0x299c
callq 0x21c0
testl %r12d, %r12d
je 0x29f5
movq (%r15), %r13
movsbl (%r13), %eax
cmpl $0x2d, %eax
setne %cl
addl $-0x30, %eax
cmpl $0xa, %eax
setae %al
testb %al, %cl
jne 0x2a0f
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x29db
xorl %ecx, %ecx
cmpb $0x2e, (%r13,%rcx)
je 0x2adf
incq %rcx
cmpq %rcx, %rax
jne 0x29c7
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8650(%rip), %rsi      # 0xb039
leaq 0x8651(%rip), %rdx      # 0xb041
jmp 0x2af4
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x861d(%rip), %rsi      # 0xb020
leaq 0x8627(%rip), %rdx      # 0xb031
jmp 0x2af4
leaq -0x48(%rbp), %r12
movq %r14, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
leaq 0x8793(%rip), %r14      # 0xb1c0
movq (%r15), %rax
addq 0x8(%r15), %rax
cmpq %rax, %r13
je 0x2a72
movb (%r13), %al
xorl %ecx, %ecx
movb (%rcx,%r14), %dl
cmpb %al, %dl
je 0x2a54
leaq 0x1(%rcx), %rsi
cmpq $0x15, %rcx
movq %rsi, %rcx
jne 0x2a3f
cmpb %al, %dl
sete %cl
cmpb $0x2e, %al
setne %dl
testb %cl, %dl
jne 0x2a72
incq %r13
movsbl %al, %esi
movq %r12, %rdi
callq 0x21a0
jmp 0x2a2d
leaq -0x48(%rbp), %rsi
movq -0x50(%rbp), %r15
movq %r15, %rdi
leaq -0x38(%rbp), %r14
callq 0x4ed0
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x2ab6
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x4bc2
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x4d94
jmp 0x2acf
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x875a(%rip), %rdx      # 0xb21e
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x4e32
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x2afc
callq 0x21c0
jmp 0x2afc
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8545(%rip), %rsi      # 0xb032
leaq 0x8544(%rip), %rdx      # 0xb038
movq %rbx, %rdi
callq 0x4e32
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b12
jmp 0x2b12
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2b27
callq 0x21c0
movq %rbx, %rdi
callq 0x2370