// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsi, %r12
movl %edi, %ebp
leaq 0xa25f(%rip), %rdi      # 0x125c8
callq 0x8986
cmpb $0x1, 0xa2ec(%rip)      # 0x12661
jne 0x83ad
movl %r14d, %r15d
leaq 0xa28f(%rip), %rdi      # 0x12610
movq %r15, %rsi
callq 0x86c0
testq %rdx, (%rax)
jne 0x84e6
leaq 0xa277(%rip), %rdi      # 0x12610
movq %r15, %rsi
callq 0x86c0
orq %rdx, (%rax)
decq 0xa29d(%rip)            # 0x12648
jmp 0x83c6
cmpb $0x1, 0xa2ae(%rip)      # 0x12662
jne 0x83c3
cmpl %r14d, 0xa29f(%rip)     # 0x1265c
jne 0x84e6
movl %r14d, %r15d
movq 0x9be3(%rip), %r14      # 0x11fb0
leaq 0x362b(%rip), %rsi      # 0xb9ff
movq %r14, %rdi
callq 0x42c0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
pushq $0x5
popq %rsi
movq %rsi, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
movl 0x18(%rax,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
movl %ebp, %esi
movq %rax, %rdi
callq 0x41d0
leaq 0x35ef(%rip), %rsi      # 0xba03
movq %r14, %rdi
callq 0x42c0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0xa, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r12, %rsi
callq 0x41c0
leaq 0x35b7(%rip), %rsi      # 0xba07
movq %r14, %rdi
callq 0x42c0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
pushq $0x5
popq %rsi
movq %rsi, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
andl 0x18(%rax,%rcx), %r13d
orl $0x20, %r13d
movl %r13d, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r15, %rsi
callq 0x41d0
leaq 0x3580(%rip), %rsi      # 0xba0b
movq %r14, %rdi
callq 0x42c0
movq (%rbx), %r15
movq 0x8(%rbx), %rbx
leaq 0x356f(%rip), %r12      # 0xba10
leaq 0x3567(%rip), %r13      # 0xba0f
cmpq %rbx, %r15
je 0x84da
movl (%r15), %edi
callq 0x4db6
movsbl %al, %esi
movq %r14, %rdi
callq 0x4320
cmpb $0x0, 0x4(%r15)
movq %r13, %rsi
cmovneq %r12, %rsi
movq %rax, %rdi
callq 0x42c0
addq $0x8, %r15
jmp 0x84a8
movq 0x9acf(%rip), %rdi      # 0x11fb0
callq 0x4120
leaq 0xa0db(%rip), %rdi      # 0x125c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4210