// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x1, 0x21b(%rdx)
jne 0x1ca72
addl $0x4, 0x308(%rbx)
jmp 0x1ca92
movl 0x308(%rbx), %eax
movl 0x30c(%rbx), %ecx
leal 0x4(%rcx), %edx
movl %edx, 0x30c(%rbx)
subl %ecx, %eax
addl $-0x8, %eax
movl %eax, 0x2a8(%rbx)
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1cb03
testq %rdi, %rdi
je 0x1cebf
movb $0x1, %cl
movb %cl, 0x217(%rbx)
movb %cl, 0x300(%rbx)
cmpb $0x0, 0x218(%rbx)
jne 0x1cacc
cmpb $0x1, 0x13e7c(%rbx)
jne 0x1ccde
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1cf96
movb $0x1, 0x1d2(%rbx)
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc9d4
movb $0x0, 0x1d2(%rbx)
movb $0x0, 0x217(%rbx)
jmp 0x1cebf
testq %rdi, %rdi
je 0x1cebf
xorl %ebp, %ebp
movb %bpl, 0x217(%rbx)
movb %bpl, 0x300(%rbx)
movb $0x1, 0x1d2(%rbx)
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc9d4
movb %bpl, 0x1d2(%rbx)
cmpb %bpl, 0x218(%rbx)
jne 0x1cebf
cmpb $0x0, 0x13e7c(%rbx)
jne 0x1cebf
movl $0x1, 0x13e80(%rbx)
movslq 0x310(%rbx), %rax
movl 0x5fc(%rbx,%rax,4), %eax
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x13e8c(%rbx)
movq %r14, %rdi
callq 0x7190
leaq 0x111a1(%rip), %rsi     # 0x2dd23
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x10961(%rip), %rsi     # 0x2d4fa
movq %rax, %rdi
callq 0x7310
leaq 0x260(%rbx), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x72d0
movl 0x258(%rbx), %edi
callq 0x1d220
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1cbca
jnp 0x1cbf7
movq %r14, %rdi
callq 0x7190
leaq 0x11152(%rip), %rsi     # 0x2dd2b
movq %rax, %rdi
callq 0x7310
movq %rax, %r12
movl 0x258(%rbx), %edi
callq 0x1d220
movq %r12, %rdi
callq 0x7510
movq %r14, %rdi
callq 0x7190
leaq 0x10920(%rip), %rsi     # 0x2d526
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movq %r15, %rsi
callq 0x72d0
leaq 0x11114(%rip), %rsi     # 0x2dd34
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x11107(%rip), %rsi     # 0x2dd3e
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movq %r15, %rsi
callq 0x72d0
leaq 0x10fb6(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movl 0x13e8c(%rbx), %esi
imull 0x258(%rbx), %esi
movq %rax, %rdi
callq 0x7590
movq %r14, %rdi
callq 0x7190
movq %rax, %rdi
movq %r15, %rsi
callq 0x72d0
leaq 0x1076e(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
movl 0x258(%rbx), %eax
cmpl $0x5, %eax
jl 0x1cedc
movq %r14, %rdi
callq 0x7190
leaq 0x110a1(%rip), %rsi     # 0x2dd4f
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
xorl %esi, %esi
callq 0x7590
movslq 0x310(%rbx), %rax
cmpq $0x15, %rax
jge 0x1ce7f
andl $0x0, 0x5f8(%rbx,%rax,4)
incq %rax
jmp 0x1ccc7
andl $0x0, 0x13e80(%rbx)
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc9d4
movslq 0x310(%rbx), %rax
movl 0x5fc(%rbx,%rax,4), %eax
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x13e8c(%rbx)
movq %r14, %rdi
callq 0x7190
leaq 0x1100a(%rip), %rsi     # 0x2dd23
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x107ca(%rip), %rsi     # 0x2d4fa
movq %rax, %rdi
callq 0x7310
leaq 0x260(%rbx), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x72d0
movl 0x258(%rbx), %edi
callq 0x1d220
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1cd61
jnp 0x1cd8e
movq %r14, %rdi
callq 0x7190
leaq 0x10fbb(%rip), %rsi     # 0x2dd2b
movq %rax, %rdi
callq 0x7310
movq %rax, %r13
movl 0x258(%rbx), %edi
callq 0x1d220
movq %r13, %rdi
callq 0x7510
movq %r14, %rdi
callq 0x7190
leaq 0x10789(%rip), %rsi     # 0x2d526
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movq %r12, %rsi
callq 0x72d0
leaq 0x10f7d(%rip), %rsi     # 0x2dd34
movq %rax, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7190
leaq 0x10f70(%rip), %rsi     # 0x2dd3e
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movq %r12, %rsi
callq 0x72d0
leaq 0x10e1f(%rip), %rsi     # 0x2dc07
movq %rax, %rdi
callq 0x7310
movl 0x13e8c(%rbx), %esi
imull 0x258(%rbx), %esi
movq %rax, %rdi
callq 0x7590
movq %r14, %rdi
callq 0x7190
movq %rax, %rdi
movq %r12, %rsi
callq 0x72d0
leaq 0x105d7(%rip), %rsi     # 0x2d3f6
movq %rax, %rdi
callq 0x7310
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1cf96
movl 0x13e8c(%rbx), %eax
cmpl 0x13e80(%rbx), %eax
jle 0x1caf7
movq %r14, %rdi
callq 0x7190
leaq 0x10eef(%rip), %rsi     # 0x2dd46
movq %rax, %rdi
callq 0x7310
movl 0x13e8c(%rbx), %esi
subl 0x13e80(%rbx), %esi
imull 0x258(%rbx), %esi
movq %rax, %rdi
callq 0x7590
jmp 0x1caf7
movl 0x13e8c(%rbx), %eax
cmpl 0x13e80(%rbx), %eax
jle 0x1cebf
movq %r14, %rdi
callq 0x7190
leaq 0x10eaa(%rip), %rsi     # 0x2dd46
movq %rax, %rdi
callq 0x7310
movl 0x13e8c(%rbx), %esi
subl 0x13e80(%rbx), %esi
imull 0x258(%rbx), %esi
movq %rax, %rdi
callq 0x7590
xorl %eax, %eax
movb %al, 0x219(%rbx)
movb %al, 0x340(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, %eax
jne 0x1cf60
leaq 0x2b0(%rbx), %r15
leaq 0x106a0(%rip), %rsi     # 0x2d58f
movq %r15, %rdi
callq 0x14630
testb %al, %al
je 0x1cf0f
movq %r14, %rdi
callq 0x7190
leaq 0x10e4f(%rip), %rsi     # 0x2dd59
jmp 0x1ccae
movl 0x258(%rbx), %eax
cmpl $0x4, %eax
jne 0x1cf60
leaq 0x1066e(%rip), %rsi     # 0x2d58f
movq %r15, %rdi
callq 0x820e
testb %al, %al
je 0x1cf5a
movq %r14, %rdi
callq 0x7190
leaq 0x10e25(%rip), %rsi     # 0x2dd61
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
xorl %esi, %esi
callq 0x7590
movb $0x0, 0x340(%rbx)
jmp 0x1ccc0
movl 0x258(%rbx), %eax
cmpl $0x1, %eax
je 0x1cf82
cmpl $0x2, %eax
jne 0x1ccc0
movq %r14, %rdi
callq 0x7190
leaq 0x10ded(%rip), %rsi     # 0x2dd6a
jmp 0x1ccae
movq %r14, %rdi
callq 0x7190
leaq 0x10de1(%rip), %rsi     # 0x2dd72
jmp 0x1ccae