// File: /workspace/github_cpp_makefile_star2_O3/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 0x373a
movq %rax, %r13
movl $0x18, %edi
callq 0x3170
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
callq 0xb75c
movq %rbp, 0x10(%rbx)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4aae
movq %rbx, %rdi
callq 0x3fdc
movq %rax, %r13
movl $0x18, %edi
callq 0x3170
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
callq 0xb7ac
movq %rbp, 0x18(%rbx)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4968
movl $0x6, %ebp
movq 0x10(%rbx), %rax
movq 0x28(%rbx), %rsi
movq (%rax), %rdx
addq $0x10, %rdx
cmpq 0x30(%rbx), %rsi
je 0x7fda
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x7fe2
movq %r14, %rdi
callq 0x6b62
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 0x7fb8
movl $0x50, %edi
callq 0x3170
movq %rax, %rbp
movq %rax, %rdi
callq 0xb7fc
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, %rdi
callq 0xba54
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 0x807a
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x90(%rbx)
jmp 0x8082
movq %r12, %rdi
callq 0x6a26
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 0x804f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movl $0x50, %esi
jmp 0x80cf
jmp 0x80c7
movq %rax, %r13
movl $0x18, %esi
movq %rbp, %rdi
callq 0x3180
jmp 0x80e6
jmp 0x80e3
jmp 0x80e3
jmp 0x80e3
jmp 0x80e3
jmp 0x80e3
movq %rax, %r13
movq 0x8(%rsp), %rax
movq (%rax), %rdi
cmpq (%rsp), %rdi
je 0x8103
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3180
movq (%r12), %rdi
testq %rdi, %rdi
je 0x811b
movq 0x98(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x8130
movq 0x78(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x8145
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq (%r15), %rdi
testq %rdi, %rdi
je 0x8159
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq (%r14), %rdi
testq %rdi, %rdi
je 0x816d
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3180
movq %rbx, %rdi
callq 0x35f8
movq %r13, %rdi
callq 0x3220
nop