// File: /workspace/github_cpp_makefile_star2_O3/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, %r15d
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %ebp
leaq 0x961f(%rip), %rdi      # 0x125d8
callq 0x4400
testl %eax, %eax
jne 0x91c7
cmpb $0x1, 0x96a4(%rip)      # 0x12671
jne 0x9001
movq 0x964a(%rip), %rax      # 0x12620
movl $0x1, %edx
movl %r15d, %ecx
shlq %cl, %rdx
movl %r15d, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rsi
btq %r15, %rsi
jb 0x9013
orq %rdx, %rsi
movq %rsi, (%rax,%rcx,8)
decq 0x9659(%rip)            # 0x12658
jmp 0x902d
cmpb $0x1, 0x966a(%rip)      # 0x12672
jne 0x902d
cmpl %r15d, 0x965b(%rip)     # 0x1266c
je 0x902d
leaq 0x95be(%rip), %rdi      # 0x125d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4230
movq 0x8f7c(%rip), %rbx      # 0x11fb0
leaq 0x3a64(%rip), %rsi      # 0xca9f
movl $0x3, %edx
movq %rbx, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0x5, %edx
movq %rdx, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
movl 0x18(%rbx,%rax), %ecx
andl %r13d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%rbx,%rax)
movl %ebp, %esi
movq %rbx, %rdi
callq 0x41e0
leaq 0x3a21(%rip), %rsi      # 0xcaa3
movl $0x3, %edx
movq %rbx, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0xa, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl %r13d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x41d0
leaq 0x39e4(%rip), %rsi      # 0xcaa7
movl $0x3, %edx
movq %rbx, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0x5, %edx
movq %rdx, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
andl 0x18(%rbx,%rax), %r13d
orl $0x20, %r13d
movl %r13d, 0x18(%rbx,%rax)
movl %r15d, %esi
movq %rbx, %rdi
callq 0x41e0
leaq 0x39a6(%rip), %rsi      # 0xcaab
movl $0x3, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r13, %r12
je 0x917e
movq 0x8e8b(%rip), %r14      # 0x11fb0
leaq 0x7(%rsp), %r15
leaq 0x397f(%rip), %rbp      # 0xcab0
leaq 0x3977(%rip), %rbx      # 0xcaaf
movl (%r12), %edi
callq 0x50ce
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4340
movzbl 0x4(%r12), %ecx
testq %rcx, %rcx
movq %rbx, %rsi
cmovneq %rbp, %rsi
movl $0x2, %edx
subq %rcx, %rdx
movq %rax, %rdi
callq 0x4340
addq $0x8, %r12
cmpq %r13, %r12
jne 0x9138
movq 0x8e2b(%rip), %rbx      # 0x11fb0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
leaq 0x9425(%rip), %rdi      # 0x125d8
callq 0x4230
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x41c0