// File: /workspace/github_cpp_makefile_star2_O1/brashi[P]PetFera/src/./petshop.cpp
// Function: Petshop::criarVeterinario()
void Petshop::criarVeterinario() {
    string nome;
    shared_ptr<Veterinario> veterinario = make_shared<Veterinario>();

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

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

    if(!veterinario->setTelefone())
        throw "Veterinário não pode ficar sem telefone";

    if(!veterinario->setEmail())
        throw "Veterinário não pode ficar sem e-mail";

    if(!veterinario->setCRMV())
        throw "Veterinário não pode ficar sem CRMV";

    if(this->adicionarVeterinario(veterinario))
        cout << "Veterinário adicionado ao cadastro." << endl;
    else
        cout << "Houve um erro na operação" << endl << "Cancelando..." << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x10(%rsp), %rdi
movq %rax, -0x8(%rdi)
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x15440
movq 0x8(%rsp), %rdi
callq 0x159f6
testb %al, %al
je 0xe22c
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x159d2
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x6330
movq (%r14), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xe0cb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62b0
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0xb010
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rdx
movq %rbx, %rsi
callq 0xe2e0
movq 0x28(%rsp), %r12
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xe111
callq 0xafa0
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0xe128
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x62b0
testq %r12, %r12
jne 0xe235
movq 0x8(%rsp), %rdi
callq 0x15b76
testb %al, %al
je 0xe23e
movq 0x8(%rsp), %rdi
callq 0x15cf6
testb %al, %al
je 0xe247
movq 0x8(%rsp), %rdi
callq 0x16cce
testb %al, %al
je 0xe250
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0xe195
movq 0x1fe41(%rip), %rcx     # 0x2dfc8
cmpb $0x0, (%rcx)
je 0xe191
incl 0x8(%rax)
jmp 0xe195
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x14b6a
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xe1b1
callq 0xafa0
movq 0x1fe18(%rip), %rbx     # 0x2dfd0
leaq 0x13dbe(%rip), %rsi     # 0x21f7d
movl $0x24, %edx
movq %rbx, %rdi
callq 0x6310
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x6280
movsbl %al, %esi
movq 0x1fde6(%rip), %rdi     # 0x2dfd0
callq 0x6030
movq %rax, %rdi
callq 0x61c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xe206
callq 0xafa0
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xe21d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62b0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x13c92(%rip), %rbx     # 0x21ec5
jmp 0xe257
leaq 0x13cb0(%rip), %rbx     # 0x21eec
jmp 0xe257
leaq 0x13cc0(%rip), %rbx     # 0x21f05
jmp 0xe257
leaq 0x13ce1(%rip), %rbx     # 0x21f2f
jmp 0xe257
leaq 0x13d00(%rip), %rbx     # 0x21f57
movl $0x8, %edi
callq 0x6170
movq %rbx, (%rax)
movq 0x1fd45(%rip), %rsi     # 0x2dfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x6440
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xe2b1
callq 0xafa0
jmp 0xe2b1
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0xe2b1
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x62b0
jmp 0xe2b1
jmp 0xe2ae
jmp 0xe2ae
movq %rax, %rbx
jmp 0xe2c0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xe2c0
callq 0xafa0
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xe2d7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62b0
movq %rbx, %rdi
callq 0x6460
nop