// File: /workspace/github_cpp_makefile_star2_O2/nataly-enne[P]pet-fera/pet_fera_main.cpp
// Function: main
int main(){
	int op;
	string especialidade, crmv;

	// Declarando o map das classes.
	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;

	map <int, VETERINARIO> vets;
	map <int, TRATADOR> tratadores;

	carregar_arquivos(anfibios_nat, anfibios_ex, mamiferos_nat, mamiferos_ex, repteis_nat, repteis_ex, aves_nat, aves_ex, vets, tratadores);

	// Menu da tela inicial.
	cout << "" << endl;
	cout << ">>> Bem-Vindo ao Sistema da Pet Fera! <<<" << endl;

	do{
		cout << " _________________________________________" << endl;
		cout << "|                                         |" << endl;
		cout << "|              MENU INICIAL               |" << endl;
		cout << "|_________________________________________|" << endl << endl;
		cout << "|"<<"1" << "|" << " - Cadastrar novo funcionario" << endl;
		cout << "|"<<"2" << "|" << " - Cadastrar novo animal" << endl;
		cout << "|"<<"3" << "|" << " - Remover um funcionario" << endl;
		cout << "|"<<"4" << "|" << " - Remover um animal" << endl;
		cout << "|"<<"5" << "|" << " - Alterar dados de um animal" << endl;
		cout << "|"<<"6" << "|" << " - Alterar dados de um funcionário" << endl;
		cout << "|"<<"7" << "|" << " - Consultar dados através da classe" << endl;
		cout << "|"<<"8" << "|" << " - Consultar dados de um animal sob responsabilidade de um veterinario ou tratador" << endl;
		cout << "|"<<"0" << "|" << " - Sair" << endl;
		cin >> op;

		switch (op){
			case 0:
				cout << "Programa finalizado!!" << endl;
				break;
			case 1: 
				cadastrar_func(vets, tratadores);
				break;
			case 2:
				cadastrar_animal(anfibios_nat, anfibios_ex, mamiferos_nat, mamiferos_ex, repteis_nat, repteis_ex, aves_nat, aves_ex, vets, tratadores);
				break;
			case 3:
				remover_funcionario(vets, tratadores);
				break;
			case 4:
				remover_animal(anfibios_nat, anfibios_ex, mamiferos_nat, mamiferos_ex, repteis_nat, repteis_ex, aves_nat, aves_ex);
				break;
			case 5:
				editar_animais(anfibios_nat, anfibios_ex, mamiferos_nat, mamiferos_ex, repteis_nat, repteis_ex, aves_nat, aves_ex, vets, tratadores);
				break;
			case 6:
				editar_func(vets, tratadores);
				break;
			case 7:
				pesquisar_classe(anfibios_nat, anfibios_ex, mamiferos_nat, mamiferos_ex, repteis_nat, repteis_ex, aves_nat, aves_ex);
				break;
			case 8:
				consulta_p_func(vets,tratadores,anfibios_nat, anfibios_ex, mamiferos_nat, mamiferos_ex, repteis_nat, repteis_ex, aves_nat, aves_ex);
				break;
			default:
				cout << "Opçao indisponível! Tente novamente!" << endl;
		}
	}while(op != 0);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
leaq -0x240(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0x220(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq -0x208(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x1d8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x1a8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x178(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x148(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x118(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0xe8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0xb8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x88(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x58(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x60(%rbp), %rax
leaq -0x90(%rbp), %r10
leaq -0xc0(%rbp), %rbx
leaq -0xf0(%rbp), %r11
leaq -0x210(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
leaq -0x180(%rbp), %rcx
leaq -0x150(%rbp), %r8
leaq -0x120(%rbp), %r9
pushq %rax
pushq %r10
pushq %rbx
pushq %r11
callq 0x139f4
addq $0x20, %rsp
movq 0x2d7a4(%rip), %rdi     # 0x30fc8
leaq 0x209cb(%rip), %rsi     # 0x241f6
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq 0x2d789(%rip), %rdi     # 0x30fc8
leaq 0x1f7e2(%rip), %rsi     # 0x23028
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq 0x2d76e(%rip), %r15     # 0x30fc8
leaq 0x1f846(%rip), %r12     # 0x230a7
leaq 0x1f79c(%rip), %r13     # 0x23004
leaq -0x210(%rbp), %r14
movq %r15, %rdi
leaq 0x1f7d9(%rip), %rsi     # 0x23052
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
leaq 0x1f7ed(%rip), %rsi     # 0x2307d
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
leaq 0x1f802(%rip), %rsi     # 0x230a9
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
leaq 0x1f817(%rip), %rsi     # 0x230d5
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f819(%rip), %rsi     # 0x23101
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f801(%rip), %rsi     # 0x23103
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x20084(%rip), %rsi     # 0x239a8
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f7e3(%rip), %rsi     # 0x23121
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f7da(%rip), %rsi     # 0x2313a
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f7c2(%rip), %rsi     # 0x2313c
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f7ba(%rip), %rsi     # 0x23156
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f7a2(%rip), %rsi     # 0x23158
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f795(%rip), %rsi     # 0x2316d
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f77d(%rip), %rsi     # 0x2316f
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f779(%rip), %rsi     # 0x2318d
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f761(%rip), %rsi     # 0x2318f
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f763(%rip), %rsi     # 0x231b3
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f74b(%rip), %rsi     # 0x231b5
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f74f(%rip), %rsi     # 0x231db
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f737(%rip), %rsi     # 0x231dd
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f768(%rip), %rsi     # 0x23230
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
leaq 0x1f750(%rip), %rsi     # 0x23232
callq 0x31f0
movq %rax, %rdi
callq 0x3110
movq 0x2d4ea(%rip), %rdi     # 0x30fe0
leaq -0x2c(%rbp), %rsi
callq 0x3150
movl -0x2c(%rbp), %eax
cmpq $0x8, %rax
ja 0x3d27
movslq (%r13,%rax,4), %rax
addq %r13, %rax
leaq 0x1f71f(%rip), %rsi     # 0x2323a
jmpq *%rax
leaq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xb888
jmp 0x3d3e
movq %r14, %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
leaq -0x180(%rbp), %rcx
leaq -0x150(%rbp), %r8
leaq -0x120(%rbp), %r9
leaq -0xc0(%rbp), %rax
pushq %rax
leaq -0xf0(%rbp), %rax
pushq %rax
callq 0x1e700
popq %rax
popq %rcx
jmp 0x3d3e
leaq -0x2b0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3ed0
leaq -0x310(%rbp), %rbx
movq %rbx, %rdi
leaq -0x60(%rbp), %rsi
callq 0x430a
movq %r14, %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
leaq -0x180(%rbp), %rcx
leaq -0x150(%rbp), %r8
leaq -0x120(%rbp), %r9
pushq %rbx
leaq -0x2b0(%rbp), %r14
pushq %r14
leaq -0xc0(%rbp), %rax
pushq %rax
leaq -0xf0(%rbp), %rax
pushq %rax
callq 0xcc86
addq $0x20, %rsp
jmp 0x3cae
leaq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1f7fb
jmp 0x3d3e
movq %r14, %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
leaq -0x180(%rbp), %rcx
leaq -0x150(%rbp), %r8
leaq -0x120(%rbp), %r9
leaq -0xc0(%rbp), %rax
pushq %rax
leaq -0xf0(%rbp), %rax
pushq %rax
callq 0xb3bc
popq %rax
popq %rcx
jmp 0x3d3e
leaq -0x280(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3ed0
leaq -0x2e0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x60(%rbp), %rsi
callq 0x430a
movq %r14, %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
leaq -0x180(%rbp), %rcx
leaq -0x150(%rbp), %r8
leaq -0x120(%rbp), %r9
pushq %rbx
leaq -0x280(%rbp), %r14
pushq %r14
leaq -0xc0(%rbp), %rax
pushq %rax
leaq -0xf0(%rbp), %rax
pushq %rax
callq 0x16de8
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x4676
movq %r14, %rdi
callq 0x468e
leaq -0x210(%rbp), %r14
jmp 0x3d3e
leaq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1d690
jmp 0x3d3e
leaq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq %r14, %rdx
leaq -0x1e0(%rbp), %rcx
leaq -0x1b0(%rbp), %r8
leaq -0x180(%rbp), %r9
leaq -0xc0(%rbp), %rax
pushq %rax
leaq -0xf0(%rbp), %rax
pushq %rax
leaq -0x120(%rbp), %rax
pushq %rax
leaq -0x150(%rbp), %rax
pushq %rax
callq 0x20180
addq $0x20, %rsp
jmp 0x3d3e
leaq 0x1f522(%rip), %rsi     # 0x23250
movq %r15, %rdi
callq 0x31f0
movq %rax, %rdi
callq 0x3110
cmpl $0x0, -0x2c(%rbp)
jne 0x386f
leaq -0x60(%rbp), %rdi
callq 0x4676
leaq -0x90(%rbp), %rdi
callq 0x468e
leaq -0xc0(%rbp), %rdi
callq 0x46a6
leaq -0xf0(%rbp), %rdi
callq 0x471e
leaq -0x120(%rbp), %rdi
callq 0x4796
leaq -0x150(%rbp), %rdi
callq 0x480e
leaq -0x180(%rbp), %rdi
callq 0x4886
leaq -0x1b0(%rbp), %rdi
callq 0x48fe
leaq -0x1e0(%rbp), %rdi
callq 0x4976
leaq -0x210(%rbp), %rdi
callq 0x49ee
leaq -0x230(%rbp), %rdi
callq 0x3100
leaq -0x250(%rbp), %rdi
callq 0x3100
xorl %eax, %eax
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x310(%rbp), %rdi
callq 0x4676
jmp 0x3dfd
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
jmp 0x3e21
movq %rax, %rbx
leaq -0x2e0(%rbp), %rdi
callq 0x4676
jmp 0x3e1a
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x468e
jmp 0x3e2d
jmp 0x3e2a
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4676
leaq -0x90(%rbp), %rdi
callq 0x468e
leaq -0xc0(%rbp), %rdi
callq 0x46a6
leaq -0xf0(%rbp), %rdi
callq 0x471e
leaq -0x120(%rbp), %rdi
callq 0x4796
leaq -0x150(%rbp), %rdi
callq 0x480e
leaq -0x180(%rbp), %rdi
callq 0x4886
leaq -0x1b0(%rbp), %rdi
callq 0x48fe
leaq -0x1e0(%rbp), %rdi
callq 0x4976
leaq -0x210(%rbp), %rdi
callq 0x49ee
leaq -0x230(%rbp), %rdi
callq 0x3100
leaq -0x250(%rbp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x3370