// File: gioannides[P]Language_Processors/src/../include/ast/ast_Expressions.cpp
// Function: ShiftExpression::render_asm(std::basic_ofstream<char, std::char_traits<char>>&, Context&)
inline void ShiftExpression::render_asm(std::ofstream& file,Context& contxt) {

			if(OPERATOR==NULL && AdditiVeExpression != NULL){
				AdditiVeExpression->render_asm(file,contxt);
				//postfix_ops(contxt, file);

			}

			
			if(contxt.LocalArray && contxt.reading && contxt.function){
					if(ShiftExpressionPtr != NULL && AdditiVeExpression != NULL){
						ShiftExpressionPtr->render_asm(file,contxt);				
						AdditiVeExpression->render_asm(file,contxt);
					}
					if(contxt.ArraySize.size()>=2){
						if( OPERATOR != NULL && *OPERATOR == "<<" ){
						
							int result = contxt.ArraySize[contxt.ArraySize.size()-1] <<  contxt.ArraySize[contxt.ArraySize.size()-2];
							contxt.ArraySize.pop_back();
							contxt.ArraySize.pop_back();
							contxt.ArraySize.push_back(result);
						}
					
						else if( OPERATOR != NULL && *OPERATOR== ">>") {
							int result = contxt.ArraySize[contxt.ArraySize.size()-2] >>  contxt.ArraySize[contxt.ArraySize.size()-1];
							contxt.ArraySize.pop_back();
							contxt.ArraySize.pop_back();
							contxt.ArraySize.push_back(result);
						}
					}
			}
			else if(ShiftExpressionPtr != NULL && !contxt.reading && AdditiVeExpression != NULL && OPERATOR != NULL){ 
				ShiftExpressionPtr->render_asm(file,contxt);				
				contxt.Regs++;
				AdditiVeExpression->render_asm(file,contxt);


				if(contxt.enum_constant){
					if( OPERATOR != NULL && *OPERATOR == "<<" ){
						if(contxt.EnumOperands.size()>=2){
							int result =  contxt.EnumOperands[contxt.EnumOperands.size()-1] << contxt.EnumOperands[contxt.EnumOperands.size()-2];
							contxt.EnumOperands.pop_back();
							contxt.EnumOperands.pop_back();
							contxt.EnumOperands.push_back(result);
						}
						
					}
					else if(OPERATOR != NULL && *OPERATOR == ">>"){
						if(contxt.EnumOperands.size()>=2){
							int result =  contxt.EnumOperands[contxt.EnumOperands.size()-2] >> contxt.EnumOperands[contxt.EnumOperands.size()-1];
							contxt.EnumOperands.pop_back();
							contxt.EnumOperands.pop_back();
							contxt.EnumOperands.push_back(result);
						}
					}
				}
								
				if((!contxt.function  && !contxt.sizeof_ && !contxt.enum_constant)){
					//postfix_ops(contxt, file);
					if( OPERATOR != NULL && *OPERATOR == "<<" ){
						contxt.eval[contxt.Regs] = contxt.eval[contxt.Regs] << contxt.eval[contxt.Regs+1];
						contxt.eval[contxt.Regs+1]=0;
					}
					else if(OPERATOR != NULL && *OPERATOR == ">>"){
						contxt.eval[contxt.Regs] = contxt.eval[contxt.Regs] >> contxt.eval[contxt.Regs+1];
						contxt.eval[contxt.Regs+1]=0;
					}
				}
				if (contxt.function  && !contxt.sizeof_ && !contxt.enum_constant){
					
					typePromotion(contxt.Regs,contxt.Regs+1,file,contxt);
					if( OPERATOR != NULL && *OPERATOR == "<<" ){
						file << std::endl << "\tsllv\t$" << contxt.Regs << ", $" << contxt.Regs << ", $" << contxt.Regs+1;
						contxt.regType[contxt.Regs]='i';
						contxt.regType[contxt.Regs+1]='i';
					}
					else if(  OPERATOR != NULL && *OPERATOR == ">>" ){
	
						if(contxt.regType[contxt.Regs] == 'u' || contxt.regType[contxt.Regs+1] == 'u'){
							file << std::endl << "\tsrlv\t$" << contxt.Regs << ", $" << contxt.Regs << ", $" << contxt.Regs+1;
							contxt.regType[contxt.Regs]='u';
							contxt.regType[contxt.Regs+1]='u';
						}
						else{
							file << std::endl << "\tsrav\t$" << contxt.Regs << ", $" << contxt.Regs << ", $" << contxt.Regs+1;
							contxt.regType[contxt.Regs]='i';
							contxt.regType[contxt.Regs+1]='i';
						}
					}
					
				}
				contxt.Regs--;
			}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x10(%rax)
jne 0x1a6c6
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1a6c6
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1afc0
movq -0x18(%rbp), %rax
testb $0x1, 0x74(%rax)
je 0x1a8d1
movq -0x18(%rbp), %rax
testb $0x1, 0x21b(%rax)
je 0x1a8d1
movq -0x18(%rbp), %rax
testb $0x1, 0x218(%rax)
je 0x1a8d1
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1a736
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1a736
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1a680
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1afc0
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x11a60
cmpq $0x2, %rax
jb 0x1a8cc
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1a80d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x49e64(%rip), %rsi     # 0x645cf
callq 0x9e30
testb $0x1, %al
jne 0x1a779
jmp 0x1a80d
movq -0x18(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x11a60
movq -0x48(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x11a80
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x11a60
movq -0x40(%rbp), %rdi
movq %rax, %rsi
subq $0x2, %rsi
callq 0x11a80
movq %rax, %rcx
movl -0x34(%rbp), %eax
movl (%rcx), %ecx
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
leaq -0x1c(%rbp), %rsi
callq 0x15ec0
jmp 0x1a8ca
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1a8c8
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x49da7(%rip), %rsi     # 0x645d2
callq 0x9e30
testb $0x1, %al
jne 0x1a839
jmp 0x1a8c8
movq -0x18(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x11a60
movq -0x60(%rbp), %rdi
movq %rax, %rsi
subq $0x2, %rsi
callq 0x11a80
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x11a60
movq -0x58(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x11a80
movq %rax, %rcx
movl -0x4c(%rbp), %eax
movl (%rcx), %ecx
sarl %cl, %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x78, %rdi
leaq -0x20(%rbp), %rsi
callq 0x15ec0
jmp 0x1a8ca
jmp 0x1a8cc
jmp 0x1afb2
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1afb0
movq -0x18(%rbp), %rax
testb $0x1, 0x21b(%rax)
jne 0x1afb0
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1afb0
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1afb0
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1a680
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %edx
addl $0x1, %edx
movl %edx, 0x310(%rcx)
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1afc0
movq -0x18(%rbp), %rax
testb $0x1, 0x14d(%rax)
je 0x1ab44
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1aa4a
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x49c54(%rip), %rsi     # 0x645cf
callq 0x9e30
testb $0x1, %al
jne 0x1a989
jmp 0x1aa4a
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x11a60
cmpq $0x2, %rax
jb 0x1aa45
movq -0x18(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x11a60
movq -0x78(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x11a80
movl (%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x18(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x11a60
movq -0x70(%rbp), %rdi
movq %rax, %rsi
subq $0x2, %rsi
callq 0x11a80
movq %rax, %rcx
movl -0x64(%rbp), %eax
movl (%rcx), %ecx
shll %cl, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
leaq -0x24(%rbp), %rsi
callq 0x15ec0
jmp 0x1ab42
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1ab40
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x49b6a(%rip), %rsi     # 0x645d2
callq 0x9e30
testb $0x1, %al
jne 0x1aa76
jmp 0x1ab40
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x11a60
cmpq $0x2, %rax
jb 0x1ab3e
movq -0x18(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x11a60
movq -0x90(%rbp), %rdi
movq %rax, %rsi
subq $0x2, %rsi
callq 0x11a80
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
movq -0x18(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x11a60
movq -0x88(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x11a80
movq %rax, %rcx
movl -0x7c(%rbp), %eax
movl (%rcx), %ecx
sarl %cl, %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x15e90
movq -0x18(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
leaq -0x28(%rbp), %rsi
callq 0x15ec0
jmp 0x1ab40
jmp 0x1ab42
jmp 0x1ab44
movq -0x18(%rbp), %rax
testb $0x1, 0x218(%rax)
jne 0x1aca2
movq -0x18(%rbp), %rax
testb $0x1, 0x1f8(%rax)
jne 0x1aca2
movq -0x18(%rbp), %rax
testb $0x1, 0x14d(%rax)
jne 0x1aca2
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1ac0d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x49a3a(%rip), %rsi     # 0x645cf
callq 0x9e30
testb $0x1, %al
jne 0x1aba0
jmp 0x1ac0d
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movl 0x5f8(%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl 0x5f8(%rax,%rcx,4), %ecx
shll %cl, %edx
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movl %edx, 0x5f8(%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl $0x0, 0x5f8(%rax,%rcx,4)
jmp 0x1aca0
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1ac9e
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x499a7(%rip), %rsi     # 0x645d2
callq 0x9e30
testb $0x1, %al
jne 0x1ac36
jmp 0x1ac9e
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movl 0x5f8(%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl 0x5f8(%rax,%rcx,4), %ecx
sarl %cl, %edx
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movl %edx, 0x5f8(%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl $0x0, 0x5f8(%rax,%rcx,4)
jmp 0x1aca0
jmp 0x1aca2
movq -0x18(%rbp), %rax
testb $0x1, 0x218(%rax)
je 0x1af9d
movq -0x18(%rbp), %rax
testb $0x1, 0x1f8(%rax)
jne 0x1af9d
movq -0x18(%rbp), %rax
testb $0x1, 0x14d(%rax)
jne 0x1af9d
movq -0x18(%rbp), %rax
movl 0x310(%rax), %edi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
addl $0x1, %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x16000
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1add3
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x498b8(%rip), %rsi     # 0x645cf
callq 0x9e30
testb $0x1, %al
jne 0x1ad25
jmp 0x1add3
movq -0x10(%rbp), %rdi
movq 0x6d240(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x49896(%rip), %rsi     # 0x645d5
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
callq 0x8730
movq %rax, %rdi
leaq 0x497f0(%rip), %rsi     # 0x64550
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
callq 0x8730
movq %rax, %rdi
leaq 0x497cf(%rip), %rsi     # 0x64550
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
addl $0x1, %esi
callq 0x8730
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movb $0x69, 0x341(%rax,%rcx)
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x69, 0x341(%rax,%rcx)
jmp 0x1af9b
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1af99
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x497e1(%rip), %rsi     # 0x645d2
callq 0x9e30
testb $0x1, %al
jne 0x1adff
jmp 0x1af99
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movsbl 0x341(%rax,%rcx), %eax
cmpl $0x75, %eax
je 0x1ae40
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl 0x341(%rax,%rcx), %eax
cmpl $0x75, %eax
jne 0x1aeee
movq -0x10(%rbp), %rdi
movq 0x6d125(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x49783(%rip), %rsi     # 0x645dd
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
callq 0x8730
movq %rax, %rdi
leaq 0x496d5(%rip), %rsi     # 0x64550
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
callq 0x8730
movq %rax, %rdi
leaq 0x496b4(%rip), %rsi     # 0x64550
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
addl $0x1, %esi
callq 0x8730
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movb $0x75, 0x341(%rax,%rcx)
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x75, 0x341(%rax,%rcx)
jmp 0x1af97
movq -0x10(%rbp), %rdi
movq 0x6d077(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x496dd(%rip), %rsi     # 0x645e5
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
callq 0x8730
movq %rax, %rdi
leaq 0x49627(%rip), %rsi     # 0x64550
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
callq 0x8730
movq %rax, %rdi
leaq 0x49606(%rip), %rsi     # 0x64550
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x310(%rax), %esi
addl $0x1, %esi
callq 0x8730
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x310(%rcx), %rcx
movb $0x69, 0x341(%rax,%rcx)
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x69, 0x341(%rax,%rcx)
jmp 0x1af99
jmp 0x1af9b
jmp 0x1af9d
movq -0x18(%rbp), %rax
movl 0x310(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x310(%rax)
jmp 0x1afb2
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)