// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ccb3(%rip), %rax     # 0x2d168
addq $0x10, %rax
movq %rax, -0x58(%rcx)
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x12068(%rip), %rsi     # 0x22535
leaq 0x12090(%rip), %rdx     # 0x22564
leaq 0x18(%rsp), %rdi
callq 0xadd8
movq 0x20(%rbx), %rax
cmpq 0x18(%rbx), %rax
je 0x10a95
movq 0x1dadd(%rip), %rdi     # 0x2dfd0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1dac2(%rip), %r14     # 0x2dfd0
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq %rax, %r15
leaq 0x120e3(%rip), %rsi     # 0x2260b
movl $0x18, %edx
movq %rax, %rdi
callq 0x6310
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq %rbx, %rdi
callq 0xfcce
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1da4e(%rip), %r14     # 0x2dfd0
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61c0
leaq 0x1208b(%rip), %rsi     # 0x22624
movl $0x28, %edx
movq %rax, %rdi
callq 0x6310
movq 0x1da33(%rip), %rdi     # 0x2dfe0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %edx
movq 0x1da18(%rip), %rdi     # 0x2dfe0
leaq 0x68(%rsp), %rsi
callq 0x6480
movq 0x68(%rsp), %r12
callq 0x6050
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x48(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x6380
cmpq %r12, (%r13)
je 0x10a9e
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x10aaa
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x10aaa
testl %ecx, %ecx
jne 0x10625
movl %ebp, (%r15)
cltq
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %rax, %rdx
jbe 0x10ab6
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 0x14ee8
movq -0x8(%r12), %r12
leaq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x6190
leaq 0xb0(%rsp), %rdi
leaq 0x28(%r12), %rsi
callq 0x6190
leaq 0xd0(%rsp), %rdi
leaq 0x48(%r12), %rsi
callq 0x6190
movl 0x68(%r12), %eax
movl %eax, 0xf0(%rsp)
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1d907(%rip), %r14     # 0x2dfd0
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x6310
movq (%rsp), %rdi
callq 0x159f6
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1d8be(%rip), %r14     # 0x2dfd0
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x6310
movq (%rsp), %rdi
callq 0x15cf6
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1d875(%rip), %r14     # 0x2dfd0
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x6310
movq (%rsp), %rdi
callq 0x15b76
movq (%rsp), %rdi
callq 0x160d4
movl %eax, 0x14(%rsp)
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1d81f(%rip), %rdi     # 0x2dfd0
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rdi
callq 0x6310
movq (%rsp), %rdi
callq 0x160d8
testb %al, %al
je 0x10a2f
movq (%rsp), %rdi
callq 0x160d4
movq 0x30(%rbx), %rbp
movq 0x38(%rbx), %r12
cmpq %r12, %rbp
je 0x10a2f
movl %eax, %r15d
addq $0x10, %rbp
leaq 0x48(%rsp), %rbx
movq -0x10(%rbp), %rsi
movq %rbx, %rdi
callq 0x17eea
movq 0x48(%rsp), %r14
movq 0x50(%rsp), %rdi
movq (%rsp), %r13
testq %rdi, %rdi
je 0x1082b
callq 0xafa0
cmpq %r13, %r14
jne 0x10a17
movq -0x10(%rbp), %rax
movq %rax, 0x38(%rsp)
movq -0x8(%rbp), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x10860
movq 0x1d776(%rip), %rcx     # 0x2dfc8
cmpb $0x0, (%rcx)
je 0x1085c
incl 0x8(%rax)
jmp 0x10860
lock
incl 0x8(%rax)
movq %rbx, %rdi
leaq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x18458
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1087e
callq 0xafa0
movq -0x10(%rbp), %rdi
callq 0x17f2e
cmpl $0x2, %r15d
sete %cl
xorb $0x1, %al
orb %cl, %al
jne 0x10920
movq (%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x162dc
movl $0x48, %edx
movq 0x1d71f(%rip), %rdi     # 0x2dfd0
leaq 0x11d95(%rip), %rsi     # 0x2264d
callq 0x6310
movq 0x1d70c(%rip), %rcx     # 0x2dfd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1d6ee(%rip), %rdi     # 0x2dfd0
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq %rax, %r13
movl $0x1a, %edx
movq %rax, %rdi
leaq 0x11d95(%rip), %rsi     # 0x22696
callq 0x6310
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x6280
jmp 0x109da
movq %rbx, %rdi
leaq 0x11d87(%rip), %rsi     # 0x226b1
callq 0x60d0
testl %eax, %eax
je 0x10952
movq %rbx, %rdi
leaq 0x11d7c(%rip), %rsi     # 0x226b9
callq 0x60d0
orl %r15d, %eax
je 0x10957
xorl %r13d, %r13d
movb $0x1, %r14b
jmp 0x109f6
testl %r15d, %r15d
jne 0x10947
movq (%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x162dc
movl $0x48, %edx
movq 0x1d660(%rip), %rdi     # 0x2dfd0
leaq 0x11cd6(%rip), %rsi     # 0x2264d
callq 0x6310
movq 0x1d64d(%rip), %rcx     # 0x2dfd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1d62f(%rip), %rdi     # 0x2dfd0
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq %rax, %r13
movl $0x1a, %edx
movq %rax, %rdi
leaq 0x11cd6(%rip), %rsi     # 0x22696
callq 0x6310
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq %r13, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movl $0x2, %r13d
xorl %r14d, %r14d
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x10a12
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62b0
testb %r14b, %r14b
je 0x10a1a
xorl %r13d, %r13d
testl %r13d, %r13d
jne 0x10a2f
leaq 0x10(%rbp), %rax
cmpq %r12, %rbp
movq %rax, %rbp
jne 0x10807
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x10a4b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x62b0
leaq 0x88(%rsp), %rdi
callq 0x160b6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
leaq 0x78(%rsp), %rbx
je 0x10a6c
callq 0xafa0
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10a83
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x62b0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11b42(%rip), %rbx     # 0x225de
jmp 0x10abd
leaq 0x1093b(%rip), %rdi     # 0x213e0
callq 0x61b0
leaq 0x1092f(%rip), %rdi     # 0x213e0
callq 0x63a0
leaq 0x1188a(%rip), %rbx     # 0x22347
movl $0x8, %edi
callq 0x6170
movq %rbx, (%rax)
movq 0x1d4df(%rip), %rsi     # 0x2dfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x6440
jmp 0x10b29
movq %rax, %rbx
jmp 0x10b48
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x10b2c
movl %ebp, (%r15)
jmp 0x10b2c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x10b2c
callq 0xafa0
jmp 0x10b2c
jmp 0x10b29
jmp 0x10b29
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x10b2c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62b0
jmp 0x10b2c
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x10b48
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x62b0
leaq 0x88(%rsp), %rdi
callq 0x160b6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x10b64
callq 0xafa0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x10b80
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x62b0
movq %rbx, %rdi
callq 0x6460