// File: brashi[P]PetFera/src/./petshop.cpp
// Function: Petshop::criarAnimal()
void Petshop::criarAnimal() {
    string nome, especie, pessoa;
    long unsigned int idPessoa;
    shared_ptr<Animal> animal;

    if(this->veterinarios.size() < 1)
        throw "Não há veterinários no sistema!"; 

    if(this->tratadores.size() < 1)
        throw "Não há tratadores no sistema!"; 

    string classe = animal->setClasse();
    if(classe.empty())
        throw "Animal deve ter uma classe válida!";

    string categoria = animal->setClassificacao();
    if(categoria.empty())
        throw "Animal deve ter uma categoria válida!";

    animal = mapa.aMap[classe + categoria]();

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

    if(animal->setEspecie())
        especie = animal->getEspecie();
    else
        throw "Animal deve ter uma espécie válida!";
    
    if(findAnimal(nome, especie) != nullptr)
        throw "Animal já existe!";

    if(!animal->setAmeacadoPor()) {
        cout << "Animal não está ameaçado de extinção!" << endl;
        animal->setAmeacadoPor("Nada");
    }

    // Adiciona veterinário ao animal
    this->listarVeterinarios();
    cout << endl << "Digite o ID do veterinário responsável: " << endl;
    getline(cin, pessoa);
    idPessoa = stoi(pessoa);

    // Pela lista de vet. ser em petshop o tratamento se dá aqui, não no setter
    if(idPessoa >= 0 && idPessoa < this->veterinarios.size())
        animal->setVeterinario(this->veterinarios[idPessoa]);
    else
        throw "Veterinário não existe!";

    if(!animal->setPerigoso())
        throw "Animal não pode ficar sem a informação de seu perigo!";

    if(classe == "ave") { // Ave
        shared_ptr<Ave> classe = dynamic_pointer_cast< Ave >(animal);

        if(!classe->setVoa())
            throw "Informe se a ave voa!";

    } else if(classe == "mam") { // Mamífero
        shared_ptr<Mamifero> classe = dynamic_pointer_cast< Mamifero >(animal);

        if(!classe->setGestacao())
            throw "Informe se o mamífero possui gestação!";

    } else if(classe == "rep") { // Réptil
        shared_ptr<Reptil> classe = dynamic_pointer_cast< Reptil >(animal);

        if(!classe->setPele())
            throw "Informe se o réptil possui pele!";

    } else if(classe == "anf") { // Anfíbio
        shared_ptr<Anfibio> classe = dynamic_pointer_cast< Anfibio >(animal);

        if(!classe->setCauda())
            throw "Informe se o anfíbio possui cauda!";

        if(!classe->setPata())
            throw "Informe se o anfíbio possui pata!";

    } else
        throw "Algo de errado aconteceu na criação de animal, verifique se a classe informada condiz com o que foi pedido pela aplicação.";

    // Adiciona tratador ao animal
    this->listarTratadores();
    cout << endl << "Digite o ID do tratador responsável: " << endl;
    getline(cin, pessoa);
    idPessoa = stoi(pessoa);

    // Pela lista de trt. ser em petshop o tratador se dá aqui, não no setter
    if(idPessoa >= 0 && idPessoa < this->tratadores.size())
        animal->setTratador(this->tratadores[idPessoa]);
    else
        throw "Tratador não existe!";

    // Tratamento de permissão
    Uniforme un = animal->getTratador()->getUniforme();
    if(animal->getPerigoso() && un != Vermelho)
        throw "Erro de permissão! O tratador necessita de ao menos um nível de segurança Vermelho.";
    else if((classe == "rep" || classe == "mam") && (un == Verde))
        throw "Erro de permissão! O tratador necessita de ao menos um nível de segurança Azul.";

    if(categoria == "D") { // Animal Doméstico
        shared_ptr<Domestico> categoria = dynamic_pointer_cast< Domestico >(animal);

        if(!categoria->setAdestrado())
            throw "Informe um valor válido de adestramento!";

    } else if(categoria == "N") { // Silvestre Nativo
        shared_ptr<Nativo> categoria = dynamic_pointer_cast< Nativo >(animal);

        if(!categoria->setLicenca())
            throw "Informe um valor válido para a licença!";

        if(!categoria->setRegiao())
            throw "Informe uma região válida!";

    } else if(categoria == "E") { // Silvestre Exótico
        shared_ptr<Exotico> categoria = dynamic_pointer_cast< Exotico >(animal);

        if(!categoria->setLocal())
            throw "Informe um habitat válido!";

    } else
        throw "Algo de errado aconteceu na criação de animal, verifique se a categoria informada condiz com o que foi pedido pela aplicação.";

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3d0, %rsp            # imm = 0x3D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x6480
leaq -0x48(%rbp), %rdi
callq 0x6480
leaq -0x68(%rbp), %rdi
callq 0x6480
leaq -0x80(%rbp), %rdi
callq 0xbe60
movq -0x278(%rbp), %rdi
callq 0x21b40
cmpq $0x1, %rax
jae 0x1b4e3
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25d31(%rip), %rax     # 0x411e5
movq %rax, (%rdi)
movq 0x47aea(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x1c64a
movq -0x278(%rbp), %rdi
addq $0x18, %rdi
callq 0x21b60
cmpq $0x1, %rax
jae 0x1b525
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25cfb(%rip), %rax     # 0x41208
movq %rax, (%rdi)
movq 0x47a91(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x2a810
jmp 0x1b53f
leaq -0xb0(%rbp), %rdi
callq 0x6560
testb $0x1, %al
jne 0x1b551
jmp 0x1b594
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25cc3(%rip), %rax     # 0x41228
movq %rax, (%rdi)
movq 0x47a39(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x1c63e
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x2a160
jmp 0x1b5ae
leaq -0xd0(%rbp), %rdi
callq 0x6560
testb $0x1, %al
jne 0x1b5c0
jmp 0x1b603
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25c78(%rip), %rax     # 0x4124c
movq %rax, (%rdi)
movq 0x479ca(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x1c632
movq -0x278(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x280(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0xbf60
jmp 0x1b631
movq -0x280(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xbe80
movq %rax, -0x288(%rbp)
jmp 0x1b64d
movq -0x288(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0xbfe0
jmp 0x1b662
leaq -0x80(%rbp), %rdi
movq %rdi, -0x298(%rbp)
leaq -0xe0(%rbp), %rsi
movq %rsi, -0x2a0(%rbp)
callq 0xc030
movq -0x2a0(%rbp), %rdi
callq 0xb460
leaq -0x100(%rbp), %rdi
callq 0x6678
movq -0x298(%rbp), %rdi
callq 0xb480
movq %rax, %rdi
callq 0x29820
movb %al, -0x289(%rbp)
jmp 0x1b6b4
movb -0x289(%rbp), %al
testb $0x1, %al
jne 0x1b6c0
jmp 0x1b71b
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rsi
leaq -0x120(%rbp), %rdi
callq 0x297c0
jmp 0x1b6da
leaq -0x28(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x6400
leaq -0x120(%rbp), %rdi
callq 0x6678
jmp 0x1b747
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x6678
jmp 0x1c632
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25b44(%rip), %rax     # 0x41273
movq %rax, (%rdi)
movq 0x4786f(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rdi
callq 0x29980
movb %al, -0x2a1(%rbp)
jmp 0x1b760
movb -0x2a1(%rbp), %al
testb $0x1, %al
jne 0x1b76c
jmp 0x1b7a4
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x29950
jmp 0x1b786
leaq -0x48(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x6400
leaq -0x140(%rbp), %rdi
callq 0x6678
jmp 0x1b7d0
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25adc(%rip), %rax     # 0x41294
movq %rax, (%rdi)
movq 0x477e6(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq -0x170(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x61a0
jmp 0x1b7e2
leaq -0x190(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x61a0
jmp 0x1b7f4
movq -0x278(%rbp), %rsi
leaq -0x150(%rbp), %rdi
leaq -0x170(%rbp), %rdx
leaq -0x190(%rbp), %rcx
callq 0x1c680
jmp 0x1b817
leaq -0x150(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21b80
movb %al, -0x2a2(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xb460
leaq -0x190(%rbp), %rdi
callq 0x6678
leaq -0x170(%rbp), %rdi
callq 0x6678
movb -0x2a2(%rbp), %al
testb $0x1, %al
jne 0x1b85d
jmp 0x1b8cc
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25a49(%rip), %rax     # 0x412ba
movq %rax, (%rdi)
movq 0x4772d(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x1b8bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x6678
leaq -0x170(%rbp), %rdi
callq 0x6678
jmp 0x1c632
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rdi
callq 0x29b10
movb %al, -0x2a3(%rbp)
jmp 0x1b8e5
movb -0x2a3(%rbp), %al
testb $0x1, %al
jne 0x1b9d7
jmp 0x1b8f5
movq 0x476cc(%rip), %rdi     # 0x62fc8
leaq 0x259ca(%rip), %rsi     # 0x412cd
callq 0x6310
movq %rax, -0x2b0(%rbp)
jmp 0x1b911
movq -0x2b0(%rbp), %rdi
movq 0x47681(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1b926
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, -0x2c0(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x65a0
movq -0x2b8(%rbp), %rdx
leaq 0x259a1(%rip), %rsi     # 0x412f8
leaq -0x1b0(%rbp), %rdi
callq 0xc1d0
jmp 0x1b965
movq -0x2c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x29c40
jmp 0x1b97a
leaq -0x1b0(%rbp), %rdi
callq 0x6678
leaq -0x1b1(%rbp), %rdi
callq 0x6380
jmp 0x1b9d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x1b9c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x6678
leaq -0x1b1(%rbp), %rdi
callq 0x6380
jmp 0x1c632
movq -0x278(%rbp), %rdi
callq 0x1c820
jmp 0x1b9e5
movq 0x475dc(%rip), %rdi     # 0x62fc8
movq 0x475ad(%rip), %rsi     # 0x62fa0
callq 0x6360
movq %rax, -0x2c8(%rbp)
jmp 0x1ba01
movq -0x2c8(%rbp), %rdi
leaq 0x258ee(%rip), %rsi     # 0x412fd
callq 0x6310
movq %rax, -0x2d0(%rbp)
jmp 0x1ba1d
movq -0x2d0(%rbp), %rdi
movq 0x47575(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1ba32
movq 0x475a7(%rip), %rdi     # 0x62fe0
leaq -0x68(%rbp), %rsi
callq 0x6090
jmp 0x1ba44
xorl %eax, %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
movl $0xa, %edx
callq 0xbdc0
movl %eax, -0x2d4(%rbp)
jmp 0x1ba5e
movl -0x2d4(%rbp), %eax
cltq
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jb 0x1bb17
movq -0x278(%rbp), %rdi
movq -0x70(%rbp), %rax
movq %rax, -0x2e0(%rbp)
callq 0x21b40
movq %rax, %rcx
movq -0x2e0(%rbp), %rax
cmpq %rcx, %rax
jae 0x1bb17
leaq -0x80(%rbp), %rdi
callq 0xb480
movq -0x278(%rbp), %rdi
movq %rax, -0x2f0(%rbp)
movq -0x70(%rbp), %rsi
callq 0x21bb0
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0xc060
movq -0x2f0(%rbp), %rdi
movq -0x2e8(%rbp), %rsi
callq 0x29ca0
jmp 0x1bae6
leaq -0x1c8(%rbp), %rdi
callq 0xb4c0
jmp 0x1bb43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0xb4c0
jmp 0x1c632
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x257fd(%rip), %rax     # 0x41328
movq %rax, (%rdi)
movq 0x47473(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rdi
callq 0x29d50
movb %al, -0x2f1(%rbp)
jmp 0x1bb5c
movb -0x2f1(%rbp), %al
testb $0x1, %al
jne 0x1bb94
jmp 0x1bb68
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x257c6(%rip), %rax     # 0x41342
movq %rax, (%rdi)
movq 0x47422(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq 0x265db(%rip), %rsi     # 0x42176
leaq -0xb0(%rbp), %rdi
callq 0xbc30
movb %al, -0x2f2(%rbp)
jmp 0x1bbaf
movb -0x2f2(%rbp), %al
testb $0x1, %al
jne 0x1bbbe
jmp 0x1bc5d
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x300(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb780
movq -0x300(%rbp), %rdi
callq 0xb810
movq %rax, %rdi
callq 0x3bfb0
movb %al, -0x2f3(%rbp)
jmp 0x1bbf1
movb -0x2f3(%rbp), %al
testb $0x1, %al
jne 0x1bc4c
jmp 0x1bbfd
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2576a(%rip), %rax     # 0x4137b
movq %rax, (%rdi)
movq 0x4738d(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0xb830
jmp 0x1c632
leaq -0x1d8(%rbp), %rdi
callq 0xb830
jmp 0x1bf3b
leaq 0x24438(%rip), %rsi     # 0x4009c
leaq -0xb0(%rbp), %rdi
callq 0xbc30
movb %al, -0x301(%rbp)
jmp 0x1bc78
movb -0x301(%rbp), %al
testb $0x1, %al
jne 0x1bc87
jmp 0x1bd26
leaq -0x1e8(%rbp), %rdi
movq %rdi, -0x310(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb9f0
movq -0x310(%rbp), %rdi
callq 0xba80
movq %rax, %rdi
callq 0x3cc90
movb %al, -0x302(%rbp)
jmp 0x1bcba
movb -0x302(%rbp), %al
testb $0x1, %al
jne 0x1bd15
jmp 0x1bcc6
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x256b7(%rip), %rax     # 0x41391
movq %rax, (%rdi)
movq 0x472c4(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0xbaa0
jmp 0x1c632
leaq -0x1e8(%rbp), %rdi
callq 0xbaa0
jmp 0x1bf39
leaq 0x24373(%rip), %rsi     # 0x400a0
leaq -0xb0(%rbp), %rdi
callq 0xbc30
movb %al, -0x311(%rbp)
jmp 0x1bd41
movb -0x311(%rbp), %al
testb $0x1, %al
jne 0x1bd50
jmp 0x1bdef
leaq -0x1f8(%rbp), %rdi
movq %rdi, -0x320(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb920
movq -0x320(%rbp), %rdi
callq 0xb9b0
movq %rax, %rdi
callq 0x3d950
movb %al, -0x312(%rbp)
jmp 0x1bd83
movb -0x312(%rbp), %al
testb $0x1, %al
jne 0x1bdde
jmp 0x1bd8f
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25618(%rip), %rax     # 0x413bb
movq %rax, (%rdi)
movq 0x471fb(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0xb9d0
jmp 0x1c632
leaq -0x1f8(%rbp), %rdi
callq 0xb9d0
jmp 0x1bf37
leaq 0x242a2(%rip), %rsi     # 0x40098
leaq -0xb0(%rbp), %rdi
callq 0xbc30
movb %al, -0x321(%rbp)
jmp 0x1be0a
movb -0x321(%rbp), %al
testb $0x1, %al
jne 0x1be19
jmp 0x1bf09
leaq -0x208(%rbp), %rdi
movq %rdi, -0x330(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb850
movq -0x330(%rbp), %rdi
callq 0xb8e0
movq %rax, %rdi
callq 0x3e690
movb %al, -0x322(%rbp)
jmp 0x1be4c
movb -0x322(%rbp), %al
testb $0x1, %al
jne 0x1bea7
jmp 0x1be58
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25571(%rip), %rax     # 0x413dd
movq %rax, (%rdi)
movq 0x47132(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0xb900
jmp 0x1c632
leaq -0x208(%rbp), %rdi
callq 0xb8e0
movq %rax, %rdi
callq 0x3e800
movb %al, -0x331(%rbp)
jmp 0x1bec3
movb -0x331(%rbp), %al
testb $0x1, %al
jne 0x1befb
jmp 0x1becf
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2551e(%rip), %rax     # 0x41401
movq %rax, (%rdi)
movq 0x470bb(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq -0x208(%rbp), %rdi
callq 0xb900
jmp 0x1bf35
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25507(%rip), %rax     # 0x41424
movq %rax, (%rdi)
movq 0x47081(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
jmp 0x1bf37
jmp 0x1bf39
jmp 0x1bf3b
movq -0x278(%rbp), %rdi
callq 0x1cb60
jmp 0x1bf49
movq 0x47078(%rip), %rdi     # 0x62fc8
movq 0x47049(%rip), %rsi     # 0x62fa0
callq 0x6360
movq %rax, -0x340(%rbp)
jmp 0x1bf65
movq -0x340(%rbp), %rdi
leaq 0x25530(%rip), %rsi     # 0x414a3
callq 0x6310
movq %rax, -0x348(%rbp)
jmp 0x1bf81
movq -0x348(%rbp), %rdi
movq 0x47011(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1bf96
movq 0x47043(%rip), %rdi     # 0x62fe0
leaq -0x68(%rbp), %rsi
callq 0x6090
jmp 0x1bfa8
xorl %eax, %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
movl $0xa, %edx
callq 0xbdc0
movl %eax, -0x34c(%rbp)
jmp 0x1bfc2
movl -0x34c(%rbp), %eax
cltq
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jb 0x1c087
movq -0x278(%rbp), %rdi
movq -0x70(%rbp), %rax
movq %rax, -0x358(%rbp)
addq $0x18, %rdi
callq 0x21b60
movq %rax, %rcx
movq -0x358(%rbp), %rax
cmpq %rcx, %rax
jae 0x1c087
leaq -0x80(%rbp), %rdi
callq 0xb480
movq -0x278(%rbp), %rdi
movq %rax, -0x368(%rbp)
addq $0x18, %rdi
movq -0x70(%rbp), %rsi
callq 0x21bd0
movq %rax, %rsi
leaq -0x218(%rbp), %rdi
movq %rdi, -0x360(%rbp)
callq 0xc090
movq -0x368(%rbp), %rdi
movq -0x360(%rbp), %rsi
callq 0x29d00
jmp 0x1c056
leaq -0x218(%rbp), %rdi
callq 0xb4a0
jmp 0x1c0b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0xb4a0
jmp 0x1c632
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2542f(%rip), %rax     # 0x414ca
movq %rax, (%rdi)
movq 0x46f03(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rsi
leaq -0x230(%rbp), %rdi
callq 0x29cd0
jmp 0x1c0cd
leaq -0x230(%rbp), %rdi
callq 0xb2d0
movq %rax, %rdi
callq 0x280c0
movl %eax, -0x36c(%rbp)
jmp 0x1c0e9
leaq -0x230(%rbp), %rdi
callq 0xb4a0
movl -0x36c(%rbp), %eax
movl %eax, -0x21c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xb480
movq %rax, %rdi
callq 0x29d30
movb %al, -0x36d(%rbp)
jmp 0x1c11a
movb -0x36d(%rbp), %al
testb $0x1, %al
jne 0x1c126
jmp 0x1c17e
cmpl $0x2, -0x21c(%rbp)
je 0x1c17e
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2539d(%rip), %rax     # 0x414e0
movq %rax, (%rdi)
movq 0x46e5b(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xb4a0
jmp 0x1c632
leaq 0x23f1b(%rip), %rsi     # 0x400a0
leaq -0xb0(%rbp), %rdi
callq 0xbc30
movb %al, -0x36e(%rbp)
jmp 0x1c199
movb -0x36e(%rbp), %al
testb $0x1, %al
jne 0x1c1cc
jmp 0x1c1a5
leaq 0x23ef0(%rip), %rsi     # 0x4009c
leaq -0xb0(%rbp), %rdi
callq 0xbc30
movb %al, -0x36f(%rbp)
jmp 0x1c1c0
movb -0x36f(%rbp), %al
testb $0x1, %al
jne 0x1c1cc
jmp 0x1c201
cmpl $0x0, -0x21c(%rbp)
jne 0x1c201
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2534e(%rip), %rax     # 0x41537
movq %rax, (%rdi)
movq 0x46db5(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
jmp 0x1c203
leaq 0x25a1d(%rip), %rsi     # 0x41c27
leaq -0xd0(%rbp), %rdi
callq 0xbc30
movb %al, -0x370(%rbp)
jmp 0x1c21e
movb -0x370(%rbp), %al
testb $0x1, %al
jne 0x1c22d
jmp 0x1c2cc
leaq -0x240(%rbp), %rdi
movq %rdi, -0x380(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb510
movq -0x380(%rbp), %rdi
callq 0xb5a0
movq %rax, %rdi
callq 0x2c190
movb %al, -0x371(%rbp)
jmp 0x1c260
movb -0x371(%rbp), %al
testb $0x1, %al
jne 0x1c2bb
jmp 0x1c26c
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2530a(%rip), %rax     # 0x4158a
movq %rax, (%rdi)
movq 0x46d1e(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0xb5c0
jmp 0x1c632
leaq -0x240(%rbp), %rdi
callq 0xb5c0
jmp 0x1c4df
leaq 0x263eb(%rip), %rsi     # 0x426be
leaq -0xd0(%rbp), %rdi
callq 0xbc30
movb %al, -0x381(%rbp)
jmp 0x1c2e7
movb -0x381(%rbp), %al
testb $0x1, %al
jne 0x1c2f6
jmp 0x1c3e9
leaq -0x250(%rbp), %rdi
movq %rdi, -0x390(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb6b0
movq -0x390(%rbp), %rdi
callq 0xb740
movq %rax, %rdi
callq 0x3bac0
movb %al, -0x382(%rbp)
jmp 0x1c329
movb -0x382(%rbp), %al
testb $0x1, %al
jne 0x1c384
jmp 0x1c335
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2526b(%rip), %rax     # 0x415b4
movq %rax, (%rdi)
movq 0x46c55(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0xb760
jmp 0x1c632
leaq -0x250(%rbp), %rdi
callq 0xb740
movq %rax, %rdi
callq 0x3bc50
movb %al, -0x391(%rbp)
jmp 0x1c3a0
movb -0x391(%rbp), %al
testb $0x1, %al
jne 0x1c3d8
jmp 0x1c3ac
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x2521e(%rip), %rax     # 0x415de
movq %rax, (%rdi)
movq 0x46bde(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
leaq -0x250(%rbp), %rdi
callq 0xb760
jmp 0x1c4dd
leaq 0x262d3(%rip), %rsi     # 0x426c3
leaq -0xd0(%rbp), %rdi
callq 0xbc30
movb %al, -0x392(%rbp)
jmp 0x1c404
movb -0x392(%rbp), %al
testb $0x1, %al
jne 0x1c413
jmp 0x1c4af
leaq -0x260(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb5e0
movq -0x3a0(%rbp), %rdi
callq 0xb670
movq %rax, %rdi
callq 0x2c380
movb %al, -0x393(%rbp)
jmp 0x1c446
movb -0x393(%rbp), %al
testb $0x1, %al
jne 0x1c4a1
jmp 0x1c452
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25195(%rip), %rax     # 0x415fb
movq %rax, (%rdi)
movq 0x46b38(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0xb690
jmp 0x1c632
leaq -0x260(%rbp), %rdi
callq 0xb690
jmp 0x1c4db
movl $0x8, %edi
callq 0x61e0
movq %rax, %rdi
leaq 0x25154(%rip), %rax     # 0x41617
movq %rax, (%rdi)
movq 0x46adb(%rip), %rsi     # 0x62fa8
xorl %eax, %eax
movl %eax, %edx
callq 0x6570
jmp 0x1c67a
jmp 0x1c4dd
jmp 0x1c4df
leaq -0x270(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xb430
movq -0x278(%rbp), %rdi
movq -0x3b0(%rbp), %rsi
callq 0x1ab00
movb %al, -0x3a1(%rbp)
jmp 0x1c511
leaq -0x270(%rbp), %rdi
callq 0xb460
movb -0x3a1(%rbp), %al
testb $0x1, %al
jne 0x1c529
jmp 0x1c582
movq 0x46a98(%rip), %rdi     # 0x62fc8
leaq 0x25162(%rip), %rsi     # 0x41699
callq 0x6310
movq %rax, -0x3b8(%rbp)
jmp 0x1c545
movq -0x3b8(%rbp), %rdi
movq 0x46a4d(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1c55a
jmp 0x1c5ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x270(%rbp), %rdi
callq 0xb460
jmp 0x1c632
movq 0x46a3f(%rip), %rdi     # 0x62fc8
leaq 0x24b6b(%rip), %rsi     # 0x410fb
callq 0x6310
movq %rax, -0x3c0(%rbp)
jmp 0x1c59e
movq -0x3c0(%rbp), %rdi
movq 0x469f4(%rip), %rsi     # 0x62fa0
callq 0x6360
movq %rax, -0x3c8(%rbp)
jmp 0x1c5ba
movq -0x3c8(%rbp), %rdi
leaq 0x24b4f(%rip), %rsi     # 0x41117
callq 0x6310
movq %rax, -0x3d0(%rbp)
jmp 0x1c5d6
movq -0x3d0(%rbp), %rdi
movq 0x469bc(%rip), %rsi     # 0x62fa0
callq 0x6360
jmp 0x1c5eb
jmp 0x1c5ed
leaq -0xd0(%rbp), %rdi
callq 0x6678
leaq -0xb0(%rbp), %rdi
callq 0x6678
leaq -0x80(%rbp), %rdi
callq 0xb460
leaq -0x68(%rbp), %rdi
callq 0x6678
leaq -0x48(%rbp), %rdi
callq 0x6678
leaq -0x28(%rbp), %rdi
callq 0x6678
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
leaq -0xd0(%rbp), %rdi
callq 0x6678
leaq -0xb0(%rbp), %rdi
callq 0x6678
leaq -0x80(%rbp), %rdi
callq 0xb460
leaq -0x68(%rbp), %rdi
callq 0x6678
leaq -0x48(%rbp), %rdi
callq 0x6678
leaq -0x28(%rbp), %rdi
callq 0x6678
movq -0x88(%rbp), %rdi
callq 0x6590
nopw (%rax,%rax)