// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_pesquisar.cpp
// Function: pesquisar_classe(std::map<int, ANFIBIO_NATIVO, std::less<int>, std::allocator<std::pair<int const, ANFIBIO_NATIVO>>>&, std::map<int, ANFIBIO_EXOTICO, std::less<int>, std::allocator<std::pair<int const, ANFIBIO_EXOTICO>>>&, std::map<int, MAMIFERO_NATIVO, std::less<int>, std::allocator<std::pair<int const, MAMIFERO_NATIVO>>>&, std::map<int, MAMIFERO_EXOTICO, std::less<int>, std::allocator<std::pair<int const, MAMIFERO_EXOTICO>>>&, std::map<int, REPTIL_NATIVO, std::less<int>, std::allocator<std::pair<int const, REPTIL_NATIVO>>>&, std::map<int, REPTIL_EXOTICO, std::less<int>, std::allocator<std::pair<int const, REPTIL_EXOTICO>>>&, std::map<int, AVE_NATIVO, std::less<int>, std::allocator<std::pair<int const, AVE_NATIVO>>>&, std::map<int, AVE_EXOTICO, std::less<int>, std::allocator<std::pair<int const, AVE_EXOTICO>>>&)
void pesquisar_classe(map <int, ANFIBIO_NATIVO> &anfibios_nat, map <int, ANFIBIO_EXOTICO> &anfibios_ex, map <int, MAMIFERO_NATIVO> &mamiferos_nat, map <int, MAMIFERO_EXOTICO> &mamiferos_ex, map <int, REPTIL_NATIVO> &repteis_nat, map <int, REPTIL_EXOTICO> &repteis_ex, map <int, AVE_NATIVO> &aves_nat, map <int, AVE_EXOTICO> &aves_ex){
	int classe, cont = 0;
	string classe_string;
	char sucesso = 'n', ok = 'n';

	do{
		do{
			cout << "Digite a opção referente a classe que deseja pesquisar: \n  1-Amphibia\n  2-Mammalia\n  3-Reptilia\n  4-Aves" << endl;
			if(!cont){
				cin.ignore();
				cont++;
			}
			getline(cin, classe_string);
			if(classe_string != "1" && classe_string != "2" && classe_string != "3" && classe_string != "4"){
				ok = 'n';
			}
			else{
				ok = 's';
				stringstream ss(classe_string);
				ss >> classe;
			}
		}while(ok == 'n');
		switch (classe){
			case 1:
				imprimir_classe(anfibios_nat, anfibios_ex); // Chama função que imprime a classe anfíbio.
				sucesso = 's';
				break;
			case 2:
				imprimir_classe(mamiferos_nat, mamiferos_ex); // Chama função que imprime a classe mamífero.
				sucesso = 's';
				break;
			case 3:
				imprimir_classe(repteis_nat, repteis_ex); // Chama função que imprime a classe réptil.
				sucesso = 's';
				break;
			case 4:
				imprimir_classe(aves_nat, aves_ex); // Chama função que imprime a classe ave.
				sucesso = 's';
				break;
			default:
				cout << "Opcao não existe!! Tente novamente." << endl;
				cout << "Deseja sair? s/n" << endl;
				cin >> sucesso;	
		}
	}while(sucesso != 's');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %r9, -0x60(%rbp)
movq %r8, -0x50(%rbp)
movq %rcx, -0x58(%rbp)
movq %rdx, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdi, -0x38(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x29(%rbp), %rax
movb $0x6e, (%rax)
movb $0x1, %r15b
movq 0x37d74(%rip), %r12     # 0x47fd0
movq 0x37d7d(%rip), %rbx     # 0x47fe0
leaq -0x80(%rbp), %r14
leaq -0x208(%rbp), %r13
movl $0x6a, %edx
movq %r12, %rdi
leaq 0x2a30b(%rip), %rsi     # 0x3a588
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
testb $0x1, %r15b
je 0x102b8
movq %rbx, %rdi
callq 0x33a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33c0
movq %r14, %rdi
leaq 0x29e35(%rip), %rsi     # 0x3a119
callq 0x30c0
testl %eax, %eax
je 0x1032d
movq %r14, %rdi
leaq 0x2a6f1(%rip), %rsi     # 0x3a9e8
callq 0x30c0
testl %eax, %eax
je 0x1032d
movq %r14, %rdi
leaq 0x29e48(%rip), %rsi     # 0x3a152
callq 0x30c0
testl %eax, %eax
je 0x1032d
movq %r14, %rdi
leaq 0x29e51(%rip), %rsi     # 0x3a16e
callq 0x30c0
xorl %r15d, %r15d
testl %eax, %eax
jne 0x1026e
movq %r13, %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0x3310
movq %r13, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3120
movq %r13, %rdi
movq 0x37c5d(%rip), %rsi     # 0x47fb0
callq 0x3160
leaq -0x188(%rbp), %rdi
callq 0x30d0
movl -0x30(%rbp), %eax
decl %eax
cmpl $0x3, %eax
jbe 0x10405
movl $0x24, %edx
movq %r12, %rdi
leaq 0x2a272(%rip), %rsi     # 0x3a5f3
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movl $0x10, %edx
movq %r12, %rdi
leaq 0x2a25b(%rip), %rsi     # 0x3a618
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rbx, %rdi
leaq -0x29(%rbp), %rsi
callq 0x3280
xorl %r15d, %r15d
cmpb $0x73, -0x29(%rbp)
jne 0x1026e
jmp 0x1044f
leaq 0x2a16c(%rip), %rcx     # 0x3a578
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x104ba
jmp 0x1044f
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x10758
jmp 0x1044f
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0x108a7
jmp 0x1044f
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x10609
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x10461
callq 0x31d0
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1049d
movq %rax, %rbx
movq 0x37b31(%rip), %rsi     # 0x47fb0
leaq -0x208(%rbp), %rdi
callq 0x3160
leaq -0x188(%rbp), %rdi
callq 0x30d0
jmp 0x104a0
jmp 0x1049d
jmp 0x1049d
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x104b2
callq 0x31d0
movq %rbx, %rdi
callq 0x3380