// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0xe5f6
leaq 0x11cd2(%rip), %rsi     # 0x27872
movq %r15, %rdi
callq 0x50a0
movl %eax, %ebp
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x15bc4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51f0
testl %ebp, %ebp
je 0x15c97
movq (%r14), %rsi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xe68a
movq (%r15), %rsi
movq %rsp, %rdi
callq 0x17b18
movq (%rsp), %r15
movq (%r14), %rsi
leaq 0x70(%rsp), %rdi
callq 0xe5d2
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r15, %rsi
callq 0xe756
movq 0x10(%rsp), %rsi
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x100(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15c2c
callq 0xb478
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15c4d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15c5c
callq 0xb478
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x15c6b
callq 0xb478
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r15
testq %r15, %r15
je 0x15d63
movq 0x1d33b(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x15d5e
incl 0x8(%r15)
jmp 0x15d63
movq (%r14), %rsi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xe68a
movq (%r15), %rsi
movq %rsp, %rdi
callq 0x17b18
movq (%rsp), %r15
movq (%r14), %rsi
movq (%rsi), %rax
leaq 0x90(%rsp), %rdi
callq *0x70(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r15, %rsi
callq 0xe756
movq 0x10(%rsp), %rsi
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x100(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15cfe
callq 0xb478
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15d1f
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15d2e
callq 0xb478
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x15d3d
callq 0xb478
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r15
testq %r15, %r15
je 0x15da0
movq 0x1d26d(%rip), %rax     # 0x32fc0
cmpb $0x0, (%rax)
je 0x15d9b
incl 0x8(%r15)
jmp 0x15da0
lock
incl 0x8(%r15)
movq (%r14), %rsi
leaq 0x50(%rsp), %rdi
callq 0xe68a
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0xe676
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15d8c
callq 0xb478
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xb3c4
jmp 0x15dd6
lock
incl 0x8(%r15)
movq (%r14), %rsi
leaq 0x60(%rsp), %rdi
callq 0xe68a
leaq 0x60(%rsp), %rsi
movq %r12, %rdi
callq 0xe676
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x15dc9
callq 0xb478
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xb3c4
testq %r15, %r15
je 0x15de3
movq %r15, %rdi
callq 0xb478
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15df2
callq 0xb478
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0x15e4a
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15e23
callq 0xb478
jmp 0x15e23
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15e93
movq 0xa0(%rsp), %rsi
jmp 0x15e86
jmp 0x15e90
jmp 0x15ea4
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15eb3
callq 0xb478
jmp 0x15eb3
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15e6d
callq 0xb478
jmp 0x15e6d
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15e93
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x15e93
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15ea7
callq 0xb478
jmp 0x15ea7
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x15ec5
jmp 0x15eb0
movq %rax, %rbx
testq %r15, %r15
je 0x15ec0
movq %r15, %rdi
callq 0xb478
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15ecf
callq 0xb478
movq %rbx, %rdi
callq 0x5320
nop