// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
addq $0x80, %rdi
movq 0x58(%rbx), %rsi
subq 0x50(%rbx), %rsi
sarq $0x3, %rsi
callq 0x6fb6
movq %rbx, %rdi
callq 0x6ab4
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x50(%rbx), %r13
addq $0x8, %r13
cmpq 0x58(%rbx), %r13
je 0x6ea8
movq 0x80(%rbx), %r14
leaq -0x68(%rbp), %r12
leaq 0x38(%rbx), %rax
movq %rax, -0x50(%rbp)
addq $0x78, %r14
xorl %r15d, %r15d
movq %r15, -0x40(%rbp)
movq -0x48(%rbp), %rax
movb %r15b, (%rax)
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %r15, -0xa0(%rbp)
movb %r15b, -0x98(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %r15, -0x80(%rbp)
movb %r15b, -0x78(%rbp)
movq %r15, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movl $0x0, -0xd0(%rbp)
movq %r15, -0xc8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq %rax, -0xb8(%rbp)
movq %r15, -0xb0(%rbp)
movslq (%r13), %rdi
movslq 0x4(%r13), %rsi
movq -0x50(%rbp), %rdx
leaq -0x48(%rbp), %rcx
leaq -0xa8(%rbp), %r8
leaq -0xd8(%rbp), %r9
callq 0x2f41
leaq -0x88(%rbp), %rdi
leaq 0x4429(%rip), %rsi      # 0xb21e
callq 0x2080
testl %eax, %eax
jne 0x6e1d
movq -0x80(%rbp), %rdx
movl $0x4, %r8d
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
leaq 0x4469(%rip), %rcx      # 0xb281
callq 0x2310
leaq 0x20(%r14), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x2110
leaq 0x40(%r14), %rdi
leaq -0x88(%rbp), %rsi
callq 0x2110
leaq 0x60(%r14), %rdi
movq %r12, %rsi
callq 0x6ffc
movq %r14, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2110
leaq -0xd8(%rbp), %rdi
callq 0x73c6
movq %r12, %rdi
callq 0x742a
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x6e7e
callq 0x21c0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x6e96
callq 0x21c0
addq $0x8, %r13
addq $0x78, %r14
cmpq 0x58(%rbx), %r13
jne 0x6d50
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6eba
callq 0x21c0
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x73c6
leaq -0xa8(%rbp), %rdi
callq 0x6f78
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6ef9
callq 0x21c0
movq %rbx, %rdi
callq 0x2380
nop