// File: /workspace/github_cpp_makefile_star2_O1/BohangZhang[P]Sorcery-C-Project/player.cc
// Function: Player::inspect(int)
void Player::inspect(int i) {
    shared_ptr<Slot> s = this->slot;
    if (s->getSize() < i) {
        throw 11; // Number, You don't have enough minion
    }
    shared_ptr<Minion> m = s->getSlot()[i-1];
    shared_ptr<Minion> am = s->getSlot()[i-1];
    shared_ptr<vector<card_template_t>> temp {new vector<card_template_t>};
    while (1) {
        if ((m->getType() == "Minion") || (m->getType() == "Act_Minion") || (m->getType() == "Tri_Minion")) {
            am->print();
            break;
        } else {
            if (m->getName() == "Giant Strength") {
                temp->push_back(display_enchantment_attack_defence(m->getName(), m->getCost(), m->getEffect(), "+2", "+2"));
            } else {
                temp->push_back(display_enchantment(m->getName(), m->getCost(), m->getEffect()));
            }
            m = m->getOrigin();
        }
    }
    if (temp->size() == 0) {return;}
    int turn = temp->size() / 5;
    int left = temp->size() % 5;
    for (int k = 0; k < turn; ++k) {
        for (int i = 0; i < 11; ++i) {
            for (int j = 0; j < 5; ++j) { cout << (*temp)[j][i]; }
            cout << endl;
        }
    }
    for (int i = 0; i < 11; ++i) {
        for (int j = 0; j < left; ++j) { cout << (*temp)[j][i]; }
        cout << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %esi, %ebp
movq 0x48(%rdi), %rbx
movq 0x50(%rdi), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x1cdea
movq 0x171ee(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1cde1
movq 0x18(%rsp), %rax
incl 0x8(%rax)
jmp 0x1cdea
movq 0x18(%rsp), %rax
lock
incl 0x8(%rax)
movq %rbx, %rdi
callq 0x2470a
cmpl %ebp, %eax
jl 0x1d3c5
movq %rbx, %rdi
callq 0x24706
movslq %ebp, %r15
decq %r15
movq (%rax), %rax
shlq $0x4, %r15
movq (%rax,%r15), %r14
movq 0x8(%rax,%r15), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x1ce41
movq 0x17197(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1ce38
movq 0x8(%rsp), %rax
incl 0x8(%rax)
jmp 0x1ce41
movq 0x8(%rsp), %rax
lock
incl 0x8(%rax)
movq %rbx, %rdi
callq 0x24706
movq (%rax), %rax
movq (%rax,%r15), %rcx
movq %rcx, 0xa0(%rsp)
movq 0x8(%rax,%r15), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1ce86
movq 0x17152(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x1ce7d
movq 0x10(%rsp), %rax
incl 0x8(%rax)
jmp 0x1ce86
movq 0x10(%rsp), %rax
lock
incl 0x8(%rax)
movl $0x18, %edi
callq 0x51e0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x50(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %rax, %rsi
callq 0x23e72
leaq 0x30(%rsp), %rbx
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r14, (%rsp)
movq %r14, %rsi
callq 0xe816
movq %rbp, %rdi
leaq 0xba13(%rip), %rsi      # 0x288e5
callq 0x50a0
movl %eax, %r13d
movb $0x1, %r15b
testl %eax, %eax
je 0x1cf35
leaq 0x128(%rsp), %r14
movq %r14, %rdi
movq (%rsp), %rsi
callq 0xe816
movq %r14, %rdi
leaq 0xb9d7(%rip), %rsi      # 0x288d6
callq 0x50a0
testl %eax, %eax
je 0x1cf35
leaq 0x148(%rsp), %r14
movq %r14, %rdi
movq (%rsp), %rsi
callq 0xe816
movq %r14, %rdi
leaq 0xb9bb(%rip), %rsi      # 0x288e1
callq 0x50a0
testl %eax, %eax
sete %r15b
movb $0x1, %al
jmp 0x1cf37
xorl %eax, %eax
testb %al, %al
je 0x1cf60
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x1cf60
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x51f0
testl %r13d, %r13d
je 0x1cf8a
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x1cf8a
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1cfa1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51f0
testb %r15b, %r15b
jne 0x1d229
movq %rbp, %rdi
movq (%rsp), %rsi
callq 0xe7f2
movq %rbp, %rdi
leaq 0xba7c(%rip), %rsi      # 0x28a3c
callq 0x50a0
movl %eax, %r15d
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1cfdf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
testl %r15d, %r15d
je 0x1d09a
leaq 0xa8(%rsp), %rdi
movq (%rsp), %r14
movq %r14, %rsi
callq 0xe7f2
movq %r14, %rdi
callq 0xe85e
movq %r14, %rsi
leaq 0x108(%rsp), %r14
movl %eax, %r15d
movq %r14, %rdi
callq 0xe83a
movq %rbp, %rdi
leaq 0xa8(%rsp), %rsi
movl %r15d, %edx
movq %r14, %rcx
callq 0xd99e
movq 0x58(%rsp), %rdi
movq %rbp, %rsi
callq 0x23f20
movq %rbp, %rdi
callq 0xc96c
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x1d074
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d1df
movq 0xb8(%rsp), %rsi
jmp 0x1d1d7
leaq 0xe8(%rsp), %rdi
movq (%rsp), %r15
movq %r15, %rsi
callq 0xe7f2
movq %r15, %rdi
callq 0xe85e
movq %r15, %rsi
movl %eax, %r15d
leaq 0xc8(%rsp), %rdi
callq 0xe83a
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0xbac4(%rip), %r14      # 0x28ba3
movq %r14, %rsi
leaq 0xbabc(%rip), %rbx      # 0x28ba5
movq %rbx, %rdx
callq 0xb734
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb734
movq %rbp, %rdi
leaq 0xe8(%rsp), %rsi
movl %r15d, %edx
leaq 0xc8(%rsp), %rcx
leaq 0x60(%rsp), %r8
movq %r13, %r9
callq 0xde39
leaq 0x30(%rsp), %rbx
movq 0x58(%rsp), %rdi
movq %rbp, %rsi
callq 0x23f20
movq %rbp, %rdi
callq 0xc96c
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x1d179
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x1d195
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d1ba
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d1df
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x51f0
movq (%rsp), %rsi
movq (%rsi), %rax
movq %rbp, %rdi
callq *0x68(%rax)
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1d20d
callq 0xb634
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1d21c
callq 0xb634
movq %r14, 0x8(%rsp)
movq %r12, %r14
jmp 0x1ceb9
movq 0xa0(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x48(%rsp), %rcx
movq 0x8(%rcx), %rdx
subq (%rcx), %rdx
je 0x1d377
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %rax, (%rsp)
mulq %rcx
movq %rdx, %r15
shrq $0x2, %r15
testl %r15d, %r15d
jle 0x1d2ee
xorl %r13d, %r13d
movq 0x16d46(%rip), %r12     # 0x33fc8
xorl %r14d, %r14d
movq %r14, %rbp
shlq $0x5, %rbp
xorl %ebx, %ebx
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx), %rax
movq (%rax,%rbp), %rsi
movq 0x8(%rax,%rbp), %rdx
movq %r12, %rdi
callq 0x5240
addq $0x18, %rbx
cmpq $0x78, %rbx
jne 0x1d28e
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x51d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5140
incq %r14
cmpq $0xb, %r14
jne 0x1d285
incl %r13d
cmpl %r15d, %r13d
jne 0x1d282
leaq (%r15,%r15,4), %rax
movq (%rsp), %rbp
subq %rax, %rbp
cmpl $0x1, %ebp
movl %ebp, %eax
adcl $0x0, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
xorl %r13d, %r13d
movq 0x16cb5(%rip), %r15     # 0x33fc8
testq %rbp, %rbp
je 0x1d347
movq %r13, %r14
shlq $0x5, %r14
xorl %ebx, %ebx
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx), %rax
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
movq %r15, %rdi
callq 0x5240
addq $0x18, %rbx
cmpq %rbx, %r12
jne 0x1d321
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x51d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5140
incq %r13
cmpq $0xb, %r13
jne 0x1d313
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1d386
callq 0xb634
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1d395
callq 0xb634
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1d3a4
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1d3b3
callq 0xb634
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x5100
movl $0xb, (%rax)
movq 0x16bb4(%rip), %rsi     # 0x33f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5300
jmp 0x1d566
movq %rax, %r15
jmp 0x1d587
jmp 0x1d3fd
movq %rax, %r15
jmp 0x1d578
movq %rax, %r15
jmp 0x1d596
jmp 0x1d566
movq %rax, %r15
jmp 0x1d467
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0xc96c
jmp 0x1d421
movq %rax, %r15
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x1d44b
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x1d44b
movq %rax, %r15
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x1d467
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d511
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x1d511
movq %rax, %r15
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x1d4fd
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x1d4fd
movq %rax, %r15
jmp 0x1d4d3
jmp 0x1d566
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0xc96c
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x1d539
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x1d539
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1d569
movq 0x30(%rsp), %rsi
jmp 0x1d556
movq %rax, %r15
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d569
movq 0xf8(%rsp), %rsi
jmp 0x1d556
jmp 0x1d566
jmp 0x1d566
jmp 0x1d566
movq %rax, %r15
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d569
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x1d569
jmp 0x1d566
jmp 0x1d566
jmp 0x1d566
movq %rax, %r15
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1d578
callq 0xb634
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1d587
callq 0xb634
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1d596
callq 0xb634
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1d5a5
callq 0xb634
movq %r15, %rdi
callq 0x5320
nop