// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IPrint.hpp
// Function: IPrint::generateCode(std::basic_fstream<char, std::char_traits<char>>&)
void generateCode(std::fstream& fileStream) {

		/* O comando equivalente a escreva é o cout */
		fileStream << "cout";

		/* Quebramos a expressão usando o operador de concatenação '+' */
		boost::char_separator<char> separator("+");
		Tokenizer tokens(*expression, separator);

		/* Para cada token, procuramos por erros*/
		for(auto tokenIterator = tokens.begin(); tokenIterator != tokens.end(); tokenIterator++){

			/* Se o token não for um número nem uma string, é uma variável */
			if(!IMath::isNumber(*tokenIterator) && tokenIterator->find("\"") == string::npos){
				IData *var = ownerBlock->getLocalVariable(*tokenIterator);

				/* Se a variável não tiver sido definida, geramos um erro */
				if(var == NULL){
					std::string errorMsg = "Variavel " + *tokenIterator + " nao declarada.";
					throw ISourceErrorException(errorMsg, myLine);
				}

				/* Adicionamos o operador << para cada token, para concatenação dos valores. */
				fileStream << " << " << *tokenIterator;
			}else
				/* Adicionamos o operador << para cada token, para concatenação dos valores. */
				fileStream << " << " << *tokenIterator;
		}

		fileStream << ";" << endl;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rsi, %rax
movq %rdi, %r14
addq $0x10, %rax
leaq 0x7424(%rip), %rsi      # 0x2c737
movq %rax, -0x30(%rbp)
movq %rax, %rdi
callq 0x8390
leaq 0x2d28(%rip), %rsi      # 0x2804e
leaq -0x168(%rbp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xceb2
movq %r14, -0x38(%rbp)
movq 0x18(%r14), %rsi
leaq -0x118(%rbp), %rdi
movq %rbx, %rdx
callq 0xcf34
leaq -0x278(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xcf54
leaq -0x1f0(%rbp), %r15
leaq -0x278(%rbp), %r13
leaq -0xb8(%rbp), %rbx
movq %r15, %rdi
leaq -0x118(%rbp), %rsi
callq 0xcfc2
movq %r13, %rdi
movq %r15, %rsi
callq 0xcfb4
movl %eax, %r14d
movq %r15, %rdi
callq 0xd022
testb %r14b, %r14b
je 0x254ad
movq %r13, %rdi
callq 0xd3d8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x85b0
movq %rbx, %rdi
callq 0xa89e
testb %al, %al
je 0x253cf
movq %rbx, %rdi
callq 0x8930
jmp 0x253f9
movq %r13, %rdi
callq 0xd3d8
movq %rax, %rdi
leaq 0x2cbd(%rip), %rsi      # 0x2809e
xorl %edx, %edx
callq 0x88f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x8930
cmpq $-0x1, %r14
je 0x25441
movq -0x30(%rbp), %rdi
leaq 0x7338(%rip), %rsi      # 0x2c73c
callq 0x8390
movq %rax, %r14
movq %r13, %rdi
callq 0xd3d8
movq %r14, %rdi
movq %rax, %rsi
callq 0x8340
leaq -0x300(%rbp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xd042
leaq -0x300(%rbp), %rdi
callq 0xd022
jmp 0x25378
movq -0x38(%rbp), %rax
movq 0x10(%rax), %r14
movq %r13, %rdi
callq 0xd3d8
leaq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x85b0
movq %r14, %rdi
leaq -0x98(%rbp), %r12
movq %r12, %rsi
callq 0xc772
movq %rax, %r14
movq %r12, %rdi
callq 0x8930
testq %r14, %r14
je 0x254fb
movq -0x30(%rbp), %rdi
leaq 0x72af(%rip), %rsi      # 0x2c73c
callq 0x8390
movq %rax, %r14
movq %r13, %rdi
callq 0xd3d8
movq %r14, %rdi
movq %rax, %rsi
callq 0x8340
jmp 0x2541f
leaq -0x278(%rbp), %rdi
callq 0xd022
leaq 0x72ad(%rip), %rsi      # 0x2c76d
movq -0x30(%rbp), %rdi
callq 0x8390
movq %rax, %rdi
callq 0x81f0
leaq -0x108(%rbp), %rdi
callq 0xd078
leaq -0x168(%rbp), %rdi
callq 0xd078
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x278(%rbp), %rdi
callq 0xd3d8
leaq 0x2d13(%rip), %rsi      # 0x28221
leaq -0x58(%rbp), %rdi
movq %rax, %rdx
callq 0xc83b
leaq 0x7234(%rip), %rdx      # 0x2c755
leaq -0x1f0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xc63c
leaq -0x58(%rbp), %rdi
callq 0x8930
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %r14
leaq -0x78(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x85b0
movq -0x38(%rbp), %rax
movl 0x8(%rax), %edx
movb $0x1, %r15b
leaq -0x78(%rbp), %rsi
movq %r14, %rdi
callq 0xc8b2
xorl %r15d, %r15d
leaq 0x15b3b(%rip), %rsi     # 0x3b0b0
leaq -0x18c8c(%rip), %rdx    # 0xc8f0
movq %r14, %rdi
callq 0x87a0
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x8930
testb %r15b, %r15b
jne 0x2559a
jmp 0x255a2
movq %rax, %rbx
movq %r14, %rdi
callq 0x82f0
leaq -0x1f0(%rbp), %rdi
jmp 0x255da
jmp 0x255bb
movq %rax, %rbx
jmp 0x2560f
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
jmp 0x255da
movq %rax, %rbx
jmp 0x25603
jmp 0x255f4
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x255da
jmp 0x255f4
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x8930
jmp 0x255f7
jmp 0x255f4
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
callq 0xd022
jmp 0x255f7
movq %rax, %rbx
leaq -0x278(%rbp), %rdi
callq 0xd022
leaq -0x108(%rbp), %rdi
callq 0xd078
leaq -0x168(%rbp), %rdi
callq 0xd078
movq %rbx, %rdi
callq 0x87e0
nop