// File: /workspace/github_cpp_makefile_star2_O3/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 $0xf8, %rsp
movl %esi, %ebp
movq %rdi, %r14
movq 0x38(%rdi), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x18e98
movq 0x1a136(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x18e94
incl 0x8(%rbx)
jmp 0x18e98
lock
incl 0x8(%rbx)
callq 0x15f86
movq 0x8(%rax), %r12
subq (%rax), %r12
sarq $0x4, %r12
movslq %ebp, %r15
testq %rbx, %rbx
je 0x18eb8
movq %rbx, %rdi
callq 0xb478
cmpq %r15, %r12
jb 0x1973d
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x18ee3
movq 0x1a0eb(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x18edf
incl 0x8(%rbx)
jmp 0x18ee3
lock
incl 0x8(%rbx)
callq 0x15f86
movq (%rax), %rax
shlq $0x4, %r15
movq -0x10(%rax,%r15), %r12
movq -0x8(%rax,%r15), %r15
testq %r15, %r15
je 0x18f15
movq 0x1a0bb(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x18f10
incl 0x8(%r15)
jmp 0x18f15
lock
incl 0x8(%r15)
testq %rbx, %rbx
je 0x18f22
movq %rbx, %rdi
callq 0xb478
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0xe5f6
leaq 0xe939(%rip), %rsi      # 0x27872
leaq 0x98(%rsp), %rdi
callq 0x50a0
testl %eax, %eax
movq %r15, 0x8(%rsp)
je 0x1975e
leaq 0xd98e(%rip), %rsi      # 0x268e8
leaq 0x98(%rsp), %rdi
callq 0x50a0
testl %eax, %eax
je 0x18fe8
leaq 0xd96f(%rip), %rsi      # 0x268e1
leaq 0x98(%rsp), %rdi
callq 0x50a0
testl %eax, %eax
je 0x19010
movq 0x48(%r14), %rdi
callq 0x243e6
testb %al, %al
jne 0x19765
testq %r15, %r15
sete %bl
leaq 0x1910b(%rip), %rsi     # 0x320b0
leaq 0x199ec(%rip), %rdx     # 0x32998
xorl %r15d, %r15d
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x5220
movq %rax, %r12
testq %rax, %rax
sete %al
orb %bl, %al
jne 0x19083
movq 0x19fef(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x19079
movq 0x8(%rsp), %r15
incl 0x8(%r15)
jmp 0x19083
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x19061
movq 0x19fba(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1905d
incl 0x8(%rbx)
jmp 0x19061
testq %r15, %r15
sete %r15b
leaq 0x19092(%rip), %rsi     # 0x320b0
leaq 0x19b8b(%rip), %rdx     # 0x32bb0
xorl %ebx, %ebx
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x5220
testq %rax, %rax
sete %cl
orb %r15b, %cl
jne 0x191e3
movq 0x19f79(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0x191da
movq 0x8(%rsp), %rbx
incl 0x8(%rbx)
jmp 0x191e3
lock
incl 0x8(%rbx)
movl %ebp, %esi
callq 0x15fb8
testq %rbx, %rbx
je 0x192d6
movq %rbx, %rdi
jmp 0x191d0
movq 0x8(%rsp), %r15
lock
incl 0x8(%r15)
movq 0x48(%r14), %rdi
movq 0x50(%r14), %r13
testq %r13, %r13
je 0x190a7
movq 0x19f29(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x190a2
incl 0x8(%r13)
jmp 0x190a7
lock
incl 0x8(%r13)
movq %r12, 0x78(%rsp)
movq %r15, 0x80(%rsp)
testq %r15, %r15
je 0x190d0
movq 0x19f00(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x190cb
incl 0x8(%r15)
jmp 0x190d0
lock
incl 0x8(%r15)
leaq 0x78(%rsp), %rsi
callq 0x24414
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x190ec
callq 0xb478
testq %r13, %r13
je 0x190f9
movq %r13, %rdi
callq 0xb478
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x1911b
movq 0x19eb3(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x19117
incl 0x8(%rbx)
jmp 0x1911b
lock
incl 0x8(%rbx)
movl %ebp, %esi
callq 0x15fb8
testq %rbx, %rbx
je 0x1912f
movq %rbx, %rdi
callq 0xb478
movq 0x88(%r14), %rbx
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xe919(%rip), %rsi      # 0x27a62
leaq 0xe917(%rip), %rdx      # 0x27a67
leaq 0xb8(%rsp), %rdi
callq 0xb57e
movq %r12, 0x68(%rsp)
movq %r15, 0x70(%rsp)
testq %r15, %r15
je 0x19183
movq 0x19e4d(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1917e
incl 0x8(%r15)
jmp 0x19183
lock
incl 0x8(%r15)
leaq 0xb8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x120a0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x191a7
callq 0xb478
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x191c4
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
testq %r15, %r15
je 0x192d6
movq %r15, %rdi
callq 0xb478
jmp 0x192d6
movq 0x8(%rsp), %rbx
lock
incl 0x8(%rbx)
movq %rax, 0x68(%r14)
movq 0x70(%r14), %rdi
movq %rbx, 0x70(%r14)
testq %rdi, %rdi
je 0x191f9
callq 0xb478
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x1921b
movq 0x19db3(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x19217
incl 0x8(%rbx)
jmp 0x1921b
lock
incl 0x8(%rbx)
movl %ebp, %esi
callq 0x15fb8
testq %rbx, %rbx
je 0x1922f
movq %rbx, %rdi
callq 0xb478
movq 0x88(%r14), %rbx
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe826(%rip), %rsi      # 0x27a6f
leaq 0xe825(%rip), %rdx      # 0x27a75
leaq 0xd8(%rsp), %rdi
callq 0xb57e
movq 0x68(%r14), %rax
movq %rax, 0x88(%rsp)
movq 0x70(%r14), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x1928f
movq 0x19d3f(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0x1928b
incl 0x8(%rax)
jmp 0x1928f
lock
incl 0x8(%rax)
leaq 0xd8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x155e8
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x192b9
callq 0xb478
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x192d6
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x48(%r14), %rdi
movq 0x50(%r14), %rbx
testq %rbx, %rbx
je 0x192f8
movq 0x19cd6(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x192f4
incl 0x8(%rbx)
jmp 0x192f8
lock
incl 0x8(%rbx)
callq 0x243d6
movq (%rax), %r15
testq %rbx, %rbx
je 0x1930d
movq %rbx, %rdi
callq 0xb478
leaq 0x48(%rsp), %rbp
movq 0x19ca7(%rip), %r12     # 0x32fc0
movq 0x48(%r14), %rdi
movq 0x50(%r14), %rbx
testq %rbx, %rbx
je 0x19336
cmpb $0x0, (%r12)
je 0x19332
incl 0x8(%rbx)
jmp 0x19336
lock
incl 0x8(%rbx)
callq 0x243d6
movq 0x8(%rax), %r13
testq %rbx, %rbx
je 0x1934c
movq %rbx, %rdi
callq 0xb478
cmpq %r13, %r15
je 0x1944f
movq (%r15), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x19446
movq 0x58(%r14), %rdi
movq 0x60(%r14), %r13
testq %r13, %r13
je 0x19388
cmpb $0x0, (%r12)
je 0x19383
incl 0x8(%r13)
jmp 0x19388
lock
incl 0x8(%r13)
movq (%r15), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x193ae
cmpb $0x0, (%r12)
je 0x193aa
incl 0x8(%rax)
jmp 0x193ae
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
callq 0x15b74
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x193c7
callq 0xb478
testq %r13, %r13
je 0x193d4
movq %r13, %rdi
callq 0xb478
movq 0x48(%r14), %rdi
movq 0x50(%r14), %r13
testq %r13, %r13
je 0x193f3
cmpb $0x0, (%r12)
je 0x193ee
incl 0x8(%r13)
jmp 0x193f3
lock
incl 0x8(%r13)
movq (%r15), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x19419
cmpb $0x0, (%r12)
je 0x19415
incl 0x8(%rax)
jmp 0x19419
lock
incl 0x8(%rax)
movq %rbp, %rsi
callq 0x2441a
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x19430
callq 0xb478
testq %r13, %r13
je 0x19319
movq %r13, %rdi
callq 0xb478
jmp 0x19319
addq $0x10, %r15
jmp 0x19319
movq 0x88(%r14), %rsi
movq 0x90(%r14), %r15
testq %r15, %r15
je 0x19474
cmpb $0x0, (%r12)
je 0x1946f
incl 0x8(%r15)
jmp 0x19474
lock
incl 0x8(%r15)
leaq 0x10(%rsp), %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x194a0
cmpb $0x0, (%r12)
je 0x1949c
incl 0x8(%rbx)
jmp 0x194a0
lock
incl 0x8(%rbx)
callq 0x243d6
movq (%rax), %r13
testq %rbx, %rbx
je 0x194b5
movq %rbx, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x194c4
callq 0xb478
testq %r15, %r15
je 0x194d1
movq %r15, %rdi
callq 0xb478
leaq 0x10(%rsp), %r15
movq 0x88(%r14), %rsi
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x194f9
cmpb $0x0, (%r12)
je 0x194f5
incl 0x8(%rax)
jmp 0x194f9
lock
incl 0x8(%rax)
movq %rax, 0x20(%rsp)
movq %r15, %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x19528
cmpb $0x0, (%r12)
je 0x19524
incl 0x8(%rbx)
jmp 0x19528
lock
incl 0x8(%rbx)
callq 0x243d6
movq 0x8(%rax), %rbp
testq %rbx, %rbx
je 0x1953e
movq %rbx, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1954d
callq 0xb478
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1955c
callq 0xb478
cmpq %rbp, %r13
je 0x196f8
movq (%r13), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x196ef
movq 0x88(%r14), %rsi
movq 0x90(%r14), %rbp
testq %rbp, %rbp
je 0x1959d
cmpb $0x0, (%r12)
je 0x19599
incl 0x8(%rbp)
jmp 0x1959d
lock
incl 0x8(%rbp)
movq %r15, %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x60(%rax), %rbx
testq %rbx, %rbx
je 0x195c7
cmpb $0x0, (%r12)
je 0x195c3
incl 0x8(%rbx)
jmp 0x195c7
lock
incl 0x8(%rbx)
movq (%r13), %rax
movq %rax, 0x38(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x195ee
cmpb $0x0, (%r12)
je 0x195ea
incl 0x8(%rax)
jmp 0x195ee
lock
incl 0x8(%rax)
leaq 0x38(%rsp), %rsi
callq 0x15b74
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x19607
callq 0xb478
testq %rbx, %rbx
je 0x19614
movq %rbx, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x19623
callq 0xb478
testq %rbp, %rbp
je 0x19630
movq %rbp, %rdi
callq 0xb478
movq 0x88(%r14), %rsi
movq 0x90(%r14), %rbp
testq %rbp, %rbp
je 0x19653
cmpb $0x0, (%r12)
je 0x1964f
incl 0x8(%rbp)
jmp 0x19653
lock
incl 0x8(%rbp)
movq %r15, %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x1967d
cmpb $0x0, (%r12)
je 0x19679
incl 0x8(%rbx)
jmp 0x1967d
lock
incl 0x8(%rbx)
movq (%r13), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x196a4
cmpb $0x0, (%r12)
je 0x196a0
incl 0x8(%rax)
jmp 0x196a4
lock
incl 0x8(%rax)
leaq 0x28(%rsp), %rsi
callq 0x2441a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x196bd
callq 0xb478
testq %rbx, %rbx
je 0x196ca
movq %rbx, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x196d9
callq 0xb478
testq %rbp, %rbp
je 0x194d6
movq %rbp, %rdi
callq 0xb478
jmp 0x194d6
addq $0x10, %r13
jmp 0x194d6
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x8(%rsp), %rbx
je 0x1971e
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x51f0
testq %rbx, %rbx
je 0x1972b
movq %rbx, %rdi
callq 0xb478
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x5100
movl $0x7, (%rax)
movq 0x1983c(%rip), %rsi     # 0x32f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
movl $0x8, %ebx
jmp 0x1976a
movl $0x2, %ebx
movl $0x4, %edi
callq 0x5100
movl %ebx, (%rax)
movq 0x19813(%rip), %rsi     # 0x32f90
movq %rax, %rdi
xorl %edx, %edx
movq 0x8(%rsp), %r15
callq 0x5300
movq %rax, %r14
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x197a1
callq 0xb478
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1994e
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x1994e
jmp 0x19906
jmp 0x1993e
jmp 0x1993e
movq %rax, %r14
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x197e8
callq 0xb478
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x19859
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x19859
jmp 0x19856
movq %rax, %r14
testq %rbx, %rbx
je 0x19859
movq %rbx, %rdi
jmp 0x1984f
movq %rax, %r14
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1982b
callq 0xb478
testq %r13, %r13
je 0x19859
movq %r13, %rdi
jmp 0x1984f
movq %rax, %r14
testq %rbx, %rbx
je 0x19845
movq %rbx, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x19859
callq 0xb478
jmp 0x19859
movq %rax, %r14
testq %r15, %r15
je 0x1994e
movq %r15, %rdi
jmp 0x19949
jmp 0x1993e
movq %rax, %r14
jmp 0x19974
jmp 0x19879
movq %rax, %r14
testq %rbx, %rbx
je 0x19981
movq %rbx, %rdi
jmp 0x1997c
movq %rax, %r14
jmp 0x19953
movq %rax, %r14
movq 0x30(%rsp), %rdi
jmp 0x198a9
jmp 0x198d1
movq %rax, %r14
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x198b3
callq 0xb478
testq %rbx, %rbx
je 0x198c0
movq %rbx, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x198d4
callq 0xb478
jmp 0x198d4
movq %rax, %r14
testq %rbp, %rbp
je 0x1994e
movq %rbp, %rdi
jmp 0x19949
movq %rax, %r14
movq 0x50(%rsp), %rdi
jmp 0x198f0
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x198fa
callq 0xb478
testq %r13, %r13
je 0x1994e
movq %r13, %rdi
jmp 0x19949
jmp 0x19906
movq %rax, %r14
jmp 0x1994e
movq %rax, %r14
jmp 0x1992f
movq %rax, %r14
testq %rbx, %rbx
je 0x19920
movq %rbx, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1992f
callq 0xb478
cmpq $0x0, 0x20(%rsp)
je 0x1994e
movq 0x20(%rsp), %rdi
jmp 0x19949
movq %rax, %r14
testq %rbx, %rbx
je 0x1994e
movq %rbx, %rdi
callq 0xb478
movq 0x8(%rsp), %r15
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19974
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x51f0
testq %r15, %r15
je 0x19981
movq %r15, %rdi
callq 0xb478
movq %r14, %rdi
callq 0x5320
nop