// File: /workspace/github_cpp_makefile_star2_O3/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 -0x40(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x240(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x228(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x1f8(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x1c8(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x198(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x168(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x138(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x108(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0xd8(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0xa8(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x78(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x80(%rbp), %rax
leaq -0xb0(%rbp), %r10
leaq -0xe0(%rbp), %r11
leaq -0x110(%rbp), %rbx
leaq -0x230(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
leaq -0x1a0(%rbp), %rcx
leaq -0x170(%rbp), %r8
leaq -0x140(%rbp), %r9
pushq %rax
pushq %r10
pushq %r11
pushq %rbx
callq 0x1eb64
addq $0x20, %rsp
movq 0x447af(%rip), %rbx     # 0x47fd0
leaq 0x37a0e(%rip), %rsi     # 0x3b236
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq 0x44780(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x4476c(%rip), %rbx     # 0x47fd0
leaq 0x367d5(%rip), %rsi     # 0x3a040
movl $0x29, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq 0x4473a(%rip), %r15     # 0x47fd0
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
leaq 0x36812(%rip), %r12     # 0x3a0bf
leaq 0x36750(%rip), %r13     # 0x3a004
movl $0x2a, %edx
movq %r15, %rdi
leaq 0x367a7(%rip), %rsi     # 0x3a06a
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 $0x2b, %edx
movq %r15, %rdi
leaq 0x36797(%rip), %rsi     # 0x3a095
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 $0x2b, %edx
movq %r15, %rdi
leaq 0x36788(%rip), %rsi     # 0x3a0c1
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 $0x2b, %edx
movq %r15, %rdi
leaq 0x36779(%rip), %rsi     # 0x3a0ed
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 %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x36730(%rip), %rsi     # 0x3a119
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1d, %edx
movq %r15, %rdi
leaq 0x3670e(%rip), %rsi     # 0x3a11b
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x36f90(%rip), %rsi     # 0x3a9e8
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x18, %edx
movq %r15, %rdi
leaq 0x366bd(%rip), %rsi     # 0x3a139
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x3668b(%rip), %rsi     # 0x3a152
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x19, %edx
movq %r15, %rdi
leaq 0x36669(%rip), %rsi     # 0x3a154
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x36638(%rip), %rsi     # 0x3a16e
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x14, %edx
movq %r15, %rdi
leaq 0x36616(%rip), %rsi     # 0x3a170
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x365e0(%rip), %rsi     # 0x3a185
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1d, %edx
movq %r15, %rdi
leaq 0x365be(%rip), %rsi     # 0x3a187
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x36591(%rip), %rsi     # 0x3a1a5
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x23, %edx
movq %r15, %rdi
leaq 0x3656f(%rip), %rsi     # 0x3a1a7
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x36548(%rip), %rsi     # 0x3a1cb
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x25, %edx
movq %r15, %rdi
leaq 0x36526(%rip), %rsi     # 0x3a1cd
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x36501(%rip), %rsi     # 0x3a1f3
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x52, %edx
movq %r15, %rdi
leaq 0x364df(%rip), %rsi     # 0x3a1f5
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 $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
leaq 0x364e7(%rip), %rsi     # 0x3a248
callq 0x3250
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movl $0x7, %edx
movq %r15, %rdi
leaq 0x364c5(%rip), %rsi     # 0x3a24a
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 0x44228(%rip), %rdi     # 0x47fe0
leaq -0x2c(%rbp), %rsi
callq 0x3120
movl -0x2c(%rbp), %eax
cmpq $0x8, %rax
ja 0x400a
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x15, %edx
leaq 0x3646e(%rip), %rsi     # 0x3a252
jmp 0x4016
leaq -0x230(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
leaq -0x1a0(%rbp), %rcx
leaq -0x170(%rbp), %r8
leaq -0x140(%rbp), %r9
leaq -0xe0(%rbp), %rax
pushq %rax
leaq -0x110(%rbp), %rax
pushq %rax
callq 0x33110
addq $0x10, %rsp
jmp 0x4045
leaq -0x2b0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x41fc
leaq -0x310(%rbp), %rbx
movq %rbx, %rdi
leaq -0x80(%rbp), %rsi
callq 0x4690
leaq -0x230(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
leaq -0x1a0(%rbp), %rcx
leaq -0x170(%rbp), %r8
leaq -0x140(%rbp), %r9
pushq %rbx
leaq -0x2b0(%rbp), %r14
pushq %r14
leaq -0xe0(%rbp), %rax
pushq %rax
leaq -0x110(%rbp), %rax
pushq %rax
callq 0x1333d
addq $0x20, %rsp
jmp 0x3f8e
leaq -0xb0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x34e34
jmp 0x4045
leaq -0x230(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
leaq -0x1a0(%rbp), %rcx
leaq -0x170(%rbp), %r8
leaq -0x140(%rbp), %r9
leaq -0xe0(%rbp), %rax
pushq %rax
leaq -0x110(%rbp), %rax
pushq %rax
callq 0x1020c
addq $0x10, %rsp
jmp 0x4045
leaq -0xb0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x109f8
jmp 0x4045
leaq -0x280(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x41fc
leaq -0x2e0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x80(%rbp), %rsi
callq 0x4690
leaq -0x230(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
leaq -0x1a0(%rbp), %rcx
leaq -0x170(%rbp), %r8
leaq -0x140(%rbp), %r9
pushq %rbx
leaq -0x280(%rbp), %r14
pushq %r14
leaq -0xe0(%rbp), %rax
pushq %rax
leaq -0x110(%rbp), %rax
pushq %rax
callq 0x2456c
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x4a8a
movq %r14, %rdi
callq 0x4aa2
jmp 0x4045
leaq -0xb0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x31f69
jmp 0x4045
leaq -0xb0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x230(%rbp), %rdx
leaq -0x200(%rbp), %rcx
leaq -0x1d0(%rbp), %r8
leaq -0x1a0(%rbp), %r9
leaq -0xe0(%rbp), %rax
pushq %rax
leaq -0x110(%rbp), %rax
pushq %rax
leaq -0x140(%rbp), %rax
pushq %rax
leaq -0x170(%rbp), %rax
pushq %rax
callq 0x359a8
addq $0x20, %rsp
jmp 0x4045
movl $0x26, %edx
leaq 0x36252(%rip), %rsi     # 0x3a268
movq %r15, %rdi
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
cmpl $0x0, -0x2c(%rbp)
jne 0x38b4
leaq -0x80(%rbp), %rdi
callq 0x4a8a
leaq -0xb0(%rbp), %rdi
callq 0x4aa2
leaq -0xe0(%rbp), %rdi
callq 0x4aba
leaq -0x110(%rbp), %rdi
callq 0x4b1c
leaq -0x140(%rbp), %rdi
callq 0x4b7e
leaq -0x170(%rbp), %rdi
callq 0x4be0
leaq -0x1a0(%rbp), %rdi
callq 0x4c42
leaq -0x1d0(%rbp), %rdi
callq 0x4ca4
leaq -0x200(%rbp), %rdi
callq 0x4d06
leaq -0x230(%rbp), %rdi
callq 0x4d68
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x40dc
callq 0x31d0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x40ee
callq 0x31d0
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 0x4a8a
jmp 0x4116
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
jmp 0x413a
movq %rax, %rbx
leaq -0x2e0(%rbp), %rdi
callq 0x4a8a
jmp 0x4133
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x4aa2
jmp 0x4146
jmp 0x4143
movq %rax, %rbx
leaq -0x40(%rbp), %r14
leaq -0x80(%rbp), %rdi
callq 0x4a8a
leaq -0xb0(%rbp), %rdi
callq 0x4aa2
leaq -0xe0(%rbp), %rdi
callq 0x4aba
leaq -0x110(%rbp), %rdi
callq 0x4b1c
leaq -0x140(%rbp), %rdi
callq 0x4b7e
leaq -0x170(%rbp), %rdi
callq 0x4be0
leaq -0x1a0(%rbp), %rdi
callq 0x4c42
leaq -0x1d0(%rbp), %rdi
callq 0x4ca4
leaq -0x200(%rbp), %rdi
callq 0x4d06
leaq -0x230(%rbp), %rdi
callq 0x4d68
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x41d7
callq 0x31d0
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x41e5
callq 0x31d0
movq %rbx, %rdi
callq 0x3380