// File: /workspace/github_cpp_makefile_star2_O1/araujoigor[P]ipp-compiler/./src/include/IMath.hpp
// Function: IMath::checkAndGetExpression[abi:cxx11](IBlock*, int)
std::string checkAndGetExpression(IBlock *ownerBlock, int myLine) {

		/* Utiliza-se um tokenizer que quebra a expressão matemática nos seus operadores */
		boost::char_separator<char> separator("+-*/() ");
		Tokenizer tokens(expression, separator);

		/* Para cada token, verificamos se exitem erros, como variáveis não declaradas
		 * ou valores String
		 */
		for(auto tokenIterator = tokens.begin(); tokenIterator != tokens.end(); tokenIterator++){
			/* Se o token atual NÃO for um NUMERO, deve ser uma variável */
			if(!isNumber(*tokenIterator)){
				/* Portanto obtemos a variavel */
				IData *data = ownerBlock->getLocalVariable(*tokenIterator);
				std::string errorMsg;

				/* Se não for uma variável, então é uma string ou a variável não foi declarada
				 * Então geramos o erro aproriado
				 */
				if(data == NULL){
					if(tokenIterator->find("\"") != std::string::npos)
						errorMsg = "Impossivel utilizar uma string em uma expressao matematica (valor " + *tokenIterator + ")";
					else
						errorMsg = "Variavel " + *tokenIterator + " nao declarada.";

					throw ISourceErrorException(errorMsg, myLine);
				}
				/* Se for uma variavel string, também geramos um erro.*/
				else if(data->getType() == IString::myType){
					errorMsg = "Impossivel usar uma string em uma expressao matematica (variavel " + *tokenIterator + ")" ;
					throw ISourceErrorException(errorMsg, myLine);
				}
				else if(data->getType() == IReal::myType)
					mathType = TYPE_REAL;
			}else if(!IMath::isInteger(*tokenIterator))
				mathType = TYPE_REAL;
		}

		if(outType == TYPE_INTEGER){
			expression.insert(0, "(int)");
		}

		return expression;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movl %ecx, %r14d
movq %rdx, -0x88(%rbp)
movq %rsi, %r12
movq %rdi, %r15
leaq 0x1e5b2(%rip), %rsi     # 0x2c371
leaq -0x370(%rbp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe690
leaq -0x320(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xe736
movq %r12, -0x58(%rbp)
movq %r15, -0x80(%rbp)
movl %r14d, -0x4c(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0xe7c2
leaq -0x1e8(%rbp), %rbx
leaq -0x108(%rbp), %r12
leaq -0x270(%rbp), %r15
leaq -0xe8(%rbp), %r14
leaq -0x1f8(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0xe886
movb -0x198(%rbp), %al
cmpb $0x1, %al
jne 0xde5e
cmpb $0x1, -0x110(%rbp)
jne 0xde5e
movq -0x1a8(%rbp), %rax
cmpq -0x120(%rbp), %rax
je 0xe044
xorl %r13d, %r13d
jmp 0xde68
cmpb -0x110(%rbp), %al
sete %r13b
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0xde80
callq 0x8350
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0xde98
callq 0x8350
movq -0x1f8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xdea9
callq 0x8350
testb %r13b, %r13b
jne 0xe1df
cmpb $0x0, -0x110(%rbp)
je 0xe3cf
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x10d2a
movq %r14, %rdi
callq 0xb254
movl %eax, %r13d
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0xdf09
callq 0x8350
movb -0x110(%rbp), %al
testb %r13b, %r13b
je 0xdf87
testb %al, %al
je 0xe3cf
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x10d2a
leaq -0xa8(%rbp), %rdi
callq 0xb8e6
movl %eax, %r13d
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xdf6e
callq 0x8350
testb %r13b, %r13b
jne 0xe0e9
movq -0x58(%rbp), %rax
movl $0x1, 0x38(%rax)
jmp 0xe0e9
testb %al, %al
je 0xe3cf
leaq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %r13
movq %r13, %rdi
callq 0x10d2a
movq -0x88(%rbp), %rdi
movq %r13, %rsi
callq 0xda54
movq %rax, %r13
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0xdfe7
callq 0x8350
movq %rbx, -0x1f8(%rbp)
movq $0x0, -0x1f0(%rbp)
movb $0x0, -0x1e8(%rbp)
testq %r13, %r13
je 0xe322
movq (%r13), %rax
leaq -0x48(%rbp), %rdi
movq %r13, %rsi
callq *0x10(%rax)
movq -0x40(%rbp), %rdx
cmpq 0x2f476(%rip), %rdx     # 0x3d498
jne 0xe040
testq %rdx, %rdx
je 0xe057
movq 0x2f460(%rip), %rsi     # 0x3d490
movq -0x48(%rbp), %rdi
callq 0x83e0
testl %eax, %eax
sete %bl
jmp 0xe059
xorl %ebx, %ebx
jmp 0xe059
movq -0x1a0(%rbp), %rax
cmpq -0x118(%rbp), %rax
jmp 0xde64
movb $0x1, %bl
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xe06b
callq 0x8350
testb %bl, %bl
jne 0xe2c8
movq (%r13), %rax
leaq -0x48(%rbp), %rdi
movq %r13, %rsi
callq *0x10(%rax)
movq -0x40(%rbp), %rdx
cmpq 0x2f42c(%rip), %rdx     # 0x3d4b8
jne 0xe0aa
testq %rdx, %rdx
je 0xe0ae
movq 0x2f416(%rip), %rsi     # 0x3d4b0
movq -0x48(%rbp), %rdi
callq 0x83e0
testl %eax, %eax
sete %bl
jmp 0xe0b0
xorl %ebx, %ebx
jmp 0xe0b0
movb $0x1, %bl
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xe0c2
callq 0x8350
testb %bl, %bl
je 0xe0d1
movq -0x58(%rbp), %rax
movl $0x1, 0x38(%rax)
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rbx
cmpq %rbx, %rdi
je 0xe0e9
callq 0x8350
movq %r15, -0x280(%rbp)
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
addq %rsi, %rdx
leaq -0x280(%rbp), %rdi
callq 0x10d2a
leaq -0x250(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdx
addq %rsi, %rdx
leaq -0x260(%rbp), %rdi
callq 0x10d2a
movb -0x20(%r12), %al
movb %al, 0x38(%r15)
movq -0x28(%r12), %rax
movq %rax, 0x30(%r15)
movb -0x8(%r12), %al
movb %al, 0x50(%r15)
movups -0x18(%r12), %xmm0
movups %xmm0, 0x40(%r15)
leaq -0x208(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
addq %rsi, %rdx
leaq -0x218(%rbp), %rdi
callq 0x10d2a
leaq -0x170(%rbp), %rdi
callq 0xecfe
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0xe1ad
callq 0x8350
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0xe1c5
callq 0x8350
movq -0x280(%rbp), %rdi
cmpq %r15, %rdi
je 0xde1f
callq 0x8350
jmp 0xde1f
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe1f4
callq 0x8350
leaq -0x140(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq -0x80(%rbp), %rbx
movq -0x58(%rbp), %r14
je 0xe211
callq 0x8350
leaq -0x160(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe226
callq 0x8350
cmpl $0x0, 0x3c(%r14)
jne 0xe246
leaq 0x1e1ca(%rip), %rcx     # 0x2c3fe
movl $0x5, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8450
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x10d2a
leaq -0x2e0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe274
callq 0x8350
leaq -0x300(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe289
callq 0x8350
leaq -0x340(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe29e
callq 0x8350
leaq -0x360(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2b3
callq 0x8350
movq %rbx, %rax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, -0x110(%rbp)
je 0xe3cf
leaq 0x1e0e0(%rip), %rsi     # 0x2c3bc
leaq -0x78(%rbp), %rdi
movq %r12, %rdx
callq 0xdb86
leaq 0x1f7e7(%rip), %rsi     # 0x2dad6
leaq -0x78(%rbp), %rdi
callq 0x8850
leaq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xe3ee
movups (%rcx), %xmm0
leaq -0x38(%rbp), %rdx
movups %xmm0, (%rdx)
jmp 0xe3f9
cmpb $0x0, -0x110(%rbp)
je 0xe3cf
leaq 0x1dd68(%rip), %rsi     # 0x2c09e
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
callq 0x8790
cmpq $-0x1, %rax
jne 0xe379
cmpb $0x0, -0x110(%rbp)
je 0xe3cf
leaq 0x1dec6(%rip), %rsi     # 0x2c221
leaq -0x78(%rbp), %rdi
movq %r12, %rdx
callq 0xdb86
leaq 0x2245e(%rip), %rsi     # 0x307cc
leaq -0x78(%rbp), %rdi
callq 0x8850
jmp 0xe3a5
cmpb $0x0, -0x110(%rbp)
je 0xe3cf
leaq 0x1dff0(%rip), %rsi     # 0x2c379
leaq -0x78(%rbp), %rdi
movq %r12, %rdx
callq 0xdb86
leaq 0x1f73a(%rip), %rsi     # 0x2dad6
leaq -0x78(%rbp), %rdi
callq 0x8850
leaq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xe4ac
movups (%rcx), %xmm0
leaq -0x38(%rbp), %rdx
movups %xmm0, (%rdx)
jmp 0xe4b7
leaq 0x1e02e(%rip), %rdi     # 0x2c404
leaq 0x1e02e(%rip), %rsi     # 0x2c40b
leaq 0x1e04d(%rip), %rcx     # 0x2c431
movl $0x3b, %edx
callq 0x82a0
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x1f8(%rbp), %rdi
movq %rbx, %rsi
callq 0x84d0
movq (%rbx), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xe434
callq 0x8350
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe446
callq 0x8350
movl $0x28, %edi
callq 0x81f0
movq %rax, %r14
leaq -0x290(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2a0(%rbp), %rdi
callq 0x10d2a
movb $0x1, %bl
leaq -0x2a0(%rbp), %rsi
movq %r14, %rdi
movl -0x4c(%rbp), %edx
callq 0xdc12
xorl %ebx, %ebx
leaq 0x2dbc8(%rip), %rsi     # 0x3c060
leaq -0x83d(%rip), %rdx      # 0xdc62
movq %r14, %rdi
callq 0x8770
jmp 0xe565
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x1f8(%rbp), %rdi
movq %rbx, %rsi
callq 0x84d0
movq (%rbx), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xe4f2
callq 0x8350
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe504
callq 0x8350
movl $0x28, %edi
callq 0x81f0
movq %rax, %r14
leaq -0x2b0(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2c0(%rbp), %rdi
callq 0x10d2a
movb $0x1, %bl
leaq -0x2c0(%rbp), %rsi
movq %r14, %rdi
movl -0x4c(%rbp), %edx
callq 0xdc12
xorl %ebx, %ebx
leaq 0x2db0a(%rip), %rsi     # 0x3c060
leaq -0x8fb(%rip), %rdx      # 0xdc62
movq %r14, %rdi
callq 0x8770
movq %rax, %r12
movq -0x2c0(%rbp), %rdi
jmp 0xe588
jmp 0xe594
jmp 0xe5b9
jmp 0xe5b9
jmp 0xe5fc
jmp 0xe5fc
movq %rax, %r12
movq -0x2a0(%rbp), %rdi
cmpq %r15, %rdi
je 0xe599
callq 0x8350
jmp 0xe599
movq %rax, %r12
movb $0x1, %bl
testb %bl, %bl
je 0xe5ff
movq %r14, %rdi
callq 0x82e0
jmp 0xe5ff
jmp 0xe5b1
movq %rax, %r12
jmp 0xe67c
movq %rax, %r12
jmp 0xe670
movq %rax, %r12
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe5ff
callq 0x8350
jmp 0xe5ff
jmp 0xe5fc
movq %rax, %r12
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
jmp 0xe653
movq %rax, %r12
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
jmp 0xe653
jmp 0xe5fc
jmp 0xe661
movq %rax, %r12
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
jmp 0xe653
movq %rax, %r12
movq -0x280(%rbp), %rdi
cmpq %r15, %rdi
jne 0xe658
jmp 0xe664
movq %rax, %r12
leaq -0x280(%rbp), %rdi
callq 0xe9c8
jmp 0xe664
movq %rax, %r12
leaq -0x280(%rbp), %rdi
callq 0xe94a
jmp 0xe664
movq %rax, %r12
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0xe664
callq 0x8350
jmp 0xe664
jmp 0xe661
movq %rax, %r12
leaq -0x170(%rbp), %rdi
callq 0xe94a
leaq -0x320(%rbp), %rdi
callq 0xe992
leaq -0x370(%rbp), %rdi
callq 0xe9c8
movq %r12, %rdi
callq 0x87b0