// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0xb3f4
leaq 0xdc84(%rip), %rsi      # 0x1e7d4
movq %r15, %rdi
callq 0x8dc3
movl %eax, %ebp
movq %r15, %rdi
callq 0x5378
testb %bpl, %bpl
je 0x10c3c
movq (%r14), %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0xb45c
movq (%r15), %rsi
leaq 0x18(%rsp), %rdi
callq 0x121a8
movq 0x18(%rsp), %r15
movq (%r14), %rsi
movq (%rsi), %rax
leaq 0x98(%rsp), %rdi
callq *0x70(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x98(%rsp), %rdx
movq %r15, %rsi
callq 0xb50e
movq 0x8(%rsp), %rsi
movq (%rsi), %rax
leaq 0x38(%rsp), %rdi
callq *0x100(%rax)
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x98(%rsp), %rdi
callq 0x5378
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x30(%rsp), %rdi
callq 0x8ea0
leaq 0x8(%rsp), %r15
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x9ef8
movq (%r15), %r15
movq (%r14), %rsi
leaq 0x68(%rsp), %rdi
callq 0xb45c
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0xb452
leaq 0x70(%rsp), %rdi
callq 0x8ea0
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x8e02
jmp 0x10cfe
movq (%r14), %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0xb45c
movq (%r15), %rsi
leaq 0x18(%rsp), %rdi
callq 0x121a8
movq 0x18(%rsp), %r15
movq (%r14), %rsi
leaq 0x78(%rsp), %rdi
callq 0xb3e2
leaq 0x8(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq %r15, %rsi
callq 0xb50e
movq 0x8(%rsp), %rsi
movq (%rsi), %rax
leaq 0x38(%rsp), %rdi
callq *0x100(%rax)
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x78(%rsp), %rdi
callq 0x5378
leaq 0x20(%rsp), %rdi
callq 0x8ea0
leaq 0x30(%rsp), %rdi
callq 0x8ea0
leaq 0x8(%rsp), %r15
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x9ef8
movq (%r15), %r15
movq (%r14), %rsi
leaq 0x58(%rsp), %rdi
callq 0xb45c
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0xb452
leaq 0x60(%rsp), %rdi
callq 0x8ea0
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x8e02
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x40(%rsp), %rdi
callq 0x8ea0
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x10d32
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x8ea0
jmp 0x10d95
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8ea0
jmp 0x10d5a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8ea0
jmp 0x10d64
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x10d6c
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x5378
jmp 0x10d78
jmp 0x10d75
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8ea0
jmp 0x10d89
jmp 0x10d86
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x10da4
jmp 0x10d92
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8ea0
leaq 0x40(%rsp), %rdi
callq 0x8ea0
movq %rbx, %rdi
callq 0x5330
nop