// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq -0xb0(%rbp), %r14
movl $0xf, %esi
movq %r14, %rdi
callq 0x289c0
movl $0x1, %ecx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x5f, %r8d
callq 0x8800
movq %r15, -0x50(%rbp)
leaq 0x10(%r15), %r14
leaq 0x837d(%rip), %rsi      # 0x30769
movl $0x8, %edx
movq %r14, %rdi
callq 0x8460
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq %r14, %rdi
callq 0x8460
movq %rax, %r15
leaq 0x8359(%rip), %rsi      # 0x30772
movl $0x6, %edx
movq %rax, %rdi
callq 0x8460
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq %r15, %rdi
callq 0x8460
leaq 0x8336(%rip), %rsi      # 0x30779
movl $0x3, %edx
movq %rax, %rdi
callq 0x8460
movl 0x20(%rbx), %r12d
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
movl $0x1, %r15d
cmpl $0xa, %r13d
jb 0x284b4
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r13d, %ecx
cmpl $0x63, %ecx
jbe 0x284ab
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x284b1
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x284b4
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x28478
addl $-0x3, %r15d
jmp 0x284b4
addl $-0x2, %r15d
jmp 0x284b4
decl %r15d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x90(%rbp), %rdi
movl $0x2d, %edx
callq 0x8490
addq -0x90(%rbp), %r12
movq %r12, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x10c07
cmpb $0x0, 0x30(%rbx)
je 0x28583
cmpb $0x1, 0x31(%rbx)
movq -0x50(%rbp), %r12
jne 0x2869a
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x826c(%rip), %rsi      # 0x3077d
leaq 0x8290(%rip), %rdx      # 0x307a8
leaq -0x48(%rbp), %rdi
callq 0x1d592
movl $0x28, %edi
callq 0x81f0
movq %rax, %r14
leaq -0xc0(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x10d2a
movl 0x8(%rbx), %edx
movb $0x1, %r12b
leaq -0xd0(%rbp), %rsi
movq %r14, %rdi
callq 0xdc12
xorl %r12d, %r12d
leaq 0x13af1(%rip), %rsi     # 0x3c060
leaq -0x1a914(%rip), %rdx    # 0xdc62
movq %r14, %rdi
callq 0x8770
jmp 0x288d1
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x10b10
movq %rax, %r12
testq %rax, %rax
je 0x28774
movq (%r12), %rax
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq *0x10(%rax)
movq -0x40(%rbp), %r15
cmpq 0x14ee3(%rip), %r15     # 0x3d498
jne 0x285db
testq %r15, %r15
je 0x287bf
movq 0x14ec9(%rip), %rsi     # 0x3d490
movq -0x48(%rbp), %rdi
movq %r15, %rdx
callq 0x83e0
testl %eax, %eax
je 0x287bf
cmpq 0x14ed6(%rip), %r15     # 0x3d4b8
jne 0x28646
testq %r15, %r15
je 0x28600
movq 0x14ec0(%rip), %rsi     # 0x3d4b0
movq -0x48(%rbp), %rdi
movq %r15, %rdx
callq 0x83e0
testl %eax, %eax
jne 0x28646
movq 0x149c1(%rip), %r15     # 0x3cfc8
leaq 0x80bb(%rip), %rsi      # 0x306c9
movl $0x9f, %edx
movq %r15, %rdi
callq 0x8460
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x8360
movsbl %al, %esi
movq 0x1498f(%rip), %rdi     # 0x3cfc8
callq 0x8030
movq %rax, %rdi
callq 0x82b0
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x10d2a
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %r15
movq %r15, %rsi
callq 0x84d0
movq (%r15), %rdi
cmpq %r13, %rdi
movq -0x50(%rbp), %r12
je 0x28688
callq 0x8350
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2869a
callq 0x8350
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %r14, %rdi
callq 0x8460
movq %rax, %r15
leaq 0x80bc(%rip), %rsi      # 0x30776
movl $0x2, %edx
movq %rax, %rdi
callq 0x8460
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq %r15, %rdi
callq 0x8460
leaq 0x80c5(%rip), %rsi      # 0x307a9
movl $0x4, %edx
movq %rax, %rdi
callq 0x8460
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *(%rax)
leaq 0x8215(%rip), %rsi      # 0x30919
movl $0x1, %edx
movq %r14, %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 -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x2874d
callq 0x8350
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28762
callq 0x8350
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rdx
leaq 0x3aa2(%rip), %rsi      # 0x2c221
leaq -0x70(%rbp), %rdi
callq 0xdb86
leaq 0x803d(%rip), %rsi      # 0x307cc
leaq -0x70(%rbp), %rdi
callq 0x8850
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x28840
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x2884b
leaq -0x60(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x7faf(%rip), %rsi      # 0x3077d
leaq 0x7fd3(%rip), %rdx      # 0x307a8
leaq -0x70(%rbp), %rdi
callq 0x1d592
movl $0x28, %edi
callq 0x81f0
movq %rax, %r14
leaq -0xe0(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x10d2a
movl 0x8(%rbx), %edx
movb $0x1, %r12b
leaq -0xf0(%rbp), %rsi
movq %r14, %rdi
callq 0xdc12
xorl %r12d, %r12d
leaq 0x13834(%rip), %rsi     # 0x3c060
leaq -0x1abd1(%rip), %rdx    # 0xdc62
movq %r14, %rdi
callq 0x8770
jmp 0x288d1
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28874
callq 0x8350
movl $0x28, %edi
callq 0x81f0
movq %rax, %r14
leaq -0x100(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x10d2a
movl 0x8(%rbx), %edx
movb $0x1, %r12b
leaq -0x110(%rbp), %rsi
movq %r14, %rdi
callq 0xdc12
xorl %r12d, %r12d
leaq 0x1379e(%rip), %rsi     # 0x3c060
leaq -0x1ac67(%rip), %rdx    # 0xdc62
movq %r14, %rdi
callq 0x8770
movq %rax, %rbx
movq -0x110(%rbp), %rdi
jmp 0x2892b
jmp 0x28937
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r13, %rdi
je 0x288fb
callq 0x8350
jmp 0x288fb
movq %rax, %rbx
movb $0x1, %r12b
testb %r12b, %r12b
je 0x28908
movq %r14, %rdi
callq 0x82e0
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x28964
callq 0x8350
jmp 0x28964
movq %rax, %rbx
leaq -0x60(%rbp), %rax
jmp 0x28968
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x2893d
callq 0x8350
jmp 0x2893d
movq %rax, %rbx
movb $0x1, %r12b
testb %r12b, %r12b
je 0x2894a
movq %r14, %rdi
callq 0x82e0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
jne 0x28971
jmp 0x28984
jmp 0x28961
jmp 0x28981
jmp 0x28981
jmp 0x28961
jmp 0x28981
jmp 0x28981
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28984
callq 0x8350
jmp 0x28984
jmp 0x2897c
jmp 0x2897c
movq %rax, %rbx
jmp 0x28999
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x28999
callq 0x8350
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x289ae
callq 0x8350
movq %rbx, %rdi
callq 0x87b0