// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
cmpb $0x5b, (%rax)
jne 0x27a1
leaq 0x687c(%rip), %rsi      # 0x901b
jmp 0x27de
movq %rdx, %r14
movq %rsi, %r15
leaq -0x58(%rbp), %r12
pushq $0x11
popq %rcx
movq %r12, %rdi
xorl %edx, %edx
callq 0x21d0
leaq 0x6861(%rip), %rsi      # 0x9020
movq %r12, %rdi
callq 0x42a8
movl %eax, %r13d
movq %r12, %rdi
callq 0x20e0
testb %r13b, %r13b
je 0x27fc
leaq 0x6842(%rip), %rsi      # 0x9020
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, -0x60(%rbp)
movq %rbx, -0x38(%rbp)
movq (%r15), %r14
movsbl (%r14), %eax
cmpl $0x2d, %eax
setne %cl
addl $-0x30, %eax
cmpl $0xa, %eax
setae %al
testb %al, %cl
jne 0x2841
movq 0x8(%r15), %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x28b7
cmpb $0x2e, (%r14,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x2824
leaq 0x67f3(%rip), %rsi      # 0x9032
jmp 0x28be
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%r15), %rax
addq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x2885
movsbl (%r14), %r13d
cmpl $0x2e, %r13d
setne %bl
movl %r13d, %edi
callq 0x2753
testb %al, %bl
jne 0x2885
incq %r14
movsbl %r13b, %esi
movq %r12, %rdi
callq 0x2160
jmp 0x2851
leaq -0x58(%rbp), %rsi
movq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0x42b8
movq -0x38(%rbp), %rbx
testq %rax, %rax
je 0x28cb
leaq -0x58(%rbp), %rsi
movq %r14, %rdi
callq 0x42dc
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2290
jmp 0x28de
leaq 0x677b(%rip), %rsi      # 0x9039
leaq -0x58(%rbp), %rdx
movq -0x38(%rbp), %rbx
jmp 0x27e2
leaq 0x692c(%rip), %rsi      # 0x91fe
leaq -0x29(%rbp), %rdx
movq %rbx, %rdi
callq 0x20b0
leaq -0x58(%rbp), %rdi
callq 0x20e0
jmp 0x27ea
jmp 0x28f0
jmp 0x28f0
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2320