// File: /workspace/github_cpp_makefile_star2_O2/gioannides[P]Language_Processors/src/../include/ast/class_forward_declarations.hpp
// Function: load_locals(Context&, std::basic_ofstream<char, std::char_traits<char>>&, int)
inline void load_locals(Context& contxt, std::ofstream& file, int good_index)
{
	file << std::endl << "\taddiu $" << contxt.Regs+1 << ", $sp, " << contxt.Variables[good_index].offset; 
	if(contxt.nested_arrays){
		file << std::endl << "\tadd $" << contxt.Regs+1 << ", $" << contxt.Regs+1 << ", $25";				
	}
	if(contxt.Variables[good_index].Pointer && contxt.Variables[good_index].DataType != "float"){
		//file << std::endl << "\tlw\t$" << contxt.Regs+1 << ", " << contxt.Variables[good_index].offset << "($sp) #" << contxt.Variables[good_index].id;
		file << std::endl << "\tlw\t$" << contxt.Regs+1 << ", 0($" << contxt.Regs+1 << ") #" << contxt.Variables[good_index].id;	
		
		
			contxt.regType[contxt.Regs+1]='i';
		
	}
	else if(contxt.Variables[good_index].Pointer && contxt.Variables[good_index].DataType == "float"){
		
		//file << std::endl << "\tlw\t$" << contxt.Regs+1 << ", " << contxt.Variables[good_index].offset << "($sp) #" << contxt.Variables[good_index].id;
		file << std::endl << "\tlw\t$" << contxt.Regs+1 << ", 0($" << contxt.Regs+1 << ") #" << contxt.Variables[good_index].id;	

		contxt.regType[contxt.Regs+1]='i';
	}
	
			
	else if(contxt.Variables[good_index].DataType == "char" )  
	{
		//file << std::endl << "\tlb\t$" << contxt.Regs+1 << ", " << contxt.Variables[good_index].offset << "($sp) #" << contxt.Variables[good_index].id;
		file << std::endl << "\tlb\t$" << contxt.Regs+1 << ", 0($" << contxt.Regs+1 << ") #" << contxt.Variables[good_index].id;	
		
		contxt.regType[contxt.Regs+1]='c';
	}
	else if( (contxt.Variables[good_index].DataType == "int" ||contxt.Variables[good_index].DataType == "unsigned" || contxt.Variables[good_index].DataType =="signed") && contxt.Variables[good_index].DataType != "float")
	{
		//file << std::endl << "\tlw\t$" << contxt.Regs+1 << ", " << contxt.Variables[good_index].offset << "($sp) #" << contxt.Variables[good_index].id;	
		file << std::endl << "\tlw\t$" << contxt.Regs+1 << ", 0($" << contxt.Regs+1 << ") #" << contxt.Variables[good_index].id;	
		
		if(contxt.Variables[good_index].DataType=="unsigned"){
			contxt.regType[contxt.Regs+1]='u';
		}	
		else{
			contxt.regType[contxt.Regs+1]='i';
		}		
			
	}
	else if(contxt.Variables[good_index].DataType== "short" && contxt.Variables[good_index].DataType != "float")
	{
		//file << std::endl << "\tlh\t$" << contxt.Regs+1 << ", " << contxt.Variables[good_index].offset << "($sp) #" << contxt.Variables[good_index].id;			
		file << std::endl << "\tlh\t$" << contxt.Regs+1 << ", 0($" << contxt.Regs+1 << ") #" << contxt.Variables[good_index].id;	
		
		contxt.regType[contxt.Regs+1]='i';					
	}
	else if(contxt.Variables[good_index].DataType == "float") //TODO: CHECK OK
	{
		//file << std::endl << "\tlwc1\t$f" << contxt.Regs+1 << ", " << contxt.Variables[good_index].offset << "($sp) #" << contxt.Variables[good_index].id;
		file << std::endl << "\tlwc1\t$f" << contxt.Regs+1 << ", 0($" << contxt.Regs+1 << ") #" << contxt.Variables[good_index].id;	
		
		file << std::endl << "\tnop\t";
		contxt.regType[contxt.Regs+1]='f';		
	}
	if(contxt.Variables[good_index].DataType == "unsigned") 
				{
					contxt.is_unsigned = true;			
				}
				if(contxt.Variables[good_index].DataType == "float") {
					contxt.float_ = true;
				}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x7190
leaq 0x159d5(%rip), %rsi     # 0x2d8e2
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x15a6d(%rip), %rsi     # 0x2d999
movq %rax, %rdi
callq 0x7310
movslq %ebp, %rcx
movq 0x240(%rbx), %rdx
imulq $0xb0, %rcx, %r15
movl 0x50(%rdx,%r15), %esi
movq %rax, %rdi
callq 0x7590
cmpl $0x0, 0x13e90(%rbx)
je 0x17fb0
movq %r14, %rdi
callq 0x7190
leaq 0x15b9c(%rip), %rsi     # 0x2db06
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x15812(%rip), %rsi     # 0x2d79b
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x15a31(%rip), %rsi     # 0x2d9d9
movq %rax, %rdi
callq 0x7310
movq 0x240(%rbx), %rdi
movb 0x9c(%rdi,%r15), %al
cmpb $0x1, %al
jne 0x17fe9
addq %r15, %rdi
addq $0x58, %rdi
leaq 0x155be(%rip), %rsi     # 0x2d58f
callq 0x14630
testb %al, %al
jne 0x1800c
movq 0x240(%rbx), %rdi
movb 0x9c(%rdi,%r15), %al
testb $0x1, %al
je 0x18093
addq %r15, %rdi
addq $0x58, %rdi
leaq 0x15590(%rip), %rsi     # 0x2d58f
callq 0x820e
testb %al, %al
je 0x1808c
movq %r14, %rdi
callq 0x7190
leaq 0x15b2b(%rip), %rsi     # 0x2db46
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x158dc(%rip), %rsi     # 0x2d916
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x159ba(%rip), %rsi     # 0x2da13
movq %rax, %rdi
callq 0x7310
movq 0x240(%rbx), %rcx
leaq (%rcx,%r15), %rsi
addq $0x8, %rsi
movq %rax, %rdi
callq 0x72d0
movslq 0x310(%rbx), %rax
movb $0x69, 0x342(%rax,%rbx)
jmp 0x18129
movq 0x240(%rbx), %rdi
addq %r15, %rdi
addq $0x58, %rdi
leaq 0x1550d(%rip), %rsi     # 0x2d5ae
callq 0x820e
testb %al, %al
je 0x18180
movq %r14, %rdi
callq 0x7190
leaq 0x15a8f(%rip), %rsi     # 0x2db4c
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1583a(%rip), %rsi     # 0x2d916
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x15918(%rip), %rsi     # 0x2da13
movq %rax, %rdi
callq 0x7310
movq 0x240(%rbx), %rcx
leaq (%rcx,%r15), %rsi
addq $0x8, %rsi
movq %rax, %rdi
callq 0x72d0
movslq 0x310(%rbx), %rax
movb $0x63, 0x342(%rax,%rbx)
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x1551b(%rip), %rsi     # 0x2d65a
callq 0x820e
testb %al, %al
je 0x1814f
movb $0x1, 0x219(%rbx)
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x1542a(%rip), %rsi     # 0x2d58f
callq 0x820e
testb %al, %al
je 0x18175
movb $0x1, 0x340(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x16000(%rip), %rsi     # 0x2e196
callq 0x820e
testb %al, %al
jne 0x181e1
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x154a5(%rip), %rsi     # 0x2d65a
callq 0x820e
testb %al, %al
jne 0x181e1
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x15488(%rip), %rsi     # 0x2d65c
callq 0x820e
testb %al, %al
je 0x182a7
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x15398(%rip), %rsi     # 0x2d58f
callq 0x14630
testb %al, %al
je 0x182a7
movq %r14, %rdi
callq 0x7190
leaq 0x15933(%rip), %rsi     # 0x2db46
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x156e4(%rip), %rsi     # 0x2d916
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x157c2(%rip), %rsi     # 0x2da13
movq %rax, %rdi
callq 0x7310
movq 0x240(%rbx), %rcx
leaq (%rcx,%r15), %rsi
addq $0x8, %rsi
movq %rax, %rdi
callq 0x72d0
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x153d4(%rip), %rsi     # 0x2d65a
callq 0x820e
movslq 0x310(%rbx), %rcx
testb %al, %al
je 0x183b3
movb $0x75, 0x342(%rbx,%rcx)
jmp 0x18129
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x152fc(%rip), %rsi     # 0x2d5b9
callq 0x820e
testb %al, %al
je 0x182f9
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x152b3(%rip), %rsi     # 0x2d58f
callq 0x14630
testb %al, %al
je 0x182f9
movq %r14, %rdi
callq 0x7190
leaq 0x1585e(%rip), %rsi     # 0x2db52
jmp 0x1801b
movq 0x240(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x58, %rdi
leaq 0x15280(%rip), %rsi     # 0x2d58f
callq 0x820e
testb %al, %al
je 0x18129
movq %r14, %rdi
callq 0x7190
leaq 0x1582d(%rip), %rsi     # 0x2db58
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x155cc(%rip), %rsi     # 0x2d916
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x156aa(%rip), %rsi     # 0x2da13
movq %rax, %rdi
callq 0x7310
movq 0x240(%rbx), %rcx
leaq (%rcx,%r15), %rsi
addq $0x8, %rsi
movq %rax, %rdi
callq 0x72d0
movq %r14, %rdi
callq 0x7190
leaq 0x1533f(%rip), %rsi     # 0x2d6d6
movq %rax, %rdi
callq 0x7310
movslq 0x310(%rbx), %rax
movb $0x66, 0x342(%rax,%rbx)
jmp 0x18129
movb $0x69, 0x342(%rbx,%rcx)
jmp 0x18129