// File: /workspace/github_cpp_makefile_star2_O3/BohangZhang[P]Sorcery-C-Project/act_minion.cc
// Function: Act_Minion::use()
void Act_Minion::use() {
    if (getSilent()) throw 1; // Number; The minion has been silented
    if (getMaster()->isSlotFull()) throw 2; // You have already own 5 Minions!
    if (name == "Apprentice Summoner") {
        shared_ptr<Minion> m = this->master->getDatabase()->getMinion("Air Elemental")->cloneMinion();
        shared_ptr<Card> p = m;
        p->setMaster(master);
        this->getMaster()->getSlot()->push(m);
        this->getMaster()->getGame()->notify("Enter", m);
    }
    if (name == "Master Summoner") {
        int i = this->master->getSlot()->getSize();
        int count = 0;
        while (!(getMaster()->isSlotFull()) && (count < 3)) {
            shared_ptr<Minion> m = this->master->getDatabase()->getMinion("Air Elemental")->cloneMinion();
            shared_ptr<Card> p = m;
            p->setMaster(master);
            this->getMaster()->getSlot()->push(m);
            this->getMaster()->getGame()->notify("Enter", m);
            ++count;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x60(%rax)
testb %al, %al
jne 0xc0cc
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe68a
movq (%r14), %rdi
callq 0x17bdc
movl %eax, %ebp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbaf1
callq 0xb478
testb %bpl, %bpl
jne 0xc0de
leaq 0x8(%rbx), %r15
leaq 0x1ad4b(%rip), %rsi     # 0x26850
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
jne 0xbdba
movq 0x70(%rbx), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x17b18
movq (%r14), %r14
leaq 0x108(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1ad27(%rip), %rsi     # 0x26864
leaq 0x1ad2d(%rip), %rdx     # 0x26871
leaq 0xf8(%rsp), %rdi
callq 0xb57e
leaq 0x18(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
movq %r14, %rsi
callq 0xe756
movq 0x18(%rsp), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x100(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbb88
callq 0xb478
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0xbba5
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbbb4
callq 0xb478
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0xbbda
movq 0x273f6(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0xbbd5
incl 0x8(%r14)
jmp 0xbbda
lock
incl 0x8(%r14)
movq 0x70(%rbx), %rax
movq %rax, 0xa8(%rsp)
movq 0x78(%rbx), %rax
movq %rax, 0xb0(%rsp)
testq %rax, %rax
je 0xbc0c
movq 0x273c2(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0xbc08
incl 0x8(%rax)
jmp 0xbc0c
lock
incl 0x8(%rax)
leaq 0xa8(%rsp), %rsi
callq 0xe676
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xbc2b
callq 0xb478
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0xe68a
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x17a94
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rsp)
movq %rax, 0xa0(%rsp)
testq %rax, %rax
je 0xbc80
movq 0x2734e(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0xbc7c
incl 0x8(%rax)
jmp 0xbc80
lock
incl 0x8(%rax)
leaq 0x98(%rsp), %rsi
callq 0x24414
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xbc9f
callq 0xb478
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbcae
callq 0xb478
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbcbd
callq 0xb478
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0xe68a
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x17a62
movq 0x18(%rsp), %r12
leaq 0xe8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1bd71(%rip), %rsi     # 0x27a62
leaq 0x1bd6f(%rip), %rdx     # 0x27a67
leaq 0xd8(%rsp), %rdi
callq 0xb57e
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0xbd39
movq 0x27295(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0xbd35
incl 0x8(%rax)
jmp 0xbd39
lock
incl 0x8(%rax)
leaq 0xd8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %r12, %rdi
callq 0x120a0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xbd63
callq 0xb478
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0xbd80
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbd8f
callq 0xb478
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbd9e
callq 0xb478
testq %r14, %r14
je 0xbdab
movq %r14, %rdi
callq 0xb478
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbdba
callq 0xb478
leaq 0x1aab1(%rip), %rsi     # 0x26872
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0xbddf
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x70(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x17a94
movq (%r14), %rdi
callq 0x243da
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbe07
callq 0xb478
xorl %r13d, %r13d
leaq 0x28(%rsp), %r12
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xe68a
movq 0x8(%rsp), %rdi
callq 0x17bdc
movl %eax, %r14d
cmpl $0x3, %r13d
setae %r15b
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbe45
callq 0xb478
orb %r15b, %r14b
jne 0xbdcd
movq 0x70(%rbx), %rsi
movq %r12, %rdi
callq 0x17b18
movq 0x28(%rsp), %r14
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
leaq 0x1a9e7(%rip), %rsi     # 0x26864
leaq 0x1a9ed(%rip), %rdx     # 0x26871
callq 0xb57e
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xe756
movq 0x18(%rsp), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x100(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbeb9
callq 0xb478
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xbede
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbeed
callq 0xb478
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0xbf13
movq 0x270bd(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0xbf0e
incl 0x8(%r14)
jmp 0xbf13
lock
incl 0x8(%r14)
movq 0x70(%rbx), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rbx), %rax
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0xbf42
movq 0x2708c(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0xbf3e
incl 0x8(%rax)
jmp 0xbf42
lock
incl 0x8(%rax)
leaq 0x78(%rsp), %rsi
callq 0xe676
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xbf5e
callq 0xb478
movq %r12, %rdi
movq %rbx, %rsi
callq 0xe68a
movq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x17a94
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x68(%rsp)
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0xbfa9
movq 0x27025(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0xbfa5
incl 0x8(%rax)
jmp 0xbfa9
lock
incl 0x8(%rax)
leaq 0x68(%rsp), %rsi
callq 0x24414
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xbfc2
callq 0xb478
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbfd1
callq 0xb478
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbfe0
callq 0xb478
movq %r12, %rdi
movq %rbx, %rsi
callq 0xe68a
movq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x17a62
movq 0x18(%rsp), %r15
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x1ba4f(%rip), %rsi     # 0x27a62
leaq 0x1ba4d(%rip), %rdx     # 0x27a67
callq 0xb57e
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0xc04d
movq 0x26f81(%rip), %rcx     # 0x32fc0
cmpb $0x0, (%rcx)
je 0xc049
incl 0x8(%rax)
jmp 0xc04d
lock
incl 0x8(%rax)
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x120a0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xc06e
callq 0xb478
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc08a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc099
callq 0xb478
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc0a8
callq 0xb478
testq %r14, %r14
je 0xc0b5
movq %r14, %rdi
callq 0xb478
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc0c4
callq 0xb478
incl %r13d
jmp 0xbe14
movl $0x4, %edi
callq 0x5100
movl $0x1, (%rax)
jmp 0xc0ee
movl $0x4, %edi
callq 0x5100
movl $0x2, (%rax)
movq 0x26e9b(%rip), %rsi     # 0x32f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xc114
callq 0xb478
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc251
movq 0xe8(%rsp), %rsi
jmp 0xc1e3
jmp 0xc1b0
jmp 0xc23a
jmp 0xc271
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
jmp 0xc247
jmp 0xc23a
jmp 0xc283
jmp 0xc271
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
jmp 0xc265
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc184
callq 0xb478
jmp 0xc184
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc224
movq 0x108(%rsp), %rsi
jmp 0xc21c
jmp 0xc1ab
jmp 0xc283
jmp 0xc23a
movq %rax, %rbx
jmp 0xc224
movq %rax, %rbx
jmp 0xc251
movq %rax, %rbx
jmp 0xc1ff
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xc1cf
callq 0xb478
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc251
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0xc251
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc1ff
callq 0xb478
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xc224
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x30(%rsp), %rdi
jmp 0xc28b
movq %rax, %rbx
movq 0x80(%rsp), %rdi
jmp 0xc265
jmp 0xc271
movq %rax, %rbx
jmp 0xc260
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xc251
callq 0xb478
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc260
callq 0xb478
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc274
callq 0xb478
jmp 0xc274
movq %rax, %rbx
testq %r14, %r14
je 0xc286
movq %r14, %rdi
callq 0xb478
jmp 0xc286
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc295
callq 0xb478
movq %rbx, %rdi
callq 0x5320
nop