// File: ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::UpdateAvailableMoves()
void Solitaire::UpdateAvailableMoves() {
	movesAvailableCount = 0;
	int foundationMin = FoundationMin();
	Card talon[24];
	int talonMoves[24];
	int talonCount = GetTalonCards(talon, talonMoves);

	//Check tableau to foundation, Check tableau to tableau
	for (int i = TABLEAU1; i <= TABLEAU7; ++i) {
		Pile & pile1 = piles[i];
		int pile1Size = pile1.Size();

		if (pile1Size == 0) { continue; }

		int pile1UpSize = pile1.UpSize();
		Card card1 = pile1.Low();
		int cardFoundation = card1.Foundation;

		if (card1.Rank - piles[cardFoundation].Size() == 1) {
			//logic used to tell if we can safely move a card to its foundation
			if (card1.Rank < foundationMin) {
				movesAvailable[0].Set(i, cardFoundation, 1, pile1UpSize == 1 && pile1Size > 1 ? 1 : 0);
				movesAvailableCount = 1;
				return;
			}

			movesAvailable[movesAvailableCount++].Set(i, cardFoundation, 1, pile1UpSize == 1 && pile1Size > 1 ? 1 : 0);
		}

		Card card2 = pile1.High();
		int pile1Length = card2.Rank - card1.Rank + 1;
		bool kingMoved = false;

		for (int j = TABLEAU1; j <= TABLEAU7; ++j) {
			if (i == j) { continue; }

			Pile & pile2 = piles[j];

			if (pile2.Size() == 0) {
				if (card2.Rank == KING && pile1Size != pile1Length && !kingMoved) {
					movesAvailable[movesAvailableCount++].Set(i, j, pile1Length, 1);
					//only create one move for a blank spot
					kingMoved = true;
				}
				continue;
			}

			Card card3 = pile2.Low();
			//logic used to determine if a pile of cards can be moved ontop of another pile of cards
			if (card1.Rank >= card3.Rank || card2.Rank + 1 < card3.Rank || ((card3.IsRed ^ card1.IsRed) ^ (card3.IsOdd ^ card1.IsOdd)) != 0) {
				continue;
			}

			int pile1Moved = card3.Rank - card1.Rank;

			if (pile1Moved == pile1Length) {//we are moving all face up cards
				movesAvailable[movesAvailableCount++].Set(i, j, pile1Moved, pile1Size > pile1Moved ? 1 : 0);
				continue;
			}

			//look to see if we are covering a card that can be moved to the foundation
			Card card4 = pile1[pile1UpSize - pile1Moved - 1];
			if (card4.Rank - piles[card4.Foundation].Size() == 1) {
				movesAvailable[movesAvailableCount++].Set(i, j, pile1Moved, 0);
			}
		}
	}

	//Check talon cards
	for (int j = 0; j < talonCount; j++) {
		Card talonCard = talon[j];
		int foundation = talonCard.Foundation;
		int cardsToDraw = talonMoves[j];

		if (talonCard.Rank - piles[foundation].Size() == 1) {
			if (talonCard.Rank <= foundationMin) {
				if (drawCount == 1) {
					if (cardsToDraw == 0 || movesAvailableCount == 0) {
						movesAvailable[0].Set(WASTE, foundation, 1, cardsToDraw);
						movesAvailableCount = 1;
						return;
					} else {
						movesAvailable[movesAvailableCount++].Set(WASTE, foundation, 1, cardsToDraw);
						break;
					}
				} else {
					movesAvailable[movesAvailableCount++].Set(WASTE, foundation, 1, cardsToDraw);
					continue;
				}
			}

			movesAvailable[movesAvailableCount++].Set(WASTE, foundation, 1, cardsToDraw);
		}

		for (int i = TABLEAU1; i <= TABLEAU7; ++i) {
			Pile & pile = piles[i];

			if (pile.Size() != 0) {
				Card tableauCard = pile.Low();

				if (tableauCard.Rank - talonCard.Rank != 1 || tableauCard.IsRed == talonCard.IsRed) {
					continue;
				}

				movesAvailable[movesAvailableCount++].Set(WASTE, i, 1, cardsToDraw);
			} else if (talonCard.Rank == KING) {
				movesAvailable[movesAvailableCount++].Set(WASTE, i, 1, cardsToDraw);
				break;
			}
		}
	}

	if (foundationCount == 0) { return; }
	//Check foundation to tableau, very rarely needed to solve optimally
	Move lastMove = movesMade[movesMadeCount - 1];
	for (int i = FOUNDATION1C; i <= FOUNDATION4H; ++i) {
		Pile & pile1 = piles[i];
		int foundationRank = pile1.Size();
		if (foundationRank == 0 || foundationRank <= foundationMin) { continue; }

		for (int j = TABLEAU1; j <= TABLEAU7; ++j) {
			Pile & pile2 = piles[j];

			if (pile2.Size() != 0) {
				Card card = pile2.Low();

				if ((card.Foundation & 1) == (i & 1) || card.Rank - foundationRank != 1) {
					continue;
				}

				if (lastMove.From != j && lastMove.To != i) {
					movesAvailable[movesAvailableCount++].Set(i, j, 1, 0);
				}
			} else if (foundationRank == KING) {
				if (lastMove.From != j && lastMove.To != i) {
					movesAvailable[movesAvailableCount++].Set(i, j, 1, 0);
				}
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
movl $0x0, 0x1910(%rdi)
callq 0xba00
movq -0x1b0(%rbp), %rdi
movl %eax, -0xc(%rbp)
leaq -0xa0(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0xb710
movl %eax, -0x104(%rbp)
movl $0x1, -0x108(%rbp)
cmpl $0x7, -0x108(%rbp)
jg 0x7927
movq -0x1b0(%rbp), %rax
addq $0x800, %rax            # imm = 0x800
movslq -0x108(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
addq %rcx, %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
callq 0x6400
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
jne 0x7428
jmp 0x7913
movq -0x110(%rbp), %rdi
callq 0x6440
movl %eax, -0x118(%rbp)
movq -0x110(%rbp), %rdi
callq 0x6550
movq -0x1b0(%rbp), %rdi
movl %eax, %ecx
movl %ecx, -0x11e(%rbp)
shrq $0x20, %rax
movw %ax, -0x11a(%rbp)
movzbl -0x11a(%rbp), %eax
movl %eax, -0x124(%rbp)
movzbl -0x11d(%rbp), %eax
movl %eax, -0x1b4(%rbp)
addq $0x800, %rdi            # imm = 0x800
movslq -0x124(%rbp), %rax
imulq $0x12c, %rax, %rax      # imm = 0x12C
addq %rax, %rdi
callq 0x6400
movl %eax, %ecx
movl -0x1b4(%rbp), %eax
subl %ecx, %eax
cmpl $0x1, %eax
jne 0x7604
movzbl -0x11d(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x755b
movq -0x1b0(%rbp), %rax
addq $0x1874, %rax           # imm = 0x1874
movq %rax, -0x1c0(%rbp)
movl -0x108(%rbp), %eax
movb %al, -0x1b7(%rbp)
movl -0x124(%rbp), %eax
movb %al, -0x1b6(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x118(%rbp)
movb %al, -0x1b5(%rbp)
jne 0x7507
cmpl $0x1, -0x114(%rbp)
setg %al
movb %al, -0x1b5(%rbp)
movb -0x1b6(%rbp), %dl
movb -0x1b7(%rbp), %sil
movq -0x1c0(%rbp), %rdi
movb -0x1b5(%rbp), %r8b
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %r8b
cmovnel %ecx, %eax
movl $0x1, %ecx
movzbl %sil, %esi
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
movq -0x1b0(%rbp), %rax
movl $0x1, 0x1910(%rax)
jmp 0x7ef7
movq -0x1b0(%rbp), %rdx
movq %rdx, %rax
addq $0x1874, %rax           # imm = 0x1874
movl 0x1910(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x1910(%rdx)
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x1d0(%rbp)
movl -0x108(%rbp), %eax
movb %al, -0x1c3(%rbp)
movl -0x124(%rbp), %eax
movb %al, -0x1c2(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x118(%rbp)
movb %al, -0x1c1(%rbp)
jne 0x75c6
cmpl $0x1, -0x114(%rbp)
setg %al
movb %al, -0x1c1(%rbp)
movb -0x1c2(%rbp), %dl
movb -0x1c3(%rbp), %sil
movq -0x1d0(%rbp), %rdi
movb -0x1c1(%rbp), %r8b
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %r8b
cmovnel %ecx, %eax
movl $0x1, %ecx
movzbl %sil, %esi
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
movq -0x110(%rbp), %rdi
callq 0x65a0
movl %eax, %ecx
movl %ecx, -0x12a(%rbp)
shrq $0x20, %rax
movw %ax, -0x126(%rbp)
movzbl -0x129(%rbp), %eax
movzbl -0x11d(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x130(%rbp)
movb $0x0, -0x131(%rbp)
movl $0x1, -0x138(%rbp)
cmpl $0x7, -0x138(%rbp)
jg 0x7911
movl -0x108(%rbp), %eax
cmpl -0x138(%rbp), %eax
jne 0x766d
jmp 0x78fd
movq -0x1b0(%rbp), %rax
addq $0x800, %rax            # imm = 0x800
movslq -0x138(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
callq 0x6400
cmpl $0x0, %eax
jne 0x772b
movzbl -0x129(%rbp), %eax
cmpl $0xd, %eax
jne 0x7726
movl -0x114(%rbp), %eax
cmpl -0x130(%rbp), %eax
je 0x7726
testb $0x1, -0x131(%rbp)
jne 0x7726
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x108(%rbp), %eax
movb %al, %dl
movl -0x138(%rbp), %eax
movb %al, %cl
movl -0x130(%rbp), %eax
movl $0x1, %r8d
movzbl %dl, %esi
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x5950
movb $0x1, -0x131(%rbp)
jmp 0x78fd
movq -0x140(%rbp), %rdi
callq 0x6550
movl %eax, %ecx
movl %ecx, -0x146(%rbp)
shrq $0x20, %rax
movw %ax, -0x142(%rbp)
movzbl -0x11d(%rbp), %eax
movzbl -0x145(%rbp), %ecx
cmpl %ecx, %eax
jge 0x7798
movzbl -0x129(%rbp), %eax
addl $0x1, %eax
movzbl -0x145(%rbp), %ecx
cmpl %ecx, %eax
jl 0x7798
movzbl -0x143(%rbp), %eax
movzbl -0x11b(%rbp), %ecx
xorl %ecx, %eax
movzbl -0x144(%rbp), %ecx
movzbl -0x11c(%rbp), %edx
xorl %edx, %ecx
xorl %ecx, %eax
cmpl $0x0, %eax
je 0x779d
jmp 0x78fd
movzbl -0x145(%rbp), %eax
movzbl -0x11d(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
cmpl -0x130(%rbp), %eax
jne 0x783a
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x108(%rbp), %eax
movb %al, %sil
movl -0x138(%rbp), %eax
movb %al, %dl
movl -0x14c(%rbp), %eax
movb %al, %cl
movl -0x114(%rbp), %r9d
movl -0x14c(%rbp), %r10d
xorl %eax, %eax
movl $0x1, %r8d
cmpl %r10d, %r9d
cmovgl %r8d, %eax
movzbl %sil, %esi
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %al, %r8d
callq 0x5950
jmp 0x78fd
movq -0x110(%rbp), %rdi
movl -0x118(%rbp), %eax
movl -0x14c(%rbp), %esi
notl %esi
addl %eax, %esi
callq 0x6460
movq -0x1b0(%rbp), %rdi
movl %eax, %ecx
movl %ecx, -0x152(%rbp)
shrq $0x20, %rax
movw %ax, -0x14e(%rbp)
movzbl -0x151(%rbp), %eax
movl %eax, -0x1d4(%rbp)
addq $0x800, %rdi            # imm = 0x800
movzbl -0x14e(%rbp), %eax
imulq $0x12c, %rax, %rax      # imm = 0x12C
addq %rax, %rdi
callq 0x6400
movl %eax, %ecx
movl -0x1d4(%rbp), %eax
subl %ecx, %eax
cmpl $0x1, %eax
jne 0x78fb
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x108(%rbp), %eax
movb %al, %dl
movl -0x138(%rbp), %eax
movb %al, %cl
movl -0x14c(%rbp), %eax
xorl %r8d, %r8d
movzbl %dl, %esi
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x5950
jmp 0x78fd
movl -0x138(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x138(%rbp)
jmp 0x764d
jmp 0x7913
movl -0x108(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x108(%rbp)
jmp 0x73d6
movl $0x0, -0x158(%rbp)
movl -0x158(%rbp), %eax
cmpl -0x104(%rbp), %eax
jge 0x7cb2
movq -0x1b0(%rbp), %rdi
movslq -0x158(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movl %ecx, -0x15e(%rbp)
movw 0x4(%rax), %ax
movw %ax, -0x15a(%rbp)
movzbl -0x15a(%rbp), %eax
movl %eax, -0x164(%rbp)
movslq -0x158(%rbp), %rax
movl -0x100(%rbp,%rax,4), %eax
movl %eax, -0x168(%rbp)
movzbl -0x15d(%rbp), %eax
movl %eax, -0x1d8(%rbp)
addq $0x800, %rdi            # imm = 0x800
movslq -0x164(%rbp), %rax
imulq $0x12c, %rax, %rax      # imm = 0x12C
addq %rax, %rdi
callq 0x6400
movl %eax, %ecx
movl -0x1d8(%rbp), %eax
subl %ecx, %eax
cmpl $0x1, %eax
jne 0x7b40
movzbl -0x15d(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x7af4
movq -0x1b0(%rbp), %rax
cmpl $0x1, 0x1904(%rax)
jne 0x7aa3
cmpl $0x0, -0x168(%rbp)
je 0x7a0d
movq -0x1b0(%rbp), %rax
cmpl $0x0, 0x1910(%rax)
jne 0x7a52
movq -0x1b0(%rbp), %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl -0x164(%rbp), %eax
movb %al, %dl
movl -0x168(%rbp), %eax
xorl %esi, %esi
movl $0x1, %ecx
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
movq -0x1b0(%rbp), %rax
movl $0x1, 0x1910(%rax)
jmp 0x7ef7
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x164(%rbp), %eax
movb %al, %dl
movl -0x168(%rbp), %eax
xorl %esi, %esi
movl $0x1, %ecx
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
jmp 0x7cb2
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x164(%rbp), %eax
movb %al, %dl
movl -0x168(%rbp), %eax
xorl %esi, %esi
movl $0x1, %ecx
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
jmp 0x7c9e
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x164(%rbp), %eax
movb %al, %dl
movl -0x168(%rbp), %eax
xorl %esi, %esi
movl $0x1, %ecx
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
movl $0x1, -0x16c(%rbp)
cmpl $0x7, -0x16c(%rbp)
jg 0x7c9c
movq -0x1b0(%rbp), %rax
addq $0x800, %rax            # imm = 0x800
movslq -0x16c(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
addq %rcx, %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rdi
callq 0x6400
cmpl $0x0, %eax
je 0x7c2a
movq -0x178(%rbp), %rdi
callq 0x6550
movl %eax, %ecx
movl %ecx, -0x17e(%rbp)
shrq $0x20, %rax
movw %ax, -0x17a(%rbp)
movzbl -0x17d(%rbp), %eax
movzbl -0x15d(%rbp), %ecx
subl %ecx, %eax
cmpl $0x1, %eax
jne 0x7bd7
movzbl -0x17b(%rbp), %eax
movzbl -0x15b(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7bdc
jmp 0x7c88
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x16c(%rbp), %eax
movb %al, %dl
movl -0x168(%rbp), %eax
xorl %esi, %esi
movl $0x1, %ecx
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
jmp 0x7c86
movzbl -0x15d(%rbp), %eax
cmpl $0xd, %eax
jne 0x7c84
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x16c(%rbp), %eax
movb %al, %dl
movl -0x168(%rbp), %eax
xorl %esi, %esi
movl $0x1, %ecx
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x5950
jmp 0x7c9c
jmp 0x7c86
jmp 0x7c88
movl -0x16c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x16c(%rbp)
jmp 0x7b4a
jmp 0x7c9e
movl -0x158(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x158(%rbp)
jmp 0x7931
movq -0x1b0(%rbp), %rax
cmpl $0x0, 0x190c(%rax)
jne 0x7cc7
jmp 0x7ef7
movq -0x1b0(%rbp), %rax
movl 0x1914(%rax), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x182(%rbp)
movl $0x9, -0x188(%rbp)
cmpl $0xc, -0x188(%rbp)
jg 0x7ef7
movq -0x1b0(%rbp), %rax
addq $0x800, %rax            # imm = 0x800
movslq -0x188(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
addq %rcx, %rax
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rdi
callq 0x6400
movl %eax, -0x194(%rbp)
cmpl $0x0, -0x194(%rbp)
je 0x7d45
movl -0x194(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x7d4a
jmp 0x7ee3
movl $0x1, -0x198(%rbp)
cmpl $0x7, -0x198(%rbp)
jg 0x7ee1
movq -0x1b0(%rbp), %rax
addq $0x800, %rax            # imm = 0x800
movslq -0x198(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
addq %rcx, %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rdi
callq 0x6400
cmpl $0x0, %eax
je 0x7e54
movq -0x1a0(%rbp), %rdi
callq 0x6550
movl %eax, %ecx
movl %ecx, -0x1a6(%rbp)
shrq $0x20, %rax
movw %ax, -0x1a2(%rbp)
movzbl -0x1a2(%rbp), %eax
andl $0x1, %eax
movl -0x188(%rbp), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
je 0x7de3
movzbl -0x1a5(%rbp), %eax
subl -0x194(%rbp), %eax
cmpl $0x1, %eax
je 0x7de8
jmp 0x7ecd
movzbl -0x182(%rbp), %eax
cmpl -0x198(%rbp), %eax
je 0x7e52
movzbl -0x181(%rbp), %eax
cmpl -0x188(%rbp), %eax
je 0x7e52
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x188(%rbp), %eax
movb %al, %dl
movl -0x198(%rbp), %eax
movl $0x1, %ecx
xorl %r8d, %r8d
movzbl %dl, %esi
movzbl %al, %edx
callq 0x5950
jmp 0x7ecb
cmpl $0xd, -0x194(%rbp)
jne 0x7ec9
movzbl -0x182(%rbp), %eax
cmpl -0x198(%rbp), %eax
je 0x7ec7
movzbl -0x181(%rbp), %eax
cmpl -0x188(%rbp), %eax
je 0x7ec7
movq -0x1b0(%rbp), %rcx
movq %rcx, %rdi
addq $0x1874, %rdi           # imm = 0x1874
movl 0x1910(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x1910(%rcx)
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x188(%rbp), %eax
movb %al, %dl
movl -0x198(%rbp), %eax
movl $0x1, %ecx
xorl %r8d, %r8d
movzbl %dl, %esi
movzbl %al, %edx
callq 0x5950
jmp 0x7ee1
jmp 0x7ecb
jmp 0x7ecd
movl -0x198(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x198(%rbp)
jmp 0x7d54
jmp 0x7ee3
movl -0x188(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x188(%rbp)
jmp 0x7ced
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq