// File: /workspace/github_cpp_makefile_star2_O1/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 0xe816
leaq 0x12c02(%rip), %rsi     # 0x28872
movq %r15, %rdi
callq 0x50a0
movl %eax, %ebp
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x15c94
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51f0
testl %ebp, %ebp
je 0x15d67
movq (%r14), %rsi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xe8aa
movq (%r15), %rsi
movq %rsp, %rdi
callq 0x17c54
movq (%rsp), %r15
movq (%r14), %rsi
leaq 0x70(%rsp), %rdi
callq 0xe7f2
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r15, %rsi
callq 0xe972
movq 0x10(%rsp), %rsi
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x100(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15cfc
callq 0xb634
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15d1d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15d2c
callq 0xb634
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x15d3b
callq 0xb634
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r15
testq %r15, %r15
je 0x15e33
movq 0x1e26b(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x15e2e
incl 0x8(%r15)
jmp 0x15e33
movq (%r14), %rsi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xe8aa
movq (%r15), %rsi
movq %rsp, %rdi
callq 0x17c54
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 0xe972
movq 0x10(%rsp), %rsi
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x100(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15dce
callq 0xb634
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15def
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x51f0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15dfe
callq 0xb634
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x15e0d
callq 0xb634
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r15
testq %r15, %r15
je 0x15e70
movq 0x1e19d(%rip), %rax     # 0x33fc0
cmpb $0x0, (%rax)
je 0x15e6b
incl 0x8(%r15)
jmp 0x15e70
lock
incl 0x8(%r15)
movq (%r14), %rsi
leaq 0x50(%rsp), %rdi
callq 0xe8aa
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0xe896
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15e5c
callq 0xb634
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xb590
jmp 0x15ea6
lock
incl 0x8(%r15)
movq (%r14), %rsi
leaq 0x60(%rsp), %rdi
callq 0xe8aa
leaq 0x60(%rsp), %rsi
movq %r12, %rdi
callq 0xe896
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x15e99
callq 0xb634
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xb590
testq %r15, %r15
je 0x15eb3
movq %r15, %rdi
callq 0xb634
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15ec2
callq 0xb634
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0x15f1a
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15ef3
callq 0xb634
jmp 0x15ef3
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15f63
movq 0xa0(%rsp), %rsi
jmp 0x15f56
jmp 0x15f60
jmp 0x15f74
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15f83
callq 0xb634
jmp 0x15f83
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15f3d
callq 0xb634
jmp 0x15f3d
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15f63
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x51f0
jmp 0x15f63
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15f77
callq 0xb634
jmp 0x15f77
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x15f95
jmp 0x15f80
movq %rax, %rbx
testq %r15, %r15
je 0x15f90
movq %r15, %rdi
callq 0xb634
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15f9f
callq 0xb634
movq %rbx, %rdi
callq 0x5320
nop