// File: 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
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3450
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x3b41
leaq -0x19(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3400
movq -0xc0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
leaq 0x12519(%rip), %rsi     # 0x1602b
callq 0x3340
jmp 0x3b19
leaq -0x19(%rbp), %rdi
callq 0x32a0
jmp 0x3eb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x19(%rbp), %rdi
callq 0x32a0
jmp 0x3ec0
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x50(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movl $0x11, %ecx
callq 0x3260
movq -0xd8(%rbp), %rdi
leaq 0x124c4(%rip), %rsi     # 0x16030
callq 0x71d0
movb %al, -0xc9(%rbp)
jmp 0x3b79
leaq -0x50(%rbp), %rdi
callq 0x3170
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0x3b8e
jmp 0x3bfc
leaq -0x51(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x3400
movq -0xc0(%rbp), %rdi
movq -0xe0(%rbp), %rdx
leaq 0x1247d(%rip), %rsi     # 0x16030
callq 0x3340
jmp 0x3bba
leaq -0x51(%rbp), %rdi
callq 0x32a0
jmp 0x3eb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3170
jmp 0x3ec0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x32a0
jmp 0x3ec0
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3450
movsbl (%rax), %edi
callq 0x3200
cmpl $0x0, %eax
jne 0x3c2f
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3450
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x3d25
movq -0x10(%rbp), %rdi
callq 0x31d0
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3140
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x7190
testb $0x1, %al
jne 0x3c5c
jmp 0x3cd1
leaq -0x60(%rbp), %rdi
callq 0x6f70
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x3cc1
leaq -0x69(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x3400
movq -0xc0(%rbp), %rdi
movq -0xe8(%rbp), %rdx
leaq 0x123b0(%rip), %rsi     # 0x16042
callq 0x3340
jmp 0x3c99
leaq -0x69(%rbp), %rdi
callq 0x32a0
jmp 0x3eb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x32a0
jmp 0x3ec0
jmp 0x3cc3
leaq -0x60(%rbp), %rdi
callq 0x6fd0
jmp 0x3c3c
leaq -0x6a(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3400
movq -0xc0(%rbp), %rdi
movq -0xf0(%rbp), %rdx
leaq 0x12353(%rip), %rsi     # 0x16049
callq 0x3340
jmp 0x3cfd
leaq -0x6a(%rbp), %rdi
callq 0x32a0
jmp 0x3eb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x6a(%rbp), %rdi
callq 0x32a0
jmp 0x3ec0
movq -0x10(%rbp), %rdi
callq 0x31d0
movq %rax, -0x78(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3360
movq -0x10(%rbp), %rdi
callq 0x3140
movq %rax, -0xa0(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x7190
testb $0x1, %al
jne 0x3d64
jmp 0x3dd3
leaq -0x78(%rbp), %rdi
callq 0x6f70
movsbl (%rax), %edi
callq 0x3a40
testb $0x1, %al
jne 0x3d7b
jmp 0x3d8e
leaq -0x78(%rbp), %rdi
callq 0x6f70
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x3d8e
jmp 0x3dd3
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0x7150
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x6f70
movsbl (%rax), %esi
leaq -0x98(%rbp), %rdi
callq 0x31c0
jmp 0x3dbd
jmp 0x3d3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3ea2
movq -0x18(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x7200
movq %rax, -0xf8(%rbp)
jmp 0x3dec
movq -0xf8(%rbp), %rax
cmpq $0x0, %rax
je 0x3e33
movq -0x18(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x7260
movq %rax, -0x100(%rbp)
jmp 0x3e12
movq -0x100(%rbp), %rsi
movq -0xc0(%rbp), %rdi
callq 0x30f0
jmp 0x3e27
movl $0x1, -0xac(%rbp)
jmp 0x3e94
leaq -0xad(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x3400
movq -0xc0(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq 0x123b3(%rip), %rsi     # 0x1620e
callq 0x3340
jmp 0x3e62
leaq -0xad(%rbp), %rdi
callq 0x32a0
movl $0x1, -0xac(%rbp)
jmp 0x3e94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xad(%rbp), %rdi
callq 0x32a0
jmp 0x3ea2
leaq -0x98(%rbp), %rdi
callq 0x3170
jmp 0x3eb0
leaq -0x98(%rbp), %rdi
callq 0x3170
jmp 0x3ec0
movq -0xb8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x33f0
nopl (%rax)