// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IRepeat.hpp
// Function: IRepeat::generateCode(std::basic_fstream<char, std::char_traits<char>>&)
void generateCode(std::fstream& fileStream) {
		/* Como o método repita se baseia no laço for, geramos um nome de variável
		 * aleatório para utilizar como contador
		 */
		string randomVarName = IBlock::generateRandomVariableName(15);
		randomVarName.insert(randomVarName.begin(), '_');

		/* Criamos o corpo do for */
		fileStream << "for(int " << randomVarName << " = 0; " << randomVarName << " < ";

		string comparer = std::to_string(value);

		/* Se o contador for uma variável, verificamos se a mesma existe e se ela é numérica */
		if(!isValue){
			IData *data = ownerBlock->getLocalVariable(varname);

			/* Se ela não existir, geramos um erro */
			if(data == NULL){
				std::string errorMsg = "Variavel " + *varname + " nao declarada.";
				throw ISourceErrorException(errorMsg, myLine);
			}

			string type = data->getType();

			/* Se o tipo for string, geramos um erro */
			if(type == IString::myType){
				std::string errorMsg = "Variavel string utilizada em laco \'repita\'.";
				throw ISourceErrorException(errorMsg, myLine);
			}else if(type == IReal::myType)
				/* Se for um valor real, mostramos o warning de arrendondamento */
				//warning
				cout << "Atencao: a utilizacao de um valor real em uma expressao \'repita\' causa arredondamento para cima (i.e, `repita 3.3 vezes` repetiria o bloco de código 4 vezes)." << endl;

			comparer = data->getId();
		}else if(isStrValue){
			/* Se for uma variável string, geramos um erro*/
			std::string errorMsg = "Variavel string utilizada em laco \'repita\'.";
			throw ISourceErrorException(errorMsg, myLine);
		}

		/* Terminamos de gerar o bloco */
		fileStream << comparer << "; " << randomVarName << "++){";
		innerBlock->generateCode(fileStream);
		fileStream << "}" << endl;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x88(%rbp), %r15
pushq $0xf
popq %rsi
movq %r15, %rdi
callq 0x25256
movq (%r15), %rsi
pushq $0x5f
popq %rdx
movq %r15, %rdi
callq 0x8860
leaq 0x10(%r14), %r15
leaq 0x7819(%rip), %rsi      # 0x2c6f2
movq %r15, %rdi
callq 0x8390
leaq -0x88(%rbp), %rsi
movq %rax, %rdi
callq 0x8340
leaq 0x7804(%rip), %rsi      # 0x2c6fb
movq %rax, %rdi
callq 0x8390
leaq -0x88(%rbp), %rsi
movq %rax, %rdi
callq 0x8340
leaq 0x77ed(%rip), %rsi      # 0x2c702
movq %rax, %rdi
callq 0x8390
movl 0x20(%rbx), %esi
leaq -0xa8(%rbp), %rdi
callq 0xec36
cmpb $0x0, 0x30(%rbx)
je 0x24f9e
cmpb $0x1, 0x31(%rbx)
jne 0x25040
leaq 0x77c3(%rip), %rsi      # 0x2c706
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x8180
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %r14
leaq -0xc8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x85b0
movl 0x8(%rbx), %edx
movb $0x1, %r15b
leaq -0xc8(%rbp), %rsi
movq %r14, %rdi
callq 0xc8b2
xorl %r15d, %r15d
leaq 0x16126(%rip), %rsi     # 0x3b0b0
leaq -0x186a1(%rip), %rdx    # 0xc8f0
movq %r14, %rdi
callq 0x87a0
jmp 0x251a0
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0xebdc
movq %rax, %r12
testq %rax, %rax
je 0x250c7
movq (%r12), %rax
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq *0x10(%rax)
leaq 0x1750c(%rip), %rsi     # 0x3c4d8
leaq -0x48(%rbp), %rdi
callq 0xce8f
testb %al, %al
jne 0x25143
leaq 0x17514(%rip), %rsi     # 0x3c4f8
leaq -0x48(%rbp), %rdi
callq 0xce8f
testb %al, %al
je 0x2500c
movq 0x16fc8(%rip), %rdi     # 0x3bfc0
leaq 0x7653(%rip), %rsi      # 0x2c652
callq 0x8390
movq %rax, %rdi
callq 0x81f0
addq $0x8, %r12
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0x85b0
leaq -0xa8(%rbp), %rdi
leaq -0x68(%rbp), %r12
movq %r12, %rsi
callq 0x84d0
movq %r12, %rdi
callq 0x8930
leaq -0x48(%rbp), %rdi
callq 0x8930
leaq -0xa8(%rbp), %rsi
movq %r15, %rdi
callq 0x8340
leaq 0x76a9(%rip), %rsi      # 0x2c6ff
movq %rax, %rdi
callq 0x8390
leaq -0x88(%rbp), %rsi
movq %rax, %rdi
callq 0x8340
leaq 0x76be(%rip), %rsi      # 0x2c732
movq %rax, %rdi
callq 0x8390
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
leaq 0x7813(%rip), %rsi      # 0x2c8a2
movq %r15, %rdi
callq 0x8390
movq %rax, %rdi
callq 0x81f0
leaq -0xa8(%rbp), %rdi
callq 0x8930
leaq -0x88(%rbp), %rdi
callq 0x8930
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rdx
leaq 0x314f(%rip), %rsi      # 0x28221
leaq -0x68(%rbp), %rdi
callq 0xc83b
leaq 0x7673(%rip), %rdx      # 0x2c755
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xc63c
leaq -0x68(%rbp), %rdi
callq 0x8930
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %r14
leaq -0x108(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x85b0
movl 0x8(%rbx), %edx
movb $0x1, %r15b
leaq -0x108(%rbp), %rsi
movq %r14, %rdi
callq 0xc8b2
xorl %r15d, %r15d
leaq 0x15f7e(%rip), %rsi     # 0x3b0b0
leaq -0x18849(%rip), %rdx    # 0xc8f0
movq %r14, %rdi
callq 0x87a0
jmp 0x251a0
leaq 0x75bc(%rip), %rsi      # 0x2c706
leaq -0x68(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x8180
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %r14
leaq -0xe8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x85b0
movl 0x8(%rbx), %edx
movb $0x1, %r15b
leaq -0xe8(%rbp), %rsi
movq %r14, %rdi
callq 0xc8b2
xorl %r15d, %r15d
leaq 0x15f1f(%rip), %rsi     # 0x3b0b0
leaq -0x188a8(%rip), %rdx    # 0xc8f0
movq %r14, %rdi
callq 0x87a0
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
jmp 0x251ed
jmp 0x251f9
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x8930
testb %r15b, %r15b
jne 0x251c7
jmp 0x251cf
movq %rax, %rbx
movq %r14, %rdi
callq 0x82f0
leaq -0x68(%rbp), %rdi
callq 0x8930
jmp 0x25211
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
jmp 0x25215
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x8930
testb %r15b, %r15b
jne 0x251fc
jmp 0x25211
movq %rax, %rbx
movq %r14, %rdi
callq 0x82f0
jmp 0x25211
jmp 0x2520e
jmp 0x25229
jmp 0x25229
jmp 0x2520e
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x8930
jmp 0x2522c
jmp 0x25229
jmp 0x25229
jmp 0x25224
jmp 0x25224
movq %rax, %rbx
jmp 0x25238
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x8930
leaq -0x88(%rbp), %rdi
callq 0x8930
movq %rbx, %rdi
callq 0x87e0