// File: /workspace/github_cpp_makefile_star2_O3/mitchblank[P]qiksolve/qiksolve.cpp
// Function: Dictionary::recursiveInteractive(std::vector<unsigned int, std::allocator<unsigned int>> const&) const
void Dictionary::recursiveInteractive(Words const& active_words) const
{
	if (active_words.empty()) {
		puts("No choices remain.\n");
	} else if (active_words.size() == 1) {
		fputs("Only choice remaining is: ", stdout);
		describeWord(stdout, active_words.front());
		puts("\n");
	} else {
		printf("%u choices remain", static_cast<unsigned>(active_words.size()));
		if (active_words.size() <= 5) {
			// If we're near the end, print a list
			fputs(": ", stdout);
			auto it = active_words.cbegin();
			describeWord(stdout, *it);
			do {
				fputs(", ", stdout);
				describeWord(stdout, *it);
			} while (++it != active_words.cend());
			putchar('\n');
		} else {
			puts(".");
		}
		putchar('\n');

		string cmd;
		for (;;) {
			printInteractiveSuggestions(active_words);
			fputs("Give your move in form \"<word> <result>\" like \"TAXI 2\"\n\n"
			      "> ", stdout);
			fflush(stdout);
			if (!read_uppercase_word(stdin, &cmd))
				break;	// EOF
			Word tried;
			unsigned matched;
			if (parse_move(cmd, wordLength(), &tried, &matched)) {
				DividedWordList dl(wordLength());
				dl.build(*this, active_words, tried);
				recursiveInteractive(dl[matched].choices());
				break;
			}
			puts("Invalid move.\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r13
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
cmpq %rsi, %rax
je 0x32c2
movq %rdi, %rbx
subq %rax, %rsi
cmpq $0x4, %rsi
jne 0x32dc
movq 0x5d27(%rip), %r14      # 0x8fc0
movq (%r14), %rsi
leaq 0x306e(%rip), %rdi      # 0x6311
callq 0x2170
movq (%r14), %rsi
movq (%r13), %rax
movl (%rax), %edx
movq %rbx, %rdi
callq 0x3aae
leaq 0x3158(%rip), %rdi      # 0x6418
jmp 0x32c9
leaq 0x3034(%rip), %rdi      # 0x62fd
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
shrq $0x2, %rsi
leaq 0x3045(%rip), %rdi      # 0x632c
xorl %eax, %eax
callq 0x2040
movq 0x8(%r13), %rax
subq (%r13), %rax
cmpq $0x17, %rax
movq %r13, -0x30(%rbp)
ja 0x3360
movq 0x5cb9(%rip), %r15      # 0x8fc0
movq (%r15), %rsi
leaq 0x2f90(%rip), %rdi      # 0x62a1
callq 0x2170
movq (%r13), %r12
movq (%r15), %rsi
movl (%r12), %edx
movq %rbx, %rdi
callq 0x3aae
leaq 0x300e(%rip), %r14      # 0x633e
movq (%r15), %rsi
movq %r14, %rdi
callq 0x2170
movq (%r15), %rsi
movl (%r12), %edx
movq %rbx, %rdi
callq 0x3aae
addq $0x4, %r12
cmpq 0x8(%r13), %r12
jne 0x3330
movl $0xa, %edi
callq 0x21b0
jmp 0x336c
leaq 0x318a(%rip), %rdi      # 0x64f1
callq 0x21e0
movl $0xa, %edi
callq 0x21b0
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x48(%rbp), %r13
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x34ee
movq 0x5c1b(%rip), %r14      # 0x8fc0
movq (%r14), %rsi
leaq 0x2f92(%rip), %rdi      # 0x6341
callq 0x2170
movq (%r14), %rdi
callq 0x2190
movq 0x5c15(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq -0x68(%rbp), %rsi
callq 0x26cf
testb %al, %al
je 0x34a0
movl 0x48(%rbx), %r15d
movq -0x68(%rbp), %r12
movq $0x0, -0x48(%rbp)
movzbl (%r12), %eax
testl %eax, %eax
je 0x3451
cmpl $0x9, %eax
je 0x340e
cmpl $0x20, %eax
je 0x340e
incq %r12
movsbl %al, %esi
movq %r13, %rdi
callq 0x252a
testb %al, %al
jne 0x33e7
jmp 0x3451
movl -0x48(%rbp), %r14d
cmpl %r15d, -0x44(%rbp)
setne %cl
testl %r14d, %r14d
sete %dl
orb %cl, %dl
jne 0x3451
cmpb $0x20, %al
je 0x342f
movzbl %al, %ecx
cmpl $0x9, %ecx
jne 0x3439
movb 0x1(%r12), %al
incq %r12
jmp 0x3423
movsbl %al, %eax
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x3451
movq %r12, %rdi
callq 0x21f0
cmpl %r15d, %eax
jbe 0x3462
leaq 0x2f24(%rip), %rdi      # 0x637c
callq 0x21e0
jmp 0x338d
movl %eax, %r12d
leaq -0x48(%rbp), %rdi
movl %r15d, %esi
callq 0x3a22
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
movq -0x30(%rbp), %rdx
movl %r14d, %ecx
callq 0x27c2
movl %r12d, %esi
shlq $0x5, %rsi
addq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x3266
leaq -0x48(%rbp), %rdi
callq 0x3a5a
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x34b2
callq 0x2140
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34d1
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3a5a
jmp 0x34d4
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x34e6
callq 0x2140
movq %rbx, %rdi
callq 0x2240