// File: BohangZhang[P]Sorcery-C-Project/graveyard.cc
// Function: Graveyard::pushfirst(std::shared_ptr<Minion>)
void Graveyard::pushfirst(shared_ptr<Minion> m) {
    if (m->getType() == "Enchantment") {
        shared_ptr<Minion> m1 = m->getMaster()->getDatabase()->getMinion(m->getOriginName())->cloneMinion();
        shared_ptr<Card> c = m1;
        c->setMaster(m->getMaster());
        theGrave.emplace_back(m1);
    }
    else {
        shared_ptr<Minion> m1 = m->getMaster()->getDatabase()->getMinion(m->getName())->cloneMinion();
        shared_ptr<Card> c = m1;
        c->setMaster(m->getMaster());
        theGrave.emplace_back(m1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, -0x168(%rbp)
movq %rdi, %rax
movq -0x168(%rbp), %rdi
movq %rdi, -0x160(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x158(%rbp)
callq 0x12d30
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x19c20
movq -0x150(%rbp), %rdi
leaq 0x1a858(%rip), %rsi     # 0x417d4
callq 0x12920
movb %al, -0x141(%rbp)
jmp 0x26f89
leaq -0x30(%rbp), %rdi
callq 0x64c8
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x26fa1
jmp 0x271b9
movq -0x160(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x19d90
movq -0x170(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0x2a740
jmp 0x26fda
leaq -0x70(%rbp), %rdi
callq 0x15bb0
movq -0x160(%rbp), %rdi
movq %rax, -0x178(%rbp)
callq 0x12d30
movq %rax, %rsi
movq (%rsi), %rax
movq 0x70(%rax), %rax
leaq -0xa0(%rbp), %rdi
callq *%rax
jmp 0x2700b
movq -0x178(%rbp), %rsi
leaq -0x60(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x19f60
jmp 0x27024
leaq -0x60(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
movq (%rsi), %rax
movq 0x100(%rax), %rax
leaq -0x50(%rbp), %rdi
callq *%rax
jmp 0x27042
leaq -0x60(%rbp), %rdi
callq 0x12d50
leaq -0xa0(%rbp), %rdi
callq 0x64c8
leaq -0x70(%rbp), %rdi
callq 0x15bd0
leaq -0x80(%rbp), %rdi
callq 0x12a00
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x188(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x15bf0
movq -0x188(%rbp), %rdi
callq 0x15c20
movq -0x160(%rbp), %rdi
movq %rax, -0x180(%rbp)
callq 0x12d30
movq %rax, %rsi
leaq -0xc0(%rbp), %rdi
callq 0x19d90
jmp 0x270b0
movq -0x180(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x19d60
jmp 0x270c5
leaq -0xc0(%rbp), %rdi
callq 0x12a00
movq -0x158(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x12d90
jmp 0x270e3
leaq -0xb0(%rbp), %rdi
callq 0x15c40
leaq -0x50(%rbp), %rdi
callq 0x12d50
jmp 0x273dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x64c8
jmp 0x273e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2716b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27162
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27156
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x12d50
leaq -0xa0(%rbp), %rdi
callq 0x64c8
leaq -0x70(%rbp), %rdi
callq 0x15bd0
leaq -0x80(%rbp), %rdi
callq 0x12a00
jmp 0x273e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2719f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x12a00
leaq -0xb0(%rbp), %rdi
callq 0x15c40
leaq -0x50(%rbp), %rdi
callq 0x12d50
jmp 0x273e6
movq -0x160(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
leaq -0x100(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x19d90
movq -0x190(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0xf0(%rbp), %rdi
callq 0x2a740
jmp 0x271f8
leaq -0xf0(%rbp), %rdi
callq 0x15bb0
movq -0x160(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x12d30
movq %rax, %rsi
leaq -0x120(%rbp), %rdi
callq 0x19bf0
jmp 0x27228
movq -0x198(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
leaq -0x120(%rbp), %rdx
callq 0x19f60
jmp 0x27244
leaq -0xe0(%rbp), %rdi
callq 0x12d30
movq %rax, %rsi
movq (%rsi), %rax
movq 0x100(%rax), %rax
leaq -0xd0(%rbp), %rdi
callq *%rax
jmp 0x27268
leaq -0xe0(%rbp), %rdi
callq 0x12d50
leaq -0x120(%rbp), %rdi
callq 0x64c8
leaq -0xf0(%rbp), %rdi
callq 0x15bd0
leaq -0x100(%rbp), %rdi
callq 0x12a00
leaq -0x130(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
leaq -0xd0(%rbp), %rsi
callq 0x15bf0
movq -0x1a8(%rbp), %rdi
callq 0x15c20
movq -0x160(%rbp), %rdi
movq %rax, -0x1a0(%rbp)
callq 0x12d30
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x19d90
jmp 0x272e2
movq -0x1a0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x19d60
jmp 0x272f7
leaq -0x140(%rbp), %rdi
callq 0x12a00
movq -0x158(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x12d90
jmp 0x27318
leaq -0x130(%rbp), %rdi
callq 0x15c40
leaq -0xd0(%rbp), %rdi
callq 0x12d50
jmp 0x273dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2738f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27383
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27377
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x12d50
leaq -0x120(%rbp), %rdi
callq 0x64c8
leaq -0xf0(%rbp), %rdi
callq 0x15bd0
leaq -0x100(%rbp), %rdi
callq 0x12a00
jmp 0x273e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x273c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x12a00
leaq -0x130(%rbp), %rdi
callq 0x15c40
leaq -0xd0(%rbp), %rdi
callq 0x12d50
jmp 0x273e6
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x6460
nop