// File: /workspace/github_cpp_makefile_star2_O2/nikhilYadala[P]Python_to_cpp/Source/src/generate_cpp_code.cpp
// Function: source_code::generate_cpp_code()
void source_code::generate_cpp_code()
{

	generated_cpp_code.resize(functions.size());
	main_func(*this);
	std::string converted_code;
	std::vector< std::pair< std::string,function_declaration > >::iterator itr2=generated_cpp_code.begin()+1;
	for(std::vector< int_pair >::iterator itr1=functions.begin()+1;itr1!=functions.end();++itr1,++itr2)
	{
		converted_code.clear();
		function_declaration _function;
		std::map< std::string,std::string > variables;	//name,pair(value,type)
		convert_to_cpp(itr1->first,itr1->second,lines,converted_code,&_function,variables);
					
		if(_function.return_type=="")
				_function.return_type="void";		
		
				itr2->second=_function;	
		itr2->first=converted_code;	

	}

	// for(std::vector< std::pair< std::string,function_declaration > >::iterator itr=generated_cpp_code.begin();itr!=generated_cpp_code.end();++itr)
	// 	{
	// 		std::cout<<itr->first<<"\n";
	// 		std::cout<<"name-"<<itr->second.name<<"  return_type-"<<itr->second.return_type<<"args-\n";
			
	// 		for(std::vector< string_pair >::iterator itr1=itr->second.args.begin();itr1!=itr->second.args.end();++itr1)
	// 			std::cout<<itr1->first<<"   "<<itr1->second<<"\n";
				
	// 			std::cout<<"\n\n";						
	// 	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r14
addq $0x80, %rdi
movq 0x58(%r14), %rsi
subq 0x50(%r14), %rsi
sarq $0x3, %rsi
callq 0x5fb8
movq %r14, %rdi
callq 0x5be0
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x50(%r14), %rbx
leaq -0xd0(%rbp), %r13
leaq 0x38(%r14), %rax
movq %rax, -0x30(%rbp)
movl $0x98, %r12d
movq %r14, -0x38(%rbp)
addq 0x80(%r14), %r12
addq $0x8, %rbx
xorl %r15d, %r15d
leaq -0xe0(%rbp), %r14
movq -0x38(%rbp), %rax
cmpq 0x58(%rax), %rbx
je 0x5ec9
andq $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movb %r15b, (%rax)
movq %r13, -0xe0(%rbp)
andq $0x0, -0xd8(%rbp)
movb %r15b, -0xd0(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0xc0(%rbp)
andq $0x0, -0xb8(%rbp)
movb %r15b, -0xb0(%rbp)
andq $0x0, 0x40(%r13)
andl $0x0, -0x80(%rbp)
andq $0x0, -0x78(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rax, -0x68(%rbp)
andq $0x0, -0x60(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r13)
movslq (%rbx), %rdi
movslq 0x4(%rbx), %rsi
movq -0x30(%rbp), %rdx
leaq -0x58(%rbp), %rcx
movq %r14, %r8
leaq -0x88(%rbp), %r9
callq 0x2bd9
leaq -0xc0(%rbp), %rdi
leaq 0x338b(%rip), %rsi      # 0x91fe
callq 0x42a8
testb %al, %al
je 0x5e8f
leaq -0xc0(%rbp), %rdi
leaq 0x33d7(%rip), %rsi      # 0x9261
callq 0x2350
movq %r12, %rdi
movq %r14, %rsi
callq 0x5f56
leaq -0x20(%r12), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2110
leaq -0x88(%rbp), %rdi
callq 0x634c
movq %r14, %rdi
callq 0x5f8e
addq $0x8, %rbx
addq $0x78, %r12
jmp 0x5dd3
leaq -0x58(%rbp), %rdi
callq 0x20e0
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x634c
leaq -0xe0(%rbp), %rdi
callq 0x5f8e
leaq -0x58(%rbp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2320