// File: /workspace/github_cpp_makefile_star2_O1/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, -0x58(%rbp)
movq %rcx, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq %rsi, -0x40(%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, %r14b
movq 0x37d78(%rip), %r15     # 0x47fd0
movq 0x37d81(%rip), %r13     # 0x47fe0
leaq -0x80(%rbp), %rbx
leaq -0x208(%rbp), %r12
movl $0x6a, %edx
movq %r15, %rdi
leaq 0x2a30f(%rip), %rsi     # 0x3a588
callq 0x3250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
testb $0x1, %r14b
je 0x102b3
movq %r13, %rdi
callq 0x33a0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x33c0
movq %rbx, %rdi
leaq 0x29e39(%rip), %rsi     # 0x3a119
callq 0x30c0
testl %eax, %eax
je 0x10329
movq %rbx, %rdi
leaq 0x2a6f5(%rip), %rsi     # 0x3a9e8
callq 0x30c0
testl %eax, %eax
je 0x10329
movq %rbx, %rdi
leaq 0x29e4c(%rip), %rsi     # 0x3a152
callq 0x30c0
testl %eax, %eax
je 0x10329
movq %rbx, %rdi
leaq 0x29e55(%rip), %rsi     # 0x3a16e
callq 0x30c0
xorl %r14d, %r14d
testl %eax, %eax
jne 0x1026a
movq %r12, %rdi
movq %rbx, %rsi
movl $0x18, %edx
callq 0x3310
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3120
movq %r12, %rdi
movq 0x37c61(%rip), %rsi     # 0x47fb0
callq 0x3160
leaq -0x188(%rbp), %rdi
callq 0x30d0
movl -0x30(%rbp), %eax
decl %eax
cmpl $0x3, %eax
ja 0x103ca
leaq 0x2a207(%rip), %rcx     # 0x3a578
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x104ba
jmp 0x103b4
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x10758
jmp 0x103b4
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0x108a7
jmp 0x103b4
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x10609
movb $0x73, -0x29(%rbp)
xorl %r14d, %r14d
cmpb $0x73, -0x29(%rbp)
jne 0x1026a
jmp 0x10451
movl $0x24, %edx
movq %r15, %rdi
leaq 0x2a21a(%rip), %rsi     # 0x3a5f3
callq 0x3250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movl $0x10, %edx
movq %r15, %rdi
leaq 0x2a204(%rip), %rsi     # 0x3a618
callq 0x3250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %r13, %rdi
leaq -0x29(%rbp), %rsi
callq 0x3280
jmp 0x103b8
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x10463
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 0x37b2f(%rip), %rsi     # 0x47fb0
leaq -0x208(%rbp), %rdi
callq 0x3160
leaq -0x188(%rbp), %rdi
callq 0x30d0
jmp 0x104a0
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