// File: /workspace/github_cpp_makefile_star2_O1/araujoigor[P]ipp-compiler/./src/include/IWhile.hpp
// Function: IWhile::generateCode(std::basic_fstream<char, std::char_traits<char>>&)
void generateCode(std::fstream& fileStream) {
		//Variavel para armazenamento dos tokens que iremos gerar através da quebra
		//da expressao do if pelos tokens '&&' e '||'
		vector<string> tokens;

		//Armazenamos a expressao original temporariamente, para processamento
		string tempStr = *expression;

		//eliminamos todos os parenteses para analise
		boost::erase_all(tempStr, "(");
		boost::erase_all(tempStr, ")");

		//Quebramos a expressao pelos operadores || e &&
		boost::algorithm::split_regex(tokens, tempStr,
				boost::regex("&&|\\|\\|"));

		//Iteramos sobre as sub expressões para dividir os elementos da expressão e procurar por comparações
		//incorretas e/ou variaveis não declaradas
		for (auto it = tokens.begin(); it != tokens.end(); it++) {
			//Vetor de strings para armazenamento das subexpressões
			vector<string> varsExps;

			//Quebramos cada subexpressão pelos operadores de comparação
			boost::algorithm::split_regex(varsExps, *it,
					boost::regex("==|!=|<|>|<=|>="));
			string type[2];
			int i = 0;

			//Obtemos o tipo de cada operando das comparações
			for (auto it2 = varsExps.begin(); it2 != varsExps.end(); it2++) {
				//Se for um numeri=o
				if (IMath::isNumber(*it2)) {
					type[i] = IReal::myType;
					continue;
				}

				//Se for uma string
				if (it2->find("\"") != string::npos) {
					type[i] = IString::myType;
					continue;
				}

				IData *data = ownerBlock->getLocalVariable(*it2);

				//Se for uma variavel
				if (data == NULL) {
					//Variavel nao declarada, gera um erro
					throw ISourceErrorException(
							"Variavel " + *it2 + " nao declarada.", myLine);
				} else {
					type[0] = data->getType();
				}

				i++;
			}

			//Caso a comparação seja de tipagem errada, gera-se um erro
			if (type[0] != type[1]
					&& (type[0] == IString::myType || type[1] == IString::myType)) {
				throw ISourceErrorException(
						"Impossivel comparar uma variavel numerica com uma string.",
						myLine);
			}
		}

		fileStream << "while (" << *expression << "){" << endl;
		innerBlock->generateCode(fileStream);
		fileStream << "}" << endl;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0xd0(%rbp)
movq $0x0, -0xc0(%rbp)
movq %rdi, -0x30(%rbp)
movq 0x18(%rdi), %rax
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x10d2a
leaq 0x45f0(%rip), %rax      # 0x2c243
movq %rax, -0x70(%rbp)
leaq 0x45e6(%rip), %rax      # 0x2c244
movq %rax, -0x68(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rax
leaq (%rsi,%rax), %rdx
testq %rax, %rax
je 0x27c86
cmpb $0x28, (%rsi)
je 0x27c8b
incq %rsi
decq %rax
jne 0x27c79
movq %rdx, %rsi
jmp 0x27c8f
leaq 0x1(%rsi), %rdx
cmpq %rdx, %rsi
je 0x27cb1
movq -0x60(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x70(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x90(%rbp), %rdi
callq 0x116b5
leaq 0x5e1e(%rip), %rax      # 0x2dad6
movq %rax, -0x70(%rbp)
leaq 0x5e14(%rip), %rax      # 0x2dad7
movq %rax, -0x68(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rax
leaq (%rsi,%rax), %rdx
testq %rax, %rax
je 0x27ceb
cmpb $0x29, (%rsi)
je 0x27cf0
incq %rsi
decq %rax
jne 0x27cde
movq %rdx, %rsi
jmp 0x27cf4
leaq 0x1(%rsi), %rdx
cmpq %rdx, %rsi
je 0x27d16
movq -0x60(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x70(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x90(%rbp), %rdi
callq 0x116b5
leaq 0x4a68(%rip), %rsi      # 0x2c785
leaq -0x70(%rbp), %rdi
xorl %edx, %edx
callq 0x1160e
movq %rbx, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x70(%rbp), %rdx
xorl %ecx, %ecx
callq 0x132bf
leaq -0x68(%rbp), %rdi
callq 0x18c60
movq -0xd0(%rbp), %rbx
cmpq -0xc8(%rbp), %rbx
je 0x28001
leaq -0x40(%rbp), %r12
leaq -0x70(%rbp), %r14
leaq -0xb0(%rbp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movq $0x0, -0xa0(%rbp)
movq %r14, %rdi
leaq 0x49fa(%rip), %rsi      # 0x2c78d
xorl %edx, %edx
callq 0x1160e
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x132bf
movq %rbx, -0xe0(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x18c60
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0x70, %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x50, %rax
jne 0x27dbf
movq -0xb0(%rbp), %rbx
cmpq -0xa8(%rbp), %rbx
je 0x27f38
xorl %r15d, %r15d
leaq -0xf0(%rbp), %rax
movq %rax, -0x100(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x100(%rbp), %rdi
callq 0x10d2a
leaq -0x100(%rbp), %rdi
callq 0xb254
movl %eax, %r14d
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x27e42
callq 0x8350
leaq 0x15667(%rip), %rsi     # 0x3d4b0
testb %r14b, %r14b
jne 0x27e71
movl $0x1, %ecx
movq %rbx, %rdi
leaq 0x4241(%rip), %rsi      # 0x2c09e
xorl %edx, %edx
callq 0x8790
leaq 0x15625(%rip), %rsi     # 0x3d490
cmpq $-0x1, %rax
je 0x27e9b
movslq %r15d, %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %rdi
addq $-0x70, %rdi
callq 0x8230
addq $0x20, %rbx
cmpq -0xa8(%rbp), %rbx
jne 0x27df7
jmp 0x27f38
movq -0x30(%rbp), %rax
movq 0x10(%rax), %r14
leaq -0x130(%rbp), %rax
movq %rax, -0x140(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x140(%rbp), %r13
movq %r13, %rdi
callq 0x10d2a
movq %r14, %rdi
movq %r13, %rsi
callq 0xda54
movq %rax, %r14
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x27ef0
callq 0x8350
testq %r14, %r14
je 0x280f4
movq (%r14), %rax
leaq -0x120(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq *0x10(%rax)
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
callq 0x84d0
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x27f30
callq 0x8350
incl %r15d
jmp 0x27e85
movq -0x68(%rbp), %r14
movq -0x48(%rbp), %rbx
cmpq %rbx, %r14
jne 0x27f5e
testq %r14, %r14
je 0x27fb7
movq -0x70(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r14, %rdx
callq 0x83e0
testl %eax, %eax
je 0x27fb7
movq 0x15533(%rip), %r15     # 0x3d498
cmpq %r15, %r14
jne 0x27f8e
testq %r14, %r14
je 0x2814e
movq 0x15516(%rip), %rsi     # 0x3d490
movq -0x70(%rbp), %rdi
movq %r14, %rdx
callq 0x83e0
testl %eax, %eax
je 0x2814e
cmpq %r15, %rbx
jne 0x27fb7
testq %rbx, %rbx
je 0x2814e
movq 0x154ed(%rip), %rsi     # 0x3d490
movq -0x50(%rbp), %rdi
movq %rbx, %rdx
callq 0x83e0
testl %eax, %eax
je 0x2814e
xorl %ebx, %ebx
leaq -0x70(%rbp), %r14
leaq -0xb0(%rbp), %r15
movq -0x50(%rbp,%rbx), %rdi
leaq (%r12,%rbx), %rax
cmpq %rdi, %rax
je 0x27fd7
callq 0x8350
addq $-0x20, %rbx
cmpq $-0x40, %rbx
jne 0x27fc4
movq %r15, %rdi
callq 0xf39a
movq -0xe0(%rbp), %rbx
addq $0x20, %rbx
cmpq -0xc8(%rbp), %rbx
jne 0x27d74
movq -0xd8(%rbp), %r12
leaq 0x10(%r12), %rbx
leaq 0x868b(%rip), %rsi      # 0x3069f
movl $0x7, %edx
movq %rbx, %rdi
leaq -0x80(%rbp), %r15
callq 0x8460
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x8460
movq %rax, %r14
leaq 0x8765(%rip), %rsi      # 0x307ab
movl $0x2, %edx
movq %rax, %rdi
callq 0x8460
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8360
movsbl %al, %esi
movq %r14, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x82b0
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *(%rax)
leaq 0x8888(%rip), %rsi      # 0x30919
movl $0x1, %edx
movq %rbx, %rdi
callq 0x8460
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x82b0
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x280d6
callq 0x8350
leaq -0xd0(%rbp), %rdi
callq 0xf39a
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81f0
movq %rax, %r14
leaq 0x4119(%rip), %rsi      # 0x2c221
leaq -0x120(%rbp), %rdi
movq %rbx, %rdx
callq 0xdb86
leaq 0x86ae(%rip), %rsi      # 0x307cc
leaq -0x120(%rbp), %rdi
callq 0x8850
leaq -0x150(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x281b4
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x281c5
movl $0x28, %edi
callq 0x81f0
movq %rax, %r14
leaq -0x170(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x4630(%rip), %rsi      # 0x2c79d
leaq 0x4662(%rip), %rdx      # 0x2c7d6
leaq -0x180(%rbp), %rdi
callq 0x1d592
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
movb $0x1, %r15b
leaq -0x180(%rbp), %rsi
movq %r14, %rdi
callq 0xdc12
xorl %r15d, %r15d
leaq 0x13ebd(%rip), %rsi     # 0x3c060
leaq -0x1a548(%rip), %rdx    # 0xdc62
movq %r14, %rdi
callq 0x8770
jmp 0x2820e
movq %rdx, -0x160(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x150(%rbp)
movq 0x8(%rax), %rdx
leaq -0x160(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
movb $0x1, %r15b
movq %r14, %rdi
callq 0xdc12
xorl %r15d, %r15d
leaq 0x13e61(%rip), %rsi     # 0x3c060
leaq -0x1a5a4(%rip), %rdx    # 0xdc62
movq %r14, %rdi
callq 0x8770
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x18c60
jmp 0x28305
jmp 0x28229
movq %rax, %rbx
jmp 0x2831a
movq %rax, %rbx
jmp 0x28309
movq %rax, %rbx
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
jne 0x28273
jmp 0x28293
jmp 0x2828d
movq %rax, %rbx
movq -0x160(%rbp), %rdi
cmpq %r13, %rdi
je 0x28260
callq 0x8350
jmp 0x28260
movq %rax, %rbx
movb $0x1, %r15b
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x28293
callq 0x8350
jmp 0x28293
movq %rax, %rbx
jmp 0x282f9
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x18c60
jmp 0x282f9
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0x282d9
movq %r14, %rdi
callq 0x82e0
jmp 0x282d9
jmp 0x282d6
movq %rax, %rbx
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
jmp 0x282ca
jmp 0x282d6
movq %rax, %rbx
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x282d9
callq 0x8350
jmp 0x282d9
movq %rax, %rbx
xorl %r14d, %r14d
movq -0x50(%rbp,%r14), %rdi
leaq (%r12,%r14), %rax
cmpq %rdi, %rax
je 0x282ef
callq 0x8350
addq $-0x20, %r14
cmpq $-0x40, %r14
jne 0x282dc
leaq -0xb0(%rbp), %rdi
callq 0xf39a
leaq -0x80(%rbp), %r15
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x2831a
callq 0x8350
leaq -0xd0(%rbp), %rdi
callq 0xf39a
movq %rbx, %rdi
callq 0x87b0