// File: /workspace/github_cpp_makefile_star2_O3/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 0x1ab8f
movq 0x18441(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1ab8a
incl 0x8(%r14)
jmp 0x1ab8f
lock
incl 0x8(%r14)
leaq 0x68(%rsp), %rdi
callq 0x11e3e
testq %r14, %r14
je 0x1aba6
movq %r14, %rdi
callq 0xb478
movq 0x48(%r15), %rdi
movq 0x50(%r15), %r14
testq %r14, %r14
je 0x1abca
movq 0x18406(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1abc5
incl 0x8(%r14)
jmp 0x1abca
lock
incl 0x8(%r14)
callq 0x243da
movl %eax, %r12d
testq %r14, %r14
je 0x1abdf
movq %r14, %rdi
callq 0xb478
cmpl %ebx, %r12d
jl 0x1b166
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1ac11
movq 0x183bf(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1ac0c
incl 0x8(%r14)
jmp 0x1ac11
lock
incl 0x8(%r14)
callq 0x243da
movl %eax, %r12d
testq %r14, %r14
je 0x1ac26
movq %r14, %rdi
callq 0xb478
cmpl %ebp, %r12d
jl 0x1b16d
movq 0x48(%r15), %rdi
movq 0x50(%r15), %r14
testq %r14, %r14
je 0x1ac53
movq 0x1837d(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1ac4e
incl 0x8(%r14)
jmp 0x1ac53
lock
incl 0x8(%r14)
callq 0x243d6
movq (%rax), %rax
movslq %ebx, %rcx
shlq $0x4, %rcx
movq -0x10(%rax,%rcx), %rbx
movq -0x8(%rax,%rcx), %r12
testq %r12, %r12
je 0x1ac8a
movq 0x18348(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1ac84
incl 0x8(%r12)
jmp 0x1ac8a
lock
incl 0x8(%r12)
testq %r14, %r14
je 0x1ac97
movq %r14, %rdi
callq 0xb478
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1acc0
movq 0x18310(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1acbb
incl 0x8(%r14)
jmp 0x1acc0
lock
incl 0x8(%r14)
callq 0x243d6
movslq %ebp, %rcx
shlq $0x4, %rcx
movq (%rax), %rax
movq -0x8(%rcx,%rax), %r13
testq %r13, %r13
je 0x1acf0
movq 0x182e0(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1aceb
incl 0x8(%r13)
jmp 0x1acf0
lock
incl 0x8(%r13)
decl %ebp
testq %r14, %r14
je 0x1acff
movq %r14, %rdi
callq 0xb478
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0xd0(%rax)
movq 0x48(%r15), %rdi
movq 0x50(%r15), %rbx
testq %rbx, %rbx
je 0x1ad2f
movq 0x1829f(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x1ad2b
incl 0x8(%rbx)
jmp 0x1ad2f
lock
incl 0x8(%rbx)
callq 0x243d6
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
movq (%rax), %r14
testq %rbx, %rbx
je 0x1ad4d
movq %rbx, %rdi
callq 0xb478
leaq 0x48(%rsp), %r13
movq 0x18267(%rip), %rbp     # 0x32fc0
movq 0x48(%r15), %rdi
movq 0x50(%r15), %rbx
testq %rbx, %rbx
je 0x1ad75
cmpb $0x0, (%rbp)
je 0x1ad71
incl 0x8(%rbx)
jmp 0x1ad75
lock
incl 0x8(%rbx)
callq 0x243d6
movq 0x8(%rax), %r12
testq %rbx, %rbx
je 0x1ad8b
movq %rbx, %rdi
callq 0xb478
cmpq %r12, %r14
je 0x1ae86
movq (%r14), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x1ae7d
movq 0x58(%r15), %rdi
movq 0x60(%r15), %rbx
testq %rbx, %rbx
je 0x1adc4
cmpb $0x0, (%rbp)
je 0x1adc0
incl 0x8(%rbx)
jmp 0x1adc4
lock
incl 0x8(%rbx)
movq (%r14), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x1ade9
cmpb $0x0, (%rbp)
je 0x1ade5
incl 0x8(%rax)
jmp 0x1ade9
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
callq 0x15b74
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1ae02
callq 0xb478
testq %rbx, %rbx
je 0x1ae0f
movq %rbx, %rdi
callq 0xb478
movq 0x48(%r15), %rdi
movq 0x50(%r15), %rbx
testq %rbx, %rbx
je 0x1ae2b
cmpb $0x0, (%rbp)
je 0x1ae27
incl 0x8(%rbx)
jmp 0x1ae2b
lock
incl 0x8(%rbx)
movq (%r14), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x1ae50
cmpb $0x0, (%rbp)
je 0x1ae4c
incl 0x8(%rax)
jmp 0x1ae50
lock
incl 0x8(%rax)
movq %r13, %rsi
callq 0x2441a
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1ae67
callq 0xb478
testq %rbx, %rbx
je 0x1ad59
movq %rbx, %rdi
callq 0xb478
jmp 0x1ad59
addq $0x10, %r14
jmp 0x1ad59
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rbx
testq %rbx, %rbx
je 0x1aea8
cmpb $0x0, (%rbp)
je 0x1aea4
incl 0x8(%rbx)
jmp 0x1aea8
lock
incl 0x8(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1aed5
cmpb $0x0, (%rbp)
je 0x1aed0
incl 0x8(%r14)
jmp 0x1aed5
lock
incl 0x8(%r14)
callq 0x243d6
movq (%rax), %r13
testq %r14, %r14
je 0x1aeea
movq %r14, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1aef9
callq 0xb478
testq %rbx, %rbx
je 0x1af06
movq %rbx, %rdi
callq 0xb478
leaq 0x10(%rsp), %r12
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rax
testq %rax, %rax
je 0x1af2d
cmpb $0x0, (%rbp)
je 0x1af29
incl 0x8(%rax)
jmp 0x1af2d
lock
incl 0x8(%rax)
movq %rax, 0x20(%rsp)
movq %r12, %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1af5d
cmpb $0x0, (%rbp)
je 0x1af58
incl 0x8(%r14)
jmp 0x1af5d
lock
incl 0x8(%r14)
callq 0x243d6
movq 0x8(%rax), %rbx
testq %r14, %r14
je 0x1af73
movq %r14, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1af82
callq 0xb478
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1af91
callq 0xb478
cmpq %rbx, %r13
je 0x1b12b
movq (%r13), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
testb %al, %al
je 0x1b122
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rbx
testq %rbx, %rbx
je 0x1afd1
cmpb $0x0, (%rbp)
je 0x1afcd
incl 0x8(%rbx)
jmp 0x1afd1
lock
incl 0x8(%rbx)
movq %r12, %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x60(%rax), %r14
testq %r14, %r14
je 0x1affc
cmpb $0x0, (%rbp)
je 0x1aff7
incl 0x8(%r14)
jmp 0x1affc
lock
incl 0x8(%r14)
movq (%r13), %rax
movq %rax, 0x38(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x1b022
cmpb $0x0, (%rbp)
je 0x1b01e
incl 0x8(%rax)
jmp 0x1b022
lock
incl 0x8(%rax)
leaq 0x38(%rsp), %rsi
callq 0x15b74
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b03b
callq 0xb478
testq %r14, %r14
je 0x1b048
movq %r14, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b057
callq 0xb478
testq %rbx, %rbx
je 0x1b064
movq %rbx, %rdi
callq 0xb478
movq 0x88(%r15), %rsi
movq 0x90(%r15), %rbx
testq %rbx, %rbx
je 0x1b086
cmpb $0x0, (%rbp)
je 0x1b082
incl 0x8(%rbx)
jmp 0x1b086
lock
incl 0x8(%rbx)
movq %r12, %rdi
callq 0x11e3e
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rax), %r14
testq %r14, %r14
je 0x1b0b1
cmpb $0x0, (%rbp)
je 0x1b0ac
incl 0x8(%r14)
jmp 0x1b0b1
lock
incl 0x8(%r14)
movq (%r13), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x1b0d7
cmpb $0x0, (%rbp)
je 0x1b0d3
incl 0x8(%rax)
jmp 0x1b0d7
lock
incl 0x8(%rax)
leaq 0x28(%rsp), %rsi
callq 0x2441a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1b0f0
callq 0xb478
testq %r14, %r14
je 0x1b0fd
movq %r14, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b10c
callq 0xb478
testq %rbx, %rbx
je 0x1af0b
movq %rbx, %rdi
callq 0xb478
jmp 0x1af0b
addq $0x10, %r13
jmp 0x1af0b
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1b139
callq 0xb478
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b148
callq 0xb478
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1b157
callq 0xb478
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xb, %ebx
jmp 0x1b172
movl $0x3, %ebx
movl $0x4, %edi
callq 0x5100
movl %ebx, (%rax)
movq 0x17e0b(%rip), %rsi     # 0x32f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
movq %rax, %r15
jmp 0x1b21a
jmp 0x1b288
movq %rax, %r15
testq %rbx, %rbx
je 0x1b2a1
movq %rbx, %rdi
callq 0xb478
jmp 0x1b2a1
movq %rax, %r15
jmp 0x1b2a1
movq %rax, %r15
movq %r14, %r13
testq %r14, %r14
jne 0x1b2a6
jmp 0x1b2ae
jmp 0x1b1d5
jmp 0x1b1d5
movq %rax, %r15
testq %r14, %r14
je 0x1b2bb
movq %r14, %rdi
jmp 0x1b2b6
movq %rax, %r15
jmp 0x1b2c0
movq %rax, %r15
jmp 0x1b2bb
movq %rax, %r15
movq 0x30(%rsp), %rdi
jmp 0x1b210
jmp 0x1b288
movq %rax, %r15
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b21a
callq 0xb478
testq %r14, %r14
je 0x1b227
movq %r14, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
jmp 0x1b242
jmp 0x1b288
movq %rax, %r15
movq 0x50(%rsp), %rdi
jmp 0x1b242
movq %rax, %r15
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1b28b
callq 0xb478
jmp 0x1b28b
jmp 0x1b250
movq %rax, %r15
jmp 0x1b298
movq %rax, %r15
jmp 0x1b279
movq %rax, %r15
testq %r14, %r14
je 0x1b26a
movq %r14, %rdi
callq 0xb478
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1b279
callq 0xb478
cmpq $0x0, 0x20(%rsp)
je 0x1b298
movq 0x20(%rsp), %rdi
jmp 0x1b293
movq %rax, %r15
testq %rbx, %rbx
je 0x1b298
movq %rbx, %rdi
callq 0xb478
movq 0x8(%rsp), %r12
movq (%rsp), %r13
testq %r13, %r13
je 0x1b2ae
movq %r13, %rdi
callq 0xb478
testq %r12, %r12
je 0x1b2bb
movq %r12, %rdi
callq 0xb478
movq 0x70(%rsp), %r14
testq %r14, %r14
je 0x1b2cd
movq %r14, %rdi
callq 0xb478
movq %r15, %rdi
callq 0x5320
nop