// File: /workspace/github_cpp_makefile_star2_O3/brashi[P]PetFera/src/./petshop.cpp
// Function: Petshop::atualizarTratador()
void Petshop::atualizarTratador() {
    string nome;

    shared_ptr<Tratador> tratador;
    Tratador antigotrt;
    long unsigned int num;

    // Configuração do texto acima dos campos de alteração
    string updateText = "Alterar: (para não alterar mantenha em branco)";

    if(this->tratadores.size() == 0)
        throw "Não há tratadores para remover no sistema!";

    cout << endl << "Tratadores registrados: " << endl;
    this->listarTratadores();
    cout << endl << "Digite o ID do tratador a ser alterado: ";
    getline(cin, nome);
    num = stoi(nome);
    if(num >= 0 && num < this->tratadores.size())
        tratador = this->tratadores[num];
    else
        throw "Tratador não existe!";

    antigotrt = *tratador;

    cout << endl << updateText;
    tratador->setNome();

    cout << endl << updateText;
    tratador->setEmail();

    cout << endl << updateText;
    tratador->setTelefone();

    Uniforme un = tratador->getUniforme();

    cout << endl << updateText;
    if(tratador->setUniforme()) {
        Uniforme novo = tratador->getUniforme();
        for(auto& animal : this->animais) {
            if(animal->getTratador() == tratador) {
                string classe = Animal::getClasse(animal);
                if(animal->getPerigoso() && novo != Vermelho) {
                    tratador->setUniforme(un);
                    cout << "O tratador possui animais que requerem segurança maior que a informada." << endl << "Valor anterior restaurado." << endl;
                    break;
                } else if((classe == "Réptil" || classe == "Mamífero") && (novo == Verde)) {
                    tratador->setUniforme(un);
                    cout << "O tratador possui animais que requerem segurança maior que a informada." << endl << "Valor anterior restaurado." << endl;
                    break;
                }
            }
        }
        /*if(tratador->getUniforme() != un)
            for(auto& animal : this->animais)
                if(animal->getTratador() == antigotrt)
                    animal->setTratador(*tratador); */
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
leaq 0x78(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0xa0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xc0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xe0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x1ae75(%rip), %rax     # 0x2a168
addq $0x10, %rax
movq %rax, -0x58(%rcx)
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1122a(%rip), %rsi     # 0x20535
leaq 0x11252(%rip), %rdx     # 0x20564
leaq 0x18(%rsp), %rdi
callq 0x9d84
movq 0x20(%rbx), %rax
cmpq 0x18(%rbx), %rax
je 0xf8c5
movq 0x1bc9f(%rip), %rdi     # 0x2afd0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1bc84(%rip), %r14     # 0x2afd0
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq %rax, %r15
leaq 0x112a5(%rip), %rsi     # 0x2060b
movl $0x18, %edx
movq %rax, %rdi
callq 0x5310
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq %rbx, %rdi
callq 0xeb38
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1bc10(%rip), %r14     # 0x2afd0
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51c0
leaq 0x1124d(%rip), %rsi     # 0x20624
movl $0x28, %edx
movq %rax, %rdi
callq 0x5310
movq 0x1bbf5(%rip), %rdi     # 0x2afe0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %edx
movq 0x1bbda(%rip), %rdi     # 0x2afe0
leaq 0x68(%rsp), %rsi
callq 0x5480
movq 0x68(%rsp), %r12
callq 0x5050
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x48(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x5380
cmpq %r12, (%r13)
je 0xf8ce
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xf8da
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0xf8da
testl %ecx, %ecx
jne 0xf463
movl %ebp, (%r15)
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %rax, %rdx
jbe 0xf8e6
leaq 0x90(%rsp), %r15
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq -0x8(%rsi), %rax
leaq 0x8(%rsp), %r12
movq %rax, -0x8(%r12)
movq %r12, %rdi
callq 0x13cf6
movq -0x8(%r12), %r12
leaq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x5190
leaq 0xb0(%rsp), %rdi
leaq 0x28(%r12), %rsi
callq 0x5190
leaq 0xd0(%rsp), %rdi
leaq 0x48(%r12), %rsi
callq 0x5190
movl 0x68(%r12), %eax
movl %eax, 0xf0(%rsp)
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1bacb(%rip), %r14     # 0x2afd0
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x5310
movq (%rsp), %rdi
callq 0x1475a
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1ba82(%rip), %r14     # 0x2afd0
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x5310
movq (%rsp), %rdi
callq 0x14a5a
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1ba39(%rip), %r14     # 0x2afd0
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x5310
movq (%rsp), %rdi
callq 0x148da
movq (%rsp), %rdi
callq 0x14e54
movl %eax, 0x14(%rsp)
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1b9e3(%rip), %rdi     # 0x2afd0
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x5310
movq (%rsp), %rdi
callq 0x14e58
testb %al, %al
je 0xf85f
movq (%rsp), %rdi
callq 0x14e54
movq 0x30(%rbx), %r12
movq 0x38(%rbx), %rbp
cmpq %rbp, %r12
je 0xf85f
movl %eax, %r15d
leaq 0x48(%rsp), %rbx
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x16b3a
movq 0x48(%rsp), %r13
movq 0x50(%rsp), %rdi
movq (%rsp), %r14
testq %rdi, %rdi
je 0xf663
callq 0x9f52
cmpq %r14, %r13
je 0xf676
addq $0x10, %r12
cmpq %rbp, %r12
jne 0xf63f
jmp 0xf85f
movq (%r12), %rax
movq %rax, 0x38(%rsp)
movq 0x8(%r12), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0xf6a3
movq 0x1b933(%rip), %rcx     # 0x2afc8
cmpb $0x0, (%rcx)
je 0xf69f
incl 0x8(%rax)
jmp 0xf6a3
lock
incl 0x8(%rax)
movq %rbx, %rdi
leaq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x1706e
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xf6c1
callq 0x9f52
movq (%r12), %rdi
callq 0x16b7e
cmpl $0x2, %r15d
sete %cl
xorb $0x1, %al
orb %cl, %al
jne 0xf763
movq (%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1505c
movl $0x48, %edx
movq 0x1b8dc(%rip), %rdi     # 0x2afd0
leaq 0x10f52(%rip), %rsi     # 0x2064d
callq 0x5310
movq 0x1b8c9(%rip), %rcx     # 0x2afd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1b8ab(%rip), %rdi     # 0x2afd0
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq %rax, %r13
movl $0x1a, %edx
movq %rax, %rdi
leaq 0x10f52(%rip), %rsi     # 0x20696
callq 0x5310
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x5280
jmp 0xf81a
movq %rbx, %rdi
leaq 0x10f44(%rip), %rsi     # 0x206b1
callq 0x50d0
testl %eax, %eax
je 0xf792
movq %rbx, %rdi
leaq 0x10f39(%rip), %rsi     # 0x206b9
callq 0x50d0
orl %r15d, %eax
je 0xf797
xorl %r13d, %r13d
jmp 0xf830
testl %r15d, %r15d
jne 0xf78a
movq (%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1505c
movl $0x48, %edx
movq 0x1b820(%rip), %rdi     # 0x2afd0
leaq 0x10e96(%rip), %rsi     # 0x2064d
callq 0x5310
movq 0x1b80d(%rip), %rcx     # 0x2afd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq 0x1b7ef(%rip), %rdi     # 0x2afd0
callq 0x5030
movq %rax, %rdi
callq 0x51c0
movq %rax, %r13
movl $0x1a, %edx
movq %rax, %rdi
leaq 0x10e96(%rip), %rsi     # 0x20696
callq 0x5310
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x5280
movsbl %al, %esi
movq %r13, %rdi
callq 0x5030
movb $0x1, %r13b
movq %rax, %rdi
callq 0x51c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xf84c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x52b0
addq $0x10, %r12
cmpq %rbp, %r12
sete %al
orb %al, %r13b
je 0xf63f
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xf87b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x52b0
leaq 0x88(%rsp), %rdi
callq 0x14e36
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
leaq 0x78(%rsp), %rbx
je 0xf89c
callq 0x9f52
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0xf8b3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x52b0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10d12(%rip), %rbx     # 0x205de
jmp 0xf8ed
leaq 0xfb0b(%rip), %rdi      # 0x1f3e0
callq 0x51b0
leaq 0xfaff(%rip), %rdi      # 0x1f3e0
callq 0x53a0
leaq 0x10a5a(%rip), %rbx     # 0x20347
movl $0x8, %edi
callq 0x5170
movq %rbx, (%rax)
movq 0x1b6af(%rip), %rsi     # 0x2afb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x5440
jmp 0xf959
movq %rax, %rbx
jmp 0xf978
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0xf95c
movl %ebp, (%r15)
jmp 0xf95c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xf95c
callq 0x9f52
jmp 0xf95c
jmp 0xf959
jmp 0xf959
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xf95c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x52b0
jmp 0xf95c
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xf978
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x52b0
leaq 0x88(%rsp), %rdi
callq 0x14e36
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xf994
callq 0x9f52
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xf9b0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x52b0
movq %rbx, %rdi
callq 0x5460