// File: /workspace/github_cpp_makefile_star2_O1/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), %r15
testq %r15, %r15
je 0x18ff4
movq 0x1afdc(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x18fef
incl 0x8(%r15)
jmp 0x18ff4
lock
incl 0x8(%r15)
callq 0x16056
movq 0x8(%rax), %rbx
subq (%rax), %rbx
sarq $0x4, %rbx
movslq %ebp, %r12
testq %r15, %r15
je 0x19014
movq %r15, %rdi
callq 0xb634
cmpq %r12, %rbx
jb 0x198b3
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x1903f
movq 0x1af8f(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1903b
incl 0x8(%rbx)
jmp 0x1903f
lock
incl 0x8(%rbx)
callq 0x16056
movq (%rax), %rax
shlq $0x4, %r12
movq -0x10(%rax,%r12), %r15
movq -0x8(%rax,%r12), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x1907e
movq 0x1af5a(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x19075
movq 0x8(%rsp), %rax
incl 0x8(%rax)
jmp 0x1907e
movq 0x8(%rsp), %rax
lock
incl 0x8(%rax)
testq %rbx, %rbx
je 0x1908b
movq %rbx, %rdi
callq 0xb634
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0xe816
leaq 0xf7d0(%rip), %rsi      # 0x28872
leaq 0x98(%rsp), %rdi
callq 0x50a0
testl %eax, %eax
je 0x198d4
leaq 0xe82a(%rip), %rsi      # 0x278e8
leaq 0x98(%rsp), %rdi
callq 0x50a0
testl %eax, %eax
je 0x19159
leaq 0xe807(%rip), %rsi      # 0x278e1
leaq 0x98(%rsp), %rdi
callq 0x50a0
testl %eax, %eax
je 0x19180
movq 0x48(%r14), %rdi
callq 0x24716
testb %al, %al
jne 0x198db
movq 0x8(%rsp), %r13
testq %r13, %r13
sete %bl
leaq 0x19f9e(%rip), %rsi     # 0x330b0
leaq 0x1a87f(%rip), %rdx     # 0x33998
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x5220
movq %rax, %r12
testq %rax, %rax
sete %al
movq %r13, %r15
cmoveq %r12, %r15
orb %bl, %al
jne 0x191fa
movq 0x1ae7e(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x191f0
movq 0x8(%rsp), %r15
incl 0x8(%r15)
jmp 0x191fa
movq (%r15), %rax
movq %r15, %rdi
callq *0x40(%rax)
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x191d8
movq 0x1ae4a(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x191d4
incl 0x8(%rbx)
jmp 0x191d8
movq 0x8(%rsp), %rax
testq %rax, %rax
sete %bl
leaq 0x19f1e(%rip), %rsi     # 0x330b0
leaq 0x1aa17(%rip), %rdx     # 0x33bb0
movq %r15, %rdi
movq %rax, %r15
xorl %ecx, %ecx
callq 0x5220
testq %rax, %rax
sete %dl
movq %rax, %rcx
cmovneq %r15, %rcx
orb %bl, %dl
jne 0x19359
movq 0x1adfe(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0x19351
incl 0x8(%r15)
jmp 0x19356
lock
incl 0x8(%rbx)
movl %ebp, %esi
callq 0x16088
testq %rbx, %rbx
je 0x1944c
movq %rbx, %rdi
jmp 0x19347
movq 0x8(%rsp), %r15
lock
incl 0x8(%r15)
movq 0x48(%r14), %rdi
movq 0x50(%r14), %r13
testq %r13, %r13
je 0x1921e
movq 0x1adb2(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x19219
incl 0x8(%r13)
jmp 0x1921e
lock
incl 0x8(%r13)
movq %r12, 0x78(%rsp)
movq %r15, 0x80(%rsp)
testq %r15, %r15
je 0x19247
movq 0x1ad89(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x19242
incl 0x8(%r15)
jmp 0x19247
lock
incl 0x8(%r15)
leaq 0x78(%rsp), %rsi
callq 0x24744
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x19263
callq 0xb634
testq %r13, %r13
je 0x19270
movq %r13, %rdi
callq 0xb634
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x19292
movq 0x1ad3c(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1928e
incl 0x8(%rbx)
jmp 0x19292
lock
incl 0x8(%rbx)
movl %ebp, %esi
callq 0x16088
testq %rbx, %rbx
je 0x192a6
movq %rbx, %rdi
callq 0xb634
movq 0x88(%r14), %rbx
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xf7a2(%rip), %rsi      # 0x28a62
leaq 0xf7a0(%rip), %rdx      # 0x28a67
leaq 0xb8(%rsp), %rdi
callq 0xb734
movq %r12, 0x68(%rsp)
movq %r15, 0x70(%rsp)
testq %r15, %r15
je 0x192fa
movq 0x1acd6(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x192f5
incl 0x8(%r15)
jmp 0x192fa
lock
incl 0x8(%r15)
leaq 0xb8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x12304
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1931e
callq 0xb634
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1933b
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
testq %r15, %r15
je 0x1944c
movq %r15, %rdi
callq 0xb634
jmp 0x1944c
lock
incl 0x8(%r15)
movq %r15, %rcx
movq %rax, 0x68(%r14)
movq 0x70(%r14), %rdi
movq %rcx, 0x70(%r14)
testq %rdi, %rdi
je 0x1936f
callq 0xb634
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x19391
movq 0x1ac3d(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1938d
incl 0x8(%rbx)
jmp 0x19391
lock
incl 0x8(%rbx)
movl %ebp, %esi
callq 0x16088
testq %rbx, %rbx
je 0x193a5
movq %rbx, %rdi
callq 0xb634
movq 0x88(%r14), %rbx
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf6b0(%rip), %rsi      # 0x28a6f
leaq 0xf6af(%rip), %rdx      # 0x28a75
leaq 0xd8(%rsp), %rdi
callq 0xb734
movq 0x68(%r14), %rax
movq %rax, 0x88(%rsp)
movq 0x70(%r14), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x19405
movq 0x1abc9(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0x19401
incl 0x8(%rax)
jmp 0x19405
lock
incl 0x8(%rax)
leaq 0xd8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x156c2
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x1942f
callq 0xb634
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1944c
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x48(%r14), %rdi
movq 0x50(%r14), %rbx
testq %rbx, %rbx
je 0x1946e
movq 0x1ab60(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1946a
incl 0x8(%rbx)
jmp 0x1946e
lock
incl 0x8(%rbx)
callq 0x24706
movq (%rax), %r15
testq %rbx, %rbx
je 0x19483
movq %rbx, %rdi
callq 0xb634
leaq 0x48(%rsp), %rbp
movq 0x1ab31(%rip), %r12     # 0x33fc0
movq 0x48(%r14), %rdi
movq 0x50(%r14), %rbx
testq %rbx, %rbx
je 0x194ac
cmpb $0x0, (%r12)
je 0x194a8
incl 0x8(%rbx)
jmp 0x194ac
lock
incl 0x8(%rbx)
callq 0x24706
movq 0x8(%rax), %r13
testq %rbx, %rbx
je 0x194c2
movq %rbx, %rdi
callq 0xb634
cmpq %r13, %r15
je 0x195c5
movq (%r15), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x195bc
movq 0x58(%r14), %rdi
movq 0x60(%r14), %r13
testq %r13, %r13
je 0x194fe
cmpb $0x0, (%r12)
je 0x194f9
incl 0x8(%r13)
jmp 0x194fe
lock
incl 0x8(%r13)
movq (%r15), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x19524
cmpb $0x0, (%r12)
je 0x19520
incl 0x8(%rax)
jmp 0x19524
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
callq 0x15c44
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1953d
callq 0xb634
testq %r13, %r13
je 0x1954a
movq %r13, %rdi
callq 0xb634
movq 0x48(%r14), %rdi
movq 0x50(%r14), %r13
testq %r13, %r13
je 0x19569
cmpb $0x0, (%r12)
je 0x19564
incl 0x8(%r13)
jmp 0x19569
lock
incl 0x8(%r13)
movq (%r15), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x1958f
cmpb $0x0, (%r12)
je 0x1958b
incl 0x8(%rax)
jmp 0x1958f
lock
incl 0x8(%rax)
movq %rbp, %rsi
callq 0x2474a
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x195a6
callq 0xb634
testq %r13, %r13
je 0x1948f
movq %r13, %rdi
callq 0xb634
jmp 0x1948f
addq $0x10, %r15
jmp 0x1948f
movq 0x88(%r14), %rsi
movq 0x90(%r14), %r15
testq %r15, %r15
je 0x195ea
cmpb $0x0, (%r12)
je 0x195e5
incl 0x8(%r15)
jmp 0x195ea
lock
incl 0x8(%r15)
leaq 0x10(%rsp), %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x19616
cmpb $0x0, (%r12)
je 0x19612
incl 0x8(%rbx)
jmp 0x19616
lock
incl 0x8(%rbx)
callq 0x24706
movq (%rax), %r13
testq %rbx, %rbx
je 0x1962b
movq %rbx, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1963a
callq 0xb634
testq %r15, %r15
je 0x19647
movq %r15, %rdi
callq 0xb634
leaq 0x10(%rsp), %r15
movq 0x88(%r14), %rsi
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x1966f
cmpb $0x0, (%r12)
je 0x1966b
incl 0x8(%rax)
jmp 0x1966f
lock
incl 0x8(%rax)
movq %rax, 0x20(%rsp)
movq %r15, %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x1969e
cmpb $0x0, (%r12)
je 0x1969a
incl 0x8(%rbx)
jmp 0x1969e
lock
incl 0x8(%rbx)
callq 0x24706
movq 0x8(%rax), %rbp
testq %rbx, %rbx
je 0x196b4
movq %rbx, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x196c3
callq 0xb634
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x196d2
callq 0xb634
cmpq %rbp, %r13
je 0x1986e
movq (%r13), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x19865
movq 0x88(%r14), %rsi
movq 0x90(%r14), %rbp
testq %rbp, %rbp
je 0x19713
cmpb $0x0, (%r12)
je 0x1970f
incl 0x8(%rbp)
jmp 0x19713
lock
incl 0x8(%rbp)
movq %r15, %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x60(%rax), %rbx
testq %rbx, %rbx
je 0x1973d
cmpb $0x0, (%r12)
je 0x19739
incl 0x8(%rbx)
jmp 0x1973d
lock
incl 0x8(%rbx)
movq (%r13), %rax
movq %rax, 0x38(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x19764
cmpb $0x0, (%r12)
je 0x19760
incl 0x8(%rax)
jmp 0x19764
lock
incl 0x8(%rax)
leaq 0x38(%rsp), %rsi
callq 0x15c44
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1977d
callq 0xb634
testq %rbx, %rbx
je 0x1978a
movq %rbx, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x19799
callq 0xb634
testq %rbp, %rbp
je 0x197a6
movq %rbp, %rdi
callq 0xb634
movq 0x88(%r14), %rsi
movq 0x90(%r14), %rbp
testq %rbp, %rbp
je 0x197c9
cmpb $0x0, (%r12)
je 0x197c5
incl 0x8(%rbp)
jmp 0x197c9
lock
incl 0x8(%rbp)
movq %r15, %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x197f3
cmpb $0x0, (%r12)
je 0x197ef
incl 0x8(%rbx)
jmp 0x197f3
lock
incl 0x8(%rbx)
movq (%r13), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x1981a
cmpb $0x0, (%r12)
je 0x19816
incl 0x8(%rax)
jmp 0x1981a
lock
incl 0x8(%rax)
leaq 0x28(%rsp), %rsi
callq 0x2474a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x19833
callq 0xb634
testq %rbx, %rbx
je 0x19840
movq %rbx, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1984f
callq 0xb634
testq %rbp, %rbp
je 0x1964c
movq %rbp, %rdi
callq 0xb634
jmp 0x1964c
addq $0x10, %r13
jmp 0x1964c
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x8(%rsp), %rbx
je 0x19894
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x51f0
testq %rbx, %rbx
je 0x198a1
movq %rbx, %rdi
callq 0xb634
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 0x1a6c6(%rip), %rsi     # 0x33f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
movl $0x8, %ebx
jmp 0x198e0
movl $0x2, %ebx
movl $0x4, %edi
callq 0x5100
movl %ebx, (%rax)
movq 0x1a69d(%rip), %rsi     # 0x33f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
movq %rax, %r14
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x19912
callq 0xb634
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x19ac4
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x19ac4
jmp 0x19a7c
jmp 0x19ab4
jmp 0x19ab4
movq %rax, %r14
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x19959
callq 0xb634
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x199ca
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x199ca
jmp 0x199c7
movq %rax, %r14
testq %rbx, %rbx
je 0x199ca
movq %rbx, %rdi
jmp 0x199c0
movq %rax, %r14
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1999c
callq 0xb634
testq %r13, %r13
je 0x199ca
movq %r13, %rdi
jmp 0x199c0
movq %rax, %r14
testq %rbx, %rbx
je 0x199b6
movq %rbx, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x199ca
callq 0xb634
jmp 0x199ca
movq %rax, %r14
testq %r15, %r15
je 0x19ac4
movq %r15, %rdi
jmp 0x19abf
jmp 0x19ab4
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x19aea
movq %rax, %r14
movq %rbx, %r15
testq %rbx, %rbx
jne 0x19aef
jmp 0x19af7
movq %rax, %r14
jmp 0x19aea
jmp 0x19a7c
movq %rax, %r14
movq 0x30(%rsp), %rdi
jmp 0x19a1f
jmp 0x19a47
movq %rax, %r14
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x19a29
callq 0xb634
testq %rbx, %rbx
je 0x19a36
movq %rbx, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x19a4a
callq 0xb634
jmp 0x19a4a
movq %rax, %r14
testq %rbp, %rbp
je 0x19ac4
movq %rbp, %rdi
jmp 0x19abf
movq %rax, %r14
movq 0x50(%rsp), %rdi
jmp 0x19a66
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x19a70
callq 0xb634
testq %r13, %r13
je 0x19ac4
movq %r13, %rdi
jmp 0x19abf
jmp 0x19a7c
movq %rax, %r14
jmp 0x19ac4
movq %rax, %r14
jmp 0x19aa5
movq %rax, %r14
testq %rbx, %rbx
je 0x19a96
movq %rbx, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x19aa5
callq 0xb634
cmpq $0x0, 0x20(%rsp)
je 0x19ac4
movq 0x20(%rsp), %rdi
jmp 0x19abf
movq %rax, %r14
testq %rbx, %rbx
je 0x19ac4
movq %rbx, %rdi
callq 0xb634
movq 0x8(%rsp), %r15
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19aea
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x51f0
testq %r15, %r15
je 0x19af7
movq %r15, %rdi
callq 0xb634
movq %r14, %rdi
callq 0x5320
nop