// File: /workspace/github_cpp_makefile_star2_O2/xelia-it[P]mustache/third-party/catch2/single_include/catch2/catch.hpp
// Function: Catch::sortTests(Catch::IConfig const&, std::vector<Catch::TestCase, std::allocator<Catch::TestCase>> const&)
std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) {
        switch( config.runOrder() ) {
            case RunTests::InDeclarationOrder:
                // already in declaration order
                break;

            case RunTests::InLexicographicalOrder: {
                std::vector<TestCase> sorted = unsortedTestCases;
                std::sort( sorted.begin(), sorted.end() );
                return sorted;
            }

            case RunTests::InRandomOrder: {
                seedRng( config );
                TestHasher h{ config.rngSeed() };

                using hashedTest = std::pair<TestHasher::hash_t, TestCase const*>;
                std::vector<hashedTest> indexed_tests;
                indexed_tests.reserve( unsortedTestCases.size() );

                for (auto const& testCase : unsortedTestCases) {
                    indexed_tests.emplace_back(h(testCase), &testCase);
                }

                std::sort(indexed_tests.begin(), indexed_tests.end(),
                          [](hashedTest const& lhs, hashedTest const& rhs) {
                          if (lhs.first == rhs.first) {
                              return lhs.second->name < rhs.second->name;
                          }
                          return lhs.first < rhs.first;
                });

                std::vector<TestCase> sorted;
                sorted.reserve( indexed_tests.size() );

                for (auto const& hashed : indexed_tests) {
                    sorted.emplace_back(*hashed.second);
                }

                return sorted;
            }
        }
        return unsortedTestCases;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x80(%rax)
cmpl $0x2, %eax
je 0x31d99
movq %r13, %rdi
movq %r12, %rsi
cmpl $0x1, %eax
jne 0x31e57
callq 0x3f4e8
movq (%r13), %rdi
movq 0x8(%r13), %rsi
callq 0x59f80
jmp 0x31f1b
movq %r15, %rdi
callq 0x2f32e
movq (%r15), %rax
movq %r15, %rdi
callq *0x88(%rax)
movl %eax, %r15d
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x8(%r12), %rax
subq (%r12), %rax
movl $0xb8, %ecx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x3f544
movq %r13, -0x58(%rbp)
movl %r15d, %r13d
movabsq $0x100000001b3, %rbx    # imm = 0x100000001B3
movq (%r12), %r14
movq 0x8(%r12), %r15
leaq -0x60(%rbp), %r12
cmpq %r15, %r14
je 0x31e61
movq (%r14), %rcx
movq 0x8(%r14), %rdx
xorl %esi, %esi
movabsq $-0x340d631b7bdddcdb, %rax # imm = 0xCBF29CE484222325
cmpq %rsi, %rdx
je 0x31e26
movsbq (%rcx,%rsi), %rdi
xorq %rdi, %rax
imulq %rbx, %rax
incq %rsi
jmp 0x31e10
xorq %r13, %rax
imulq %rbx, %rax
movq %rax, %rcx
shrq $0x20, %rcx
imull %eax, %ecx
movl %ecx, -0x2c(%rbp)
movq %r14, -0x60(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
movq %r12, %rdx
callq 0x3f5ec
addq $0xb8, %r14
jmp 0x31df8
callq 0x3f4e8
jmp 0x31f1b
movq -0x50(%rbp), %r15
movq -0x48(%rbp), %r14
cmpq %r14, %r15
movq -0x58(%rbp), %r13
je 0x31ed2
movq %r14, %rbx
subq %r15, %rbx
movq %rbx, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3cfad
cmpq $0x101, %rbx            # imm = 0x101
jl 0x31ec7
leaq 0x100(%r15), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3d345
jmp 0x31ec0
movq %r12, %rdi
callq 0x3d3af
addq $0x10, %r12
cmpq %r14, %r12
jne 0x31eb4
jmp 0x31ed2
movq %r15, %rdi
movq %r14, %rsi
callq 0x3d345
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
andq $0x0, 0x10(%r13)
movq -0x48(%rbp), %rsi
subq -0x50(%rbp), %rsi
sarq $0x4, %rsi
movq %r13, %rdi
callq 0x3f61c
movq -0x50(%rbp), %rbx
movq -0x48(%rbp), %r14
cmpq %r14, %rbx
je 0x31f12
movq 0x8(%rbx), %rsi
movq %r13, %rdi
callq 0x3f6b6
addq $0x10, %rbx
jmp 0x31efb
leaq -0x50(%rbp), %rdi
callq 0x5a8e6
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x31f3e
movq %rax, %r14
movq %r13, %rdi
callq 0x3e31c
jmp 0x31f58
jmp 0x31f4c
movq %rax, %r14
movq -0x58(%rbp), %rdi
callq 0x3e31c
jmp 0x31f4f
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x5a8e6
movq %r14, %rdi
callq 0x24950