// File: chuckwolber[P]Cube/order/cli.cpp
// Function: printResult(unsigned int, unsigned long long, std::vector<Turn, std::allocator<Turn>> const&, unsigned int)
void printResult(const unsigned int threadNum, const unsigned long long int algNum, const std::vector<Turn> &alg, const unsigned int order) {
    coutMutex.lock();

    if (skipFoundOrders) {
        if (foundOrders[order]) {
            coutMutex.unlock();
            return;
        }
        foundOrders[order] = true;
        --numSkipFoundOrders;
    } else if (showFoundOrder && order != foundOrder) {
        coutMutex.unlock();
        return;
    }

    std::cout << "TN:" << std::setw(5)  << std::left << threadNum;
    std::cout << "AN:" << std::setw(10) << std::left << algNum;
    std::cout << "OR:" << std::setw(5)  << std::left << order;
    std::cout << "AG:";
    for (const Turn &t : alg)
        std::cout << Algorithm::layerToChar(t.layer)
                  << (t.clockwise ? " ": "' ");
    std::cout << std::endl;
    coutMutex.unlock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq 0x1cd98(%rip), %rdi     # 0x2b688
callq 0xfbd0
testb $0x1, 0x1ce25(%rip)     # 0x2b721
je 0xe972
movl -0x1c(%rbp), %eax
movl %eax, %esi
leaq 0x1cdc6(%rip), %rdi     # 0x2b6d0
callq 0xf110
movq %rax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xfc20
testb $0x1, %al
jne 0xe926
jmp 0xe937
leaq 0x1cd5b(%rip), %rdi     # 0x2b688
callq 0xfc00
jmp 0xeb3b
movl -0x1c(%rbp), %eax
movl %eax, %esi
leaq 0x1cd8d(%rip), %rdi     # 0x2b6d0
callq 0xf110
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0xf170
movq 0x1cda3(%rip), %rax     # 0x2b708
addq $-0x1, %rax
movq %rax, 0x1cd98(%rip)     # 0x2b708
jmp 0xe999
testb $0x1, 0x1cda9(%rip)     # 0x2b722
je 0xe997
movl -0x1c(%rbp), %eax
cmpl 0x1cd98(%rip), %eax     # 0x2b71c
je 0xe997
leaq 0x1ccfb(%rip), %rdi     # 0x2b688
callq 0xfc00
jmp 0xeb3b
jmp 0xe999
movq 0x1c610(%rip), %rdi     # 0x2afb0
leaq 0xe100(%rip), %rsi      # 0x1caa7
callq 0x4370
movq %rax, -0x88(%rbp)
movl $0x5, %edi
callq 0xf8f0
movq -0x88(%rbp), %rdi
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %esi
callq 0x4410
movq %rax, %rdi
leaq 0xf37(%rip), %rsi       # 0xf910
callq 0x40f0
movq %rax, %rdi
movl -0x4(%rbp), %esi
callq 0x44d0
movq 0x1c5c0(%rip), %rdi     # 0x2afb0
leaq 0xe0b4(%rip), %rsi      # 0x1caab
callq 0x4370
movq %rax, -0x80(%rbp)
movl $0xa, %edi
callq 0xf8f0
movq -0x80(%rbp), %rdi
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %esi
callq 0x4410
movq %rax, %rdi
leaq 0xeed(%rip), %rsi       # 0xf910
callq 0x40f0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x4340
movq 0x1c575(%rip), %rdi     # 0x2afb0
leaq 0xe06d(%rip), %rsi      # 0x1caaf
callq 0x4370
movq %rax, -0x78(%rbp)
movl $0x5, %edi
callq 0xf8f0
movq -0x78(%rbp), %rdi
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %esi
callq 0x4410
movq %rax, %rdi
leaq 0xea2(%rip), %rsi       # 0xf910
callq 0x40f0
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x44d0
movq 0x1c52b(%rip), %rdi     # 0x2afb0
leaq 0xe027(%rip), %rsi      # 0x1cab3
callq 0x4370
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x71a0
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
callq 0x71d0
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x7200
testb $0x1, %al
jne 0xeac6
jmp 0xeb1c
leaq -0x60(%rbp), %rdi
callq 0x7240
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl (%rax), %edi
callq 0x57b0
movq 0x1c4cb(%rip), %rdi     # 0x2afb0
movsbl %al, %esi
callq 0x4440
movq %rax, %rdi
movq -0x70(%rbp), %rax
movb 0x4(%rax), %cl
leaq 0xdfb9(%rip), %rsi      # 0x1cab7
leaq 0xdfb3(%rip), %rax      # 0x1cab8
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x4370
leaq -0x60(%rbp), %rdi
callq 0x7260
jmp 0xeab3
movq 0x1c48d(%rip), %rdi     # 0x2afb0
movq 0x1c436(%rip), %rsi     # 0x2af60
callq 0x43b0
leaq 0x1cb52(%rip), %rdi     # 0x2b688
callq 0xfc00
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)