// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl 0x310(%rdi)
movq %rsi, %r14
movl 0x5b4(%rdi), %ebp
leaq 0x318(%rdi), %r15
leaq 0x250ce(%rip), %rsi     # 0x37bb8
movq %r15, %rdi
callq 0x70c0
testl %eax, %eax
jne 0x12b0c
cmpb $0x1, 0x5b0(%rbx)
jne 0x12b0c
cmpb $0x0, 0x21b(%rbx)
je 0x12b95
leaq 0x250ae(%rip), %rsi     # 0x37bc1
movq %r15, %rdi
callq 0x70c0
testl %eax, %eax
jne 0x12ea0
cmpb $0x1, 0x5b0(%rbx)
jne 0x12ea0
cmpb $0x0, 0x21b(%rbx)
jne 0x12ea0
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 0x24aee(%rip), %rsi     # 0x3765e
callq 0x70c0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
cmpb $0x66, %r15b
jne 0x12bf1
testl %eax, %eax
je 0x12cc9
callq 0x1df97
jmp 0x12cce
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 0x24a96(%rip), %rsi     # 0x3765e
callq 0x70c0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
cmpb $0x66, %r15b
jne 0x12be6
testl %eax, %eax
je 0x12c03
callq 0x1df97
jmp 0x12c08
testl %eax, %eax
je 0x12c68
callq 0x1df97
jmp 0x12c6d
testl %eax, %eax
je 0x12df0
callq 0x1df97
jmp 0x12df5
callq 0x1f79e
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x24b2b(%rip), %rsi     # 0x37764
movl $0x8, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x24a78(%rip), %rsi     # 0x376d6
movl $0x2, %edx
jmp 0x12d29
callq 0x1f79e
leaq 0x24f36(%rip), %rsi     # 0x37baa
movl $0x8, %edx
movq %r14, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r14, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x24af6(%rip), %rsi     # 0x37791
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x24ef4(%rip), %rsi     # 0x37bb3
movl $0x7, %edx
jmp 0x12e4c
callq 0x1f79e
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x24a65(%rip), %rsi     # 0x37764
movl $0x8, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x24dd4(%rip), %rsi     # 0x37af8
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movslq 0x310(%rbx), %rax
movb $0x66, %r13b
movb %r13b, 0x341(%rbx,%rax)
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7220
movq %rax, %r15
leaq 0x24aba(%rip), %rsi     # 0x3782e
movl $0x9, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x249da(%rip), %r12     # 0x37775
movl $0x3, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x73a0
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %r15, %rdi
callq 0x75c0
movslq 0x310(%rbx), %rax
movb %r13b, 0x342(%rbx,%rax)
jmp 0x12e54
callq 0x1f79e
leaq 0x24dae(%rip), %rsi     # 0x37baa
movl $0x8, %edx
movq %r14, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r14, %rdi
callq 0x75c0
movq %rax, %r15
leaq 0x2496e(%rip), %rsi     # 0x37791
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x24d74(%rip), %rsi     # 0x37bbb
movl $0x8, %edx
movq %rax, %rdi
callq 0x73a0
leaq 0x5b0(%rbx), %r15
movslq 0x5b4(%rbx), %rax
movq 0x240(%rbx), %rcx
imulq $0xb0, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $0x30, %rdi
leaq 0x247df(%rip), %rsi     # 0x3765e
callq 0x70c0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
testl %eax, %eax
je 0x12e97
callq 0x1c13a
jmp 0x12e9c
callq 0x1d118
movb $0x0, (%r15)
decl 0x310(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq