// File: BohangZhang[P]Sorcery-C-Project/spell.cc
// Function: Spell::action(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Spell::action(int p, string t) {
    shared_ptr<Player> targetplayer = nullptr;
    if (p == 1) {
        targetplayer = this->master->getGame()->get1();
    } else {
        targetplayer = this->master->getGame()->get2();
    }
    
    if (t == "r") {
        if (targetplayer->isRitualEmpty()) {
            throw 15; // You haven't played a Ritual card!
        }
        if (name == "Banish") {
            targetplayer->setRitual(shared_ptr<Ritual>(nullptr));
        } else {
            throw 17; // The Spell cannot be played upon a Ritual!
        }
    } else {
        int j;
        istringstream ss{t};
        ss >> j;
        if (targetplayer->getSlot()->getSize() < j) {
            throw 3; // The target Minion DNE!
        }
        if (name == "Unsummon") {
            shared_ptr<Slot> s = targetplayer->getSlot();
            shared_ptr<Minion> m = s->getSlot()[j-1];
            if (m->getType() == "Enchantment") {
                shared_ptr<Card> p = m->getMaster()->getDatabase()->getCard(m->getOriginName())->clone();
                p->setMaster(m->getMaster());
                m->getMaster()->getDeck()->push(p);
                s->pop(m);
            } else {
                shared_ptr<Card> p = m->getMaster()->getDatabase()->getCard(m->getName())->clone();
                p->setMaster(m->getMaster());
                m->getMaster()->getDeck()->push(p);
                s->pop(m);
            }
            return;
        }
        if (name == "Banish") {
            shared_ptr<Slot> s = targetplayer->getSlot();
            targetplayer->getGraveyard()->pushfirst(s->getSlot()[j-1]);
            s->getSlot().erase(s->getSlot().begin()+j-1);
            return;
        }
        if (name == "Disenchant") {
            shared_ptr<Minion> m = targetplayer->getSlot()->getSlot()[j-1];
            if (m->getType() == "Enchantment") {
                targetplayer->getSlot()->getSlot()[j-1] = m->getOrigin();
            } else {
                throw 18; // Number, Target Minion hasn't been enchanted.
            }
            return;
        }
        throw 10; // Number, Wrong Spell
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x590, %rsp            # imm = 0x590
movq %rdx, -0x490(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x488(%rbp)
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15c60
cmpl $0x1, -0xc(%rbp)
jne 0x3dcc3
movq -0x488(%rbp), %rdi
addq $0x70, %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0x2a670
jmp 0x3dc5d
leaq -0x48(%rbp), %rdi
callq 0x12a20
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x22940
jmp 0x3dc74
leaq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x15c80
leaq -0x38(%rbp), %rdi
callq 0x12a00
leaq -0x48(%rbp), %rdi
callq 0x12a70
jmp 0x3dd33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3ebc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x12a70
jmp 0x3ebc3
movq -0x488(%rbp), %rdi
addq $0x70, %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x2a670
jmp 0x3dce1
leaq -0x78(%rbp), %rdi
callq 0x12a20
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
callq 0x22970
jmp 0x3dcf8
leaq -0x28(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x15c80
leaq -0x68(%rbp), %rdi
callq 0x12a00
leaq -0x78(%rbp), %rdi
callq 0x12a70
jmp 0x3dd33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x12a70
jmp 0x3ebc3
movq -0x490(%rbp), %rdi
leaq 0x2ab3(%rip), %rsi      # 0x407f4
callq 0x12920
movb %al, -0x491(%rbp)
jmp 0x3dd4e
movb -0x491(%rbp), %al
testb $0x1, %al
jne 0x3dd5d
jmp 0x3de69
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, %rdi
callq 0x2a9b0
movb %al, -0x492(%rbp)
jmp 0x3dd76
movb -0x492(%rbp), %al
testb $0x1, %al
jne 0x3dd82
jmp 0x3ddaa
movl $0x4, %edi
callq 0x6160
movq %rax, %rdi
movl $0xf, (%rdi)
movq 0x161fc(%rip), %rsi     # 0x53f98
xorl %eax, %eax
movl %eax, %edx
callq 0x6430
jmp 0x3ebd5
movq -0x488(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3eed(%rip), %rsi      # 0x41ca9
callq 0x12920
movb %al, -0x493(%rbp)
jmp 0x3ddc9
movb -0x493(%rbp), %al
testb $0x1, %al
jne 0x3ddd5
jmp 0x3de3c
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, -0x4a8(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x12e50
movq -0x4a8(%rbp), %rdi
movq -0x4a0(%rbp), %rsi
callq 0x2aba0
jmp 0x3de11
leaq -0x88(%rbp), %rdi
callq 0x12e70
jmp 0x3de64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x12e70
jmp 0x3ebc3
movl $0x4, %edi
callq 0x6160
movq %rax, %rdi
movl $0x11, (%rdi)
movq 0x16142(%rip), %rsi     # 0x53f98
xorl %eax, %eax
movl %eax, %edx
callq 0x6430
jmp 0x3ebd5
jmp 0x3eba7
movq -0x490(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movl $0x8, %edx
callq 0x6410
jmp 0x3de83
leaq -0x210(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
callq 0x61a0
jmp 0x3de98
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x220(%rbp), %rdi
callq 0x2a6b0
jmp 0x3deb2
leaq -0x220(%rbp), %rdi
callq 0x12af0
movq %rax, %rdi
callq 0x3d230
movl %eax, -0x4ac(%rbp)
jmp 0x3dece
movl -0x8c(%rbp), %eax
movl %eax, -0x4b0(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x12b30
movl -0x4b0(%rbp), %ecx
movl -0x4ac(%rbp), %eax
cmpl %ecx, %eax
jge 0x3df4c
movl $0x4, %edi
callq 0x6160
movq %rax, %rdi
movl $0x3, (%rdi)
movq 0x16088(%rip), %rsi     # 0x53f98
xorl %eax, %eax
movl %eax, %edx
callq 0x6430
jmp 0x3ebd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3eb99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x12b30
jmp 0x3eb99
movq -0x488(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3d52(%rip), %rsi      # 0x41cb0
callq 0x12920
movb %al, -0x4b1(%rbp)
jmp 0x3df6b
movb -0x4b1(%rbp), %al
testb $0x1, %al
jne 0x3df7a
jmp 0x3e6fb
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x230(%rbp), %rdi
callq 0x2a6b0
jmp 0x3df94
leaq -0x230(%rbp), %rdi
callq 0x12af0
movq %rax, %rdi
callq 0x3d220
movq %rax, -0x4c0(%rbp)
jmp 0x3dfb1
movq -0x4c0(%rbp), %rdi
movl -0x8c(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x12c80
movq %rax, %rsi
leaq -0x240(%rbp), %rdi
movq %rdi, -0x4c8(%rbp)
callq 0x12c10
movq -0x4c8(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x260(%rbp), %rdi
callq 0x19c20
jmp 0x3dffb
leaq 0x37d2(%rip), %rsi      # 0x417d4
leaq -0x260(%rbp), %rdi
callq 0x12920
movb %al, -0x4c9(%rbp)
jmp 0x3e016
leaq -0x260(%rbp), %rdi
callq 0x64c8
movb -0x4c9(%rbp), %al
testb $0x1, %al
jne 0x3e031
jmp 0x3e397
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x2a0(%rbp), %rdi
callq 0x19d90
jmp 0x3e04e
leaq -0x2a0(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x290(%rbp), %rdi
callq 0x2a740
jmp 0x3e06b
leaq -0x290(%rbp), %rdi
callq 0x15bb0
movq %rax, -0x4d8(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
movq (%rsi), %rax
movq 0x70(%rax), %rax
leaq -0x2c0(%rbp), %rdi
callq *%rax
jmp 0x3e09f
movq -0x4d8(%rbp), %rsi
leaq -0x280(%rbp), %rdi
leaq -0x2c0(%rbp), %rdx
callq 0x19f10
jmp 0x3e0bb
leaq -0x280(%rbp), %rdi
callq 0x15c20
movq %rax, %rsi
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq -0x270(%rbp), %rdi
callq *%rax
jmp 0x3e0dc
leaq -0x280(%rbp), %rdi
callq 0x15c40
leaq -0x2c0(%rbp), %rdi
callq 0x64c8
leaq -0x290(%rbp), %rdi
callq 0x15bd0
leaq -0x2a0(%rbp), %rdi
callq 0x12a00
leaq -0x270(%rbp), %rdi
callq 0x15c20
movq %rax, -0x4e0(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x2d0(%rbp), %rdi
callq 0x19d90
jmp 0x3e13c
movq -0x4e0(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x19d60
jmp 0x3e151
leaq -0x2d0(%rbp), %rdi
callq 0x12a00
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x2f0(%rbp), %rdi
callq 0x19d90
jmp 0x3e17a
leaq -0x2f0(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x2e0(%rbp), %rdi
callq 0x2a710
jmp 0x3e197
leaq -0x2e0(%rbp), %rdi
callq 0x25d80
movq %rax, -0x4f0(%rbp)
leaq -0x300(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
leaq -0x270(%rbp), %rsi
callq 0x1a1f0
movq -0x4f0(%rbp), %rdi
movq -0x4e8(%rbp), %rsi
callq 0x1d380
jmp 0x3e1d9
leaq -0x300(%rbp), %rdi
callq 0x15c40
leaq -0x2e0(%rbp), %rdi
callq 0x25da0
leaq -0x2f0(%rbp), %rdi
callq 0x12a00
leaq -0x230(%rbp), %rdi
callq 0x12af0
movq %rax, -0x500(%rbp)
leaq -0x310(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
leaq -0x240(%rbp), %rsi
callq 0x12c10
movq -0x500(%rbp), %rdi
movq -0x4f8(%rbp), %rsi
callq 0x3d2d0
jmp 0x3e23f
leaq -0x310(%rbp), %rdi
callq 0x12d50
leaq -0x270(%rbp), %rdi
callq 0x15c40
jmp 0x3e6b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e6ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e6de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x64c8
jmp 0x3e6de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e2f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e2e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e2dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x15c40
leaq -0x2c0(%rbp), %rdi
callq 0x64c8
leaq -0x290(%rbp), %rdi
callq 0x15bd0
leaq -0x2a0(%rbp), %rdi
callq 0x12a00
jmp 0x3e6de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e386
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x12a00
jmp 0x3e386
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e360
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x15c40
leaq -0x2e0(%rbp), %rdi
callq 0x25da0
leaq -0x2f0(%rbp), %rdi
callq 0x12a00
jmp 0x3e386
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x12d50
leaq -0x270(%rbp), %rdi
callq 0x15c40
jmp 0x3e6de
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x350(%rbp), %rdi
callq 0x19d90
jmp 0x3e3b4
leaq -0x350(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x340(%rbp), %rdi
callq 0x2a740
jmp 0x3e3d1
leaq -0x340(%rbp), %rdi
callq 0x15bb0
movq %rax, -0x508(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x370(%rbp), %rdi
callq 0x19bf0
jmp 0x3e401
movq -0x508(%rbp), %rsi
leaq -0x330(%rbp), %rdi
leaq -0x370(%rbp), %rdx
callq 0x19f10
jmp 0x3e41d
leaq -0x330(%rbp), %rdi
callq 0x15c20
movq %rax, %rsi
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq -0x320(%rbp), %rdi
callq *%rax
jmp 0x3e43e
leaq -0x330(%rbp), %rdi
callq 0x15c40
leaq -0x370(%rbp), %rdi
callq 0x64c8
leaq -0x340(%rbp), %rdi
callq 0x15bd0
leaq -0x350(%rbp), %rdi
callq 0x12a00
leaq -0x320(%rbp), %rdi
callq 0x15c20
movq %rax, -0x510(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x380(%rbp), %rdi
callq 0x19d90
jmp 0x3e49e
movq -0x510(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x19d60
jmp 0x3e4b3
leaq -0x380(%rbp), %rdi
callq 0x12a00
leaq -0x240(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x3a0(%rbp), %rdi
callq 0x19d90
jmp 0x3e4dc
leaq -0x3a0(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x390(%rbp), %rdi
callq 0x2a710
jmp 0x3e4f9
leaq -0x390(%rbp), %rdi
callq 0x25d80
movq %rax, -0x520(%rbp)
leaq -0x3b0(%rbp), %rdi
movq %rdi, -0x518(%rbp)
leaq -0x320(%rbp), %rsi
callq 0x1a1f0
movq -0x520(%rbp), %rdi
movq -0x518(%rbp), %rsi
callq 0x1d380
jmp 0x3e53b
leaq -0x3b0(%rbp), %rdi
callq 0x15c40
leaq -0x390(%rbp), %rdi
callq 0x25da0
leaq -0x3a0(%rbp), %rdi
callq 0x12a00
leaq -0x230(%rbp), %rdi
callq 0x12af0
movq %rax, -0x530(%rbp)
leaq -0x3c0(%rbp), %rdi
movq %rdi, -0x528(%rbp)
leaq -0x240(%rbp), %rsi
callq 0x12c10
movq -0x530(%rbp), %rdi
movq -0x528(%rbp), %rsi
callq 0x3d2d0
jmp 0x3e5a1
leaq -0x3c0(%rbp), %rdi
callq 0x12d50
leaq -0x320(%rbp), %rdi
callq 0x15c40
jmp 0x3e6b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e618
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e60c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e600
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x15c40
leaq -0x370(%rbp), %rdi
callq 0x64c8
leaq -0x340(%rbp), %rdi
callq 0x15bd0
leaq -0x350(%rbp), %rdi
callq 0x12a00
jmp 0x3e6de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e6a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x12a00
jmp 0x3e6a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x15c40
leaq -0x390(%rbp), %rdi
callq 0x25da0
leaq -0x3a0(%rbp), %rdi
callq 0x12a00
jmp 0x3e6a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x12d50
leaq -0x320(%rbp), %rdi
callq 0x15c40
jmp 0x3e6de
movl $0x1, -0x3c4(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x12d50
leaq -0x230(%rbp), %rdi
callq 0x12b30
jmp 0x3eb8b
leaq -0x240(%rbp), %rdi
callq 0x12d50
leaq -0x230(%rbp), %rdi
callq 0x12b30
jmp 0x3eb99
movq -0x488(%rbp), %rdi
addq $0x8, %rdi
leaq 0x359c(%rip), %rsi      # 0x41ca9
callq 0x12920
movb %al, -0x531(%rbp)
jmp 0x3e71a
movb -0x531(%rbp), %al
testb $0x1, %al
jne 0x3e729
jmp 0x3e90f
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x3d8(%rbp), %rdi
callq 0x2a6b0
jmp 0x3e743
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x3e8(%rbp), %rdi
callq 0x2a6e0
jmp 0x3e75d
leaq -0x3e8(%rbp), %rdi
callq 0x3ab30
movq %rax, -0x548(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x12af0
movq %rax, %rdi
callq 0x3d220
movq %rax, -0x540(%rbp)
jmp 0x3e78d
movq -0x540(%rbp), %rdi
movl -0x8c(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x12c80
movq %rax, %rsi
leaq -0x3f8(%rbp), %rdi
movq %rdi, -0x550(%rbp)
callq 0x12c10
movq -0x548(%rbp), %rdi
movq -0x550(%rbp), %rsi
callq 0x26f20
jmp 0x3e7cf
leaq -0x3f8(%rbp), %rdi
callq 0x12d50
leaq -0x3e8(%rbp), %rdi
callq 0x3a9d0
leaq -0x3d8(%rbp), %rdi
callq 0x12af0
movq %rax, %rdi
callq 0x3d220
movq %rax, -0x558(%rbp)
jmp 0x3e804
leaq -0x3d8(%rbp), %rdi
callq 0x12af0
movq %rax, %rdi
callq 0x3d220
movq %rax, -0x560(%rbp)
jmp 0x3e821
movq -0x560(%rbp), %rdi
callq 0x12b50
movq %rax, -0x418(%rbp)
movslq -0x8c(%rbp), %rsi
leaq -0x418(%rbp), %rdi
callq 0x275b0
movq %rax, -0x410(%rbp)
leaq -0x410(%rbp), %rdi
movl $0x1, %esi
callq 0x148e0
movq %rax, -0x408(%rbp)
leaq -0x400(%rbp), %rdi
leaq -0x408(%rbp), %rsi
callq 0x274b0
movq -0x558(%rbp), %rdi
movq -0x400(%rbp), %rsi
callq 0x27440
movq %rax, -0x568(%rbp)
jmp 0x3e895
movq -0x568(%rbp), %rax
movq %rax, -0x420(%rbp)
movl $0x1, -0x3c4(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x12b30
jmp 0x3eb8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e8fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3e8f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x12d50
leaq -0x3e8(%rbp), %rdi
callq 0x3a9d0
leaq -0x3d8(%rbp), %rdi
callq 0x12b30
jmp 0x3eb99
movq -0x488(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3398(%rip), %rsi      # 0x41cb9
callq 0x12920
movb %al, -0x569(%rbp)
jmp 0x3e92e
movb -0x569(%rbp), %al
testb $0x1, %al
jne 0x3e93d
jmp 0x3eb66
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x440(%rbp), %rdi
callq 0x2a6b0
jmp 0x3e957
leaq -0x440(%rbp), %rdi
callq 0x12af0
movq %rax, %rdi
callq 0x3d220
movq %rax, -0x578(%rbp)
jmp 0x3e974
movq -0x578(%rbp), %rdi
movl -0x8c(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x12c80
movq %rax, %rsi
leaq -0x430(%rbp), %rdi
movq %rdi, -0x580(%rbp)
callq 0x12c10
leaq -0x440(%rbp), %rdi
callq 0x12b30
movq -0x580(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x460(%rbp), %rdi
callq 0x19c20
jmp 0x3e9ca
leaq 0x2e03(%rip), %rsi      # 0x417d4
leaq -0x460(%rbp), %rdi
callq 0x12920
movb %al, -0x581(%rbp)
jmp 0x3e9e5
leaq -0x460(%rbp), %rdi
callq 0x64c8
movb -0x581(%rbp), %al
testb $0x1, %al
jne 0x3ea00
jmp 0x3eb18
leaq -0x430(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
movq (%rsi), %rax
movq 0x68(%rax), %rax
leaq -0x470(%rbp), %rdi
callq *%rax
jmp 0x3ea21
leaq -0x28(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x480(%rbp), %rdi
callq 0x2a6b0
jmp 0x3ea3b
leaq -0x480(%rbp), %rdi
callq 0x12af0
movq %rax, %rdi
callq 0x3d220
movq %rax, -0x590(%rbp)
jmp 0x3ea58
movq -0x590(%rbp), %rdi
movl -0x8c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x12c80
movq %rax, %rdi
leaq -0x470(%rbp), %rsi
callq 0x21670
leaq -0x480(%rbp), %rdi
callq 0x12b30
leaq -0x470(%rbp), %rdi
callq 0x12d50
jmp 0x3eb40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x12b30
jmp 0x3eb99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3eb58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x64c8
jmp 0x3eb58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3eb0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x480(%rbp), %rdi
callq 0x12b30
leaq -0x470(%rbp), %rdi
callq 0x12d50
jmp 0x3eb58
movl $0x4, %edi
callq 0x6160
movq %rax, %rdi
movl $0x12, (%rdi)
movq 0x15466(%rip), %rsi     # 0x53f98
xorl %eax, %eax
movl %eax, %edx
callq 0x6430
jmp 0x3ebd5
movl $0x1, -0x3c4(%rbp)
leaq -0x430(%rbp), %rdi
callq 0x12d50
jmp 0x3eb8b
leaq -0x430(%rbp), %rdi
callq 0x12d50
jmp 0x3eb99
movl $0x4, %edi
callq 0x6160
movq %rax, %rdi
movl $0xa, (%rdi)
movq 0x15418(%rip), %rsi     # 0x53f98
xorl %eax, %eax
movl %eax, %edx
callq 0x6430
jmp 0x3ebd5
leaq -0x210(%rbp), %rdi
callq 0x6150
jmp 0x3ebb1
leaq -0x210(%rbp), %rdi
callq 0x6150
jmp 0x3ebc3
movl $0x0, -0x3c4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x12a00
addq $0x590, %rsp            # imm = 0x590
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x12a00
movq -0x50(%rbp), %rdi
callq 0x6460
nopw %cs:(%rax,%rax)