// File: brashi[P]PetFera/src/./petshop.cpp
// Function: Petshop::criarTratador()
void Petshop::criarTratador() {
    string nome;
    shared_ptr<Tratador> tratador = make_shared<Tratador>();

    if(tratador->setNome())
        nome = tratador->getNome();
    else
        throw "Tratador deve ter um nome válido!";

    if(this->findTratador(nome) != nullptr)
        throw "Funcionário já existe!";

    if(!tratador->setTelefone())
        throw "Tratador não pode ficar sem telefone";

    if(!tratador->setEmail())
        throw "Tratador não pode ficar sem e-mail";

    if(!tratador->setUniforme())
        throw "Tratador não pode ficar sem nível de segurança";

    if(this->adicionarTratador(tratador))
        cout << "Tratador adicionado ao cadastro." << endl;
    else
        cout << "Houve um erro na operação" << endl << "Cancelando..." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x6480
leaq -0x38(%rbp), %rdi
callq 0x21aa0
jmp 0x1afee
leaq -0x38(%rbp), %rdi
callq 0xb2d0
movq %rax, %rdi
callq 0x27950
movb %al, -0xb1(%rbp)
jmp 0x1b007
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x1b013
jmp 0x1b064
leaq -0x38(%rbp), %rdi
callq 0xb2d0
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
callq 0x27920
jmp 0x1b02a
leaq -0x28(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x6400
leaq -0x68(%rbp), %rdi
callq 0x6678
jmp 0x1b090
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1b357
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1b34e
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x260ad(%rip), %rax     # 0x41125
movq %rax, (%rdi)
movq 0x47f26(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1b369
leaq -0x98(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x61a0
jmp 0x1b0a2
movq -0xb0(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x1b370
jmp 0x1b0bb
leaq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21b10
movb %al, -0xb2(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xb4a0
leaq -0x98(%rbp), %rdi
callq 0x6678
movb -0xb2(%rbp), %al
testb $0x1, %al
jne 0x1b0ef
jmp 0x1b138
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25f42(%rip), %rax     # 0x41045
movq %rax, (%rdi)
movq 0x47e9b(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1b369
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x6678
jmp 0x1b34e
leaq -0x38(%rbp), %rdi
callq 0xb2d0
movq %rax, %rdi
callq 0x27ae0
movb %al, -0xb3(%rbp)
jmp 0x1b151
movb -0xb3(%rbp), %al
testb $0x1, %al
jne 0x1b189
jmp 0x1b15d
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25fd7(%rip), %rax     # 0x41148
movq %rax, (%rdi)
movq 0x47e2d(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1b369
leaq -0x38(%rbp), %rdi
callq 0xb2d0
movq %rax, %rdi
callq 0x27c70
movb %al, -0xb4(%rbp)
jmp 0x1b1a2
movb -0xb4(%rbp), %al
testb $0x1, %al
jne 0x1b1da
jmp 0x1b1ae
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25fac(%rip), %rax     # 0x4116e
movq %rax, (%rdi)
movq 0x47ddc(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1b369
leaq -0x38(%rbp), %rdi
callq 0xb2d0
movq %rax, %rdi
callq 0x280e0
movb %al, -0xb5(%rbp)
jmp 0x1b1f3
movb -0xb5(%rbp), %al
testb $0x1, %al
jne 0x1b22b
jmp 0x1b1ff
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25f7f(%rip), %rax     # 0x41192
movq %rax, (%rdi)
movq 0x47d8b(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1b369
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
leaq -0x38(%rbp), %rsi
callq 0xc090
movq -0xb0(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x1aad0
movb %al, -0xb6(%rbp)
jmp 0x1b25d
leaq -0xa8(%rbp), %rdi
callq 0xb4a0
movb -0xb6(%rbp), %al
testb $0x1, %al
jne 0x1b275
jmp 0x1b2c8
movq 0x47d4c(%rip), %rdi     # 0x62fc8
leaq 0x25f41(%rip), %rsi     # 0x411c4
callq 0x6310
movq %rax, -0xc8(%rbp)
jmp 0x1b291
movq -0xc8(%rbp), %rdi
movq 0x47d01(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1b2a6
jmp 0x1b333
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xb4a0
jmp 0x1b34e
movq 0x47cf9(%rip), %rdi     # 0x62fc8
leaq 0x25e25(%rip), %rsi     # 0x410fb
callq 0x6310
movq %rax, -0xd0(%rbp)
jmp 0x1b2e4
movq -0xd0(%rbp), %rdi
movq 0x47cae(%rip), %rsi     # 0x62fa0
callq 0x6360
movq %rax, -0xd8(%rbp)
jmp 0x1b300
movq -0xd8(%rbp), %rdi
leaq 0x25e09(%rip), %rsi     # 0x41117
callq 0x6310
movq %rax, -0xe0(%rbp)
jmp 0x1b31c
movq -0xe0(%rbp), %rdi
movq 0x47c76(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1b331
jmp 0x1b333
leaq -0x38(%rbp), %rdi
callq 0xb4a0
leaq -0x28(%rbp), %rdi
callq 0x6678
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0xb4a0
leaq -0x28(%rbp), %rdi
callq 0x6678
movq -0x40(%rbp), %rdi
callq 0x6590
nopl (%rax)