// File: /workspace/github_cpp_makefile_star2_O1/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 0x2974
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x86b3(%rip), %rsi      # 0xb01b
leaq 0x86b0(%rip), %rdx      # 0xb01f
jmp 0x2a56
movq %rsi, %r15
movq %rdx, -0x50(%rbp)
leaq -0x48(%rbp), %r13
movl $0x11, %ecx
movq %r13, %rdi
xorl %edx, %edx
callq 0x2210
leaq 0x868b(%rip), %rsi      # 0xb020
movq %r13, %rdi
callq 0x2080
movl %eax, %r12d
movq (%r13), %rdi
leaq -0x38(%rbp), %r14
cmpq %r14, %rdi
je 0x29b2
callq 0x21c0
testl %r12d, %r12d
je 0x2a41
movq (%r15), %r13
movsbl (%r13), %eax
cmpl $0x2d, %eax
setne %cl
addl $-0x30, %eax
cmpl $0xa, %eax
setae %al
testb %al, %cl
jne 0x2a70
movq 0x8(%r15), %rax
testq %rax, %rax
sete %r14b
je 0x2a2a
cmpb $0x2e, (%r13)
je 0x2a08
movl $0x1, %ecx
cmpq %rcx, %rax
sete %r14b
je 0x2a2a
cmpb $0x2e, (%r13,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x29f3
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x861c(%rip), %rsi      # 0xb032
leaq 0x861b(%rip), %rdx      # 0xb038
movq %rbx, %rdi
callq 0x4e92
testb %r14b, %r14b
je 0x2a5e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8601(%rip), %rsi      # 0xb039
leaq 0x8602(%rip), %rdx      # 0xb041
jmp 0x2a56
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x85d1(%rip), %rsi      # 0xb020
leaq 0x85db(%rip), %rdx      # 0xb031
movq %rbx, %rdi
callq 0x4e92
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x48(%rbp), %r12
movq %r14, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
leaq 0x8732(%rip), %r14      # 0xb1c0
movq (%r15), %rax
addq 0x8(%r15), %rax
cmpq %rax, %r13
je 0x2ad8
movb (%r13), %al
movb $0x1, %cl
cmpb $0x20, %al
je 0x2abf
movl $0x1, %edx
cmpq $0x16, %rdx
setne %cl
je 0x2abf
leaq 0x1(%rdx), %rsi
cmpb %al, (%rdx,%r14)
movq %rsi, %rdx
jne 0x2aa9
cmpb $0x2e, %al
setne %dl
testb %cl, %dl
jne 0x2ad8
incq %r13
movsbl %al, %esi
movq %r12, %rdi
callq 0x21a0
jmp 0x2a8e
leaq -0x48(%rbp), %rsi
movq -0x50(%rbp), %r15
movq %r15, %rdi
leaq -0x38(%rbp), %r14
callq 0x4f2c
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x2b1c
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x4c30
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x4df8
jmp 0x2b35
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x86f4(%rip), %rdx      # 0xb21e
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x4e92
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x2a5e
callq 0x21c0
jmp 0x2a5e
jmp 0x2b50
jmp 0x2b50
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2b65
callq 0x21c0
movq %rbx, %rdi
callq 0x2380