// File: /workspace/github_cpp_makefile_star2_O2/codeandkey[P]neocortex/src/position.cpp
// Function: neocortex::Position::pseudolegal_moves_evasions(neocortex::Move*)
int Position::pseudolegal_moves_evasions(Move* out) {
	int count = 0;

	assert(check());

	bitboard ctm = board.get_color_occ(color_to_move);
	bitboard opp = board.get_color_occ(!color_to_move);

	/* King moves */
	bitboard kings = ctm & board.get_piece_occ(piece::KING);

	/* Also grab attackers */
	int king_sq = bb::getlsb(kings);
	bitboard attackers = board.attacks_on(king_sq) & opp;

	while (kings) {
		int src = bb::poplsb(kings);
		bitboard moves = attacks::king(src) & ~ctm;

		while (moves) {
			int dst = bb::poplsb(moves);
			out[count++] = Move(src, dst);
		}
	}

	if (bb::popcount(attackers) > 1) {
		/* double check, king moves only */
		return count;
	}

	/* Only one attacker -- look for pieces that can capture it */
	int attacker_square = bb::getlsb(attackers);

	/* If checker is sliding piece, add blocking moves */
	bitboard block_dsts = bb::between(king_sq, attacker_square);

	bitboard ep_mask = 0;
	int ep_square = ply.back().en_passant_square;

	if (square::is_valid(ep_square)) {
		ep_mask = bb::mask(ep_square);
	}

	/* Pawn moves */
	bitboard pawns = ctm & board.get_piece_occ(piece::PAWN);

	bitboard promoting_rank = (color_to_move == piece::WHITE) ? RANK_7 : RANK_2;
	bitboard starting_rank = (color_to_move == piece::WHITE) ? RANK_2 : RANK_7;

	int adv_dir = (color_to_move == piece::WHITE) ? NORTH : SOUTH;
	int left_dir = (color_to_move == piece::WHITE) ? NORTHWEST : SOUTHWEST;
	int right_dir = (color_to_move == piece::WHITE) ? NORTHEAST : SOUTHEAST;

	bitboard promoting_pawns = pawns & promoting_rank;

	/* Promoting left captures */
	bitboard promoting_left_cap = bb::shift(promoting_pawns & ~FILE_A, left_dir) & attackers;

	while (promoting_left_cap) {
		int dst = bb::poplsb(promoting_left_cap);
		out[count++] = Move(dst - left_dir, dst, piece::QUEEN);
		out[count++] = Move(dst - left_dir, dst, piece::KNIGHT);
		out[count++] = Move(dst - left_dir, dst, piece::ROOK);
		out[count++] = Move(dst - left_dir, dst, piece::BISHOP);
	}

	/* Promoting right captures */
	bitboard promoting_right_cap = bb::shift(promoting_pawns & ~FILE_H, right_dir) & attackers;

	while (promoting_right_cap) {
		int dst = bb::poplsb(promoting_right_cap);
		out[count++] = Move(dst - right_dir, dst, piece::QUEEN);
		out[count++] = Move(dst - right_dir, dst, piece::KNIGHT);
		out[count++] = Move(dst - right_dir, dst, piece::ROOK);
		out[count++] = Move(dst - right_dir, dst, piece::BISHOP);
	}

	/* Promoting advances, blocking */
	bitboard promoting_advances = bb::shift(promoting_pawns, adv_dir) & ~board.get_global_occ() & block_dsts;

	while (promoting_advances) {
		int dst = bb::poplsb(promoting_advances);
		out[count++] = Move(dst - adv_dir, dst, piece::QUEEN);
		out[count++] = Move(dst - adv_dir, dst, piece::KNIGHT);
		out[count++] = Move(dst - adv_dir, dst, piece::ROOK);
		out[count++] = Move(dst - adv_dir, dst, piece::BISHOP);
	}

	/* Nonpromoting pawn moves */
	bitboard npm_pawns = pawns & ~promoting_pawns;

	/* Blocking advances */
	bitboard npm_advances = bb::shift(npm_pawns, adv_dir) & ~board.get_global_occ() & block_dsts;

	while (npm_advances) {
		int dst = bb::poplsb(npm_advances);
		out[count++] = Move(dst - adv_dir, dst);
	}

	/* Left captures */
	bitboard npm_left_cap = bb::shift(npm_pawns & ~FILE_A, left_dir) & (attackers | ep_mask);

	while (npm_left_cap) {
		int dst = bb::poplsb(npm_left_cap);
		out[count++] = Move(dst - left_dir, dst);
	}

	/* Right captures */
	bitboard npm_right_cap = bb::shift(npm_pawns & ~FILE_H, right_dir) & (attackers | ep_mask);

	while (npm_right_cap) {
		int dst = bb::poplsb(npm_right_cap);
		out[count++] = Move(dst - right_dir, dst);
	}

	/* Jumps */
	bitboard npm_jumps = bb::shift(pawns & starting_rank, adv_dir) & ~board.get_global_occ();
	npm_jumps = bb::shift(npm_jumps, adv_dir) & ~board.get_global_occ() & block_dsts;

	while (npm_jumps) {
		int dst = bb::poplsb(npm_jumps);
		out[count++] = Move(dst - 2 * adv_dir, dst);
	}

	/* Queen moves */
	bitboard queens = ctm & board.get_piece_occ(piece::QUEEN);

	while (queens) {
		int src = bb::poplsb(queens);
		bitboard moves = attacks::queen(src, board.get_global_occ()) & (block_dsts | attackers);

		while (moves) {
			int dst = bb::poplsb(moves);
			out[count++] = Move(src, dst);
		}
	}

	/* Rook moves */
	bitboard rooks = ctm & board.get_piece_occ(piece::ROOK);

	while (rooks) {
		int src = bb::poplsb(rooks);
		bitboard moves = attacks::rook(src, board.get_global_occ()) & (block_dsts | attackers);

		while (moves) {
			int dst = bb::poplsb(moves);
			out[count++] = Move(src, dst);
		}
	}

	/* Knight moves */
	bitboard knights = ctm & board.get_piece_occ(piece::KNIGHT);

	while (knights) {
		int src = bb::poplsb(knights);
		bitboard moves = attacks::knight(src) & (block_dsts | attackers);

		while (moves) {
			int dst = bb::poplsb(moves);
			out[count++] = Move(src, dst);
		}
	}

	/* Bishop moves */
	bitboard bishops = ctm & board.get_piece_occ(piece::BISHOP);

	while (bishops) {
		int src = bb::poplsb(bishops);
		bitboard moves = attacks::bishop(src, board.get_global_occ()) & (block_dsts | attackers);

		while (moves) {
			int dst = bb::poplsb(moves);
			out[count++] = Move(src, dst);
		}
	}

	assert(count <= MAX_PL_MOVES);
	return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, 0x38(%rsp)
movq 0x160(%rdi), %rax
cmpl $0x0, -0x14(%rax)
je 0x9e8b
movq %rdi, %r14
movslq 0x170(%rdi), %rax
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
movq 0x8(%rdi,%rax,8), %r15
movq 0x8(%rdi,%rcx,8), %rax
movq %rax, 0x50(%rsp)
movq 0x40(%rdi), %rbx
andq %r15, %rbx
leaq 0xa8(%rsp), %rax
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0x6515
movq %r14, 0x18(%rsp)
movq %r14, %rdi
movl %eax, 0x48(%rsp)
movl %eax, %esi
callq 0x5eda
movq %rax, 0x40(%rsp)
movq %r15, 0x30(%rsp)
notq %r15
movq %r15, 0x20(%rsp)
xorl %r13d, %r13d
leaq 0x70(%rsp), %r14
leaq 0x8(%rsp), %r15
pushq $-0x1
popq %rbp
movslq %r13d, %r12
testq %rbx, %rbx
je 0x95e3
leaq 0xa8(%rsp), %rdi
callq 0x64fc
movl %eax, %ebx
cltq
leaq 0x14039(%rip), %rcx     # 0x1d5c0
movq (%rcx,%rax,8), %rax
andq 0x20(%rsp), %rax
movq %rax, 0x70(%rsp)
imulq $0xc, %r12, %r12
addq 0x38(%rsp), %r12
testq %rax, %rax
je 0x95d9
movq %r14, %rdi
callq 0x64fc
movq %r15, %rdi
movl %ebx, %esi
movl %eax, %edx
movl %ebp, %ecx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r12)
movq 0x8(%rsp), %rax
movq %rax, (%r12)
movq 0x70(%rsp), %rax
incl %r13d
addq $0xc, %r12
jmp 0x959e
movq 0xa8(%rsp), %rbx
jmp 0x9567
movq 0x40(%rsp), %r14
andq 0x50(%rsp), %r14
leaq -0x1(%r14), %rax
testq %rax, %r14
jne 0x9e76
movq %r14, %rdi
callq 0x6515
movslq 0x48(%rsp), %rcx
cltq
shlq $0x9, %rcx
addq 0x13964(%rip), %rcx     # 0x1cf78
movq (%rcx,%rax,8), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rbx
movq 0x160(%rbx), %rax
movl -0x2c(%rax), %edi
cmpl $0x3f, %edi
ja 0x963d
callq 0x5103
movq %rax, 0x78(%rsp)
jmp 0x9646
movq $0x0, 0x78(%rsp)
movq 0x30(%rsp), %rax
movq 0x18(%rbx), %r9
andq %rax, %r9
movl 0x170(%rbx), %r8d
xorl %ecx, %ecx
testl %r8d, %r8d
sete %cl
movabsq $0xff000000000000, %rdi # imm = 0xFF000000000000
movl $0xff00, %edx           # imm = 0xFF00
movl $0xff00, %esi           # imm = 0xFF00
cmoveq %rdi, %rsi
shll $0x4, %ecx
addl $-0x9, %ecx
movq %r9, 0x80(%rsp)
andq %r9, %rsi
movabsq $0xfe00000000fe00, %rax # imm = 0xFE00000000FE00
movq %rsi, 0x28(%rsp)
andq %rsi, %rax
movq %rax, %rsi
movq %rcx, 0x50(%rsp)
shlq %cl, %rsi
shrq $0x9, %rax
movl %r8d, 0x14(%rsp)
testl %r8d, %r8d
cmoveq %rdx, %rdi
movq %rdi, 0xb0(%rsp)
cmoveq %rsi, %rax
movq %r14, 0x40(%rsp)
andq %r14, %rax
leaq 0x70(%rsp), %rcx
movq %rax, (%rcx)
imulq $0xc, %r12, %r14
addq 0x38(%rsp), %r14
leaq 0x8(%rsp), %r15
pushq $0x1
popq %r13
testq %rax, %rax
je 0x9791
leaq 0x70(%rsp), %rdi
callq 0x64fc
movl %eax, %ebp
movl %eax, %ebx
subl 0x50(%rsp), %ebx
movq %r15, %rdi
movl %ebx, %esi
movl %eax, %edx
pushq $0x4
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq %r15, %rdi
movl %ebx, %esi
movl %ebp, %edx
pushq $0x2
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x14(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0xc(%r14)
movq %r15, %rdi
movl %ebx, %esi
movl %ebp, %edx
pushq $0x3
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x20(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r14)
movq %r15, %rdi
movl %ebx, %esi
movl %ebp, %edx
movl %r13d, %ecx
callq 0x6d4e
addq $0x4, %r12
movl 0x10(%rsp), %eax
movl %eax, 0x2c(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x24(%r14)
movq 0x70(%rsp), %rax
addq $0x30, %r14
jmp 0x96e5
xorl %ecx, %ecx
movl 0x14(%rsp), %esi
testl %esi, %esi
sete %cl
shll $0x4, %ecx
addl $-0x7, %ecx
movabsq $0x7f000000007f00, %rax # imm = 0x7F000000007F00
andq 0x28(%rsp), %rax
movq %rax, %rdx
movq %rcx, 0x48(%rsp)
shlq %cl, %rdx
shrq $0x7, %rax
testl %esi, %esi
cmoveq %rdx, %rax
andq 0x40(%rsp), %rax
leaq 0xa0(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %r15
pushq $0x1
popq %rbp
testq %rax, %rax
je 0x9893
leaq 0xa0(%rsp), %rdi
callq 0x64fc
movl %eax, %r13d
movl %eax, %ebx
subl 0x48(%rsp), %ebx
movq %r15, %rdi
movl %ebx, %esi
movl %eax, %edx
pushq $0x4
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
pushq $0x2
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x14(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0xc(%r14)
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
pushq $0x3
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x20(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r14)
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
movl %ebp, %ecx
callq 0x6d4e
addq $0x4, %r12
movl 0x10(%rsp), %eax
movl %eax, 0x2c(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x24(%r14)
movq 0xa0(%rsp), %rax
addq $0x30, %r14
jmp 0x97de
xorl %r13d, %r13d
movl 0x14(%rsp), %edx
testl %edx, %edx
sete %r13b
shll $0x4, %r13d
addl $-0x8, %r13d
movq 0x28(%rsp), %rsi
movq %rsi, %rax
movl %r13d, %ecx
shlq %cl, %rax
movq %rsi, %rcx
shrq $0x8, %rcx
testl %edx, %edx
cmoveq %rax, %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
notq %rax
andq 0x20(%rsp), %rax
andq %rcx, %rax
leaq 0x98(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rbp
testq %rax, %rax
je 0x999b
leaq 0x98(%rsp), %rdi
callq 0x64fc
movl %eax, %r15d
movl %eax, %ebx
subl %r13d, %ebx
movq %rbp, %rdi
movl %ebx, %esi
movl %eax, %edx
pushq $0x4
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq %rbp, %rdi
movl %ebx, %esi
movl %r15d, %edx
pushq $0x2
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x14(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0xc(%r14)
movq %rbp, %rdi
movl %ebx, %esi
movl %r15d, %edx
pushq $0x3
popq %rcx
callq 0x6d4e
movl 0x10(%rsp), %eax
movl %eax, 0x20(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r14)
movq %rbp, %rdi
movl %ebx, %esi
movl %r15d, %edx
pushq $0x1
popq %rcx
callq 0x6d4e
addq $0x4, %r12
movl 0x10(%rsp), %eax
movl %eax, 0x2c(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x24(%r14)
movq 0x98(%rsp), %rax
addq $0x30, %r14
jmp 0x98e6
movq 0x28(%rsp), %rdx
xorq 0x80(%rsp), %rdx
movq %rdx, %rax
movl %r13d, %ecx
shlq %cl, %rax
movq %rdx, 0x28(%rsp)
movq %rdx, %rcx
shrq $0x8, %rcx
cmpl $0x0, 0x14(%rsp)
cmoveq %rax, %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
notq %rax
andq %rcx, %rax
andq 0x20(%rsp), %rax
leaq 0xd0(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x8(%rsp), %rbp
pushq $-0x1
popq %r15
testq %rax, %rax
je 0x9a2d
movq %rbx, %rdi
callq 0x64fc
movl %eax, %esi
subl %r13d, %esi
movq %rbp, %rdi
movl %eax, %edx
movl %r15d, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0xd0(%rsp), %rax
addq $0xc, %r14
jmp 0x99ed
movabsq $-0x101010101010102, %rax # imm = 0xFEFEFEFEFEFEFEFE
andq 0x28(%rsp), %rax
movq %rax, %rdx
movq 0x50(%rsp), %rcx
shlq %cl, %rdx
shrq $0x9, %rax
cmpl $0x0, 0x14(%rsp)
cmoveq %rdx, %rax
movq 0x78(%rsp), %rcx
orq 0x40(%rsp), %rcx
movq %rcx, 0x78(%rsp)
andq %rcx, %rax
leaq 0xc8(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x8(%rsp), %rbp
pushq $-0x1
popq %r15
testq %rax, %rax
je 0x9abb
movq %rbx, %rdi
callq 0x64fc
movl %eax, %esi
subl 0x50(%rsp), %esi
movq %rbp, %rdi
movl %eax, %edx
movl %r15d, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0xc8(%rsp), %rax
addq $0xc, %r14
jmp 0x9a7a
movabsq $0x7f7f7f7f7f7f7f7f, %rax # imm = 0x7F7F7F7F7F7F7F7F
movq 0x28(%rsp), %rdx
andq %rax, %rdx
movq %rdx, %rax
movq 0x48(%rsp), %rcx
shlq %cl, %rax
shrq $0x7, %rdx
cmpl $0x0, 0x14(%rsp)
cmoveq %rax, %rdx
andq 0x78(%rsp), %rdx
leaq 0xc0(%rsp), %rbx
movq %rdx, (%rbx)
leaq 0x8(%rsp), %rbp
pushq $-0x1
popq %r15
testq %rdx, %rdx
je 0x9b3f
movq %rbx, %rdi
callq 0x64fc
movl %eax, %esi
subl 0x48(%rsp), %esi
movq %rbp, %rdi
movl %eax, %edx
movl %r15d, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0xc0(%rsp), %rdx
addq $0xc, %r14
jmp 0x9afe
movq 0xb0(%rsp), %rsi
andq 0x80(%rsp), %rsi
movq %rsi, %rax
movl %r13d, %ecx
shlq %cl, %rax
shrq $0x8, %rsi
movl 0x14(%rsp), %edi
testl %edi, %edi
cmoveq %rax, %rsi
movq 0x18(%rsp), %rax
movq (%rax), %rax
notq %rax
andq %rax, %rsi
movq %rsi, %rdx
shlq %cl, %rdx
shrq $0x8, %rsi
testl %edi, %edi
cmoveq %rdx, %rsi
andq 0x20(%rsp), %rax
andq %rsi, %rax
leaq 0xb8(%rsp), %rbx
movq %rax, (%rbx)
addl %r13d, %r13d
leaq 0x8(%rsp), %r15
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x9be1
movq %rbx, %rdi
callq 0x64fc
movl %eax, %esi
subl %r13d, %esi
movq %r15, %rdi
movl %eax, %edx
movl %ebp, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0xb8(%rsp), %rax
addq $0xc, %r14
jmp 0x9ba2
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rax
andq 0x30(%rsp), %rax
leaq 0x90(%rsp), %rcx
movq %rax, (%rcx)
movq 0x40(%rsp), %rcx
orq %rcx, 0x20(%rsp)
leaq 0x68(%rsp), %r14
leaq 0x8(%rsp), %rbx
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x9c90
leaq 0x90(%rsp), %rdi
callq 0x64fc
movl %eax, %r13d
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl %r13d, %edi
callq 0xcf4b
andq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
movslq %r12d, %r12
imulq $0xc, %r12, %r15
addq 0x38(%rsp), %r15
testq %rax, %rax
je 0x9c86
movq %r14, %rdi
callq 0x64fc
movq %rbx, %rdi
movl %r13d, %esi
movl %eax, %edx
movl %ebp, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r15)
movq 0x8(%rsp), %rax
movq %rax, (%r15)
movq 0x68(%rsp), %rax
addq $0xc, %r15
jmp 0x9c4c
movq 0x90(%rsp), %rax
jmp 0x9c11
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rax
andq 0x30(%rsp), %rax
leaq 0x68(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x60(%rsp), %r15
leaq 0x8(%rsp), %rbx
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x9d2c
leaq 0x68(%rsp), %rdi
callq 0x64fc
movl %eax, %r13d
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl %r13d, %edi
callq 0x649e
andq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movslq %r12d, %r12
imulq $0xc, %r12, %r14
addq 0x38(%rsp), %r14
testq %rax, %rax
je 0x9d25
movq %r15, %rdi
callq 0x64fc
movq %rbx, %rdi
movl %r13d, %esi
movl %eax, %edx
movl %ebp, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0x60(%rsp), %rax
addq $0xc, %r14
jmp 0x9ceb
movq 0x68(%rsp), %rax
jmp 0x9cb3
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
andq 0x30(%rsp), %rax
leaq 0x60(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x58(%rsp), %r15
leaq 0x8(%rsp), %rbx
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x9dc5
leaq 0x60(%rsp), %rdi
callq 0x64fc
movl %eax, %r13d
cltq
leaq 0x13a56(%rip), %rcx     # 0x1d7c0
movq (%rcx,%rax,8), %rax
andq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movslq %r12d, %r12
imulq $0xc, %r12, %r14
addq 0x38(%rsp), %r14
testq %rax, %rax
je 0x9dbe
movq %r15, %rdi
callq 0x64fc
movq %rbx, %rdi
movl %r13d, %esi
movl %eax, %edx
movl %ebp, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0x58(%rsp), %rax
addq $0xc, %r14
jmp 0x9d84
movq 0x60(%rsp), %rax
jmp 0x9d4f
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
andq 0x20(%rax), %rcx
movq %rcx, %rax
leaq 0x58(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x88(%rsp), %r15
leaq 0x8(%rsp), %rbx
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x9e6d
leaq 0x58(%rsp), %rdi
callq 0x64fc
movl %eax, %r13d
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl %r13d, %edi
callq 0x6440
andq 0x20(%rsp), %rax
movq %rax, 0x88(%rsp)
movslq %r12d, %r12
imulq $0xc, %r12, %r14
addq 0x38(%rsp), %r14
testq %rax, %rax
je 0x9e66
movq %r15, %rdi
callq 0x64fc
movq %rbx, %rdi
movl %r13d, %esi
movl %eax, %edx
movl %ebp, %ecx
callq 0x6d4e
incq %r12
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0x88(%rsp), %rax
addq $0xc, %r14
jmp 0x9e29
movq 0x58(%rsp), %rax
jmp 0x9dee
cmpl $0x65, %r12d
jge 0x9eaa
movl %r12d, %r13d
movl %r13d, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb05a(%rip), %rdi      # 0x14eec
leaq 0xae7c(%rip), %rsi      # 0x14d15
leaq 0xb054(%rip), %rcx      # 0x14ef4
movl $0x222, %edx            # imm = 0x222
callq 0x41f0
leaq 0xaff2(%rip), %rdi      # 0x14ea3
leaq 0xae5d(%rip), %rsi      # 0x14d15
leaq 0xb035(%rip), %rcx      # 0x14ef4
movl $0x2cf, %edx            # imm = 0x2CF
callq 0x41f0
nop