// File: /workspace/github_cpp_makefile_star2_O1/mitchblank[P]qiksolve/qiksolve.cpp
// Function: Dictionary::batch(_IO_FILE*, _IO_FILE*) const
void Dictionary::batch(FILE * const fin, FILE * const fout) const
{
	SolutionTree tree;
	{
		AnswerSequence seq;
		recursiveSolve(&tree, keys_, &seq);
	}
	string wstr;
	string key;
	while (read_uppercase_word(fin, &wstr)) {
		Word const target = string_to_bitmask(wstr.c_str(), wordLength());
		if (target == 0) {
			fprintf(stderr, "Bad word: %s\n", wstr.c_str());
		} else if (words_.find(target) == words_.end()) {
			fprintf(stderr, "Unknown  word: %s\n", wstr.c_str());
		} else {
			key.clear();
			printf("%s: ", wstr.c_str());
			for (;;) {
				Word const play = tree[key];
				assert(words_.find(play) != words_.end());
				if (play == target) {
					describeWord(fout, target);
					putc('\n', fout);
					break;
				}
				fputs(words_.find(play)->second.cbegin()->c_str(), fout);
				putc(' ', fout);
				append_unsigned_period(&key, correct_letters(target, play));
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, -0x58(%rbp)
movq %rdi, %rbx
leaq 0x5e3e(%rip), %rcx      # 0x8d78
leaq -0xa0(%rbp), %rax
movq %rcx, -0x10(%rax)
movl $0x0, (%rax)
xorl %edx, %edx
movq %rdx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rdx, 0x20(%rax)
leaq -0x120(%rbp), %rcx
movq %rdx, 0x10(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rcx)
leaq 0x30(%rdi), %rdx
leaq -0xb0(%rbp), %rsi
callq 0x2a1c
movq -0x120(%rbp), %rdi
testq %rdi, %rdi
je 0x2f8f
callq 0x2140
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x40(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x8(%rbx), %r12
movq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x26dd
testb %al, %al
je 0x31af
movq -0x78(%rbp), %r14
movl 0x48(%rbx), %esi
movq %r14, %rdi
callq 0x2749
leaq 0x32a2(%rip), %rsi      # 0x627e
testl %eax, %eax
je 0x3196
movl %eax, %r13d
movq 0x10(%rbx), %rcx
movq %r12, %rax
testq %rcx, %rcx
je 0x300d
movq %r12, %rax
xorl %edx, %edx
cmpl %r13d, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x2ff6
movq %r12, %rcx
cmpq %r12, %rax
je 0x3020
cmpl 0x20(%rax), %r13d
cmovbq %r12, %rax
movq %rax, %rcx
leaq 0x3265(%rip), %rsi      # 0x628c
cmpq %r12, %rcx
je 0x3196
movq $0x0, -0x48(%rbp)
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movq -0x78(%rbp), %rsi
leaq 0x3255(%rip), %rdi      # 0x629f
xorl %eax, %eax
callq 0x2040
leaq -0xb0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3bbc
movl %eax, %r14d
movq 0x10(%rbx), %rax
movq %r12, %rcx
testq %rax, %rax
je 0x308e
movq %rax, %rdx
movq %r12, %rcx
xorl %esi, %esi
cmpl %r14d, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x3076
movq %r12, %rdx
cmpq %r12, %rcx
je 0x30a1
cmpl 0x20(%rcx), %r14d
cmovbq %r12, %rcx
movq %rcx, %rdx
cmpq %r12, %rdx
je 0x31fc
cmpl %r13d, %r14d
jne 0x30d1
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movl %r13d, %edx
callq 0x3aca
movl $0xa, %edi
movq -0x30(%rbp), %rsi
callq 0x2290
jmp 0x3188
movq %r12, %rcx
testq %rax, %rax
je 0x30f3
movq %r12, %rcx
xorl %edx, %edx
cmpl %r14d, 0x20(%rax)
setb %dl
cmovaeq %rax, %rcx
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x30dc
movq %r12, %rax
cmpq %r12, %rcx
je 0x3106
cmpl 0x20(%rcx), %r14d
cmovbq %r12, %rcx
movq %rcx, %rax
movq 0x40(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x30(%rbp), %r15
movq %r15, %rsi
callq 0x2170
movl $0x20, %edi
movq %r15, %rsi
callq 0x2290
movl %r14d, %eax
andl %r13d, %eax
movl %eax, %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, %ecx
movl $0x33333333, %edx       # imm = 0x33333333
andl %edx, %ecx
shrl $0x2, %eax
andl %edx, %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
addl %eax, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
imull $0x1010101, %ecx, %ecx  # imm = 0x1010101
shrl $0x18, %ecx
movl $0x64, %esi
leaq -0x120(%rbp), %r15
movq %r15, %rdi
leaq 0x3380(%rip), %rdx      # 0x64f5
xorl %eax, %eax
callq 0x2210
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x2280
cmpl %r13d, %r14d
jne 0x3051
jmp 0x2fb1
movq 0x5e43(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x21d0
jmp 0x2fb1
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x31c1
callq 0x2140
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x31d3
callq 0x2140
leaq -0xa8(%rbp), %rdi
leaq 0x5b97(%rip), %rax      # 0x8d78
movq %rax, -0x8(%rdi)
callq 0x4088
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30a1(%rip), %rdi      # 0x62a4
leaq 0x2e4f(%rip), %rsi      # 0x6059
leaq 0x30b5(%rip), %rcx      # 0x62c6
movl $0x21f, %edx            # imm = 0x21F
callq 0x20c0
movq %rax, %rbx
movq -0x120(%rbp), %rdi
testq %rdi, %rdi
jne 0x3250
jmp 0x3255
jmp 0x322e
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3243
callq 0x2140
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3255
callq 0x2140
leaq -0xa8(%rbp), %rdi
leaq 0x5b15(%rip), %rax      # 0x8d78
movq %rax, -0x8(%rdi)
callq 0x4088
movq %rbx, %rdi
callq 0x2250