// File: BohangZhang[P]Sorcery-C-Project/game.cc
// Function: Game::loadDecks(std::basic_ifstream<char, std::char_traits<char>>&, std::basic_ifstream<char, std::char_traits<char>>&)
void Game::loadDecks(ifstream &deck1, ifstream &deck2) {
    string cardname;
    shared_ptr<Card> newcard{nullptr};
    while (getline(deck1, cardname)) {
        if (deck1.fail()) {break;}
        newcard = this->get1()->getDatabase()->getCard(cardname);
        shared_ptr<Card> c = newcard->clone();
        c->setMaster(player1);
        this->get1()->getDeck()->push(c);
    }
    while (getline(deck2, cardname)) {
        if (deck2.fail()) {break;}
        newcard = this->get2()->getDatabase()->getCard(cardname);
        shared_ptr<Card> c = newcard->clone();
        c->setMaster(player2);
        this->get2()->getDeck()->push(c);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x63d0
leaq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x25d60
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6070
movq %rax, -0x1a8(%rbp)
jmp 0x2304e
movq -0x1a8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6390
movb %al, -0x1a9(%rbp)
jmp 0x2306c
movb -0x1a9(%rbp), %al
testb $0x1, %al
jne 0x2307b
jmp 0x23347
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x1aa(%rbp)
jmp 0x23096
movb -0x1aa(%rbp), %al
testb $0x1, %al
jne 0x230a2
jmp 0x230b8
jmp 0x23347
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x23671
movq -0x1a0(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x22940
movq -0x1b8(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x2a740
jmp 0x230ec
leaq -0x78(%rbp), %rdi
callq 0x15bb0
movq %rax, -0x1c0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6100
jmp 0x2310e
movq -0x1c0(%rbp), %rsi
leaq -0x68(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x19f10
jmp 0x23127
leaq -0x48(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
leaq -0x68(%rbp), %rsi
movq %rsi, -0x1d0(%rbp)
callq 0x1e5b0
movq -0x1d0(%rbp), %rdi
callq 0x15c40
leaq -0xa8(%rbp), %rdi
callq 0x64c8
leaq -0x78(%rbp), %rdi
callq 0x15bd0
leaq -0x88(%rbp), %rdi
callq 0x12a00
movq -0x1c8(%rbp), %rdi
callq 0x15c20
movq %rax, %rsi
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq -0xb8(%rbp), %rdi
callq *%rax
jmp 0x23190
leaq -0xb8(%rbp), %rdi
callq 0x15c20
movq -0x1a0(%rbp), %rsi
movq %rax, -0x1e0(%rbp)
addq $0x8, %rsi
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x129a0
movq -0x1e0(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x19d60
jmp 0x231d6
leaq -0xc8(%rbp), %rdi
callq 0x12a00
movq -0x1a0(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x22940
movq -0x1e8(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x2a710
jmp 0x23219
leaq -0xd8(%rbp), %rdi
callq 0x25d80
movq %rax, -0x1f8(%rbp)
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
leaq -0xb8(%rbp), %rsi
callq 0x1a1f0
movq -0x1f8(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
callq 0x1d380
jmp 0x2325b
leaq -0xf8(%rbp), %rdi
callq 0x15c40
leaq -0xd8(%rbp), %rdi
callq 0x25da0
leaq -0xe8(%rbp), %rdi
callq 0x12a00
leaq -0xb8(%rbp), %rdi
callq 0x15c40
jmp 0x23038
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x232cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x232c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x64c8
leaq -0x78(%rbp), %rdi
callq 0x15bd0
leaq -0x88(%rbp), %rdi
callq 0x12a00
jmp 0x23671
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x12a00
jmp 0x23336
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2332a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x15c40
leaq -0xd8(%rbp), %rdi
callq 0x25da0
leaq -0xe8(%rbp), %rdi
callq 0x12a00
leaq -0xb8(%rbp), %rdi
callq 0x15c40
jmp 0x23671
jmp 0x23349
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6070
movq %rax, -0x200(%rbp)
jmp 0x2335f
movq -0x200(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6390
movb %al, -0x201(%rbp)
jmp 0x2337d
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x2338c
jmp 0x23656
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x202(%rbp)
jmp 0x233a7
movb -0x202(%rbp), %al
testb $0x1, %al
jne 0x233b3
jmp 0x233b8
jmp 0x23656
movq -0x1a0(%rbp), %rsi
leaq -0x128(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x22970
movq -0x210(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x118(%rbp), %rdi
callq 0x2a740
jmp 0x233ef
leaq -0x118(%rbp), %rdi
callq 0x15bb0
movq %rax, -0x218(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6100
jmp 0x23414
movq -0x218(%rbp), %rsi
leaq -0x108(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x19f10
jmp 0x23430
leaq -0x48(%rbp), %rdi
movq %rdi, -0x220(%rbp)
leaq -0x108(%rbp), %rsi
movq %rsi, -0x228(%rbp)
callq 0x1e5b0
movq -0x228(%rbp), %rdi
callq 0x15c40
leaq -0x148(%rbp), %rdi
callq 0x64c8
leaq -0x118(%rbp), %rdi
callq 0x15bd0
leaq -0x128(%rbp), %rdi
callq 0x12a00
movq -0x220(%rbp), %rdi
callq 0x15c20
movq %rax, %rsi
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq -0x158(%rbp), %rdi
callq *%rax
jmp 0x2349f
leaq -0x158(%rbp), %rdi
callq 0x15c20
movq -0x1a0(%rbp), %rsi
movq %rax, -0x238(%rbp)
addq $0x18, %rsi
leaq -0x168(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x129a0
movq -0x238(%rbp), %rdi
movq -0x230(%rbp), %rsi
callq 0x19d60
jmp 0x234e5
leaq -0x168(%rbp), %rdi
callq 0x12a00
movq -0x1a0(%rbp), %rsi
leaq -0x188(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x22970
movq -0x240(%rbp), %rdi
callq 0x12980
movq %rax, %rsi
leaq -0x178(%rbp), %rdi
callq 0x2a710
jmp 0x23528
leaq -0x178(%rbp), %rdi
callq 0x25d80
movq %rax, -0x250(%rbp)
leaq -0x198(%rbp), %rdi
movq %rdi, -0x248(%rbp)
leaq -0x158(%rbp), %rsi
callq 0x1a1f0
movq -0x250(%rbp), %rdi
movq -0x248(%rbp), %rsi
callq 0x1d380
jmp 0x2356a
leaq -0x198(%rbp), %rdi
callq 0x15c40
leaq -0x178(%rbp), %rdi
callq 0x25da0
leaq -0x188(%rbp), %rdi
callq 0x12a00
leaq -0x158(%rbp), %rdi
callq 0x15c40
jmp 0x23349
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x235df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x235d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x64c8
leaq -0x118(%rbp), %rdi
callq 0x15bd0
leaq -0x128(%rbp), %rdi
callq 0x12a00
jmp 0x23671
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x12a00
jmp 0x23648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2363c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x15c40
leaq -0x178(%rbp), %rdi
callq 0x25da0
leaq -0x188(%rbp), %rdi
callq 0x12a00
leaq -0x158(%rbp), %rdi
callq 0x15c40
jmp 0x23671
leaq -0x48(%rbp), %rdi
callq 0x15c40
leaq -0x38(%rbp), %rdi
callq 0x64c8
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x15c40
leaq -0x38(%rbp), %rdi
callq 0x64c8
movq -0x50(%rbp), %rdi
callq 0x6460
nopl (%rax)