// File: /workspace/github_cpp_makefile_star2_O1/AngelPn[P]L5R-card_game/src/Player.cpp
// Function: Player::Player(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Player::Player(const std::string &name){
	this->name = name;
	list<GreenCard*>* ptr = deck.createFateDeck();
	fateDeck= new list<GreenCard*>(*ptr);  //fateDeck is pointer to a new list of pointers which refer to the green cards in deck
	deck.deckShuffler(fateDeck);

	list<BlackCard*>* ptr1 = deck.createDynastyDeck();
	dynastyDeck = new list<BlackCard*>(*ptr1); //dynastyDeck is pointer to a new list of pointers which refer to the black cards in deck
	deck.deckShuffler(dynastyDeck);

	for(int i=0; i< NO_HAND; i++){
		hand.push_back(fateDeck->front());
		fateDeck->pop_front();
  }

	holdings.push_back(new Stronghold);
	money = holdings[0]->initialMoney();
	roundMoney = money;
	numberOfProvinces= NO_PROVINCES;

	for(int i=0; i< numberOfProvinces; i++){
		provinces.push_back(dynastyDeck->front());
	    dynastyDeck->pop_front();
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
movq %rdi, %rbx
callq 0x35a8
leaq 0x20(%rbx), %r14
leaq 0x38(%rbx), %r15
leaq 0x88(%rbx), %r12
xorl %eax, %eax
movq %rax, 0x98(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rbx)
leaq 0xa8(%rbx), %rdi
leaq 0xb8(%rbx), %rcx
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
movq %rcx, (%rsp)
movq %rcx, 0xa8(%rbx)
movq %rax, 0xb0(%rbx)
movb $0x0, 0xb8(%rbx)
movq %rdi, 0x8(%rsp)
movq %r13, %rsi
callq 0x30c0
movq %rbx, %rdi
callq 0x374a
movq %rax, %r13
movl $0x18, %edi
callq 0x3170
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
callq 0xb664
movq %rbp, 0x10(%rbx)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4a68
movq %rbx, %rdi
callq 0x3fca
movq %rax, %r13
movl $0x18, %edi
callq 0x3170
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
callq 0xb6b4
movq %rbp, 0x18(%rbx)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x492e
movl $0x6, %ebp
movq 0x10(%rbx), %rax
movq 0x28(%rbx), %rsi
movq (%rax), %rdx
addq $0x10, %rdx
cmpq 0x30(%rbx), %rsi
je 0x7f76
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x7f7e
movq %r14, %rdi
callq 0x6b08
movq 0x10(%rbx), %rax
movq (%rax), %r13
decq 0x10(%rax)
movq %r13, %rdi
callq 0x31f0
movl $0x18, %esi
movq %r13, %rdi
callq 0x3180
decl %ebp
jne 0x7f54
movl $0x50, %edi
callq 0x3170
movq %rax, %rbp
movq %rax, %rdi
callq 0xb704
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0xb95c
movq (%r15), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, 0xa0(%rbx)
movl %eax, 0xa4(%rbx)
movl $0x4, 0x80(%rbx)
xorl %ebp, %ebp
movq 0x18(%rbx), %rax
movq 0x90(%rbx), %rsi
movq (%rax), %rdx
addq $0x10, %rdx
cmpq 0x98(%rbx), %rsi
je 0x8016
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x90(%rbx)
jmp 0x801e
movq %r12, %rdi
callq 0x69cc
movq 0x18(%rbx), %rax
movq (%rax), %r13
decq 0x10(%rax)
movq %r13, %rdi
callq 0x31f0
movl $0x18, %esi
movq %r13, %rdi
callq 0x3180
incl %ebp
cmpl 0x80(%rbx), %ebp
jl 0x7feb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movl $0x50, %esi
jmp 0x806b
jmp 0x8063
movq %rax, %r13
movl $0x18, %esi
movq %rbp, %rdi
callq 0x3180
jmp 0x8082
jmp 0x807f
jmp 0x807f
jmp 0x807f
jmp 0x807f
jmp 0x807f
movq %rax, %r13
movq 0x8(%rsp), %rax
movq (%rax), %rdi
cmpq (%rsp), %rdi
je 0x809f
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3180
movq (%r12), %rdi
testq %rdi, %rdi
je 0x80b7
movq 0x98(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x80cc
movq 0x78(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x80e1
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq (%r15), %rdi
testq %rdi, %rdi
je 0x80f5
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq (%r14), %rdi
testq %rdi, %rdi
je 0x8109
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq %rbx, %rdi
callq 0x3604
movq %r13, %rdi
callq 0x3220
nop