// File: /workspace/github_cpp_makefile_star2_O2/gioannides[P]Language_Processors/src/../include/ast/class_forward_declarations.hpp
// Function: postfix_ops(Context&, std::basic_ofstream<char, std::char_traits<char>>&)
inline void postfix_ops(Context& contxt, std::ofstream& f) //this needs to be fixed for globals
{
	contxt.Regs++;
	int index = contxt.good_i;
	if(contxt.AssignmentOperator == "++" && contxt.is_postfix && !contxt.reading)
	{ 
		
		if(contxt.regType[contxt.Regs+1] == 'f'){
			if(contxt.Variables[contxt.good_i].scope=="global")
			{
				load_globals(contxt, f, index);
			}
			else 
			{
				load_locals(contxt, f, index);
			
			}		
			f << std::endl << "\tli.s\t$f" << contxt.Regs+2 << ",1";
			contxt.regType[contxt.Regs]='f';
			f << std::endl << "\tadd.s\t$f" << contxt.Regs+1 << ",$f" << contxt.Regs+1 << ",$f" << contxt.Regs+2;
			contxt.regType[contxt.Regs+1]='f';
		}
		else{
			if(contxt.Variables[contxt.good_i].scope=="global")
			{
				load_globals(contxt, f, index);
			}
			else 
			{
				load_locals(contxt, f, index);
			
			}
	
			f << "\n\taddi\t$" << contxt.Regs+1 << ", $" << contxt.Regs+1 << ", 1 #++";
		}
					
		if(contxt.Variables[contxt.good_i].scope=="global")
		{
			store_globals(contxt, f, index);
		}
		else 
		{
			store_locals(contxt, f, index);
			
		}
		
		contxt.is_postfix=false;
	}
	else if (contxt.AssignmentOperator == "--" && contxt.is_postfix && !contxt.reading)
	{
		
		if(contxt.regType[contxt.Regs+1] == 'f'){
			if(contxt.Variables[contxt.good_i].scope=="global")
			{
				load_globals(contxt, f, index);
			}
			else 
			{
				load_locals(contxt, f, index);
			
			}				
			f << std::endl << "\tli.s\t$f" << contxt.Regs+2 << ",-1";
			contxt.regType[contxt.Regs]='f';
			f << std::endl << "\tadd.s\t$f" << contxt.Regs+1 << ",$f" << contxt.Regs+1 << ",$f" << contxt.Regs+2;
			contxt.regType[contxt.Regs+1]='f';
		}
		else{
			if(contxt.Variables[contxt.good_i].scope=="global")
			{
				load_globals(contxt, f, index);
			}
			else 
			{
				load_locals(contxt, f, index);
			
			}		
			f << "\n\taddi\t$" << contxt.Regs+1 << ", $" << contxt.Regs+1 << ", -1 #--";
		}
		
		if(contxt.Variables[contxt.good_i].scope=="global")
		{
			store_globals(contxt, f, index);
		}
		else 
		{
			store_locals(contxt, f, index);
			
		}
		
		contxt.is_postfix=false;
	} 
	contxt.Regs--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
incl 0x310(%rdi)
movq %rsi, %r14
movl 0x5b4(%rdi), %ebp
leaq 0x318(%rdi), %r15
leaq 0x1e436(%rip), %rsi     # 0x2dbc2
movq %r15, %rdi
callq 0x820e
testb %al, %al
je 0xf7ae
cmpb $0x1, 0x5b0(%rbx)
jne 0xf7ae
cmpb $0x0, 0x21b(%rbx)
je 0xf837
leaq 0x1e416(%rip), %rsi     # 0x2dbcb
movq %r15, %rdi
callq 0x820e
testb %al, %al
je 0xfa8f
cmpb $0x1, 0x5b0(%rbx)
jne 0xfa8f
cmpb $0x0, 0x21b(%rbx)
jne 0xfa8f
movslq 0x310(%rbx), %rax
movb 0x342(%rax,%rbx), %r15b
movslq 0x5b4(%rbx), %rax
movq 0x240(%rbx), %rcx
imulq $0xb0, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $0x30, %rdi
leaq 0x1de56(%rip), %rsi     # 0x2d668
callq 0x820e
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
cmpb $0x66, %r15b
jne 0xf893
testb %al, %al
je 0xf92d
callq 0x18e32
jmp 0xf932
movslq 0x310(%rbx), %rax
movb 0x342(%rax,%rbx), %r15b
movslq 0x5b4(%rbx), %rax
movq 0x240(%rbx), %rcx
imulq $0xb0, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $0x30, %rdi
leaq 0x1ddfe(%rip), %rsi     # 0x2d668
callq 0x820e
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
cmpb $0x66, %r15b
jne 0xf888
testb %al, %al
je 0xf8a5
callq 0x18e32
jmp 0xf8aa
testb %al, %al
je 0xf8de
callq 0x18e32
jmp 0xf8e3
testb %al, %al
je 0xf9f1
callq 0x18e32
jmp 0xf9f6
callq 0x17eef
movq %r14, %rdi
callq 0x7190
leaq 0x1deb5(%rip), %rsi     # 0x2d76e
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1de07(%rip), %rsi     # 0x2d6e0
jmp 0xf961
callq 0x17eef
leaq 0x1e2ca(%rip), %rsi     # 0x2dbb4
movq %r14, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1de92(%rip), %rsi     # 0x2d79b
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1e295(%rip), %rsi     # 0x2dbbd
jmp 0xfa3b
callq 0x17eef
movq %r14, %rdi
callq 0x7190
leaq 0x1de2d(%rip), %rsi     # 0x2d76e
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1e1a1(%rip), %rsi     # 0x2db02
movq %rax, %rdi
callq 0x7310
movslq 0x310(%rbx), %rax
movb $0x66, %r12b
movb %r12b, 0x341(%rbx,%rax)
movq %r14, %rdi
callq 0x7190
leaq 0x1deae(%rip), %rsi     # 0x2d838
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1ddd6(%rip), %r15     # 0x2d77f
movq %rax, %rdi
movq %r15, %rsi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
movq %rax, %rdi
movq %r15, %rsi
callq 0x7310
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %rax, %rdi
callq 0x7590
movslq 0x310(%rbx), %rax
movb %r12b, 0x342(%rbx,%rax)
jmp 0xfa43
callq 0x17eef
leaq 0x1e1b7(%rip), %rsi     # 0x2dbb4
movq %r14, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1dd7f(%rip), %rsi     # 0x2d79b
movq %rax, %rdi
callq 0x7310
movl 0x310(%rbx), %esi
incl %esi
movq %rax, %rdi
callq 0x7590
leaq 0x1e18a(%rip), %rsi     # 0x2dbc5
movq %rax, %rdi
callq 0x7310
leaq 0x5b0(%rbx), %r15
movslq 0x5b4(%rbx), %rax
movq 0x240(%rbx), %rcx
imulq $0xb0, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $0x30, %rdi
leaq 0x1dbfa(%rip), %rsi     # 0x2d668
callq 0x820e
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
testb %al, %al
je 0xfa86
callq 0x17971
jmp 0xfa8b
callq 0x16fa4
movb $0x0, (%r15)
decl 0x310(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq