// File: 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 %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 0x21a00
jmp 0x1ab5e
leaq -0x38(%rbp), %rdi
callq 0xb170
movq %rax, %rdi
callq 0x27950
movb %al, -0xb1(%rbp)
jmp 0x1ab77
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x1ab83
jmp 0x1abd4
leaq -0x38(%rbp), %rdi
callq 0xb170
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
callq 0x27920
jmp 0x1ab9a
leaq -0x28(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x6400
leaq -0x68(%rbp), %rdi
callq 0x6678
jmp 0x1ac00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1aec7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1aebe
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x26436(%rip), %rax     # 0x4101e
movq %rax, (%rdi)
movq 0x483b6(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1aed9
leaq -0x98(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x61a0
jmp 0x1ac12
movq -0xb0(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x1aee0
jmp 0x1ac2b
leaq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21a70
movb %al, -0xb2(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xb4c0
leaq -0x98(%rbp), %rdi
callq 0x6678
movb -0xb2(%rbp), %al
testb $0x1, %al
jne 0x1ac5f
jmp 0x1aca8
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x263d2(%rip), %rax     # 0x41045
movq %rax, (%rdi)
movq 0x4832b(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1aed9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x6678
jmp 0x1aebe
leaq -0x38(%rbp), %rdi
callq 0xb170
movq %rax, %rdi
callq 0x27ae0
movb %al, -0xb3(%rbp)
jmp 0x1acc1
movb -0xb3(%rbp), %al
testb $0x1, %al
jne 0x1acf9
jmp 0x1accd
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2637d(%rip), %rax     # 0x4105e
movq %rax, (%rdi)
movq 0x482bd(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1aed9
leaq -0x38(%rbp), %rdi
callq 0xb170
movq %rax, %rdi
callq 0x27c70
movb %al, -0xb4(%rbp)
jmp 0x1ad12
movb -0xb4(%rbp), %al
testb $0x1, %al
jne 0x1ad4a
jmp 0x1ad1e
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x26356(%rip), %rax     # 0x41088
movq %rax, (%rdi)
movq 0x4826c(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1aed9
leaq -0x38(%rbp), %rdi
callq 0xb170
movq %rax, %rdi
callq 0x28c10
movb %al, -0xb5(%rbp)
jmp 0x1ad63
movb -0xb5(%rbp), %al
testb $0x1, %al
jne 0x1ad9b
jmp 0x1ad6f
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2632d(%rip), %rax     # 0x410b0
movq %rax, (%rdi)
movq 0x4821b(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1aed9
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
leaq -0x38(%rbp), %rsi
callq 0xc060
movq -0xb0(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x1aaa0
movb %al, -0xb6(%rbp)
jmp 0x1adcd
leaq -0xa8(%rbp), %rdi
callq 0xb4c0
movb -0xb6(%rbp), %al
testb $0x1, %al
jne 0x1ade5
jmp 0x1ae38
movq 0x481dc(%rip), %rdi     # 0x62fc8
leaq 0x262e3(%rip), %rsi     # 0x410d6
callq 0x6310
movq %rax, -0xc8(%rbp)
jmp 0x1ae01
movq -0xc8(%rbp), %rdi
movq 0x48191(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1ae16
jmp 0x1aea3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xb4c0
jmp 0x1aebe
movq 0x48189(%rip), %rdi     # 0x62fc8
leaq 0x262b5(%rip), %rsi     # 0x410fb
callq 0x6310
movq %rax, -0xd0(%rbp)
jmp 0x1ae54
movq -0xd0(%rbp), %rdi
movq 0x4813e(%rip), %rsi     # 0x62fa0
callq 0x6360
movq %rax, -0xd8(%rbp)
jmp 0x1ae70
movq -0xd8(%rbp), %rdi
leaq 0x26299(%rip), %rsi     # 0x41117
callq 0x6310
movq %rax, -0xe0(%rbp)
jmp 0x1ae8c
movq -0xe0(%rbp), %rdi
movq 0x48106(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1aea1
jmp 0x1aea3
leaq -0x38(%rbp), %rdi
callq 0xb4c0
leaq -0x28(%rbp), %rdi
callq 0x6678
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0xb4c0
leaq -0x28(%rbp), %rdi
callq 0x6678
movq -0x40(%rbp), %rdi
callq 0x6590
nopl (%rax)