// File: /workspace/github_cpp_makefile_star2_O2/BohangZhang[P]Sorcery-C-Project/player.cc
// Function: Player::testing_play(int)
void Player::testing_play(int i) { // call Game notify()
    if (getHand()->getHand().size() < i) throw 7; // Number; The card doesn't exist
    else {
        shared_ptr<Card> c = getHand()->getHand()[i - 1];
        string card_type = c->getType();
        if (card_type == "Enchantment") throw 8; // Number; Wrong command
        else if (card_type == "Spell") {
            c->action();
            getHand()->pop(i);
        } else if (card_type == "Ritual") {
            ritual = dynamic_pointer_cast<Ritual>(c);
            getHand()->pop(i);
            game->notifyRitual("REnter", ritual);
        } else {
            if (isSlotFull()) {
                throw 2;
            } else {
                shared_ptr<Minion> m = dynamic_pointer_cast<Minion>(c);
                getSlot()->push(m);
                getHand()->pop(i);
                game->notify("Enter", m);
            }
        }
        for (auto it = this->getSlot()->getSlot().begin(); it != this->getSlot()->getSlot().end(); ) {
            if ((*it)->ifDead()) {
                this->getGraveyard()->pushfirst((*it));
                this->getSlot()->pop((*it));
            } else {
                ++it;
            }
        }
        for (auto it = this->getGame()->getNoncurrent()->getSlot()->getSlot().begin(); 
             it != this->getGame()->getNoncurrent()->getSlot()->getSlot().end(); ) {
            if ((*it)->ifDead()) {
                this->getGame()->getNoncurrent()->getGraveyard()->pushfirst((*it));
                this->getGame()->getNoncurrent()->getSlot()->pop((*it));
            } else {
                ++it;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %esi, %ebp
movq %rdi, %r12
leaq 0x38(%rdi), %r14
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a83e
movq (%rbx), %rdi
callq 0x10e52
movq 0x8(%rax), %rbx
subq (%rax), %rbx
sarq $0x4, %rbx
movslq %ebp, %r15
leaq 0x40(%rsp), %rdi
callq 0x8ea0
cmpq %r15, %rbx
jb 0x1355c
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a83e
movq (%rbx), %rdi
callq 0x10e52
movq (%rax), %rax
shlq $0x4, %r15
leaq (%rax,%r15), %rsi
addq $-0x10, %rsi
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0xb86e
leaq 0x40(%rsp), %rdi
callq 0x8ea0
movq (%rbx), %rsi
leaq 0x38(%rsp), %rdi
callq 0xb3f4
leaq 0xb7cb(%rip), %rsi      # 0x1e7d4
leaq 0x38(%rsp), %rdi
callq 0x8dc3
testb %al, %al
jne 0x1357b
leaq 0xa828(%rip), %rsi      # 0x1d84a
leaq 0x38(%rsp), %rdi
callq 0x8dc3
testb %al, %al
je 0x1305a
movq 0x58(%rsp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a83e
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x10e84
jmp 0x13221
leaq 0xa7e2(%rip), %rsi      # 0x1d843
leaq 0x38(%rsp), %rdi
callq 0x8dc3
testb %al, %al
je 0x13129
leaq 0x8(%rsp), %r15
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0x1a757
leaq 0x68(%r12), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a8a6
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a83e
movq (%r15), %rdi
movl %ebp, %esi
callq 0x10e84
leaq 0x10(%rsp), %rdi
callq 0x8ea0
movq 0x88(%r12), %r14
leaq 0xb8e5(%rip), %rsi      # 0x1e9b7
leaq 0x108(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x8d88
leaq 0xd8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1078c
leaq 0x108(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x105e2
leaq 0xe0(%rsp), %rdi
callq 0x8ea0
leaq 0x108(%rsp), %rdi
callq 0x5378
jmp 0x1322b
movq %r12, %rdi
callq 0x12230
testb %al, %al
jne 0x13599
leaq 0x8(%rsp), %rbx
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x1a7ac
movq %r12, %r13
leaq 0x48(%r12), %rsi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x1a802
movq (%r15), %r15
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8f30
movq %r15, %rdi
movq %r12, %rsi
callq 0x1b320
leaq 0xd0(%rsp), %rdi
callq 0x8ea0
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a83e
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x10e84
leaq 0x20(%rsp), %rdi
callq 0x8ea0
movq %r13, %r12
movq 0x88(%r13), %rbx
leaq 0xb7dd(%rip), %rsi      # 0x1e9aa
leaq 0xe8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x8d88
leaq 0xb8(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x8f30
leaq 0xe8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xe740
leaq 0xc0(%rsp), %rdi
callq 0x8ea0
leaq 0xe8(%rsp), %rdi
callq 0x5378
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x48(%r12), %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a802
movq (%r14), %rdi
callq 0x1b2e2
movq (%rax), %r15
leaq 0x10(%rsp), %rdi
callq 0x8ea0
movq %r12, 0x68(%rsp)
leaq 0x58(%r12), %rax
movq %rax, 0x70(%rsp)
leaq 0x8(%rsp), %rbp
leaq 0xa8(%rsp), %r14
leaq 0x98(%rsp), %r12
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1a802
movq 0x8(%rsp), %rdi
callq 0x1b2e2
movq 0x8(%rax), %r13
leaq 0x10(%rsp), %rdi
callq 0x8ea0
cmpq %r13, %r15
je 0x13343
movq (%r15), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x1333a
movq %rbp, %rdi
movq 0x70(%rsp), %rsi
callq 0x1a816
movq 0x8(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x8f30
movq %r13, %rdi
movq %r14, %rsi
callq 0x10b26
leaq 0xb0(%rsp), %rdi
callq 0x8ea0
leaq 0x10(%rsp), %rdi
callq 0x8ea0
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1a802
movq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x8f30
movq %r13, %rdi
movq %r12, %rsi
callq 0x1b326
leaq 0xa0(%rsp), %rdi
callq 0x8ea0
leaq 0x10(%rsp), %rdi
callq 0x8ea0
jmp 0x13279
addq $0x10, %r15
jmp 0x13279
movq 0x68(%rsp), %r12
addq $0x88, %r12
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8f1c
movq (%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0xe57c
movq 0x18(%rsp), %rsi
addq $0x48, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1a802
movq (%rbx), %rdi
callq 0x1b2e2
movq (%rax), %r13
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x30(%rsp), %rdi
callq 0x8ea0
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %rbp
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f1c
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0xe57c
movq %r12, %rbx
movq 0x18(%rsp), %rsi
addq $0x48, %rsi
movq %rbp, %rdi
callq 0x1a802
movq 0x8(%rsp), %rdi
callq 0x1b2e2
movq 0x8(%rax), %r12
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x30(%rsp), %rdi
callq 0x8ea0
cmpq %r12, %r13
je 0x13536
movq (%r13), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
movq %rbx, %r12
testb %al, %al
je 0x1352d
movq %r14, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f1c
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0xe57c
movq 0x18(%rsp), %rsi
addq $0x58, %rsi
movq %rbp, %rdi
callq 0x1a816
movq 0x8(%rsp), %r12
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x8f30
movq %r12, %rdi
movq %r14, %rsi
callq 0x10b26
leaq 0x90(%rsp), %rdi
callq 0x8ea0
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x30(%rsp), %rdi
callq 0x8ea0
movq %r15, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8f1c
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0xe57c
movq 0x18(%rsp), %rsi
addq $0x48, %rsi
movq %rbp, %rdi
callq 0x1a802
movq 0x8(%rsp), %r12
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x8f30
movq %r12, %rdi
movq %r15, %rsi
callq 0x1b326
leaq 0x80(%rsp), %rdi
callq 0x8ea0
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x30(%rsp), %rdi
callq 0x8ea0
movq %rbx, %r12
jmp 0x133b5
addq $0x10, %r13
jmp 0x133b5
leaq 0x38(%rsp), %rdi
callq 0x5378
leaq 0x60(%rsp), %rdi
callq 0x8ea0
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x5120
movl $0x7, (%rax)
movq 0x17a2f(%rip), %rsi     # 0x2afa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x5310
pushq $0x8
popq %rbx
pushq $0x4
popq %rdi
callq 0x5120
movl %ebx, (%rax)
movq 0x17a11(%rip), %rsi     # 0x2afa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x5310
pushq $0x2
jmp 0x1357d
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x8ea0
leaq 0xe8(%rsp), %rdi
callq 0x5378
jmp 0x136a2
jmp 0x1369f
movq %rax, %rbx
jmp 0x135d9
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x8ea0
leaq 0x20(%rsp), %rdi
jmp 0x1366e
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x8ea0
leaq 0x108(%rsp), %rdi
callq 0x5378
jmp 0x136ac
jmp 0x13677
jmp 0x1369f
jmp 0x1369f
jmp 0x13681
jmp 0x1367c
jmp 0x1369f
movq %rax, %rbx
jmp 0x136b6
jmp 0x13624
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x136bb
jmp 0x13677
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x1364d
jmp 0x1367c
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x8ea0
jmp 0x13684
jmp 0x1367c
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
jmp 0x1366e
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x8ea0
jmp 0x136a2
jmp 0x13677
movq %rax, %rbx
jmp 0x136ac
movq %rax, %rbx
jmp 0x13698
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x30(%rsp), %rdi
jmp 0x136a7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x38(%rsp), %rdi
callq 0x5378
leaq 0x60(%rsp), %rdi
callq 0x8ea0
movq %rbx, %rdi
callq 0x5330