// File: gioannides[P]Language_Processors/src/../include/ast/ast_node.hpp
// Function: InitDeclarator::render_asm(std::basic_ofstream<char, std::char_traits<char>>&, Context&)
void render_asm(std::ofstream& file,Context& contxt) {
			if(contxt.reading) { //this is predicting total stack frame for all paramters/local declarations in function body
					//contxt.variable.offset = contxt.totalStackArea;
					contxt.totalStackArea += 4;// contxt.variable.word_size;
					//file << "\nonly golbals get here " << contxt.totalStackArea << "\n";

				}

				if(!contxt.reading){ //this is execution

					contxt.StackOffset += 4;//contxt.variable.word_size;
					contxt.variable.offset = contxt.StackOffset-4;//contxt.variable.word_size;
					contxt.variable.offset = contxt.totalStackArea - contxt.variable.offset - 8; 
				}
			
			if( InitiaLizer != NULL && DecLarator != NULL) 
			{
				contxt.initialized = true;
				contxt.variable.initialized = true;
				/*for(int i=0; i<contxt.Variables.size(); i++) {	//Predict the signedness of LHS, made DirectDeclarator members public...
					std::cout << contxt.Variables[i].id << contxt.Variables[i].DataType << std::endl;				
					if(*(DecLarator->DirectDecLarator->IDENTIFIER) == contxt.Variables[i].id) {
						if(contxt.Variables[i].DataType == "unsigned") {
							contxt.is_unsigned = true;
						}
					}
				}*/
				if(contxt.function||contxt.function_dec){			
				
				InitiaLizer->render_asm(file,contxt);
				
				contxt.lhs_of_assignment = true;
				DecLarator->render_asm(file,contxt);	// The boolean variable was 'initialized' set to false by default
				contxt.lhs_of_assignment = false;
				}
				else 
				{
					//file << std::endl << "# global initialized" << std::endl;
					contxt.no_of_initial_values=0;							
					//contxt.lhs_of_assignment = true;
					DecLarator->render_asm(file,contxt); 
					//contxt.lhs_of_assignment = false;

					contxt.no_array_elements = contxt.eval[contxt.Regs+1];
					if(!contxt.no_array_elements)
						contxt.no_array_elements=1;
					file << std::endl << "\n\t.data";
					file << std::endl << "\t.globl\t" << contxt.variable.id;
					if( log2(contxt.variable.word_size) )
					{
						file << std::endl << "\t.align\t" << log2(contxt.variable.word_size);
					}
					file << std::endl << "\t.type\t" << contxt.variable.id << ", @object";
					file << std::endl << "\t.size\t" << contxt.variable.id << ", " << contxt.variable.word_size*contxt.no_array_elements;
					file << std::endl << contxt.variable.id << ":";
				
					//contxt.rhs_of_expression = true;
					InitiaLizer->render_asm(file,contxt); // print .word in here
					//contxt.rhs_of_expression = false;
					if(contxt.no_array_elements-contxt.no_of_initial_values>0){
						file << std::endl << "\t.space\t" << (contxt.no_array_elements-contxt.no_of_initial_values)*contxt.variable.word_size;
					}
				}
				contxt.initialized = false;
				
			}
			else if(DecLarator != NULL &&  InitiaLizer == NULL){
				//file << std::endl << "# global not initialized" << std::endl;
				contxt.initialized = false;
				contxt.variable.initialized = false;
				contxt.lhs_of_assignment=true;
				DecLarator->render_asm(file,contxt);
				contxt.lhs_of_assignment=false;
				if(!contxt.function&&!contxt.function_dec){
					contxt.no_of_initial_values=1;	
					contxt.no_array_elements = contxt.eval[contxt.Regs+1];
					if(!contxt.no_array_elements)
						contxt.no_array_elements=1;
					file << std::endl << "\n\t.data";
					file << std::endl << "\t.globl\t" << contxt.variable.id;
					if( log2(contxt.variable.word_size) )
					{
						file << std::endl << "\t.align\t" << log2(contxt.variable.word_size);
					}
					file << std::endl << "\t.type\t" << contxt.variable.id << ", @object";
					file << std::endl << "\t.size\t" << contxt.variable.id << ", " << contxt.variable.word_size*contxt.no_array_elements;
					file << std::endl << contxt.variable.id << ":";
				if( contxt.variable.word_size > 4 ){					
					file << std::endl << "\t.double\t" << 0 ; 	//TODO: Convert to IEEE-754 for FLOAT and DOUBLE
				}
				else if( (contxt.variable.word_size==4) && contxt.variable.DataType!="float"){
					file << std::endl << "\t.word\t" << 0; //contxt.variable.value;
				}
				else if( (contxt.variable.word_size==4) && contxt.variable.DataType=="float"){
					file << std::endl << "\t.float\t" << 0; //contxt.variable.value;
					contxt.float_ = false;
				}
				else if(contxt.variable.word_size==2){
					file << std::endl << "\t.half\t" << 0;
				}
				else if(contxt.variable.word_size==1){
					file << std::endl << "\t.byte\t" << 0;
				}
				        // reset the value of the global
				for(int i=contxt.Regs; i<=20; i++)
				{
					//file << "\n#" << contxt.eval[i];
					contxt.eval[i] = 0; 
				}
					//file << std::endl << contxt.variable.id << ":";
					if(contxt.no_array_elements-contxt.no_of_initial_values>0){
						file << std::endl << "\t.space\t" << (contxt.no_array_elements-contxt.no_of_initial_values)*contxt.variable.word_size;
					}
				}
			}
			contxt.is_unsigned = false;
			contxt.float_ = false;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x21b(%rax)
je 0x3056c
movq -0x18(%rbp), %rax
movl 0x308(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x308(%rax)
movq -0x18(%rbp), %rax
testb $0x1, 0x21b(%rax)
jne 0x305c4
movq -0x18(%rbp), %rax
movl 0x30c(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x30c(%rax)
movq -0x18(%rbp), %rax
movl 0x30c(%rax), %ecx
subl $0x4, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2a8(%rax)
movq -0x18(%rbp), %rax
movl 0x308(%rax), %ecx
movq -0x18(%rbp), %rax
subl 0x2a8(%rax), %ecx
subl $0x8, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2a8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x308c9
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x308c9
movq -0x18(%rbp), %rax
movb $0x1, 0x217(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x300(%rax)
movq -0x18(%rbp), %rax
testb $0x1, 0x218(%rax)
jne 0x30612
movq -0x18(%rbp), %rax
testb $0x1, 0x13e7c(%rax)
je 0x30657
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x30d50
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x1, 0x1d2(%rcx)
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xfa00
movq -0x18(%rbp), %rax
movb $0x0, 0x1d2(%rax)
jmp 0x308b9
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl $0x0, 0x13e80(%rcx)
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xfa00
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl 0x5f8(%rax,%rcx,4), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x13e8c(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x13e8c(%rax)
jne 0x306ba
movq -0x18(%rbp), %rax
movl $0x1, 0x13e8c(%rax)
movq -0x10(%rbp), %rdi
movq 0x578ab(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x34404(%rip), %rsi     # 0x64ad8
callq 0x8400
movq -0x10(%rbp), %rdi
movq 0x5788c(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33bbc(%rip), %rsi     # 0x642af
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq -0x18(%rbp), %rax
movl 0x258(%rax), %edi
callq 0x31130
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3072b
jp 0x3072b
jmp 0x30766
movq -0x10(%rbp), %rdi
movq 0x5783a(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x3439b(%rip), %rsi     # 0x64ae0
callq 0x8400
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x258(%rax), %edi
callq 0x31130
movq -0x30(%rbp), %rdi
callq 0x8800
movq -0x10(%rbp), %rdi
movq 0x577ff(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33b5b(%rip), %rsi     # 0x642db
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq %rax, %rdi
leaq 0x34343(%rip), %rsi     # 0x64ae9
callq 0x8400
movq -0x10(%rbp), %rdi
movq 0x577ba(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x3432e(%rip), %rsi     # 0x64af3
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq %rax, %rdi
leaq 0x341d1(%rip), %rsi     # 0x649bc
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x258(%rax), %esi
movq -0x18(%rbp), %rax
imull 0x13e8c(%rax), %esi
callq 0x8730
movq -0x10(%rbp), %rdi
movq 0x57758(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq %rax, %rdi
leaq 0x33995(%rip), %rsi     # 0x641d3
callq 0x8400
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x30d50
movq -0x18(%rbp), %rax
movl 0x13e8c(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x13e80(%rcx), %eax
cmpl $0x0, %eax
jle 0x308b7
movq -0x10(%rbp), %rdi
movq 0x576f4(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x34270(%rip), %rsi     # 0x64afb
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x13e8c(%rax), %esi
movq -0x18(%rbp), %rax
subl 0x13e80(%rax), %esi
movq -0x18(%rbp), %rax
imull 0x258(%rax), %esi
callq 0x8730
jmp 0x308b9
movq -0x18(%rbp), %rax
movb $0x0, 0x217(%rax)
jmp 0x30d28
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x30d26
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x30d26
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, 0x217(%rcx)
movq -0x18(%rbp), %rcx
movb $0x0, 0x300(%rcx)
movq -0x18(%rbp), %rcx
movb $0x1, 0x1d2(%rcx)
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xfa00
movq -0x18(%rbp), %rax
movb $0x0, 0x1d2(%rax)
movq -0x18(%rbp), %rax
testb $0x1, 0x218(%rax)
jne 0x30d24
movq -0x18(%rbp), %rax
testb $0x1, 0x13e7c(%rax)
jne 0x30d24
movq -0x18(%rbp), %rax
movl $0x1, 0x13e80(%rax)
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x310(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl 0x5f8(%rax,%rcx,4), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x13e8c(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x13e8c(%rax)
jne 0x30998
movq -0x18(%rbp), %rax
movl $0x1, 0x13e8c(%rax)
movq -0x10(%rbp), %rdi
movq 0x575cd(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x34126(%rip), %rsi     # 0x64ad8
callq 0x8400
movq -0x10(%rbp), %rdi
movq 0x575ae(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x338de(%rip), %rsi     # 0x642af
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq -0x18(%rbp), %rax
movl 0x258(%rax), %edi
callq 0x31130
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x30a09
jp 0x30a09
jmp 0x30a44
movq -0x10(%rbp), %rdi
movq 0x5755c(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x340bd(%rip), %rsi     # 0x64ae0
callq 0x8400
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl 0x258(%rax), %edi
callq 0x31130
movq -0x38(%rbp), %rdi
callq 0x8800
movq -0x10(%rbp), %rdi
movq 0x57521(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x3387d(%rip), %rsi     # 0x642db
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq %rax, %rdi
leaq 0x34065(%rip), %rsi     # 0x64ae9
callq 0x8400
movq -0x10(%rbp), %rdi
movq 0x574dc(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x34050(%rip), %rsi     # 0x64af3
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq %rax, %rdi
leaq 0x33ef3(%rip), %rsi     # 0x649bc
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x258(%rax), %esi
movq -0x18(%rbp), %rax
imull 0x13e8c(%rax), %esi
callq 0x8730
movq -0x10(%rbp), %rdi
movq 0x5747a(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x258, %rsi            # imm = 0x258
addq $0x8, %rsi
callq 0x83c0
movq %rax, %rdi
leaq 0x336b7(%rip), %rsi     # 0x641d3
callq 0x8400
movq -0x18(%rbp), %rax
cmpl $0x4, 0x258(%rax)
jle 0x30b5c
movq -0x10(%rbp), %rdi
movq 0x57437(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33fbc(%rip), %rsi     # 0x64b04
callq 0x8400
movq %rax, %rdi
xorl %esi, %esi
callq 0x8730
jmp 0x30c92
movq -0x18(%rbp), %rax
cmpl $0x4, 0x258(%rax)
jne 0x30bb8
movq -0x18(%rbp), %rdi
addq $0x258, %rdi            # imm = 0x258
addq $0x58, %rdi
leaq 0x337c5(%rip), %rsi     # 0x64344
callq 0x1f7a0
testb $0x1, %al
jne 0x30b8a
jmp 0x30bb8
movq -0x10(%rbp), %rdi
movq 0x573db(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33f6a(%rip), %rsi     # 0x64b0e
callq 0x8400
movq %rax, %rdi
xorl %esi, %esi
callq 0x8730
jmp 0x30c90
movq -0x18(%rbp), %rax
cmpl $0x4, 0x258(%rax)
jne 0x30c1c
movq -0x18(%rbp), %rdi
addq $0x258, %rdi            # imm = 0x258
addq $0x58, %rdi
leaq 0x33769(%rip), %rsi     # 0x64344
callq 0x9e30
testb $0x1, %al
jne 0x30be6
jmp 0x30c1c
movq -0x10(%rbp), %rdi
movq 0x5737f(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33f16(%rip), %rsi     # 0x64b16
callq 0x8400
movq %rax, %rdi
xorl %esi, %esi
callq 0x8730
movq -0x18(%rbp), %rax
movb $0x0, 0x340(%rax)
jmp 0x30c8e
movq -0x18(%rbp), %rax
cmpl $0x2, 0x258(%rax)
jne 0x30c54
movq -0x10(%rbp), %rdi
movq 0x5733c(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33edc(%rip), %rsi     # 0x64b1f
callq 0x8400
movq %rax, %rdi
xorl %esi, %esi
callq 0x8730
jmp 0x30c8c
movq -0x18(%rbp), %rax
cmpl $0x1, 0x258(%rax)
jne 0x30c8a
movq -0x10(%rbp), %rdi
movq 0x57304(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33eac(%rip), %rsi     # 0x64b27
callq 0x8400
movq %rax, %rdi
xorl %esi, %esi
callq 0x8730
jmp 0x30c8c
jmp 0x30c8e
jmp 0x30c90
jmp 0x30c92
movq -0x18(%rbp), %rax
movl 0x310(%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x14, -0x1c(%rbp)
jg 0x30cc3
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x5f8(%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x30c9f
movq -0x18(%rbp), %rax
movl 0x13e8c(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x13e80(%rcx), %eax
cmpl $0x0, %eax
jle 0x30d22
movq -0x10(%rbp), %rdi
movq 0x57289(%rip), %rsi     # 0x87f70
callq 0x8450
movq %rax, %rdi
leaq 0x33e05(%rip), %rsi     # 0x64afb
callq 0x8400
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x13e8c(%rax), %esi
movq -0x18(%rbp), %rax
subl 0x13e80(%rax), %esi
movq -0x18(%rbp), %rax
imull 0x258(%rax), %esi
callq 0x8730
jmp 0x30d24
jmp 0x30d26
jmp 0x30d28
movq -0x18(%rbp), %rax
movb $0x0, 0x219(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x340(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop