// File: /workspace/github_cpp_makefile_star2_O1/Doug0855[P]TigerZone/Board.cpp
// Function: Board::buildTrail(Structure*, Tile*, std::vector<std::vector<Block, std::allocator<Block>>, std::allocator<std::vector<Block, std::allocator<Block>>>>&, std::pair<int, int>, std::vector<Tile*, std::allocator<Tile*>>&)
void Board::buildTrail(Structure* struc, Tile *tile, std::vector< std::vector<Block> >& tileBlocks, std::pair<int,int> blockSpot, std::vector<Tile*> &visitedTiles) {
	int row = blockSpot.first;
	int col = blockSpot.second;
	tileBlocks[row][col].visit();

	// We must check how many ways a trail exits/enters a block to know how many trails the block contains.
	// If its 2 or under then the block is 1 connected trail, if it's more than the trails all start from the center and are unique entities
	if(row == 1 && col == 1) {
		int divergingTrailCount = 0;
		if(tileBlocks[row+1][col].getType() == "trail")
			divergingTrailCount++;
		if(tileBlocks[row-1][col].getType() == "trail")
			divergingTrailCount++;
		if(tileBlocks[row][col+1].getType() == "trail")
			divergingTrailCount++;
		if(tileBlocks[row][col-1].getType() == "trail")
			divergingTrailCount++;
		if(divergingTrailCount > 2)
			return;
	}

	struc->structureBlocks.push_back(tileBlocks[row][col]);

	// Check block for meeple
	if(tileBlocks[row][col].hasMeeple())
		struc->hasMeeple = true;

	// Check to see if you've added this blocks animals
	bool addedTileAnimals;
	for(int i = 0; i < visitedTiles.size(); i++) {
			if(visitedTiles[i] == tile)
			{
				addedTileAnimals = true;
				//debugging std::cout<<"Added animals already for this tile"<<std::endl;
			}
	}
	if(!addedTileAnimals) {
		struc->checkAnimals(tile);
		// if(tile->hasCrocodile())
		// 	struc->crocodileCount++;
		// if(tile->hasDeer())
		// 	struc->deerCount++;
		// if(tile->hasBoar())
		// 	struc->boarCount++;
		// if(tile->hasBuffalo())
		// 	struc->buffaloCount++;
	}

	// Check tiles above, below, left, and right of the current block to see if trail structure continues
	if((row + 1) <= 2 && !(tileBlocks[row + 1][col].isVisited()) && tileBlocks[row+1][col].getType() == "trail") {
		buildTrail(struc, tile, tileBlocks, std::pair<int,int>(row+1,col), visitedTiles);
	}
	else if(row + 1 > 2 && tile->getDownTile() != NULL) {
		bool visitedNeighborTile = false;
		for(int i = 0; i < visitedTiles.size(); i++) {
			if(visitedTiles[i] == tile->getDownTile())
				visitedNeighborTile = true;
		}
		if(!visitedNeighborTile) {
			visitedTiles.push_back(tile->getDownTile());
			std::vector< std::vector<Block> > newBlocks = tile->getDownTile()->getInnerBlocks();
			buildTrail(struc, tile->getDownTile(), newBlocks, std::pair<int,int>(row - 2,col), visitedTiles);
		}
	}
	// std::cout<<"about to check row-1"<<std::endl;
	if((row - 1) >= 0 && !(tileBlocks[row - 1][col].isVisited()) && tileBlocks[row - 1][col].getType() == "trail") {
		buildTrail(struc, tile, tileBlocks, std::pair<int,int>(row-1,col), visitedTiles);
	}
	else if(row-1 < 0 && tile->getUpTile() != NULL) {
		bool visitedNeighborTile = false;
		for(int i = 0; i < visitedTiles.size(); i++) {
			if(visitedTiles[i] == tile->getUpTile())
				visitedNeighborTile = true;
		}
		if(!visitedNeighborTile) {
			visitedTiles.push_back(tile->getUpTile());
			std::vector< std::vector<Block> > newBlocks = tile->getUpTile()->getInnerBlocks();
			buildTrail(struc, tile->getUpTile(), newBlocks, std::pair<int,int>(row+2,col), visitedTiles);
		}
	}
	// std::cout<<"about to check col+1"<<std::endl;
	if((col + 1) <= 2 && !(tileBlocks[row][col + 1].isVisited()) && tileBlocks[row][col + 1].getType() == "trail") {
		buildTrail(struc, tile, tileBlocks, std::pair<int,int>(row,col+1), visitedTiles);
	}
	else if(col+1 > 2 && tile->getRightTile() != NULL) {
		bool visitedNeighborTile = false;
		for(int i = 0; i < visitedTiles.size(); i++) {
			if(visitedTiles[i] == tile->getRightTile())
				visitedNeighborTile = true;
		}
		if(!visitedNeighborTile) {
			visitedTiles.push_back(tile->getRightTile());
			std::vector< std::vector<Block> > newBlocks = tile->getRightTile()->getInnerBlocks();
			buildTrail(struc, tile->getRightTile(), newBlocks, std::pair<int,int>(row,col-2), visitedTiles);
		}
	}
	// std::cout<<"about to check col-1"<<std::endl;
	if((col - 1) >= 0 && !(tileBlocks[row][col-1].isVisited()) && tileBlocks[row][col - 1].getType() == "trail") {
		// std::cout<<"passing col-1"<<std::endl;
		buildTrail(struc, tile, tileBlocks, std::pair<int,int>(row,col-1), visitedTiles);
	}
	else if(col-1 < 0 && tile->getLeftTile() != NULL) {
		bool visitedNeighborTile = false;
		for(int i = 0; i < visitedTiles.size(); i++) {
			if(visitedTiles[i] == tile->getLeftTile())
				visitedNeighborTile = true;
		}
		if(!visitedNeighborTile) {
			visitedTiles.push_back(tile->getLeftTile());
			std::vector< std::vector<Block> > newBlocks = tile->getLeftTile()->getInnerBlocks();
			buildTrail(struc, tile->getLeftTile(), newBlocks, std::pair<int,int>(row,col+2), visitedTiles);
		}
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, -0x60(%rbp)
movq %r8, %r13
movq %rdx, -0x30(%rbp)
movq %rsi, %r15
movq %rdi, -0x48(%rbp)
movq %r8, %r12
shrq $0x20, %r12
movslq %r13d, %rsi
movq %rcx, -0x38(%rbp)
movq (%rcx), %rax
leaq (%rsi,%rsi,2), %rdx
movq %r8, -0x40(%rbp)
sarq $0x20, %r13
movq (%rax,%rdx,8), %rdx
leaq (,%r13,4), %rcx
addq %r13, %rcx
movq %rcx, -0x50(%rbp)
movb $0x1, 0x1(%rdx,%rcx,8)
cmpl $0x1, %esi
setne %cl
cmpq $0x1, %r12
setne %dl
orb %cl, %dl
movq %r12, -0x68(%rbp)
jne 0x138cf
movq %r15, -0x58(%rbp)
movq 0x30(%rax), %rax
leaq -0x78(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x50(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
movq 0x10(%rax,%rcx,8), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %r14
movq %r14, %rdi
callq 0x9da8
leaq 0x5026(%rip), %rsi      # 0x187b7
movq %r14, %rdi
callq 0x30b0
movl %eax, %r12d
movq (%r14), %rdi
cmpq %rbx, %rdi
je 0x137a9
callq 0x3200
xorl %r15d, %r15d
testl %r12d, %r12d
sete %r15b
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
leaq -0x88(%rbp), %rbx
leaq -0x78(%rbp), %rcx
movq %rcx, (%rbx)
movq -0x50(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
movq 0x10(%rax,%rcx,8), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
leaq 0x4fcc(%rip), %rsi      # 0x187b7
movq %rbx, %rdi
callq 0x30b0
movl %eax, %r14d
movq (%rbx), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x13807
callq 0x3200
xorl %eax, %eax
cmpl $0x1, %r12d
adcl $0x1, %eax
testl %r14d, %r14d
cmovel %eax, %r15d
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x68(%rbp), %r12
leaq (%r12,%r12,4), %rcx
leaq -0x78(%rbp), %rdx
movq %rdx, (%rbx)
movq 0x30(%rax,%rcx,8), %rsi
movq 0x38(%rax,%rcx,8), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
leaq 0x4f6a(%rip), %rsi      # 0x187b7
movq %rbx, %rdi
callq 0x30b0
movl %eax, %r14d
movq (%rbx), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x13869
callq 0x3200
cmpl $0x1, %r14d
adcl $0x0, %r15d
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
leaq -0x78(%rbp), %rcx
movq %rcx, (%rbx)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
leaq 0x4f1a(%rip), %rsi      # 0x187b7
movq %rbx, %rdi
callq 0x30b0
movl %eax, %r14d
movq (%rbx), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x138b9
callq 0x3200
cmpl $0x1, %r14d
adcl $0x0, %r15d
cmpl $0x2, %r15d
movq -0x58(%rbp), %r15
ja 0x14051
leaq 0x28(%r15), %rdi
movslq -0x40(%rbp), %rcx
movq -0x38(%rbp), %r12
movq (%r12), %rax
movq %rcx, -0x58(%rbp)
leaq (,%rcx,8), %rcx
leaq (%rcx,%rcx,2), %rbx
shlq $0x3, %r13
leaq (,%r13,4), %r14
addq %r13, %r14
movq (%rax,%rbx), %rsi
addq %r14, %rsi
callq 0x14124
movq (%r12), %rax
movq (%rax,%rbx), %rcx
cmpb $0x1, (%rcx,%r14)
jne 0x1391e
movb $0x1, 0x50(%r15)
movabsq $0x100000000, %rdx      # imm = 0x100000000
movq -0x40(%rbp), %r14
cmpl $0x1, %r14d
movq -0x60(%rbp), %r13
movq -0x68(%rbp), %r12
jg 0x1395b
movq %r14, %rcx
shlq $0x20, %rcx
addq %rdx, %rcx
sarq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x50(%rbp), %rsi
cmpb $0x0, 0x1(%rdx,%rsi,8)
je 0x13961
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x139a5
movq %rsi, %rdx
leaq (%rax,%rcx,8), %rax
movq (%rax), %rax
leaq -0x78(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x8(%rax,%rsi,8), %rsi
movq 0x10(%rax,%rdx,8), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
leaq 0x4e21(%rip), %rsi      # 0x187b7
movq %rbx, %rdi
callq 0x30b0
testl %eax, %eax
sete %bl
movb $0x1, %al
testb %al, %al
je 0x139bb
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x139bb
callq 0x3200
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
testb %bl, %bl
je 0x139f2
leal 0x1(%r14), %r8d
movq %r14, %rax
andq %rcx, %rax
orq %rax, %r8
movq -0x48(%rbp), %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %r13, %r9
callq 0x136e6
jmp 0x13ae8
cmpl $0x2, %r14d
jl 0x13ae8
movq -0x30(%rbp), %rax
movq 0xb8(%rax), %rax
testq %rax, %rax
je 0x13ae8
movq (%r13), %rcx
movq 0x8(%r13), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
je 0x13a55
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
movl $0x1, %r8d
xorl %r9d, %r9d
cmpq %rax, (%rcx,%rdi,8)
movzbl %r9b, %r9d
cmovel %r8d, %r9d
incq %rdi
cmpq %rdi, %rdx
jne 0x13a37
testb $0x1, %r9b
jne 0x13ae8
movq %rax, -0xe8(%rbp)
cmpq 0x10(%r13), %rsi
je 0x13a6c
movq %rax, (%rsi)
addq $0x8, 0x8(%r13)
jmp 0x13a7b
leaq -0xe8(%rbp), %rdx
movq %r13, %rdi
callq 0x14a62
movl $0xd0, %esi
movq -0x30(%rbp), %r14
addq 0xb8(%r14), %rsi
leaq -0xe8(%rbp), %rbx
movq %rbx, %rdi
callq 0x8e08
movq 0xb8(%r14), %rdx
movq -0x40(%rbp), %r14
movabsq $0x100000000, %rax      # imm = 0x100000000
leal (%rax,%r14), %r8d
addl $-0x2, %r8d
movq %r14, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
orq %rax, %r8
movq -0x48(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rcx
movq %r13, %r9
callq 0x136e6
leaq -0xe8(%rbp), %rdi
callq 0x14176
testl %r14d, %r14d
jle 0x13b0b
leal -0x1(%r14), %ecx
movq -0x38(%rbp), %rax
movq (%rax), %rax
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rdx
movq -0x50(%rbp), %rsi
cmpb $0x0, 0x1(%rdx,%rsi,8)
je 0x13b11
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x13b5c
movq %rsi, %rdx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rax
leaq -0xd8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x8(%rax,%rsi,8), %rsi
movq 0x10(%rax,%rdx,8), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
leaq 0x4c6a(%rip), %rsi      # 0x187b7
movq %rbx, %rdi
callq 0x30b0
testl %eax, %eax
sete %bl
movb $0x1, %al
testb %al, %al
je 0x13b75
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13b75
callq 0x3200
testb %bl, %bl
je 0x13bb9
movabsq $0x100000000, %rbx      # imm = 0x100000000
leal (%rbx,%r14), %r8d
decl %r8d
movq %r14, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
orq %rax, %r8
movq -0x48(%rbp), %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %r13, %r9
callq 0x136e6
jmp 0x13cb1
testl %r14d, %r14d
movabsq $0x100000000, %rbx      # imm = 0x100000000
jg 0x13cb1
movq -0x30(%rbp), %rax
movq 0xb0(%rax), %rax
testq %rax, %rax
je 0x13cb1
movq (%r13), %rcx
movq 0x8(%r13), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
je 0x13c25
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
movl $0x1, %r8d
xorl %r9d, %r9d
cmpq %rax, (%rcx,%rdi,8)
movzbl %r9b, %r9d
cmovel %r8d, %r9d
incq %rdi
cmpq %rdi, %rdx
jne 0x13c07
testb $0x1, %r9b
jne 0x13cb1
movq %rax, -0xc8(%rbp)
cmpq 0x10(%r13), %rsi
je 0x13c3c
movq %rax, (%rsi)
addq $0x8, 0x8(%r13)
jmp 0x13c4b
leaq -0xc8(%rbp), %rdx
movq %r13, %rdi
callq 0x14a62
movl $0xd0, %esi
movq -0x30(%rbp), %r14
addq 0xb0(%r14), %rsi
leaq -0xc8(%rbp), %rbx
movq %rbx, %rdi
callq 0x8e08
movq 0xb0(%r14), %rdx
movq -0x40(%rbp), %rax
leal 0x2(%rax), %r8d
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
orq %rax, %r8
movq -0x48(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rcx
movq %r13, %r9
callq 0x136e6
leaq -0xc8(%rbp), %rdi
callq 0x14176
movabsq $0x100000000, %rbx      # imm = 0x100000000
movq %r15, %r14
movq -0x58(%rbp), %rax
leaq (%rax,%rax,2), %r15
cmpl $0x1, %r12d
jg 0x13ce3
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
addq %rbx, %rcx
sarq $0x20, %rcx
movq (%rax,%r15,8), %rdx
leaq (%rcx,%rcx,4), %rcx
cmpb $0x0, 0x1(%rdx,%rcx,8)
je 0x13ce9
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x13d2d
leaq (%rax,%r15,8), %rax
movq (%rax), %rax
leaq -0xb8(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq 0x8(%rax,%rcx,8), %rsi
movq 0x10(%rax,%rcx,8), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
leaq 0x4a99(%rip), %rsi      # 0x187b7
movq %rbx, %rdi
callq 0x30b0
testl %eax, %eax
sete %bl
movb $0x1, %al
testb %al, %al
je 0x13d46
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13d46
callq 0x3200
testb %bl, %bl
je 0x13d8d
movq -0x40(%rbp), %rcx
movq %rcx, %rax
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
andq %rdx, %rax
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rdx, %rax
movl %ecx, %r8d
orq %rax, %r8
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %r13, %r9
callq 0x136e6
jmp 0x13e86
cmpl $0x2, %r12d
jl 0x13e86
movq -0x30(%rbp), %rax
movq 0xc8(%rax), %rax
testq %rax, %rax
je 0x13e86
movq (%r13), %rcx
movq 0x8(%r13), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
je 0x13df0
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
movl $0x1, %r8d
xorl %r9d, %r9d
cmpq %rax, (%rcx,%rdi,8)
movzbl %r9b, %r9d
cmovel %r8d, %r9d
incq %rdi
cmpq %rdi, %rdx
jne 0x13dd2
testb $0x1, %r9b
jne 0x13e86
movq %rax, -0xa8(%rbp)
cmpq 0x10(%r13), %rsi
je 0x13e07
movq %rax, (%rsi)
addq $0x8, 0x8(%r13)
jmp 0x13e16
leaq -0xa8(%rbp), %rdx
movq %r13, %rdi
callq 0x14a62
movl $0xd0, %esi
movq -0x30(%rbp), %r12
addq 0xc8(%r12), %rsi
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
callq 0x8e08
movq 0xc8(%r12), %rdx
movq -0x40(%rbp), %rcx
movq %rcx, %rax
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %rsi, %rax
movl %ecx, %ecx
addq %rax, %rcx
movabsq $-0x200000000, %r8      # imm = 0xFFFFFFFE00000000
addq %rcx, %r8
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rcx
movq %r13, %r9
callq 0x136e6
leaq -0xa8(%rbp), %rdi
callq 0x14176
movq -0x68(%rbp), %r12
testl %r12d, %r12d
jle 0x13eb6
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
addq %rdx, %rcx
sarq $0x20, %rcx
movq (%rax,%r15,8), %rdx
leaq (%rcx,%rcx,4), %rcx
cmpb $0x0, 0x1(%rdx,%rcx,8)
je 0x13ebc
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x13f00
leaq (%rax,%r15,8), %rax
movq (%rax), %rax
leaq -0x98(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq 0x8(%rax,%rcx,8), %rsi
movq 0x10(%rax,%rcx,8), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
leaq 0x48c6(%rip), %rsi      # 0x187b7
movq %rbx, %rdi
callq 0x30b0
testl %eax, %eax
sete %bl
movb $0x1, %al
testb %al, %al
movq %r14, %r15
je 0x13f1c
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13f1c
callq 0x3200
testb %bl, %bl
je 0x13f59
movq -0x40(%rbp), %rcx
movq %rcx, %rax
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
andq %rdx, %rax
addq %rdx, %rax
movl %ecx, %r8d
orq %rax, %r8
movq -0x48(%rbp), %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %r13, %r9
callq 0x136e6
jmp 0x14051
testl %r12d, %r12d
jg 0x14051
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %rax
testq %rax, %rax
je 0x14051
movq -0x60(%rbp), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
je 0x13fbe
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
movl $0x1, %r8d
xorl %r9d, %r9d
cmpq %rax, (%rcx,%rdi,8)
movzbl %r9b, %r9d
cmovel %r8d, %r9d
incq %rdi
cmpq %rdi, %rdx
jne 0x13fa0
testb $0x1, %r9b
jne 0x14051
movq %rax, -0x100(%rbp)
movq -0x60(%rbp), %r15
cmpq 0x10(%r15), %rsi
je 0x13fd9
movq %rax, (%rsi)
addq $0x8, 0x8(%r15)
jmp 0x13fe8
leaq -0x100(%rbp), %rdx
movq %r15, %rdi
callq 0x14a62
movabsq $-0x100000000, %r13     # imm = 0xFFFFFFFF00000000
movl $0xd0, %esi
movq -0x30(%rbp), %r12
addq 0xc0(%r12), %rsi
leaq -0x100(%rbp), %rbx
movq %rbx, %rdi
callq 0x8e08
movq 0xc0(%r12), %rdx
movq -0x40(%rbp), %rax
andq %rax, %r13
movl %eax, %eax
addq %r13, %rax
movabsq $0x200000000, %r8       # imm = 0x200000000
addq %rax, %r8
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rcx
movq %r15, %r9
callq 0x136e6
leaq -0x100(%rbp), %rdi
callq 0x14176
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
jmp 0x14091
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
jmp 0x14091
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x14091
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x14176
movq %rbx, %rdi
callq 0x33f0