// File: /workspace/github_cpp_makefile_star2_O1/nataly-enne[P]pet-fera/pet_fera_editar.cpp
// Function: editar(std::map<int, VETERINARIO, std::less<int>, std::allocator<std::pair<int const, VETERINARIO>>>&)
void editar(map <int, VETERINARIO> &vets){
	int id_buscado, idade;
	long int cpf;
	string nome, especialidade, crmv, tipo_sang;
	char fator_rh, sucesso;
	ofstream veterinarios;

	cout << "Insira o ID buscado: " << endl;
	cin >> id_buscado;

	auto result = vets.find(id_buscado);
	
	if(result != vets.end()){
		cout << "ID existe!" << endl;

		cout << "Digite o nome: " << endl;
		cin.ignore();
		getline(cin, nome);
		transform(nome.begin(), nome.end(), nome.begin(), ::toupper); //Converte a string nome para caracteres maiusculos
		cout << "Digite o cpf: " << endl;
		cin >> cpf;
		cout << "Digite a idade: " << endl;
		cin >> idade;
		cout << "Insira o tipo sanguineo: " << endl;
		cin >> tipo_sang;
		cout << "Insira o fator RH: " << endl;
		cin >> fator_rh;
		cout << "Digite a especialidade: " << endl;
		cin.ignore();
		getline(cin, especialidade);
		cout << "Digite o crmv: "<< endl;
		getline(cin, crmv);

		(*result).second = VETERINARIO(id_buscado, nome, cpf, idade, tipo_sang, fator_rh, especialidade, crmv);
		sucesso = 's';
	}
	else{
		cout << "Funcionario não cadastrado!!" << endl;
		sucesso = 'n';
	}

	if(sucesso == 's'){
		veterinarios.open("veterinarios.txt");
		for(auto it = vets.begin(); it != vets.end(); it++){
			veterinarios << (*it).second;
		}
		veterinarios.close();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
movq %rdi, %r14
leaq -0x50(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xb8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x98(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x78(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x3f8(%rbp), %rdi
callq 0x3360
movq 0x15eae(%rip), %rbx     # 0x47fd0
leaq 0x913e(%rip), %rsi      # 0x3b267
movl $0x15, %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 0x15e7c(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15e78(%rip), %rdi     # 0x47fe0
leaq -0x30(%rbp), %rsi
callq 0x3120
movq 0x10(%r14), %rcx
movq %r14, -0x68(%rbp)
leaq 0x8(%r14), %r15
movq %r15, %rax
testq %rcx, %rcx
je 0x321a2
movl -0x30(%rbp), %edx
movq %r15, %rax
xorl %esi, %esi
cmpl %edx, 0x20(%rcx)
setl %sil
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x3218b
movq %r15, %rcx
cmpq %r15, %rax
je 0x321b7
movl -0x30(%rbp), %ecx
cmpl 0x20(%rax), %ecx
cmovlq %r15, %rax
movq %rax, %rcx
movq %rcx, -0x40(%rbp)
cmpq %r15, %rcx
je 0x3272b
movq 0x15e05(%rip), %rbx     # 0x47fd0
leaq 0x90ab(%rip), %rsi      # 0x3b27d
movl $0xa, %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 0x15dd3(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15dbf(%rip), %rbx     # 0x47fd0
leaq 0x9154(%rip), %rsi      # 0x3b36c
movl $0xf, %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 0x15d8d(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15d89(%rip), %rbx     # 0x47fe0
movq %rbx, %rdi
callq 0x33a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq 0x15d63(%rip), %rdi     # 0x47fe0
leaq -0x60(%rbp), %rsi
callq 0x33c0
movq -0x58(%rbp), %rbx
testq %rbx, %rbx
je 0x322ac
movq -0x60(%rbp), %r14
xorl %r12d, %r12d
movsbl (%r14,%r12), %edi
callq 0x33d0
movb %al, (%r14,%r12)
incq %r12
cmpq %r12, %rbx
jne 0x32296
movq 0x15d1d(%rip), %rbx     # 0x47fd0
leaq 0x90c2(%rip), %rsi      # 0x3b37c
movl $0xe, %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 0x15ceb(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15ce7(%rip), %rdi     # 0x47fe0
leaq -0xd0(%rbp), %rsi
callq 0x3210
movq 0x15cc4(%rip), %rbx     # 0x47fd0
leaq 0x84ef(%rip), %rsi      # 0x3a802
movl $0x10, %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 0x15c92(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15c8e(%rip), %rdi     # 0x47fe0
leaq -0x38(%rbp), %rsi
callq 0x3120
movq 0x15c6e(%rip), %rbx     # 0x47fd0
leaq 0x84d7(%rip), %rsi      # 0x3a840
movl $0x19, %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 0x15c3c(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15c38(%rip), %rdi     # 0x47fe0
leaq -0x88(%rbp), %rsi
callq 0x3270
movq 0x15c15(%rip), %rbx     # 0x47fd0
leaq 0x84c8(%rip), %rsi      # 0x3a88a
movl $0x13, %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 0x15be3(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15bdf(%rip), %rdi     # 0x47fe0
leaq -0x29(%rbp), %rsi
callq 0x3280
movq 0x15bbf(%rip), %rbx     # 0x47fd0
leaq 0x84a8(%rip), %rsi      # 0x3a8c0
movl $0x18, %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 0x15b8d(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x15b89(%rip), %rbx     # 0x47fe0
movq %rbx, %rdi
callq 0x33a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq 0x15b63(%rip), %r14     # 0x47fe0
leaq -0xc8(%rbp), %rsi
movq %r14, %rdi
callq 0x33c0
movq 0x15b3d(%rip), %rbx     # 0x47fd0
leaq 0x8470(%rip), %rsi      # 0x3a90a
movl $0xf, %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 0x15b0b(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq 0x15af0(%rip), %rdi     # 0x47fe0
leaq -0xa8(%rbp), %rsi
callq 0x33c0
movl -0x30(%rbp), %r12d
leaq -0x120(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x130(%rbp), %rdi
callq 0x4574
movq -0xd0(%rbp), %r13
movl -0x38(%rbp), %ebx
leaq -0x100(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x4574
movl %ebx, -0x34(%rbp)
movb -0x29(%rbp), %r14b
leaq -0xe0(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x4574
leaq -0x140(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x150(%rbp), %rbx
movq %rbx, %rdi
callq 0x4574
subq $0x8, %rsp
movsbl %r14b, %eax
leaq -0x1f8(%rbp), %rdi
leaq -0x130(%rbp), %rdx
leaq -0x110(%rbp), %r9
movl %r12d, %esi
movq %r13, %rcx
movl -0x34(%rbp), %r8d
pushq %rbx
leaq -0xf0(%rbp), %r10
pushq %r10
pushq %rax
callq 0xf318
addq $0x20, %rsp
leaq -0x1e8(%rbp), %rbx
movl -0x8(%rbx), %eax
movq -0x40(%rbp), %r14
movl %eax, 0x30(%r14)
leaq 0x38(%r14), %rdi
movq %rbx, %rsi
callq 0x3260
movq 0x20(%rbx), %rax
movq %rax, 0x58(%r14)
movl 0x28(%rbx), %eax
movl %eax, 0x60(%r14)
leaq 0x68(%r14), %rdi
leaq -0x1b8(%rbp), %rbx
movq %rbx, %rsi
callq 0x3260
movb 0x20(%rbx), %al
movb %al, 0x88(%r14)
leaq 0x90(%r14), %rdi
leaq -0x190(%rbp), %rbx
movq %rbx, %rsi
callq 0x3260
leaq 0xb0(%r14), %rdi
leaq -0x170(%rbp), %r14
movq %r14, %rsi
callq 0x3260
leaq 0x1544d(%rip), %rax     # 0x47ab0
addq $0x10, %rax
movq %rax, -0x68(%rbx)
movq (%r14), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x3267f
callq 0x31d0
leaq 0x151b2(%rip), %rax     # 0x47838
leaq -0x180(%rbp), %rcx
movq %rax, -0x78(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
leaq -0x120(%rbp), %rbx
je 0x326a6
callq 0x31d0
leaq -0x1a8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x326bb
callq 0x31d0
leaq -0x1d8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x326d0
callq 0x31d0
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x326e8
callq 0x31d0
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x32700
callq 0x31d0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x32718
callq 0x31d0
movq -0x130(%rbp), %rdi
cmpq %rbx, %rdi
je 0x32771
callq 0x31d0
jmp 0x32771
movq 0x1589e(%rip), %rbx     # 0x47fd0
leaq 0x8c52(%rip), %rsi      # 0x3b38b
movl $0x1d, %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 0x1586c(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpq %r15, -0x40(%rbp)
je 0x327cb
leaq 0x8212(%rip), %rsi      # 0x3a990
leaq -0x3f8(%rbp), %rdi
movl $0x10, %edx
callq 0x3050
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rbx
cmpq %r15, %rbx
je 0x327bf
leaq -0x3f8(%rbp), %r14
leaq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0xf831
movq %rbx, %rdi
callq 0x3140
movq %rax, %rbx
cmpq %r15, %rax
jne 0x327a3
leaq -0x3f8(%rbp), %rdi
callq 0x32a0
movq 0x157f6(%rip), %rax     # 0x47fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x3f0(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x3f8(%rbp,%rcx)
callq 0x3190
leaq -0x300(%rbp), %rdi
callq 0x30d0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x32816
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3282e
callq 0x31d0
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x32846
callq 0x31d0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x32858
callq 0x31d0
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x3288a
callq 0x31d0
jmp 0x3288a
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x328a7
callq 0x31d0
jmp 0x328a7
movq %rax, %rbx
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x328c4
callq 0x31d0
jmp 0x328c4
movq %rax, %rbx
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x328ec
callq 0x31d0
jmp 0x328ec
jmp 0x328e9
movq %rax, %rbx
jmp 0x328f8
jmp 0x328e9
jmp 0x328e9
movq %rax, %rbx
leaq -0x3f8(%rbp), %rdi
callq 0x32e0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3290d
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x32925
callq 0x31d0
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x3293d
callq 0x31d0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x3294f
callq 0x31d0
movq %rbx, %rdi
callq 0x3380