// File: /workspace/github_cpp_makefile_star2_O1/BohangZhang[P]Sorcery-C-Project/player.cc
// Function: Player::attack(int, int)
void Player::attack(int i, int j) {
    shared_ptr<Player> nonCurrent = getGame()->getNoncurrent();
    if (getSlot()->getSize() < i) throw 11; // Number; The Minion doesn't exist
    if (nonCurrent->getSlot()->getSize() < j) throw 3; // Number; The opponent doesn't exist  
    shared_ptr<Minion> m1 = getSlot()->getSlot()[i - 1];
    shared_ptr<Minion> m2 = nonCurrent->getSlot()->getSlot()[j - 1];
    m1->attackMinion(j - 1);
    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 $0x78, %rsp
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r15
movq 0x88(%rdi), %rsi
movq 0x90(%rdi), %r14
testq %r14, %r14
je 0x1acd1
movq 0x192ff(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1accc
incl 0x8(%r14)
jmp 0x1acd1
lock
incl 0x8(%r14)
leaq 0x68(%rsp), %rdi
callq 0x1206a
testq %r14, %r14
je 0x1ace8
movq %r14, %rdi
callq 0xb634
movq 0x48(%r15), %rdi
movq 0x50(%r15), %r14
testq %r14, %r14
je 0x1ad0c
movq 0x192c4(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1ad07
incl 0x8(%r14)
jmp 0x1ad0c
lock
incl 0x8(%r14)
callq 0x2470a
movl %eax, %r12d
testq %r14, %r14
je 0x1ad21
movq %r14, %rdi
callq 0xb634
cmpl %ebx, %r12d
jl 0x1b2a8
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1ad53
movq 0x1927d(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1ad4e
incl 0x8(%r14)
jmp 0x1ad53
lock
incl 0x8(%r14)
callq 0x2470a
movl %eax, %r12d
testq %r14, %r14
je 0x1ad68
movq %r14, %rdi
callq 0xb634
cmpl %ebp, %r12d
jl 0x1b2af
movq 0x48(%r15), %rdi
movq 0x50(%r15), %r14
testq %r14, %r14
je 0x1ad95
movq 0x1923b(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1ad90
incl 0x8(%r14)
jmp 0x1ad95
lock
incl 0x8(%r14)
callq 0x24706
movq (%rax), %rax
movslq %ebx, %rcx
shlq $0x4, %rcx
movq -0x10(%rax,%rcx), %rbx
movq -0x8(%rax,%rcx), %r12
testq %r12, %r12
je 0x1adcc
movq 0x19206(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1adc6
incl 0x8(%r12)
jmp 0x1adcc
lock
incl 0x8(%r12)
testq %r14, %r14
je 0x1add9
movq %r14, %rdi
callq 0xb634
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1ae02
movq 0x191ce(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1adfd
incl 0x8(%r14)
jmp 0x1ae02
lock
incl 0x8(%r14)
callq 0x24706
movslq %ebp, %rcx
shlq $0x4, %rcx
movq (%rax), %rax
movq -0x8(%rcx,%rax), %r13
testq %r13, %r13
je 0x1ae32
movq 0x1919e(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1ae2d
incl 0x8(%r13)
jmp 0x1ae32
lock
incl 0x8(%r13)
decl %ebp
testq %r14, %r14
je 0x1ae41
movq %r14, %rdi
callq 0xb634
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0xd0(%rax)
movq 0x48(%r15), %rdi
movq 0x50(%r15), %rbx
testq %rbx, %rbx
je 0x1ae71
movq 0x1915d(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1ae6d
incl 0x8(%rbx)
jmp 0x1ae71
lock
incl 0x8(%rbx)
callq 0x24706
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
movq (%rax), %r14
testq %rbx, %rbx
je 0x1ae8f
movq %rbx, %rdi
callq 0xb634
leaq 0x48(%rsp), %r13
movq 0x19125(%rip), %rbp     # 0x33fc0
movq 0x48(%r15), %rdi
movq 0x50(%r15), %rbx
testq %rbx, %rbx
je 0x1aeb7
cmpb $0x0, (%rbp)
je 0x1aeb3
incl 0x8(%rbx)
jmp 0x1aeb7
lock
incl 0x8(%rbx)
callq 0x24706
movq 0x8(%rax), %r12
testq %rbx, %rbx
je 0x1aecd
movq %rbx, %rdi
callq 0xb634
cmpq %r12, %r14
je 0x1afc8
movq (%r14), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x1afbf
movq 0x58(%r15), %rdi
movq 0x60(%r15), %rbx
testq %rbx, %rbx
je 0x1af06
cmpb $0x0, (%rbp)
je 0x1af02
incl 0x8(%rbx)
jmp 0x1af06
lock
incl 0x8(%rbx)
movq (%r14), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x1af2b
cmpb $0x0, (%rbp)
je 0x1af27
incl 0x8(%rax)
jmp 0x1af2b
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
callq 0x15c44
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1af44
callq 0xb634
testq %rbx, %rbx
je 0x1af51
movq %rbx, %rdi
callq 0xb634
movq 0x48(%r15), %rdi
movq 0x50(%r15), %rbx
testq %rbx, %rbx
je 0x1af6d
cmpb $0x0, (%rbp)
je 0x1af69
incl 0x8(%rbx)
jmp 0x1af6d
lock
incl 0x8(%rbx)
movq (%r14), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x1af92
cmpb $0x0, (%rbp)
je 0x1af8e
incl 0x8(%rax)
jmp 0x1af92
lock
incl 0x8(%rax)
movq %r13, %rsi
callq 0x2474a
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1afa9
callq 0xb634
testq %rbx, %rbx
je 0x1ae9b
movq %rbx, %rdi
callq 0xb634
jmp 0x1ae9b
addq $0x10, %r14
jmp 0x1ae9b
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rbx
testq %rbx, %rbx
je 0x1afea
cmpb $0x0, (%rbp)
je 0x1afe6
incl 0x8(%rbx)
jmp 0x1afea
lock
incl 0x8(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1b017
cmpb $0x0, (%rbp)
je 0x1b012
incl 0x8(%r14)
jmp 0x1b017
lock
incl 0x8(%r14)
callq 0x24706
movq (%rax), %r13
testq %r14, %r14
je 0x1b02c
movq %r14, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b03b
callq 0xb634
testq %rbx, %rbx
je 0x1b048
movq %rbx, %rdi
callq 0xb634
leaq 0x10(%rsp), %r12
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rax
testq %rax, %rax
je 0x1b06f
cmpb $0x0, (%rbp)
je 0x1b06b
incl 0x8(%rax)
jmp 0x1b06f
lock
incl 0x8(%rax)
movq %rax, 0x20(%rsp)
movq %r12, %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1b09f
cmpb $0x0, (%rbp)
je 0x1b09a
incl 0x8(%r14)
jmp 0x1b09f
lock
incl 0x8(%r14)
callq 0x24706
movq 0x8(%rax), %rbx
testq %r14, %r14
je 0x1b0b5
movq %r14, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b0c4
callq 0xb634
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1b0d3
callq 0xb634
cmpq %rbx, %r13
je 0x1b26d
movq (%r13), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x1b264
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rbx
testq %rbx, %rbx
je 0x1b113
cmpb $0x0, (%rbp)
je 0x1b10f
incl 0x8(%rbx)
jmp 0x1b113
lock
incl 0x8(%rbx)
movq %r12, %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x60(%rax), %r14
testq %r14, %r14
je 0x1b13e
cmpb $0x0, (%rbp)
je 0x1b139
incl 0x8(%r14)
jmp 0x1b13e
lock
incl 0x8(%r14)
movq (%r13), %rax
movq %rax, 0x38(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x1b164
cmpb $0x0, (%rbp)
je 0x1b160
incl 0x8(%rax)
jmp 0x1b164
lock
incl 0x8(%rax)
leaq 0x38(%rsp), %rsi
callq 0x15c44
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b17d
callq 0xb634
testq %r14, %r14
je 0x1b18a
movq %r14, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b199
callq 0xb634
testq %rbx, %rbx
je 0x1b1a6
movq %rbx, %rdi
callq 0xb634
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rbx
testq %rbx, %rbx
je 0x1b1c8
cmpb $0x0, (%rbp)
je 0x1b1c4
incl 0x8(%rbx)
jmp 0x1b1c8
lock
incl 0x8(%rbx)
movq %r12, %rdi
callq 0x1206a
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1b1f3
cmpb $0x0, (%rbp)
je 0x1b1ee
incl 0x8(%r14)
jmp 0x1b1f3
lock
incl 0x8(%r14)
movq (%r13), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x1b219
cmpb $0x0, (%rbp)
je 0x1b215
incl 0x8(%rax)
jmp 0x1b219
lock
incl 0x8(%rax)
leaq 0x28(%rsp), %rsi
callq 0x2474a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1b232
callq 0xb634
testq %r14, %r14
je 0x1b23f
movq %r14, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b24e
callq 0xb634
testq %rbx, %rbx
je 0x1b04d
movq %rbx, %rdi
callq 0xb634
jmp 0x1b04d
addq $0x10, %r13
jmp 0x1b04d
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1b27b
callq 0xb634
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b28a
callq 0xb634
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1b299
callq 0xb634
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xb, %ebx
jmp 0x1b2b4
movl $0x3, %ebx
movl $0x4, %edi
callq 0x5100
movl %ebx, (%rax)
movq 0x18cc9(%rip), %rsi     # 0x33f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
movq %rax, %r15
jmp 0x1b35c
jmp 0x1b3ca
movq %rax, %r15
testq %rbx, %rbx
je 0x1b3e3
movq %rbx, %rdi
callq 0xb634
jmp 0x1b3e3
movq %rax, %r15
jmp 0x1b3e3
movq %rax, %r15
movq %r14, %r13
testq %r14, %r14
jne 0x1b3e8
jmp 0x1b3f0
jmp 0x1b317
jmp 0x1b317
movq %rax, %r15
testq %r14, %r14
je 0x1b3fd
movq %r14, %rdi
jmp 0x1b3f8
movq %rax, %r15
jmp 0x1b402
movq %rax, %r15
jmp 0x1b3fd
movq %rax, %r15
movq 0x30(%rsp), %rdi
jmp 0x1b352
jmp 0x1b3ca
movq %rax, %r15
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b35c
callq 0xb634
testq %r14, %r14
je 0x1b369
movq %r14, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
jmp 0x1b384
jmp 0x1b3ca
movq %rax, %r15
movq 0x50(%rsp), %rdi
jmp 0x1b384
movq %rax, %r15
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1b3cd
callq 0xb634
jmp 0x1b3cd
jmp 0x1b392
movq %rax, %r15
jmp 0x1b3da
movq %rax, %r15
jmp 0x1b3bb
movq %rax, %r15
testq %r14, %r14
je 0x1b3ac
movq %r14, %rdi
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b3bb
callq 0xb634
cmpq $0x0, 0x20(%rsp)
je 0x1b3da
movq 0x20(%rsp), %rdi
jmp 0x1b3d5
movq %rax, %r15
testq %rbx, %rbx
je 0x1b3da
movq %rbx, %rdi
callq 0xb634
movq 0x8(%rsp), %r12
movq (%rsp), %r13
testq %r13, %r13
je 0x1b3f0
movq %r13, %rdi
callq 0xb634
testq %r12, %r12
je 0x1b3fd
movq %r12, %rdi
callq 0xb634
movq 0x70(%rsp), %r14
testq %r14, %r14
je 0x1b40f
movq %r14, %rdi
callq 0xb634
movq %r15, %rdi
callq 0x5320
nop