// File: /workspace/github_cpp_makefile_star2_O1/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 0xc270
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe8aa
movq (%r14), %rdi
callq 0x17d18
movl %eax, %ebp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbc95
callq 0xb634
testb %bpl, %bpl
jne 0xc282
leaq 0x8(%rbx), %r15
leaq 0x1bba7(%rip), %rsi     # 0x27850
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
jne 0xbf5e
movq 0x70(%rbx), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x17c54
movq (%r14), %r14
leaq 0x108(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1bb83(%rip), %rsi     # 0x27864
leaq 0x1bb89(%rip), %rdx     # 0x27871
leaq 0xf8(%rsp), %rdi
callq 0xb734
leaq 0x18(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
movq %r14, %rsi
callq 0xe972
movq 0x18(%rsp), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x100(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbd2c
callq 0xb634
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0xbd49
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbd58
callq 0xb634
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0xbd7e
movq 0x28252(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0xbd79
incl 0x8(%r14)
jmp 0xbd7e
lock
incl 0x8(%r14)
movq 0x70(%rbx), %rax
movq %rax, 0xa8(%rsp)
movq 0x78(%rbx), %rax
movq %rax, 0xb0(%rsp)
testq %rax, %rax
je 0xbdb0
movq 0x2821e(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0xbdac
incl 0x8(%rax)
jmp 0xbdb0
lock
incl 0x8(%rax)
leaq 0xa8(%rsp), %rsi
callq 0xe896
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xbdcf
callq 0xb634
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0xe8aa
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x17bd0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rsp)
movq %rax, 0xa0(%rsp)
testq %rax, %rax
je 0xbe24
movq 0x281aa(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0xbe20
incl 0x8(%rax)
jmp 0xbe24
lock
incl 0x8(%rax)
leaq 0x98(%rsp), %rsi
callq 0x24744
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xbe43
callq 0xb634
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbe52
callq 0xb634
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbe61
callq 0xb634
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0xe8aa
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x17b9e
movq 0x18(%rsp), %r12
leaq 0xe8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1cbcd(%rip), %rsi     # 0x28a62
leaq 0x1cbcb(%rip), %rdx     # 0x28a67
leaq 0xd8(%rsp), %rdi
callq 0xb734
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0xbedd
movq 0x280f1(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0xbed9
incl 0x8(%rax)
jmp 0xbedd
lock
incl 0x8(%rax)
leaq 0xd8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %r12, %rdi
callq 0x12304
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xbf07
callq 0xb634
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0xbf24
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbf33
callq 0xb634
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbf42
callq 0xb634
testq %r14, %r14
je 0xbf4f
movq %r14, %rdi
callq 0xb634
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbf5e
callq 0xb634
leaq 0x1b90d(%rip), %rsi     # 0x27872
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0xbf83
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 0x17bd0
movq (%r14), %rdi
callq 0x2470a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbfab
callq 0xb634
xorl %r13d, %r13d
leaq 0x28(%rsp), %r12
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xe8aa
movq 0x8(%rsp), %rdi
callq 0x17d18
movl %eax, %r14d
cmpl $0x3, %r13d
setae %r15b
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbfe9
callq 0xb634
orb %r15b, %r14b
jne 0xbf71
movq 0x70(%rbx), %rsi
movq %r12, %rdi
callq 0x17c54
movq 0x28(%rsp), %r14
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
leaq 0x1b843(%rip), %rsi     # 0x27864
leaq 0x1b849(%rip), %rdx     # 0x27871
callq 0xb734
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xe972
movq 0x18(%rsp), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x100(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc05d
callq 0xb634
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xc082
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc091
callq 0xb634
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0xc0b7
movq 0x27f19(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0xc0b2
incl 0x8(%r14)
jmp 0xc0b7
lock
incl 0x8(%r14)
movq 0x70(%rbx), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rbx), %rax
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0xc0e6
movq 0x27ee8(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0xc0e2
incl 0x8(%rax)
jmp 0xc0e6
lock
incl 0x8(%rax)
leaq 0x78(%rsp), %rsi
callq 0xe896
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xc102
callq 0xb634
movq %r12, %rdi
movq %rbx, %rsi
callq 0xe8aa
movq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x17bd0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x68(%rsp)
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0xc14d
movq 0x27e81(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0xc149
incl 0x8(%rax)
jmp 0xc14d
lock
incl 0x8(%rax)
leaq 0x68(%rsp), %rsi
callq 0x24744
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xc166
callq 0xb634
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc175
callq 0xb634
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc184
callq 0xb634
movq %r12, %rdi
movq %rbx, %rsi
callq 0xe8aa
movq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x17b9e
movq 0x18(%rsp), %r15
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x1c8ab(%rip), %rsi     # 0x28a62
leaq 0x1c8a9(%rip), %rdx     # 0x28a67
callq 0xb734
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0xc1f1
movq 0x27ddd(%rip), %rcx     # 0x33fc0
cmpb $0x0, (%rcx)
je 0xc1ed
incl 0x8(%rax)
jmp 0xc1f1
lock
incl 0x8(%rax)
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x12304
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xc212
callq 0xb634
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc22e
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc23d
callq 0xb634
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc24c
callq 0xb634
testq %r14, %r14
je 0xc259
movq %r14, %rdi
callq 0xb634
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc268
callq 0xb634
incl %r13d
jmp 0xbfb8
movl $0x4, %edi
callq 0x5100
movl $0x1, (%rax)
jmp 0xc292
movl $0x4, %edi
callq 0x5100
movl $0x2, (%rax)
movq 0x27cf7(%rip), %rsi     # 0x33f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xc2b8
callq 0xb634
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc3f5
movq 0xe8(%rsp), %rsi
jmp 0xc387
jmp 0xc354
jmp 0xc3de
jmp 0xc415
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
jmp 0xc3eb
jmp 0xc3de
jmp 0xc427
jmp 0xc415
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
jmp 0xc409
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc328
callq 0xb634
jmp 0xc328
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc3c8
movq 0x108(%rsp), %rsi
jmp 0xc3c0
jmp 0xc34f
jmp 0xc427
jmp 0xc3de
movq %rax, %rbx
jmp 0xc3c8
movq %rax, %rbx
jmp 0xc3f5
movq %rax, %rbx
jmp 0xc3a3
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xc373
callq 0xb634
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc3f5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0xc3f5
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc3a3
callq 0xb634
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xc3c8
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x30(%rsp), %rdi
jmp 0xc42f
movq %rax, %rbx
movq 0x80(%rsp), %rdi
jmp 0xc409
jmp 0xc415
movq %rax, %rbx
jmp 0xc404
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xc3f5
callq 0xb634
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc404
callq 0xb634
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc418
callq 0xb634
jmp 0xc418
movq %rax, %rbx
testq %r14, %r14
je 0xc42a
movq %r14, %rdi
callq 0xb634
jmp 0xc42a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc439
callq 0xb634
movq %rbx, %rdi
callq 0x5320
nop