// File: /workspace/github_cpp_makefile_star2_O3/viniciu21[P]PetLolja/./src/PetFera.cpp
// Function: Petfera::atualizar_funcionario(std::shared_ptr<Funcionario>)
bool Petfera::atualizar_funcionario(std::shared_ptr<Funcionario> funcionario)
{
	string alterar_string;
	bool alterar_bool;
	short escolha;
	string escolha_str;
	stringstream ss;

	cout << "o que vc quer atualizar? "
			 << "\n"
			 << "# Temos as seguintes opcao : # "
			 << "\n"
			 << "    1 -> Alterar nome "
			 << "\n"
			 << "    2 -> Alterar cpf"
			 << "\n"
			 << "    3 -> Alterar numero do telefone"
			 << "\n"
			 << "    4 -> Alterar email"
			 << endl;

	if (funcionario->getClassicicacao() == Veterinario)
	{
		cout << "    5 -> Alterar inscricao no CRMV" << endl;
	}
	else if (funcionario->getClassicicacao() == Tratador)
	{
		cout << "    6 -> Alterar nivel de seguranca" << endl;
	}

	cin >> escolha_str;
	ss << escolha_str;
	ss >> escolha;

	cout << "Escolha uma opcao"
			 << "\n";

	if (escolha == 1)
	{
		cout << "Digite o novo nome \n";

		cin >> alterar_string;

		funcionario->setNome(alterar_string);
	}
	else if (escolha == 2)
	{
		cout << "Digite o novo cpf \n";

		cin >> alterar_string;

		funcionario->setCpf(alterar_string);
	}
	else if (escolha == 3)
	{
		cout << "Digite o novo cell \n";

		cin >> alterar_string;

		funcionario->setCelularProfissional(alterar_string);
	}
	else if (escolha == 4)
	{
		cout << "Digite o novo email \n";

		cin >> alterar_string;

		funcionario->setEmail(alterar_string);
	}
	else if (escolha == 5)
	{
		alterar_bool = leBool("Possui inscricao CRMV? [S/N]");

		shared_ptr<FuncionarioVeterinario> func_vet = dynamic_pointer_cast<FuncionarioVeterinario>(funcionario);

		func_vet->setIsInscritoCRMV(alterar_bool);
	}
	else if (escolha == 6)
	{
		cout << "Digite o novo nivel\n";

		nivelDeSeguranca seguranca = leNivelDeSeguranca();

		shared_ptr<FuncionarioTratador> func_trat = dynamic_pointer_cast<FuncionarioTratador>(funcionario);

		func_trat->setClassificacaoDeSeguranca(seguranca);
	}
	else if (escolha == 0 || escolha > 4)
	{
		cout << "Erro, escolha apenas entre os valores informados";
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rsi, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq -0x298(%rbp), %rdi
callq 0x4130
movq 0x1d7f8(%rip), %rdi     # 0x3afd0
leaq 0x11599(%rip), %rsi     # 0x2ed78
movl $0x19, %edx
callq 0x4210
movq 0x1d7e0(%rip), %rdi     # 0x3afd0
leaq 0x1023a(%rip), %rsi     # 0x2da31
movl $0x1, %edx
callq 0x4210
movq 0x1d7c8(%rip), %rdi     # 0x3afd0
leaq 0x11583(%rip), %rsi     # 0x2ed92
movl $0x1f, %edx
callq 0x4210
movq 0x1d7b0(%rip), %rdi     # 0x3afd0
leaq 0x1020a(%rip), %rsi     # 0x2da31
movl $0x1, %edx
callq 0x4210
movq 0x1d798(%rip), %rdi     # 0x3afd0
leaq 0x11573(%rip), %rsi     # 0x2edb2
movl $0x16, %edx
callq 0x4210
movq 0x1d780(%rip), %rdi     # 0x3afd0
leaq 0x101da(%rip), %rsi     # 0x2da31
movl $0x1, %edx
callq 0x4210
movq 0x1d768(%rip), %rdi     # 0x3afd0
leaq 0x1155a(%rip), %rsi     # 0x2edc9
movl $0x14, %edx
callq 0x4210
movq 0x1d750(%rip), %rdi     # 0x3afd0
leaq 0x101aa(%rip), %rsi     # 0x2da31
movl $0x1, %edx
callq 0x4210
movq 0x1d738(%rip), %rdi     # 0x3afd0
leaq 0x1153f(%rip), %rsi     # 0x2edde
movl $0x23, %edx
callq 0x4210
movq 0x1d720(%rip), %rdi     # 0x3afd0
leaq 0x1017a(%rip), %rsi     # 0x2da31
movl $0x1, %edx
callq 0x4210
movq 0x1d708(%rip), %r14     # 0x3afd0
leaq 0x11533(%rip), %rsi     # 0x2ee02
movl $0x16, %edx
movq %r14, %rdi
callq 0x4210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x41b0
movsbl %al, %esi
movq 0x1d6d6(%rip), %rdi     # 0x3afd0
callq 0x4030
movq %rax, %rdi
callq 0x4120
movq (%rbx), %rdi
callq 0xb7f2
testl %eax, %eax
je 0x1d92e
movq (%rbx), %rdi
callq 0xb7f2
cmpl $0x1, %eax
jne 0x1d974
movl $0x23, %edx
leaq 0x11510(%rip), %rsi     # 0x2ee3c
jmp 0x1d93a
movl $0x22, %edx
leaq 0x114df(%rip), %rsi     # 0x2ee19
movq 0x1d68f(%rip), %r14     # 0x3afd0
movq %r14, %rdi
callq 0x4210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x41b0
movsbl %al, %esi
movq 0x1d669(%rip), %rdi     # 0x3afd0
callq 0x4030
movq %rax, %rdi
callq 0x4120
movq 0x1d665(%rip), %rdi     # 0x3afe0
leaq -0x70(%rbp), %rsi
callq 0x4220
leaq -0x288(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x4210
leaq -0x298(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
callq 0x4050
movq 0x1d621(%rip), %rdi     # 0x3afd0
leaq 0x114aa(%rip), %rsi     # 0x2ee60
movl $0x11, %edx
callq 0x4210
movq 0x1d609(%rip), %rdi     # 0x3afd0
leaq 0x10063(%rip), %rsi     # 0x2da31
movl $0x1, %edx
callq 0x4210
movzwl -0x2a(%rbp), %eax
leal -0x1(%rax), %ecx
cmpl $0x5, %ecx
ja 0x1dcbf
leaq 0xfed9(%rip), %rax      # 0x2d8c8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x1d5d1(%rip), %rdi     # 0x3afd0
leaq 0x1146c(%rip), %rsi     # 0x2ee72
movl $0x14, %edx
callq 0x4210
movq 0x1d5c9(%rip), %rdi     # 0x3afe0
leaq -0x50(%rbp), %rsi
callq 0x4220
movq (%rbx), %rbx
leaq -0x100(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x4f18
leaq -0x110(%rbp), %rsi
movq %rbx, %rdi
callq 0xb85a
movq -0x110(%rbp), %rdi
movb $0x1, %bl
cmpq %r14, %rdi
je 0x1dd2a
movq -0x100(%rbp), %rsi
jmp 0x1dc5f
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x11445(%rip), %rsi     # 0x2eec6
leaq 0x1145a(%rip), %rdx     # 0x2eee2
leaq -0x90(%rbp), %rdi
callq 0x1e0e2
leaq -0x90(%rbp), %rsi
callq 0x144be
movl %eax, %r14d
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x1dabb
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x41d0
movq (%rbx), %rdi
leaq 0x1cb13(%rip), %rsi     # 0x3a5d8
leaq 0x1cb44(%rip), %rdx     # 0x3a610
xorl %ecx, %ecx
callq 0x4200
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x1dcf3
movq 0x1d4e1(%rip), %rcx     # 0x3afc8
cmpb $0x0, (%rcx)
je 0x1dcee
incl 0x8(%r15)
jmp 0x1dcf3
movq 0x1d4d0(%rip), %rdi     # 0x3afd0
leaq 0x11394(%rip), %rsi     # 0x2ee9b
movl $0x14, %edx
callq 0x4210
movq 0x1d4c8(%rip), %rdi     # 0x3afe0
leaq -0x50(%rbp), %rsi
callq 0x4220
movq (%rbx), %rbx
leaq -0xc0(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x4f18
leaq -0xd0(%rbp), %rsi
movq %rbx, %rdi
callq 0xb880
movq -0xd0(%rbp), %rdi
movb $0x1, %bl
cmpq %r14, %rdi
je 0x1dd2a
movq -0xc0(%rbp), %rsi
jmp 0x1dc5f
movq 0x1d456(%rip), %rdi     # 0x3afd0
leaq 0x1132f(%rip), %rsi     # 0x2eeb0
movl $0x15, %edx
callq 0x4210
movq 0x1d44e(%rip), %rdi     # 0x3afe0
leaq -0x50(%rbp), %rsi
callq 0x4220
movq (%rbx), %rbx
leaq -0xa0(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x4f18
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdi
callq 0xb88e
movq -0xb0(%rbp), %rdi
movb $0x1, %bl
cmpq %r14, %rdi
je 0x1dd2a
movq -0xa0(%rbp), %rsi
jmp 0x1dc5f
movq 0x1d3df(%rip), %rdi     # 0x3afd0
leaq 0x1128f(%rip), %rsi     # 0x2ee87
movl $0x13, %edx
callq 0x4210
movq 0x1d3d7(%rip), %rdi     # 0x3afe0
leaq -0x50(%rbp), %rsi
callq 0x4220
movq (%rbx), %rbx
leaq -0xe0(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x4f18
leaq -0xf0(%rbp), %rsi
movq %rbx, %rdi
callq 0xb868
movq -0xf0(%rbp), %rdi
movb $0x1, %bl
cmpq %r14, %rdi
je 0x1dd2a
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x41d0
jmp 0x1dd2a
movq 0x1d35d(%rip), %rdi     # 0x3afd0
leaq 0x11269(%rip), %rsi     # 0x2eee3
movl $0x14, %edx
callq 0x4210
callq 0x1c6e8
movl %eax, %r15d
movq (%rbx), %rdi
leaq 0x1c942(%rip), %rsi     # 0x3a5d8
leaq 0x1c923(%rip), %rdx     # 0x3a5c0
xorl %ecx, %ecx
callq 0x4200
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1dd10
movq 0x1d314(%rip), %rcx     # 0x3afc8
cmpb $0x0, (%rcx)
je 0x1dd0b
incl 0x8(%r14)
jmp 0x1dd10
testw %ax, %ax
setne %cl
cmpw $0x5, %ax
setl %al
movb $0x1, %bl
testb %al, %cl
jne 0x1dd2a
movq 0x1d2f7(%rip), %rdi     # 0x3afd0
leaq 0x11218(%rip), %rsi     # 0x2eef8
movl $0x30, %edx
callq 0x4210
xorl %ebx, %ebx
jmp 0x1dd2a
lock
incl 0x8(%r15)
movzbl %r14b, %esi
movq %rax, %rdi
callq 0xafdc
movb $0x1, %bl
testq %r15, %r15
je 0x1dd2a
movq %r15, %rdi
jmp 0x1dd25
lock
incl 0x8(%r14)
movq %rax, %rdi
movl %r15d, %esi
callq 0xa97c
movb $0x1, %bl
testq %r14, %r14
je 0x1dd2a
movq %r14, %rdi
callq 0x4eac
movq 0x1d277(%rip), %rsi     # 0x3afa8
leaq -0x298(%rbp), %rdi
callq 0x4150
leaq -0x218(%rbp), %rdi
callq 0x40a0
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x1dd5e
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x41d0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x1dd73
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x41d0
movl %ebx, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x1de3a
movq -0xe0(%rbp), %rsi
jmp 0x1de26
movq %rax, %rbx
movq -0x110(%rbp), %rdi
cmpq %r14, %rdi
je 0x1de3a
movq -0x100(%rbp), %rsi
jmp 0x1de26
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x1de3a
movq -0xa0(%rbp), %rsi
jmp 0x1de26
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x1de3a
movq -0xc0(%rbp), %rsi
jmp 0x1de26
movq %rax, %rbx
testq %r14, %r14
je 0x1de3a
movq %r14, %rdi
jmp 0x1de0a
movq %rax, %rbx
testq %r15, %r15
je 0x1de3a
movq %r15, %rdi
callq 0x4eac
jmp 0x1de3a
jmp 0x1de37
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x1de3a
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x41d0
jmp 0x1de3a
jmp 0x1de37
movq %rax, %rbx
jmp 0x1de59
movq %rax, %rbx
movq 0x1d167(%rip), %rsi     # 0x3afa8
leaq -0x298(%rbp), %rdi
callq 0x4150
leaq -0x218(%rbp), %rdi
callq 0x40a0
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x1de6e
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x41d0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x1de83
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x41d0
movq %rbx, %rdi
callq 0x42f0
nop