// File: /workspace/github_cpp_makefile_star2_O2/gioannides[P]Language_Processors/src/../include/ast/class_forward_declarations.hpp
// Function: typePromotion(int, int, std::basic_ofstream<char, std::char_traits<char>>&, Context&)
inline void typePromotion(int reg1,int reg2, std::ofstream& file,Context& contxt){
	if(contxt.regType[reg1] != 'f' && contxt.regType[reg2] != 'f' && reg2 > 1 && reg1 > 1){
		//do nothing
	}
	else if(contxt.regType[reg1] != contxt.regType[reg2] && reg2 > 1 && reg1 > 1){
		if(contxt.regType[reg1] != 'f'  && contxt.regType[reg2] == 'f'){
			file << std::endl << "\tmtc1\t$" << reg1 << ",$f" << reg1;
			file << std::endl << "\tnop" << std::endl;
			file << std::endl << "\tcvt.s.w\t$f" << reg1 << ",$f" << reg1;
			file << std::endl << "\tnop" << std::endl;
			if(contxt.regType[reg1] == 'u'){
				file << std::endl << "\tandi\t$" << reg1 << ",$" << reg1 << ",0xFF";
			}
		
		}
		else if(contxt.regType[reg1] == 'f' && contxt.regType[reg2] != 'f'){
			file << std::endl << "\tmtc1\t$" << reg2 << ",$f" << reg2;
			file << std::endl << "\tnop" << std::endl;
			file << std::endl << "\tcvt.s.w\t$f" << reg2 << ",$f" << reg2;
			file << std::endl << "\tnop" << std::endl;
			if(contxt.regType[reg1] == 'u'){
				file << std::endl << "\tandi\t$" << reg2 << ",$" << reg2 << ",0xFF";
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %r15d
movl %edi, %ebp
movslq %edi, %r13
movb 0x341(%rcx,%r13), %al
movslq %esi, %rcx
movb 0x341(%r14,%rcx), %cl
cmpb $0x66, %al
je 0xfb80
cmpl $0x2, %ebp
jl 0xfb80
cmpl $0x2, %r15d
jl 0xfb80
cmpb $0x66, %cl
jne 0xfda0
cmpl $0x2, %ebp
jl 0xfda0
cmpl $0x2, %r15d
jl 0xfda0
cmpb %cl, %al
je 0xfda0
cmpb $0x66, %al
sete %dl
cmpb $0x66, %cl
setne %sil
orb %dl, %sil
jne 0xfc74
movq %rbx, %rdi
callq 0x7190
leaq 0x1df0d(%rip), %rsi     # 0x2dacc
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movl %ebp, %esi
callq 0x7590
leaq 0x1dba7(%rip), %r15     # 0x2d77f
movq %rax, %rdi
movq %r15, %rsi
callq 0x7310
movq %rax, %rdi
movl %ebp, %esi
callq 0x7590
movq %rbx, %rdi
callq 0x7190
leaq 0x1da00(%rip), %r12     # 0x2d5fc
movq %rax, %rdi
movq %r12, %rsi
callq 0x7310
movq %rax, %rdi
callq 0x7190
movq %rbx, %rdi
callq 0x7190
leaq 0x1df0b(%rip), %rsi     # 0x2db29
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movl %ebp, %esi
callq 0x7590
movq %rax, %rdi
movq %r15, %rsi
callq 0x7310
movq %rax, %rdi
movl %ebp, %esi
callq 0x7590
movq %rbx, %rdi
callq 0x7190
movq %rax, %rdi
movq %r12, %rsi
callq 0x7310
movq %rax, %rdi
callq 0x7190
cmpb $0x75, 0x341(%r14,%r13)
je 0xfd49
jmp 0xfda0
cmpb $0x66, %cl
sete %cl
cmpb $0x66, %al
setne %al
orb %cl, %al
jne 0xfda0
movq %rbx, %rdi
callq 0x7190
leaq 0x1de36(%rip), %rsi     # 0x2dacc
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movl %r15d, %esi
callq 0x7590
leaq 0x1dacf(%rip), %r12     # 0x2d77f
movq %rax, %rdi
movq %r12, %rsi
callq 0x7310
movq %rax, %rdi
movl %r15d, %esi
callq 0x7590
movq %rbx, %rdi
callq 0x7190
leaq 0x1d927(%rip), %rbp     # 0x2d5fc
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7310
movq %rax, %rdi
callq 0x7190
movq %rbx, %rdi
callq 0x7190
leaq 0x1de32(%rip), %rsi     # 0x2db29
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movl %r15d, %esi
callq 0x7590
movq %rax, %rdi
movq %r12, %rsi
callq 0x7310
movq %rax, %rdi
movl %r15d, %esi
callq 0x7590
movq %rbx, %rdi
callq 0x7190
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7310
movq %rax, %rdi
callq 0x7190
cmpb $0x75, 0x341(%r14,%r13)
movl %r15d, %ebp
jne 0xfda0
movq %rbx, %rdi
callq 0x7190
leaq 0x1db73(%rip), %rsi     # 0x2d8cb
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movl %ebp, %esi
callq 0x7590
leaq 0x1d9ca(%rip), %rsi     # 0x2d73b
movq %rax, %rdi
callq 0x7310
movq %rax, %rdi
movl %ebp, %esi
callq 0x7590
leaq 0x1dd99(%rip), %rsi     # 0x2db23
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7310
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop