// File: /workspace/github_cpp_makefile_star2_O1/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 0x247c2(%rip), %rsi     # 0x37bb8
movq %r15, %rdi
callq 0x70c0
testl %eax, %eax
jne 0x13418
cmpb $0x1, 0x5b0(%rbx)
jne 0x13418
cmpb $0x0, 0x21b(%rbx)
je 0x134a1
leaq 0x247a2(%rip), %rsi     # 0x37bc1
movq %r15, %rdi
callq 0x70c0
testl %eax, %eax
jne 0x137ac
cmpb $0x1, 0x5b0(%rbx)
jne 0x137ac
cmpb $0x0, 0x21b(%rbx)
jne 0x137ac
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 0x241e2(%rip), %rsi     # 0x3765e
callq 0x70c0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
cmpb $0x66, %r15b
jne 0x134fd
testl %eax, %eax
je 0x135d5
callq 0x1e7b7
jmp 0x135da
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 0x2418a(%rip), %rsi     # 0x3765e
callq 0x70c0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
cmpb $0x66, %r15b
jne 0x134f2
testl %eax, %eax
je 0x1350f
callq 0x1e7b7
jmp 0x13514
testl %eax, %eax
je 0x13574
callq 0x1e7b7
jmp 0x13579
testl %eax, %eax
je 0x136fc
callq 0x1e7b7
jmp 0x13701
callq 0x1fe5e
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 0x2421f(%rip), %rsi     # 0x37764
movl $0x8, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x2416c(%rip), %rsi     # 0x376d6
movl $0x2, %edx
jmp 0x13635
callq 0x1fe5e
leaq 0x2462a(%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 0x241ea(%rip), %rsi     # 0x37791
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x245e8(%rip), %rsi     # 0x37bb3
movl $0x7, %edx
jmp 0x13758
callq 0x1fe5e
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 0x24159(%rip), %rsi     # 0x37764
movl $0x8, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
addl $0x2, %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x244c8(%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 0x241ae(%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 0x240ce(%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 0x13760
callq 0x1fe5e
leaq 0x244a2(%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 0x24062(%rip), %rsi     # 0x37791
movl $0x3, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x310(%rbx), %esi
incl %esi
movq %r15, %rdi
callq 0x75c0
leaq 0x24468(%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 0x23ed3(%rip), %rsi     # 0x3765e
callq 0x70c0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
testl %eax, %eax
je 0x137a3
callq 0x1c95e
jmp 0x137a8
callq 0x1d938
movb $0x0, (%r15)
decl 0x310(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq