llvm/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME

// <string>

// int compare(size_type pos1, size_type n1, const basic_string& str,
//             size_type pos2, size_type n2=npos) const; // constexpr since C++20
//  the "=npos" was added in C++14

#include <string>
#include <stdexcept>
#include <cassert>

#include "min_allocator.h"

#include "test_macros.h"

TEST_CONSTEXPR_CXX20 int sign(int x) {
  if (x == 0)
    return 0;
  if (x < 0)
    return -1;
  return 1;
}

template <class S>
TEST_CONSTEXPR_CXX20 void
test(const S& s,
     typename S::size_type pos1,
     typename S::size_type n1,
     const S& str,
     typename S::size_type pos2,
     typename S::size_type n2,
     int x) {
  if (pos1 <= s.size() && pos2 <= str.size())
    assert(sign(s.compare(pos1, n1, str, pos2, n2)) == sign(x));
#ifndef TEST_HAS_NO_EXCEPTIONS
  else if (!TEST_IS_CONSTANT_EVALUATED) {
    try {
      TEST_IGNORE_NODISCARD s.compare(pos1, n1, str, pos2, n2);
      assert(false);
    } catch (const std::out_of_range&) {
      assert(pos1 > s.size() || pos2 > str.size());
    }
  }
#endif
}

template <class S>
TEST_CONSTEXPR_CXX20 void test_npos(
    const S& s, typename S::size_type pos1, typename S::size_type n1, const S& str, typename S::size_type pos2, int x) {
  if (pos1 <= s.size() && pos2 <= str.size())
    assert(sign(s.compare(pos1, n1, str, pos2)) == sign(x));
#ifndef TEST_HAS_NO_EXCEPTIONS
  else if (!TEST_IS_CONSTANT_EVALUATED) {
    try {
      TEST_IGNORE_NODISCARD s.compare(pos1, n1, str, pos2);
      assert(false);
    } catch (const std::out_of_range&) {
      assert(pos1 > s.size() || pos2 > str.size());
    }
  }
#endif
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test0() {
  test(S(""), 0, 0, S(""), 0, 0, 0);
  test(S(""), 0, 0, S(""), 0, 1, 0);
  test(S(""), 0, 0, S(""), 1, 0, 0);
  test(S(""), 0, 0, S("abcde"), 0, 0, 0);
  test(S(""), 0, 0, S("abcde"), 0, 1, -1);
  test(S(""), 0, 0, S("abcde"), 0, 2, -2);
  test(S(""), 0, 0, S("abcde"), 0, 4, -4);
  test(S(""), 0, 0, S("abcde"), 0, 5, -5);
  test(S(""), 0, 0, S("abcde"), 0, 6, -5);
  test(S(""), 0, 0, S("abcde"), 1, 0, 0);
  test(S(""), 0, 0, S("abcde"), 1, 1, -1);
  test(S(""), 0, 0, S("abcde"), 1, 2, -2);
  test(S(""), 0, 0, S("abcde"), 1, 3, -3);
  test(S(""), 0, 0, S("abcde"), 1, 4, -4);
  test(S(""), 0, 0, S("abcde"), 1, 5, -4);
  test(S(""), 0, 0, S("abcde"), 2, 0, 0);
  test(S(""), 0, 0, S("abcde"), 2, 1, -1);
  test(S(""), 0, 0, S("abcde"), 2, 2, -2);
  test(S(""), 0, 0, S("abcde"), 2, 3, -3);
  test(S(""), 0, 0, S("abcde"), 2, 4, -3);
  test(S(""), 0, 0, S("abcde"), 4, 0, 0);
  test(S(""), 0, 0, S("abcde"), 4, 1, -1);
  test(S(""), 0, 0, S("abcde"), 4, 2, -1);
  test(S(""), 0, 0, S("abcde"), 5, 0, 0);
  test(S(""), 0, 0, S("abcde"), 5, 1, 0);
  test(S(""), 0, 0, S("abcde"), 6, 0, 0);
  test(S(""), 0, 0, S("abcdefghij"), 0, 0, 0);
  test(S(""), 0, 0, S("abcdefghij"), 0, 1, -1);
  test(S(""), 0, 0, S("abcdefghij"), 0, 5, -5);
  test(S(""), 0, 0, S("abcdefghij"), 0, 9, -9);
  test(S(""), 0, 0, S("abcdefghij"), 0, 10, -10);
  test(S(""), 0, 0, S("abcdefghij"), 0, 11, -10);
  test(S(""), 0, 0, S("abcdefghij"), 1, 0, 0);
  test(S(""), 0, 0, S("abcdefghij"), 1, 1, -1);
  test(S(""), 0, 0, S("abcdefghij"), 1, 4, -4);
  test(S(""), 0, 0, S("abcdefghij"), 1, 8, -8);
  test(S(""), 0, 0, S("abcdefghij"), 1, 9, -9);
  test(S(""), 0, 0, S("abcdefghij"), 1, 10, -9);
  test(S(""), 0, 0, S("abcdefghij"), 5, 0, 0);
  test(S(""), 0, 0, S("abcdefghij"), 5, 1, -1);
  test(S(""), 0, 0, S("abcdefghij"), 5, 2, -2);
  test(S(""), 0, 0, S("abcdefghij"), 5, 4, -4);
  test(S(""), 0, 0, S("abcdefghij"), 5, 5, -5);
  test(S(""), 0, 0, S("abcdefghij"), 5, 6, -5);
  test(S(""), 0, 0, S("abcdefghij"), 9, 0, 0);
  test(S(""), 0, 0, S("abcdefghij"), 9, 1, -1);
  test(S(""), 0, 0, S("abcdefghij"), 9, 2, -1);
  test(S(""), 0, 0, S("abcdefghij"), 10, 0, 0);
  test(S(""), 0, 0, S("abcdefghij"), 10, 1, 0);
  test(S(""), 0, 0, S("abcdefghij"), 11, 0, 0);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S(""), 0, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S(""), 0, 1, S(""), 0, 0, 0);
  test(S(""), 0, 1, S(""), 0, 1, 0);
  test(S(""), 0, 1, S(""), 1, 0, 0);
  test(S(""), 0, 1, S("abcde"), 0, 0, 0);
  test(S(""), 0, 1, S("abcde"), 0, 1, -1);
  test(S(""), 0, 1, S("abcde"), 0, 2, -2);
  test(S(""), 0, 1, S("abcde"), 0, 4, -4);
  test(S(""), 0, 1, S("abcde"), 0, 5, -5);
  test(S(""), 0, 1, S("abcde"), 0, 6, -5);
  test(S(""), 0, 1, S("abcde"), 1, 0, 0);
  test(S(""), 0, 1, S("abcde"), 1, 1, -1);
  test(S(""), 0, 1, S("abcde"), 1, 2, -2);
  test(S(""), 0, 1, S("abcde"), 1, 3, -3);
  test(S(""), 0, 1, S("abcde"), 1, 4, -4);
  test(S(""), 0, 1, S("abcde"), 1, 5, -4);
  test(S(""), 0, 1, S("abcde"), 2, 0, 0);
  test(S(""), 0, 1, S("abcde"), 2, 1, -1);
  test(S(""), 0, 1, S("abcde"), 2, 2, -2);
  test(S(""), 0, 1, S("abcde"), 2, 3, -3);
  test(S(""), 0, 1, S("abcde"), 2, 4, -3);
  test(S(""), 0, 1, S("abcde"), 4, 0, 0);
  test(S(""), 0, 1, S("abcde"), 4, 1, -1);
  test(S(""), 0, 1, S("abcde"), 4, 2, -1);
  test(S(""), 0, 1, S("abcde"), 5, 0, 0);
  test(S(""), 0, 1, S("abcde"), 5, 1, 0);
  test(S(""), 0, 1, S("abcde"), 6, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test1() {
  test(S(""), 0, 1, S("abcdefghij"), 0, 0, 0);
  test(S(""), 0, 1, S("abcdefghij"), 0, 1, -1);
  test(S(""), 0, 1, S("abcdefghij"), 0, 5, -5);
  test(S(""), 0, 1, S("abcdefghij"), 0, 9, -9);
  test(S(""), 0, 1, S("abcdefghij"), 0, 10, -10);
  test(S(""), 0, 1, S("abcdefghij"), 0, 11, -10);
  test(S(""), 0, 1, S("abcdefghij"), 1, 0, 0);
  test(S(""), 0, 1, S("abcdefghij"), 1, 1, -1);
  test(S(""), 0, 1, S("abcdefghij"), 1, 4, -4);
  test(S(""), 0, 1, S("abcdefghij"), 1, 8, -8);
  test(S(""), 0, 1, S("abcdefghij"), 1, 9, -9);
  test(S(""), 0, 1, S("abcdefghij"), 1, 10, -9);
  test(S(""), 0, 1, S("abcdefghij"), 5, 0, 0);
  test(S(""), 0, 1, S("abcdefghij"), 5, 1, -1);
  test(S(""), 0, 1, S("abcdefghij"), 5, 2, -2);
  test(S(""), 0, 1, S("abcdefghij"), 5, 4, -4);
  test(S(""), 0, 1, S("abcdefghij"), 5, 5, -5);
  test(S(""), 0, 1, S("abcdefghij"), 5, 6, -5);
  test(S(""), 0, 1, S("abcdefghij"), 9, 0, 0);
  test(S(""), 0, 1, S("abcdefghij"), 9, 1, -1);
  test(S(""), 0, 1, S("abcdefghij"), 9, 2, -1);
  test(S(""), 0, 1, S("abcdefghij"), 10, 0, 0);
  test(S(""), 0, 1, S("abcdefghij"), 10, 1, 0);
  test(S(""), 0, 1, S("abcdefghij"), 11, 0, 0);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S(""), 0, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S(""), 1, 0, S(""), 0, 0, 0);
  test(S(""), 1, 0, S(""), 0, 1, 0);
  test(S(""), 1, 0, S(""), 1, 0, 0);
  test(S(""), 1, 0, S("abcde"), 0, 0, 0);
  test(S(""), 1, 0, S("abcde"), 0, 1, 0);
  test(S(""), 1, 0, S("abcde"), 0, 2, 0);
  test(S(""), 1, 0, S("abcde"), 0, 4, 0);
  test(S(""), 1, 0, S("abcde"), 0, 5, 0);
  test(S(""), 1, 0, S("abcde"), 0, 6, 0);
  test(S(""), 1, 0, S("abcde"), 1, 0, 0);
  test(S(""), 1, 0, S("abcde"), 1, 1, 0);
  test(S(""), 1, 0, S("abcde"), 1, 2, 0);
  test(S(""), 1, 0, S("abcde"), 1, 3, 0);
  test(S(""), 1, 0, S("abcde"), 1, 4, 0);
  test(S(""), 1, 0, S("abcde"), 1, 5, 0);
  test(S(""), 1, 0, S("abcde"), 2, 0, 0);
  test(S(""), 1, 0, S("abcde"), 2, 1, 0);
  test(S(""), 1, 0, S("abcde"), 2, 2, 0);
  test(S(""), 1, 0, S("abcde"), 2, 3, 0);
  test(S(""), 1, 0, S("abcde"), 2, 4, 0);
  test(S(""), 1, 0, S("abcde"), 4, 0, 0);
  test(S(""), 1, 0, S("abcde"), 4, 1, 0);
  test(S(""), 1, 0, S("abcde"), 4, 2, 0);
  test(S(""), 1, 0, S("abcde"), 5, 0, 0);
  test(S(""), 1, 0, S("abcde"), 5, 1, 0);
  test(S(""), 1, 0, S("abcde"), 6, 0, 0);
  test(S(""), 1, 0, S("abcdefghij"), 0, 0, 0);
  test(S(""), 1, 0, S("abcdefghij"), 0, 1, 0);
  test(S(""), 1, 0, S("abcdefghij"), 0, 5, 0);
  test(S(""), 1, 0, S("abcdefghij"), 0, 9, 0);
  test(S(""), 1, 0, S("abcdefghij"), 0, 10, 0);
  test(S(""), 1, 0, S("abcdefghij"), 0, 11, 0);
  test(S(""), 1, 0, S("abcdefghij"), 1, 0, 0);
  test(S(""), 1, 0, S("abcdefghij"), 1, 1, 0);
  test(S(""), 1, 0, S("abcdefghij"), 1, 4, 0);
  test(S(""), 1, 0, S("abcdefghij"), 1, 8, 0);
  test(S(""), 1, 0, S("abcdefghij"), 1, 9, 0);
  test(S(""), 1, 0, S("abcdefghij"), 1, 10, 0);
  test(S(""), 1, 0, S("abcdefghij"), 5, 0, 0);
  test(S(""), 1, 0, S("abcdefghij"), 5, 1, 0);
  test(S(""), 1, 0, S("abcdefghij"), 5, 2, 0);
  test(S(""), 1, 0, S("abcdefghij"), 5, 4, 0);
  test(S(""), 1, 0, S("abcdefghij"), 5, 5, 0);
  test(S(""), 1, 0, S("abcdefghij"), 5, 6, 0);
  test(S(""), 1, 0, S("abcdefghij"), 9, 0, 0);
  test(S(""), 1, 0, S("abcdefghij"), 9, 1, 0);
  test(S(""), 1, 0, S("abcdefghij"), 9, 2, 0);
  test(S(""), 1, 0, S("abcdefghij"), 10, 0, 0);
  test(S(""), 1, 0, S("abcdefghij"), 10, 1, 0);
  test(S(""), 1, 0, S("abcdefghij"), 11, 0, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 1, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test2() {
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 10, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 19, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 20, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 21, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 1, 1, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 1, 9, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 1, 18, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 1, 19, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 1, 20, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 10, 1, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 10, 5, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 10, 9, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 10, 10, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 10, 11, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 19, 1, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 19, 2, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 0, 0, S(""), 0, 0, 0);
  test(S("abcde"), 0, 0, S(""), 0, 1, 0);
  test(S("abcde"), 0, 0, S(""), 1, 0, 0);
  test(S("abcde"), 0, 0, S("abcde"), 0, 0, 0);
  test(S("abcde"), 0, 0, S("abcde"), 0, 1, -1);
  test(S("abcde"), 0, 0, S("abcde"), 0, 2, -2);
  test(S("abcde"), 0, 0, S("abcde"), 0, 4, -4);
  test(S("abcde"), 0, 0, S("abcde"), 0, 5, -5);
  test(S("abcde"), 0, 0, S("abcde"), 0, 6, -5);
  test(S("abcde"), 0, 0, S("abcde"), 1, 0, 0);
  test(S("abcde"), 0, 0, S("abcde"), 1, 1, -1);
  test(S("abcde"), 0, 0, S("abcde"), 1, 2, -2);
  test(S("abcde"), 0, 0, S("abcde"), 1, 3, -3);
  test(S("abcde"), 0, 0, S("abcde"), 1, 4, -4);
  test(S("abcde"), 0, 0, S("abcde"), 1, 5, -4);
  test(S("abcde"), 0, 0, S("abcde"), 2, 0, 0);
  test(S("abcde"), 0, 0, S("abcde"), 2, 1, -1);
  test(S("abcde"), 0, 0, S("abcde"), 2, 2, -2);
  test(S("abcde"), 0, 0, S("abcde"), 2, 3, -3);
  test(S("abcde"), 0, 0, S("abcde"), 2, 4, -3);
  test(S("abcde"), 0, 0, S("abcde"), 4, 0, 0);
  test(S("abcde"), 0, 0, S("abcde"), 4, 1, -1);
  test(S("abcde"), 0, 0, S("abcde"), 4, 2, -1);
  test(S("abcde"), 0, 0, S("abcde"), 5, 0, 0);
  test(S("abcde"), 0, 0, S("abcde"), 5, 1, 0);
  test(S("abcde"), 0, 0, S("abcde"), 6, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcde"), 0, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcde"), 0, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcde"), 0, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcde"), 0, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcde"), 0, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcde"), 0, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcde"), 0, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcde"), 0, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcde"), 0, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 0, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 0, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 0, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcde"), 0, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcde"), 0, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcde"), 0, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 0, 1, S(""), 0, 0, 1);
  test(S("abcde"), 0, 1, S(""), 0, 1, 1);
  test(S("abcde"), 0, 1, S(""), 1, 0, 0);
  test(S("abcde"), 0, 1, S("abcde"), 0, 0, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test3() {
  test(S("abcde"), 0, 1, S("abcde"), 0, 1, 0);
  test(S("abcde"), 0, 1, S("abcde"), 0, 2, -1);
  test(S("abcde"), 0, 1, S("abcde"), 0, 4, -3);
  test(S("abcde"), 0, 1, S("abcde"), 0, 5, -4);
  test(S("abcde"), 0, 1, S("abcde"), 0, 6, -4);
  test(S("abcde"), 0, 1, S("abcde"), 1, 0, 1);
  test(S("abcde"), 0, 1, S("abcde"), 1, 1, -1);
  test(S("abcde"), 0, 1, S("abcde"), 1, 2, -1);
  test(S("abcde"), 0, 1, S("abcde"), 1, 3, -1);
  test(S("abcde"), 0, 1, S("abcde"), 1, 4, -1);
  test(S("abcde"), 0, 1, S("abcde"), 1, 5, -1);
  test(S("abcde"), 0, 1, S("abcde"), 2, 0, 1);
  test(S("abcde"), 0, 1, S("abcde"), 2, 1, -2);
  test(S("abcde"), 0, 1, S("abcde"), 2, 2, -2);
  test(S("abcde"), 0, 1, S("abcde"), 2, 3, -2);
  test(S("abcde"), 0, 1, S("abcde"), 2, 4, -2);
  test(S("abcde"), 0, 1, S("abcde"), 4, 0, 1);
  test(S("abcde"), 0, 1, S("abcde"), 4, 1, -4);
  test(S("abcde"), 0, 1, S("abcde"), 4, 2, -4);
  test(S("abcde"), 0, 1, S("abcde"), 5, 0, 1);
  test(S("abcde"), 0, 1, S("abcde"), 5, 1, 1);
  test(S("abcde"), 0, 1, S("abcde"), 6, 0, 0);
  test(S("abcde"), 0, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 0, 1, 0);
  test(S("abcde"), 0, 1, S("abcdefghij"), 0, 5, -4);
  test(S("abcde"), 0, 1, S("abcdefghij"), 0, 9, -8);
  test(S("abcde"), 0, 1, S("abcdefghij"), 0, 10, -9);
  test(S("abcde"), 0, 1, S("abcdefghij"), 0, 11, -9);
  test(S("abcde"), 0, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 1, 4, -1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 1, 8, -1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 1, 9, -1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 1, 10, -1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 5, 1, -5);
  test(S("abcde"), 0, 1, S("abcdefghij"), 5, 2, -5);
  test(S("abcde"), 0, 1, S("abcdefghij"), 5, 4, -5);
  test(S("abcde"), 0, 1, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 0, 1, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 0, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 9, 1, -9);
  test(S("abcde"), 0, 1, S("abcdefghij"), 9, 2, -9);
  test(S("abcde"), 0, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcde"), 0, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 0, 1, 0);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 0, 10, -9);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 0, 19, -18);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 0, 20, -19);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 0, 21, -19);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcde"), 0, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 0, 2, S(""), 0, 0, 2);
  test(S("abcde"), 0, 2, S(""), 0, 1, 2);
  test(S("abcde"), 0, 2, S(""), 1, 0, 0);
  test(S("abcde"), 0, 2, S("abcde"), 0, 0, 2);
  test(S("abcde"), 0, 2, S("abcde"), 0, 1, 1);
  test(S("abcde"), 0, 2, S("abcde"), 0, 2, 0);
  test(S("abcde"), 0, 2, S("abcde"), 0, 4, -2);
  test(S("abcde"), 0, 2, S("abcde"), 0, 5, -3);
  test(S("abcde"), 0, 2, S("abcde"), 0, 6, -3);
  test(S("abcde"), 0, 2, S("abcde"), 1, 0, 2);
  test(S("abcde"), 0, 2, S("abcde"), 1, 1, -1);
  test(S("abcde"), 0, 2, S("abcde"), 1, 2, -1);
  test(S("abcde"), 0, 2, S("abcde"), 1, 3, -1);
  test(S("abcde"), 0, 2, S("abcde"), 1, 4, -1);
  test(S("abcde"), 0, 2, S("abcde"), 1, 5, -1);
  test(S("abcde"), 0, 2, S("abcde"), 2, 0, 2);
  test(S("abcde"), 0, 2, S("abcde"), 2, 1, -2);
  test(S("abcde"), 0, 2, S("abcde"), 2, 2, -2);
  test(S("abcde"), 0, 2, S("abcde"), 2, 3, -2);
  test(S("abcde"), 0, 2, S("abcde"), 2, 4, -2);
  test(S("abcde"), 0, 2, S("abcde"), 4, 0, 2);
  test(S("abcde"), 0, 2, S("abcde"), 4, 1, -4);
  test(S("abcde"), 0, 2, S("abcde"), 4, 2, -4);
  test(S("abcde"), 0, 2, S("abcde"), 5, 0, 2);
  test(S("abcde"), 0, 2, S("abcde"), 5, 1, 2);
  test(S("abcde"), 0, 2, S("abcde"), 6, 0, 0);
  test(S("abcde"), 0, 2, S("abcdefghij"), 0, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghij"), 0, 1, 1);
  test(S("abcde"), 0, 2, S("abcdefghij"), 0, 5, -3);
  test(S("abcde"), 0, 2, S("abcdefghij"), 0, 9, -7);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test4() {
  test(S("abcde"), 0, 2, S("abcdefghij"), 0, 10, -8);
  test(S("abcde"), 0, 2, S("abcdefghij"), 0, 11, -8);
  test(S("abcde"), 0, 2, S("abcdefghij"), 1, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 0, 2, S("abcdefghij"), 1, 4, -1);
  test(S("abcde"), 0, 2, S("abcdefghij"), 1, 8, -1);
  test(S("abcde"), 0, 2, S("abcdefghij"), 1, 9, -1);
  test(S("abcde"), 0, 2, S("abcdefghij"), 1, 10, -1);
  test(S("abcde"), 0, 2, S("abcdefghij"), 5, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghij"), 5, 1, -5);
  test(S("abcde"), 0, 2, S("abcdefghij"), 5, 2, -5);
  test(S("abcde"), 0, 2, S("abcdefghij"), 5, 4, -5);
  test(S("abcde"), 0, 2, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 0, 2, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 0, 2, S("abcdefghij"), 9, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghij"), 9, 1, -9);
  test(S("abcde"), 0, 2, S("abcdefghij"), 9, 2, -9);
  test(S("abcde"), 0, 2, S("abcdefghij"), 10, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghij"), 10, 1, 2);
  test(S("abcde"), 0, 2, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 0, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 0, 10, -8);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 0, 19, -17);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 0, 20, -18);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 0, 21, -18);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 1, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 10, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 19, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 20, 0, 2);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 20, 1, 2);
  test(S("abcde"), 0, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 0, 4, S(""), 0, 0, 4);
  test(S("abcde"), 0, 4, S(""), 0, 1, 4);
  test(S("abcde"), 0, 4, S(""), 1, 0, 0);
  test(S("abcde"), 0, 4, S("abcde"), 0, 0, 4);
  test(S("abcde"), 0, 4, S("abcde"), 0, 1, 3);
  test(S("abcde"), 0, 4, S("abcde"), 0, 2, 2);
  test(S("abcde"), 0, 4, S("abcde"), 0, 4, 0);
  test(S("abcde"), 0, 4, S("abcde"), 0, 5, -1);
  test(S("abcde"), 0, 4, S("abcde"), 0, 6, -1);
  test(S("abcde"), 0, 4, S("abcde"), 1, 0, 4);
  test(S("abcde"), 0, 4, S("abcde"), 1, 1, -1);
  test(S("abcde"), 0, 4, S("abcde"), 1, 2, -1);
  test(S("abcde"), 0, 4, S("abcde"), 1, 3, -1);
  test(S("abcde"), 0, 4, S("abcde"), 1, 4, -1);
  test(S("abcde"), 0, 4, S("abcde"), 1, 5, -1);
  test(S("abcde"), 0, 4, S("abcde"), 2, 0, 4);
  test(S("abcde"), 0, 4, S("abcde"), 2, 1, -2);
  test(S("abcde"), 0, 4, S("abcde"), 2, 2, -2);
  test(S("abcde"), 0, 4, S("abcde"), 2, 3, -2);
  test(S("abcde"), 0, 4, S("abcde"), 2, 4, -2);
  test(S("abcde"), 0, 4, S("abcde"), 4, 0, 4);
  test(S("abcde"), 0, 4, S("abcde"), 4, 1, -4);
  test(S("abcde"), 0, 4, S("abcde"), 4, 2, -4);
  test(S("abcde"), 0, 4, S("abcde"), 5, 0, 4);
  test(S("abcde"), 0, 4, S("abcde"), 5, 1, 4);
  test(S("abcde"), 0, 4, S("abcde"), 6, 0, 0);
  test(S("abcde"), 0, 4, S("abcdefghij"), 0, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghij"), 0, 1, 3);
  test(S("abcde"), 0, 4, S("abcdefghij"), 0, 5, -1);
  test(S("abcde"), 0, 4, S("abcdefghij"), 0, 9, -5);
  test(S("abcde"), 0, 4, S("abcdefghij"), 0, 10, -6);
  test(S("abcde"), 0, 4, S("abcdefghij"), 0, 11, -6);
  test(S("abcde"), 0, 4, S("abcdefghij"), 1, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 0, 4, S("abcdefghij"), 1, 4, -1);
  test(S("abcde"), 0, 4, S("abcdefghij"), 1, 8, -1);
  test(S("abcde"), 0, 4, S("abcdefghij"), 1, 9, -1);
  test(S("abcde"), 0, 4, S("abcdefghij"), 1, 10, -1);
  test(S("abcde"), 0, 4, S("abcdefghij"), 5, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghij"), 5, 1, -5);
  test(S("abcde"), 0, 4, S("abcdefghij"), 5, 2, -5);
  test(S("abcde"), 0, 4, S("abcdefghij"), 5, 4, -5);
  test(S("abcde"), 0, 4, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 0, 4, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 0, 4, S("abcdefghij"), 9, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghij"), 9, 1, -9);
  test(S("abcde"), 0, 4, S("abcdefghij"), 9, 2, -9);
  test(S("abcde"), 0, 4, S("abcdefghij"), 10, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghij"), 10, 1, 4);
  test(S("abcde"), 0, 4, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 1, 3);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 10, -6);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 19, -15);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 20, -16);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 21, -16);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test5() {
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 10, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 19, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 20, 0, 4);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 20, 1, 4);
  test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 0, 5, S(""), 0, 0, 5);
  test(S("abcde"), 0, 5, S(""), 0, 1, 5);
  test(S("abcde"), 0, 5, S(""), 1, 0, 0);
  test(S("abcde"), 0, 5, S("abcde"), 0, 0, 5);
  test(S("abcde"), 0, 5, S("abcde"), 0, 1, 4);
  test(S("abcde"), 0, 5, S("abcde"), 0, 2, 3);
  test(S("abcde"), 0, 5, S("abcde"), 0, 4, 1);
  test(S("abcde"), 0, 5, S("abcde"), 0, 5, 0);
  test(S("abcde"), 0, 5, S("abcde"), 0, 6, 0);
  test(S("abcde"), 0, 5, S("abcde"), 1, 0, 5);
  test(S("abcde"), 0, 5, S("abcde"), 1, 1, -1);
  test(S("abcde"), 0, 5, S("abcde"), 1, 2, -1);
  test(S("abcde"), 0, 5, S("abcde"), 1, 3, -1);
  test(S("abcde"), 0, 5, S("abcde"), 1, 4, -1);
  test(S("abcde"), 0, 5, S("abcde"), 1, 5, -1);
  test(S("abcde"), 0, 5, S("abcde"), 2, 0, 5);
  test(S("abcde"), 0, 5, S("abcde"), 2, 1, -2);
  test(S("abcde"), 0, 5, S("abcde"), 2, 2, -2);
  test(S("abcde"), 0, 5, S("abcde"), 2, 3, -2);
  test(S("abcde"), 0, 5, S("abcde"), 2, 4, -2);
  test(S("abcde"), 0, 5, S("abcde"), 4, 0, 5);
  test(S("abcde"), 0, 5, S("abcde"), 4, 1, -4);
  test(S("abcde"), 0, 5, S("abcde"), 4, 2, -4);
  test(S("abcde"), 0, 5, S("abcde"), 5, 0, 5);
  test(S("abcde"), 0, 5, S("abcde"), 5, 1, 5);
  test(S("abcde"), 0, 5, S("abcde"), 6, 0, 0);
  test(S("abcde"), 0, 5, S("abcdefghij"), 0, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 0, 1, 4);
  test(S("abcde"), 0, 5, S("abcdefghij"), 0, 5, 0);
  test(S("abcde"), 0, 5, S("abcdefghij"), 0, 9, -4);
  test(S("abcde"), 0, 5, S("abcdefghij"), 0, 10, -5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 0, 11, -5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 1, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 0, 5, S("abcdefghij"), 1, 4, -1);
  test(S("abcde"), 0, 5, S("abcdefghij"), 1, 8, -1);
  test(S("abcde"), 0, 5, S("abcdefghij"), 1, 9, -1);
  test(S("abcde"), 0, 5, S("abcdefghij"), 1, 10, -1);
  test(S("abcde"), 0, 5, S("abcdefghij"), 5, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 5, 1, -5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 5, 2, -5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 5, 4, -5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 9, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 9, 1, -9);
  test(S("abcde"), 0, 5, S("abcdefghij"), 9, 2, -9);
  test(S("abcde"), 0, 5, S("abcdefghij"), 10, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 10, 1, 5);
  test(S("abcde"), 0, 5, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 0, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 0, 1, 4);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 0, 10, -5);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 0, 19, -14);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 0, 20, -15);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 0, 21, -15);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 1, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 10, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 19, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 20, 0, 5);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 20, 1, 5);
  test(S("abcde"), 0, 5, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 0, 6, S(""), 0, 0, 5);
  test(S("abcde"), 0, 6, S(""), 0, 1, 5);
  test(S("abcde"), 0, 6, S(""), 1, 0, 0);
  test(S("abcde"), 0, 6, S("abcde"), 0, 0, 5);
  test(S("abcde"), 0, 6, S("abcde"), 0, 1, 4);
  test(S("abcde"), 0, 6, S("abcde"), 0, 2, 3);
  test(S("abcde"), 0, 6, S("abcde"), 0, 4, 1);
  test(S("abcde"), 0, 6, S("abcde"), 0, 5, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test6() {
  test(S("abcde"), 0, 6, S("abcde"), 0, 6, 0);
  test(S("abcde"), 0, 6, S("abcde"), 1, 0, 5);
  test(S("abcde"), 0, 6, S("abcde"), 1, 1, -1);
  test(S("abcde"), 0, 6, S("abcde"), 1, 2, -1);
  test(S("abcde"), 0, 6, S("abcde"), 1, 3, -1);
  test(S("abcde"), 0, 6, S("abcde"), 1, 4, -1);
  test(S("abcde"), 0, 6, S("abcde"), 1, 5, -1);
  test(S("abcde"), 0, 6, S("abcde"), 2, 0, 5);
  test(S("abcde"), 0, 6, S("abcde"), 2, 1, -2);
  test(S("abcde"), 0, 6, S("abcde"), 2, 2, -2);
  test(S("abcde"), 0, 6, S("abcde"), 2, 3, -2);
  test(S("abcde"), 0, 6, S("abcde"), 2, 4, -2);
  test(S("abcde"), 0, 6, S("abcde"), 4, 0, 5);
  test(S("abcde"), 0, 6, S("abcde"), 4, 1, -4);
  test(S("abcde"), 0, 6, S("abcde"), 4, 2, -4);
  test(S("abcde"), 0, 6, S("abcde"), 5, 0, 5);
  test(S("abcde"), 0, 6, S("abcde"), 5, 1, 5);
  test(S("abcde"), 0, 6, S("abcde"), 6, 0, 0);
  test(S("abcde"), 0, 6, S("abcdefghij"), 0, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 0, 1, 4);
  test(S("abcde"), 0, 6, S("abcdefghij"), 0, 5, 0);
  test(S("abcde"), 0, 6, S("abcdefghij"), 0, 9, -4);
  test(S("abcde"), 0, 6, S("abcdefghij"), 0, 10, -5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 0, 11, -5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 1, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 0, 6, S("abcdefghij"), 1, 4, -1);
  test(S("abcde"), 0, 6, S("abcdefghij"), 1, 8, -1);
  test(S("abcde"), 0, 6, S("abcdefghij"), 1, 9, -1);
  test(S("abcde"), 0, 6, S("abcdefghij"), 1, 10, -1);
  test(S("abcde"), 0, 6, S("abcdefghij"), 5, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 5, 1, -5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 5, 2, -5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 5, 4, -5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 9, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 9, 1, -9);
  test(S("abcde"), 0, 6, S("abcdefghij"), 9, 2, -9);
  test(S("abcde"), 0, 6, S("abcdefghij"), 10, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 10, 1, 5);
  test(S("abcde"), 0, 6, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 0, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 0, 1, 4);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 0, 10, -5);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 0, 19, -14);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 0, 20, -15);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 0, 21, -15);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 1, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 10, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 19, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 20, 0, 5);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 20, 1, 5);
  test(S("abcde"), 0, 6, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 1, 0, S(""), 0, 0, 0);
  test(S("abcde"), 1, 0, S(""), 0, 1, 0);
  test(S("abcde"), 1, 0, S(""), 1, 0, 0);
  test(S("abcde"), 1, 0, S("abcde"), 0, 0, 0);
  test(S("abcde"), 1, 0, S("abcde"), 0, 1, -1);
  test(S("abcde"), 1, 0, S("abcde"), 0, 2, -2);
  test(S("abcde"), 1, 0, S("abcde"), 0, 4, -4);
  test(S("abcde"), 1, 0, S("abcde"), 0, 5, -5);
  test(S("abcde"), 1, 0, S("abcde"), 0, 6, -5);
  test(S("abcde"), 1, 0, S("abcde"), 1, 0, 0);
  test(S("abcde"), 1, 0, S("abcde"), 1, 1, -1);
  test(S("abcde"), 1, 0, S("abcde"), 1, 2, -2);
  test(S("abcde"), 1, 0, S("abcde"), 1, 3, -3);
  test(S("abcde"), 1, 0, S("abcde"), 1, 4, -4);
  test(S("abcde"), 1, 0, S("abcde"), 1, 5, -4);
  test(S("abcde"), 1, 0, S("abcde"), 2, 0, 0);
  test(S("abcde"), 1, 0, S("abcde"), 2, 1, -1);
  test(S("abcde"), 1, 0, S("abcde"), 2, 2, -2);
  test(S("abcde"), 1, 0, S("abcde"), 2, 3, -3);
  test(S("abcde"), 1, 0, S("abcde"), 2, 4, -3);
  test(S("abcde"), 1, 0, S("abcde"), 4, 0, 0);
  test(S("abcde"), 1, 0, S("abcde"), 4, 1, -1);
  test(S("abcde"), 1, 0, S("abcde"), 4, 2, -1);
  test(S("abcde"), 1, 0, S("abcde"), 5, 0, 0);
  test(S("abcde"), 1, 0, S("abcde"), 5, 1, 0);
  test(S("abcde"), 1, 0, S("abcde"), 6, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcde"), 1, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcde"), 1, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcde"), 1, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcde"), 1, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcde"), 1, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghij"), 1, 1, -1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test7() {
  test(S("abcde"), 1, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcde"), 1, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcde"), 1, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcde"), 1, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcde"), 1, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 1, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcde"), 1, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 1, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 1, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 1, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcde"), 1, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcde"), 1, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcde"), 1, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcde"), 1, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 1, 1, S(""), 0, 0, 1);
  test(S("abcde"), 1, 1, S(""), 0, 1, 1);
  test(S("abcde"), 1, 1, S(""), 1, 0, 0);
  test(S("abcde"), 1, 1, S("abcde"), 0, 0, 1);
  test(S("abcde"), 1, 1, S("abcde"), 0, 1, 1);
  test(S("abcde"), 1, 1, S("abcde"), 0, 2, 1);
  test(S("abcde"), 1, 1, S("abcde"), 0, 4, 1);
  test(S("abcde"), 1, 1, S("abcde"), 0, 5, 1);
  test(S("abcde"), 1, 1, S("abcde"), 0, 6, 1);
  test(S("abcde"), 1, 1, S("abcde"), 1, 0, 1);
  test(S("abcde"), 1, 1, S("abcde"), 1, 1, 0);
  test(S("abcde"), 1, 1, S("abcde"), 1, 2, -1);
  test(S("abcde"), 1, 1, S("abcde"), 1, 3, -2);
  test(S("abcde"), 1, 1, S("abcde"), 1, 4, -3);
  test(S("abcde"), 1, 1, S("abcde"), 1, 5, -3);
  test(S("abcde"), 1, 1, S("abcde"), 2, 0, 1);
  test(S("abcde"), 1, 1, S("abcde"), 2, 1, -1);
  test(S("abcde"), 1, 1, S("abcde"), 2, 2, -1);
  test(S("abcde"), 1, 1, S("abcde"), 2, 3, -1);
  test(S("abcde"), 1, 1, S("abcde"), 2, 4, -1);
  test(S("abcde"), 1, 1, S("abcde"), 4, 0, 1);
  test(S("abcde"), 1, 1, S("abcde"), 4, 1, -3);
  test(S("abcde"), 1, 1, S("abcde"), 4, 2, -3);
  test(S("abcde"), 1, 1, S("abcde"), 5, 0, 1);
  test(S("abcde"), 1, 1, S("abcde"), 5, 1, 1);
  test(S("abcde"), 1, 1, S("abcde"), 6, 0, 0);
  test(S("abcde"), 1, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 0, 1, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 0, 5, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 0, 9, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 0, 10, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 0, 11, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 1, 1, 0);
  test(S("abcde"), 1, 1, S("abcdefghij"), 1, 4, -3);
  test(S("abcde"), 1, 1, S("abcdefghij"), 1, 8, -7);
  test(S("abcde"), 1, 1, S("abcdefghij"), 1, 9, -8);
  test(S("abcde"), 1, 1, S("abcdefghij"), 1, 10, -8);
  test(S("abcde"), 1, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 5, 1, -4);
  test(S("abcde"), 1, 1, S("abcdefghij"), 5, 2, -4);
  test(S("abcde"), 1, 1, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 1, 1, S("abcdefghij"), 5, 5, -4);
  test(S("abcde"), 1, 1, S("abcdefghij"), 5, 6, -4);
  test(S("abcde"), 1, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 9, 1, -8);
  test(S("abcde"), 1, 1, S("abcdefghij"), 9, 2, -8);
  test(S("abcde"), 1, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcde"), 1, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 1, 0);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 9, -8);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 18, -17);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test8() {
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 19, -18);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 20, -18);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 1, 2, S(""), 0, 0, 2);
  test(S("abcde"), 1, 2, S(""), 0, 1, 2);
  test(S("abcde"), 1, 2, S(""), 1, 0, 0);
  test(S("abcde"), 1, 2, S("abcde"), 0, 0, 2);
  test(S("abcde"), 1, 2, S("abcde"), 0, 1, 1);
  test(S("abcde"), 1, 2, S("abcde"), 0, 2, 1);
  test(S("abcde"), 1, 2, S("abcde"), 0, 4, 1);
  test(S("abcde"), 1, 2, S("abcde"), 0, 5, 1);
  test(S("abcde"), 1, 2, S("abcde"), 0, 6, 1);
  test(S("abcde"), 1, 2, S("abcde"), 1, 0, 2);
  test(S("abcde"), 1, 2, S("abcde"), 1, 1, 1);
  test(S("abcde"), 1, 2, S("abcde"), 1, 2, 0);
  test(S("abcde"), 1, 2, S("abcde"), 1, 3, -1);
  test(S("abcde"), 1, 2, S("abcde"), 1, 4, -2);
  test(S("abcde"), 1, 2, S("abcde"), 1, 5, -2);
  test(S("abcde"), 1, 2, S("abcde"), 2, 0, 2);
  test(S("abcde"), 1, 2, S("abcde"), 2, 1, -1);
  test(S("abcde"), 1, 2, S("abcde"), 2, 2, -1);
  test(S("abcde"), 1, 2, S("abcde"), 2, 3, -1);
  test(S("abcde"), 1, 2, S("abcde"), 2, 4, -1);
  test(S("abcde"), 1, 2, S("abcde"), 4, 0, 2);
  test(S("abcde"), 1, 2, S("abcde"), 4, 1, -3);
  test(S("abcde"), 1, 2, S("abcde"), 4, 2, -3);
  test(S("abcde"), 1, 2, S("abcde"), 5, 0, 2);
  test(S("abcde"), 1, 2, S("abcde"), 5, 1, 2);
  test(S("abcde"), 1, 2, S("abcde"), 6, 0, 0);
  test(S("abcde"), 1, 2, S("abcdefghij"), 0, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghij"), 0, 1, 1);
  test(S("abcde"), 1, 2, S("abcdefghij"), 0, 5, 1);
  test(S("abcde"), 1, 2, S("abcdefghij"), 0, 9, 1);
  test(S("abcde"), 1, 2, S("abcdefghij"), 0, 10, 1);
  test(S("abcde"), 1, 2, S("abcdefghij"), 0, 11, 1);
  test(S("abcde"), 1, 2, S("abcdefghij"), 1, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghij"), 1, 1, 1);
  test(S("abcde"), 1, 2, S("abcdefghij"), 1, 4, -2);
  test(S("abcde"), 1, 2, S("abcdefghij"), 1, 8, -6);
  test(S("abcde"), 1, 2, S("abcdefghij"), 1, 9, -7);
  test(S("abcde"), 1, 2, S("abcdefghij"), 1, 10, -7);
  test(S("abcde"), 1, 2, S("abcdefghij"), 5, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghij"), 5, 1, -4);
  test(S("abcde"), 1, 2, S("abcdefghij"), 5, 2, -4);
  test(S("abcde"), 1, 2, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 1, 2, S("abcdefghij"), 5, 5, -4);
  test(S("abcde"), 1, 2, S("abcdefghij"), 5, 6, -4);
  test(S("abcde"), 1, 2, S("abcdefghij"), 9, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghij"), 9, 1, -8);
  test(S("abcde"), 1, 2, S("abcdefghij"), 9, 2, -8);
  test(S("abcde"), 1, 2, S("abcdefghij"), 10, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghij"), 10, 1, 2);
  test(S("abcde"), 1, 2, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 0, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 1, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 1, 1, 1);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 1, 9, -7);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 1, 18, -16);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 1, 19, -17);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 1, 20, -17);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 10, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 19, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 20, 0, 2);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 20, 1, 2);
  test(S("abcde"), 1, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 1, 3, S(""), 0, 0, 3);
  test(S("abcde"), 1, 3, S(""), 0, 1, 3);
  test(S("abcde"), 1, 3, S(""), 1, 0, 0);
  test(S("abcde"), 1, 3, S("abcde"), 0, 0, 3);
  test(S("abcde"), 1, 3, S("abcde"), 0, 1, 1);
  test(S("abcde"), 1, 3, S("abcde"), 0, 2, 1);
  test(S("abcde"), 1, 3, S("abcde"), 0, 4, 1);
  test(S("abcde"), 1, 3, S("abcde"), 0, 5, 1);
  test(S("abcde"), 1, 3, S("abcde"), 0, 6, 1);
  test(S("abcde"), 1, 3, S("abcde"), 1, 0, 3);
  test(S("abcde"), 1, 3, S("abcde"), 1, 1, 2);
  test(S("abcde"), 1, 3, S("abcde"), 1, 2, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test9() {
  test(S("abcde"), 1, 3, S("abcde"), 1, 3, 0);
  test(S("abcde"), 1, 3, S("abcde"), 1, 4, -1);
  test(S("abcde"), 1, 3, S("abcde"), 1, 5, -1);
  test(S("abcde"), 1, 3, S("abcde"), 2, 0, 3);
  test(S("abcde"), 1, 3, S("abcde"), 2, 1, -1);
  test(S("abcde"), 1, 3, S("abcde"), 2, 2, -1);
  test(S("abcde"), 1, 3, S("abcde"), 2, 3, -1);
  test(S("abcde"), 1, 3, S("abcde"), 2, 4, -1);
  test(S("abcde"), 1, 3, S("abcde"), 4, 0, 3);
  test(S("abcde"), 1, 3, S("abcde"), 4, 1, -3);
  test(S("abcde"), 1, 3, S("abcde"), 4, 2, -3);
  test(S("abcde"), 1, 3, S("abcde"), 5, 0, 3);
  test(S("abcde"), 1, 3, S("abcde"), 5, 1, 3);
  test(S("abcde"), 1, 3, S("abcde"), 6, 0, 0);
  test(S("abcde"), 1, 3, S("abcdefghij"), 0, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghij"), 0, 1, 1);
  test(S("abcde"), 1, 3, S("abcdefghij"), 0, 5, 1);
  test(S("abcde"), 1, 3, S("abcdefghij"), 0, 9, 1);
  test(S("abcde"), 1, 3, S("abcdefghij"), 0, 10, 1);
  test(S("abcde"), 1, 3, S("abcdefghij"), 0, 11, 1);
  test(S("abcde"), 1, 3, S("abcdefghij"), 1, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghij"), 1, 1, 2);
  test(S("abcde"), 1, 3, S("abcdefghij"), 1, 4, -1);
  test(S("abcde"), 1, 3, S("abcdefghij"), 1, 8, -5);
  test(S("abcde"), 1, 3, S("abcdefghij"), 1, 9, -6);
  test(S("abcde"), 1, 3, S("abcdefghij"), 1, 10, -6);
  test(S("abcde"), 1, 3, S("abcdefghij"), 5, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghij"), 5, 1, -4);
  test(S("abcde"), 1, 3, S("abcdefghij"), 5, 2, -4);
  test(S("abcde"), 1, 3, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 1, 3, S("abcdefghij"), 5, 5, -4);
  test(S("abcde"), 1, 3, S("abcdefghij"), 5, 6, -4);
  test(S("abcde"), 1, 3, S("abcdefghij"), 9, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghij"), 9, 1, -8);
  test(S("abcde"), 1, 3, S("abcdefghij"), 9, 2, -8);
  test(S("abcde"), 1, 3, S("abcdefghij"), 10, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghij"), 10, 1, 3);
  test(S("abcde"), 1, 3, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 0, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 1, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 1, 1, 2);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 1, 9, -6);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 1, 18, -15);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 1, 19, -16);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 1, 20, -16);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 10, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 19, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 20, 0, 3);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 20, 1, 3);
  test(S("abcde"), 1, 3, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 1, 4, S(""), 0, 0, 4);
  test(S("abcde"), 1, 4, S(""), 0, 1, 4);
  test(S("abcde"), 1, 4, S(""), 1, 0, 0);
  test(S("abcde"), 1, 4, S("abcde"), 0, 0, 4);
  test(S("abcde"), 1, 4, S("abcde"), 0, 1, 1);
  test(S("abcde"), 1, 4, S("abcde"), 0, 2, 1);
  test(S("abcde"), 1, 4, S("abcde"), 0, 4, 1);
  test(S("abcde"), 1, 4, S("abcde"), 0, 5, 1);
  test(S("abcde"), 1, 4, S("abcde"), 0, 6, 1);
  test(S("abcde"), 1, 4, S("abcde"), 1, 0, 4);
  test(S("abcde"), 1, 4, S("abcde"), 1, 1, 3);
  test(S("abcde"), 1, 4, S("abcde"), 1, 2, 2);
  test(S("abcde"), 1, 4, S("abcde"), 1, 3, 1);
  test(S("abcde"), 1, 4, S("abcde"), 1, 4, 0);
  test(S("abcde"), 1, 4, S("abcde"), 1, 5, 0);
  test(S("abcde"), 1, 4, S("abcde"), 2, 0, 4);
  test(S("abcde"), 1, 4, S("abcde"), 2, 1, -1);
  test(S("abcde"), 1, 4, S("abcde"), 2, 2, -1);
  test(S("abcde"), 1, 4, S("abcde"), 2, 3, -1);
  test(S("abcde"), 1, 4, S("abcde"), 2, 4, -1);
  test(S("abcde"), 1, 4, S("abcde"), 4, 0, 4);
  test(S("abcde"), 1, 4, S("abcde"), 4, 1, -3);
  test(S("abcde"), 1, 4, S("abcde"), 4, 2, -3);
  test(S("abcde"), 1, 4, S("abcde"), 5, 0, 4);
  test(S("abcde"), 1, 4, S("abcde"), 5, 1, 4);
  test(S("abcde"), 1, 4, S("abcde"), 6, 0, 0);
  test(S("abcde"), 1, 4, S("abcdefghij"), 0, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 0, 1, 1);
  test(S("abcde"), 1, 4, S("abcdefghij"), 0, 5, 1);
  test(S("abcde"), 1, 4, S("abcdefghij"), 0, 9, 1);
  test(S("abcde"), 1, 4, S("abcdefghij"), 0, 10, 1);
  test(S("abcde"), 1, 4, S("abcdefghij"), 0, 11, 1);
  test(S("abcde"), 1, 4, S("abcdefghij"), 1, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 1, 1, 3);
  test(S("abcde"), 1, 4, S("abcdefghij"), 1, 4, 0);
  test(S("abcde"), 1, 4, S("abcdefghij"), 1, 8, -4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 1, 9, -5);
  test(S("abcde"), 1, 4, S("abcdefghij"), 1, 10, -5);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test10() {
  test(S("abcde"), 1, 4, S("abcdefghij"), 5, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 5, 1, -4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 5, 2, -4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 5, 5, -4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 5, 6, -4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 9, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 9, 1, -8);
  test(S("abcde"), 1, 4, S("abcdefghij"), 9, 2, -8);
  test(S("abcde"), 1, 4, S("abcdefghij"), 10, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 10, 1, 4);
  test(S("abcde"), 1, 4, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 0, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 1, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 1, 1, 3);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 1, 9, -5);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 1, 18, -14);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 1, 19, -15);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 1, 20, -15);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 10, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 19, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 20, 0, 4);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 20, 1, 4);
  test(S("abcde"), 1, 4, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 1, 5, S(""), 0, 0, 4);
  test(S("abcde"), 1, 5, S(""), 0, 1, 4);
  test(S("abcde"), 1, 5, S(""), 1, 0, 0);
  test(S("abcde"), 1, 5, S("abcde"), 0, 0, 4);
  test(S("abcde"), 1, 5, S("abcde"), 0, 1, 1);
  test(S("abcde"), 1, 5, S("abcde"), 0, 2, 1);
  test(S("abcde"), 1, 5, S("abcde"), 0, 4, 1);
  test(S("abcde"), 1, 5, S("abcde"), 0, 5, 1);
  test(S("abcde"), 1, 5, S("abcde"), 0, 6, 1);
  test(S("abcde"), 1, 5, S("abcde"), 1, 0, 4);
  test(S("abcde"), 1, 5, S("abcde"), 1, 1, 3);
  test(S("abcde"), 1, 5, S("abcde"), 1, 2, 2);
  test(S("abcde"), 1, 5, S("abcde"), 1, 3, 1);
  test(S("abcde"), 1, 5, S("abcde"), 1, 4, 0);
  test(S("abcde"), 1, 5, S("abcde"), 1, 5, 0);
  test(S("abcde"), 1, 5, S("abcde"), 2, 0, 4);
  test(S("abcde"), 1, 5, S("abcde"), 2, 1, -1);
  test(S("abcde"), 1, 5, S("abcde"), 2, 2, -1);
  test(S("abcde"), 1, 5, S("abcde"), 2, 3, -1);
  test(S("abcde"), 1, 5, S("abcde"), 2, 4, -1);
  test(S("abcde"), 1, 5, S("abcde"), 4, 0, 4);
  test(S("abcde"), 1, 5, S("abcde"), 4, 1, -3);
  test(S("abcde"), 1, 5, S("abcde"), 4, 2, -3);
  test(S("abcde"), 1, 5, S("abcde"), 5, 0, 4);
  test(S("abcde"), 1, 5, S("abcde"), 5, 1, 4);
  test(S("abcde"), 1, 5, S("abcde"), 6, 0, 0);
  test(S("abcde"), 1, 5, S("abcdefghij"), 0, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 0, 1, 1);
  test(S("abcde"), 1, 5, S("abcdefghij"), 0, 5, 1);
  test(S("abcde"), 1, 5, S("abcdefghij"), 0, 9, 1);
  test(S("abcde"), 1, 5, S("abcdefghij"), 0, 10, 1);
  test(S("abcde"), 1, 5, S("abcdefghij"), 0, 11, 1);
  test(S("abcde"), 1, 5, S("abcdefghij"), 1, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 1, 1, 3);
  test(S("abcde"), 1, 5, S("abcdefghij"), 1, 4, 0);
  test(S("abcde"), 1, 5, S("abcdefghij"), 1, 8, -4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 1, 9, -5);
  test(S("abcde"), 1, 5, S("abcdefghij"), 1, 10, -5);
  test(S("abcde"), 1, 5, S("abcdefghij"), 5, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 5, 1, -4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 5, 2, -4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 5, 5, -4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 5, 6, -4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 9, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 9, 1, -8);
  test(S("abcde"), 1, 5, S("abcdefghij"), 9, 2, -8);
  test(S("abcde"), 1, 5, S("abcdefghij"), 10, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 10, 1, 4);
  test(S("abcde"), 1, 5, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 0, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 1, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 1, 1, 3);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 1, 9, -5);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 1, 18, -14);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 1, 19, -15);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 1, 20, -15);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 1, -9);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test11() {
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 19, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 20, 0, 4);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 20, 1, 4);
  test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 2, 0, S(""), 0, 0, 0);
  test(S("abcde"), 2, 0, S(""), 0, 1, 0);
  test(S("abcde"), 2, 0, S(""), 1, 0, 0);
  test(S("abcde"), 2, 0, S("abcde"), 0, 0, 0);
  test(S("abcde"), 2, 0, S("abcde"), 0, 1, -1);
  test(S("abcde"), 2, 0, S("abcde"), 0, 2, -2);
  test(S("abcde"), 2, 0, S("abcde"), 0, 4, -4);
  test(S("abcde"), 2, 0, S("abcde"), 0, 5, -5);
  test(S("abcde"), 2, 0, S("abcde"), 0, 6, -5);
  test(S("abcde"), 2, 0, S("abcde"), 1, 0, 0);
  test(S("abcde"), 2, 0, S("abcde"), 1, 1, -1);
  test(S("abcde"), 2, 0, S("abcde"), 1, 2, -2);
  test(S("abcde"), 2, 0, S("abcde"), 1, 3, -3);
  test(S("abcde"), 2, 0, S("abcde"), 1, 4, -4);
  test(S("abcde"), 2, 0, S("abcde"), 1, 5, -4);
  test(S("abcde"), 2, 0, S("abcde"), 2, 0, 0);
  test(S("abcde"), 2, 0, S("abcde"), 2, 1, -1);
  test(S("abcde"), 2, 0, S("abcde"), 2, 2, -2);
  test(S("abcde"), 2, 0, S("abcde"), 2, 3, -3);
  test(S("abcde"), 2, 0, S("abcde"), 2, 4, -3);
  test(S("abcde"), 2, 0, S("abcde"), 4, 0, 0);
  test(S("abcde"), 2, 0, S("abcde"), 4, 1, -1);
  test(S("abcde"), 2, 0, S("abcde"), 4, 2, -1);
  test(S("abcde"), 2, 0, S("abcde"), 5, 0, 0);
  test(S("abcde"), 2, 0, S("abcde"), 5, 1, 0);
  test(S("abcde"), 2, 0, S("abcde"), 6, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcde"), 2, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcde"), 2, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcde"), 2, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcde"), 2, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcde"), 2, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcde"), 2, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcde"), 2, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcde"), 2, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcde"), 2, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 2, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 2, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 2, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcde"), 2, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcde"), 2, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcde"), 2, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 2, 1, S(""), 0, 0, 1);
  test(S("abcde"), 2, 1, S(""), 0, 1, 1);
  test(S("abcde"), 2, 1, S(""), 1, 0, 0);
  test(S("abcde"), 2, 1, S("abcde"), 0, 0, 1);
  test(S("abcde"), 2, 1, S("abcde"), 0, 1, 2);
  test(S("abcde"), 2, 1, S("abcde"), 0, 2, 2);
  test(S("abcde"), 2, 1, S("abcde"), 0, 4, 2);
  test(S("abcde"), 2, 1, S("abcde"), 0, 5, 2);
  test(S("abcde"), 2, 1, S("abcde"), 0, 6, 2);
  test(S("abcde"), 2, 1, S("abcde"), 1, 0, 1);
  test(S("abcde"), 2, 1, S("abcde"), 1, 1, 1);
  test(S("abcde"), 2, 1, S("abcde"), 1, 2, 1);
  test(S("abcde"), 2, 1, S("abcde"), 1, 3, 1);
  test(S("abcde"), 2, 1, S("abcde"), 1, 4, 1);
  test(S("abcde"), 2, 1, S("abcde"), 1, 5, 1);
  test(S("abcde"), 2, 1, S("abcde"), 2, 0, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test12() {
  test(S("abcde"), 2, 1, S("abcde"), 2, 1, 0);
  test(S("abcde"), 2, 1, S("abcde"), 2, 2, -1);
  test(S("abcde"), 2, 1, S("abcde"), 2, 3, -2);
  test(S("abcde"), 2, 1, S("abcde"), 2, 4, -2);
  test(S("abcde"), 2, 1, S("abcde"), 4, 0, 1);
  test(S("abcde"), 2, 1, S("abcde"), 4, 1, -2);
  test(S("abcde"), 2, 1, S("abcde"), 4, 2, -2);
  test(S("abcde"), 2, 1, S("abcde"), 5, 0, 1);
  test(S("abcde"), 2, 1, S("abcde"), 5, 1, 1);
  test(S("abcde"), 2, 1, S("abcde"), 6, 0, 0);
  test(S("abcde"), 2, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 0, 1, 2);
  test(S("abcde"), 2, 1, S("abcdefghij"), 0, 5, 2);
  test(S("abcde"), 2, 1, S("abcdefghij"), 0, 9, 2);
  test(S("abcde"), 2, 1, S("abcdefghij"), 0, 10, 2);
  test(S("abcde"), 2, 1, S("abcdefghij"), 0, 11, 2);
  test(S("abcde"), 2, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 1, 1, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 1, 4, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 1, 8, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 1, 9, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 1, 10, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 5, 1, -3);
  test(S("abcde"), 2, 1, S("abcdefghij"), 5, 2, -3);
  test(S("abcde"), 2, 1, S("abcdefghij"), 5, 4, -3);
  test(S("abcde"), 2, 1, S("abcdefghij"), 5, 5, -3);
  test(S("abcde"), 2, 1, S("abcdefghij"), 5, 6, -3);
  test(S("abcde"), 2, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 9, 1, -7);
  test(S("abcde"), 2, 1, S("abcdefghij"), 9, 2, -7);
  test(S("abcde"), 2, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcde"), 2, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 0, 1, 2);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 0, 10, 2);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 0, 19, 2);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 0, 20, 2);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 0, 21, 2);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 1, 1, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 1, 9, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 1, 18, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 1, 19, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 1, 20, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 10, 1, -8);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 10, 5, -8);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 10, 9, -8);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 10, 10, -8);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 10, 11, -8);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 19, 1, -17);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 19, 2, -17);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcde"), 2, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 2, 2, S(""), 0, 0, 2);
  test(S("abcde"), 2, 2, S(""), 0, 1, 2);
  test(S("abcde"), 2, 2, S(""), 1, 0, 0);
  test(S("abcde"), 2, 2, S("abcde"), 0, 0, 2);
  test(S("abcde"), 2, 2, S("abcde"), 0, 1, 2);
  test(S("abcde"), 2, 2, S("abcde"), 0, 2, 2);
  test(S("abcde"), 2, 2, S("abcde"), 0, 4, 2);
  test(S("abcde"), 2, 2, S("abcde"), 0, 5, 2);
  test(S("abcde"), 2, 2, S("abcde"), 0, 6, 2);
  test(S("abcde"), 2, 2, S("abcde"), 1, 0, 2);
  test(S("abcde"), 2, 2, S("abcde"), 1, 1, 1);
  test(S("abcde"), 2, 2, S("abcde"), 1, 2, 1);
  test(S("abcde"), 2, 2, S("abcde"), 1, 3, 1);
  test(S("abcde"), 2, 2, S("abcde"), 1, 4, 1);
  test(S("abcde"), 2, 2, S("abcde"), 1, 5, 1);
  test(S("abcde"), 2, 2, S("abcde"), 2, 0, 2);
  test(S("abcde"), 2, 2, S("abcde"), 2, 1, 1);
  test(S("abcde"), 2, 2, S("abcde"), 2, 2, 0);
  test(S("abcde"), 2, 2, S("abcde"), 2, 3, -1);
  test(S("abcde"), 2, 2, S("abcde"), 2, 4, -1);
  test(S("abcde"), 2, 2, S("abcde"), 4, 0, 2);
  test(S("abcde"), 2, 2, S("abcde"), 4, 1, -2);
  test(S("abcde"), 2, 2, S("abcde"), 4, 2, -2);
  test(S("abcde"), 2, 2, S("abcde"), 5, 0, 2);
  test(S("abcde"), 2, 2, S("abcde"), 5, 1, 2);
  test(S("abcde"), 2, 2, S("abcde"), 6, 0, 0);
  test(S("abcde"), 2, 2, S("abcdefghij"), 0, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 0, 1, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 0, 5, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 0, 9, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 0, 10, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 0, 11, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 1, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 1, 1, 1);
  test(S("abcde"), 2, 2, S("abcdefghij"), 1, 4, 1);
  test(S("abcde"), 2, 2, S("abcdefghij"), 1, 8, 1);
  test(S("abcde"), 2, 2, S("abcdefghij"), 1, 9, 1);
  test(S("abcde"), 2, 2, S("abcdefghij"), 1, 10, 1);
  test(S("abcde"), 2, 2, S("abcdefghij"), 5, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 5, 1, -3);
  test(S("abcde"), 2, 2, S("abcdefghij"), 5, 2, -3);
  test(S("abcde"), 2, 2, S("abcdefghij"), 5, 4, -3);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test13() {
  test(S("abcde"), 2, 2, S("abcdefghij"), 5, 5, -3);
  test(S("abcde"), 2, 2, S("abcdefghij"), 5, 6, -3);
  test(S("abcde"), 2, 2, S("abcdefghij"), 9, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 9, 1, -7);
  test(S("abcde"), 2, 2, S("abcdefghij"), 9, 2, -7);
  test(S("abcde"), 2, 2, S("abcdefghij"), 10, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 10, 1, 2);
  test(S("abcde"), 2, 2, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 0, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 0, 1, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 0, 10, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 0, 19, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 0, 20, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 0, 21, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 1, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 1, 1, 1);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 1, 9, 1);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 1, 18, 1);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 1, 19, 1);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 1, 20, 1);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 10, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 10, 1, -8);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 10, 5, -8);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 10, 9, -8);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 10, 10, -8);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 10, 11, -8);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 19, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 19, 1, -17);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 19, 2, -17);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 20, 0, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 20, 1, 2);
  test(S("abcde"), 2, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 2, 3, S(""), 0, 0, 3);
  test(S("abcde"), 2, 3, S(""), 0, 1, 3);
  test(S("abcde"), 2, 3, S(""), 1, 0, 0);
  test(S("abcde"), 2, 3, S("abcde"), 0, 0, 3);
  test(S("abcde"), 2, 3, S("abcde"), 0, 1, 2);
  test(S("abcde"), 2, 3, S("abcde"), 0, 2, 2);
  test(S("abcde"), 2, 3, S("abcde"), 0, 4, 2);
  test(S("abcde"), 2, 3, S("abcde"), 0, 5, 2);
  test(S("abcde"), 2, 3, S("abcde"), 0, 6, 2);
  test(S("abcde"), 2, 3, S("abcde"), 1, 0, 3);
  test(S("abcde"), 2, 3, S("abcde"), 1, 1, 1);
  test(S("abcde"), 2, 3, S("abcde"), 1, 2, 1);
  test(S("abcde"), 2, 3, S("abcde"), 1, 3, 1);
  test(S("abcde"), 2, 3, S("abcde"), 1, 4, 1);
  test(S("abcde"), 2, 3, S("abcde"), 1, 5, 1);
  test(S("abcde"), 2, 3, S("abcde"), 2, 0, 3);
  test(S("abcde"), 2, 3, S("abcde"), 2, 1, 2);
  test(S("abcde"), 2, 3, S("abcde"), 2, 2, 1);
  test(S("abcde"), 2, 3, S("abcde"), 2, 3, 0);
  test(S("abcde"), 2, 3, S("abcde"), 2, 4, 0);
  test(S("abcde"), 2, 3, S("abcde"), 4, 0, 3);
  test(S("abcde"), 2, 3, S("abcde"), 4, 1, -2);
  test(S("abcde"), 2, 3, S("abcde"), 4, 2, -2);
  test(S("abcde"), 2, 3, S("abcde"), 5, 0, 3);
  test(S("abcde"), 2, 3, S("abcde"), 5, 1, 3);
  test(S("abcde"), 2, 3, S("abcde"), 6, 0, 0);
  test(S("abcde"), 2, 3, S("abcdefghij"), 0, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 0, 1, 2);
  test(S("abcde"), 2, 3, S("abcdefghij"), 0, 5, 2);
  test(S("abcde"), 2, 3, S("abcdefghij"), 0, 9, 2);
  test(S("abcde"), 2, 3, S("abcdefghij"), 0, 10, 2);
  test(S("abcde"), 2, 3, S("abcdefghij"), 0, 11, 2);
  test(S("abcde"), 2, 3, S("abcdefghij"), 1, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 1, 1, 1);
  test(S("abcde"), 2, 3, S("abcdefghij"), 1, 4, 1);
  test(S("abcde"), 2, 3, S("abcdefghij"), 1, 8, 1);
  test(S("abcde"), 2, 3, S("abcdefghij"), 1, 9, 1);
  test(S("abcde"), 2, 3, S("abcdefghij"), 1, 10, 1);
  test(S("abcde"), 2, 3, S("abcdefghij"), 5, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 5, 1, -3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 5, 2, -3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 5, 4, -3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 5, 5, -3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 5, 6, -3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 9, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 9, 1, -7);
  test(S("abcde"), 2, 3, S("abcdefghij"), 9, 2, -7);
  test(S("abcde"), 2, 3, S("abcdefghij"), 10, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 10, 1, 3);
  test(S("abcde"), 2, 3, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 0, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 0, 1, 2);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 0, 10, 2);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 0, 19, 2);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 0, 20, 2);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 0, 21, 2);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 1, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 1, 1, 1);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 1, 9, 1);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 1, 18, 1);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 1, 19, 1);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 1, 20, 1);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 1, -8);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 5, -8);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 9, -8);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 10, -8);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 11, -8);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test14() {
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 19, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 19, 1, -17);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 19, 2, -17);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 20, 0, 3);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 20, 1, 3);
  test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 2, 4, S(""), 0, 0, 3);
  test(S("abcde"), 2, 4, S(""), 0, 1, 3);
  test(S("abcde"), 2, 4, S(""), 1, 0, 0);
  test(S("abcde"), 2, 4, S("abcde"), 0, 0, 3);
  test(S("abcde"), 2, 4, S("abcde"), 0, 1, 2);
  test(S("abcde"), 2, 4, S("abcde"), 0, 2, 2);
  test(S("abcde"), 2, 4, S("abcde"), 0, 4, 2);
  test(S("abcde"), 2, 4, S("abcde"), 0, 5, 2);
  test(S("abcde"), 2, 4, S("abcde"), 0, 6, 2);
  test(S("abcde"), 2, 4, S("abcde"), 1, 0, 3);
  test(S("abcde"), 2, 4, S("abcde"), 1, 1, 1);
  test(S("abcde"), 2, 4, S("abcde"), 1, 2, 1);
  test(S("abcde"), 2, 4, S("abcde"), 1, 3, 1);
  test(S("abcde"), 2, 4, S("abcde"), 1, 4, 1);
  test(S("abcde"), 2, 4, S("abcde"), 1, 5, 1);
  test(S("abcde"), 2, 4, S("abcde"), 2, 0, 3);
  test(S("abcde"), 2, 4, S("abcde"), 2, 1, 2);
  test(S("abcde"), 2, 4, S("abcde"), 2, 2, 1);
  test(S("abcde"), 2, 4, S("abcde"), 2, 3, 0);
  test(S("abcde"), 2, 4, S("abcde"), 2, 4, 0);
  test(S("abcde"), 2, 4, S("abcde"), 4, 0, 3);
  test(S("abcde"), 2, 4, S("abcde"), 4, 1, -2);
  test(S("abcde"), 2, 4, S("abcde"), 4, 2, -2);
  test(S("abcde"), 2, 4, S("abcde"), 5, 0, 3);
  test(S("abcde"), 2, 4, S("abcde"), 5, 1, 3);
  test(S("abcde"), 2, 4, S("abcde"), 6, 0, 0);
  test(S("abcde"), 2, 4, S("abcdefghij"), 0, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 0, 1, 2);
  test(S("abcde"), 2, 4, S("abcdefghij"), 0, 5, 2);
  test(S("abcde"), 2, 4, S("abcdefghij"), 0, 9, 2);
  test(S("abcde"), 2, 4, S("abcdefghij"), 0, 10, 2);
  test(S("abcde"), 2, 4, S("abcdefghij"), 0, 11, 2);
  test(S("abcde"), 2, 4, S("abcdefghij"), 1, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 1, 1, 1);
  test(S("abcde"), 2, 4, S("abcdefghij"), 1, 4, 1);
  test(S("abcde"), 2, 4, S("abcdefghij"), 1, 8, 1);
  test(S("abcde"), 2, 4, S("abcdefghij"), 1, 9, 1);
  test(S("abcde"), 2, 4, S("abcdefghij"), 1, 10, 1);
  test(S("abcde"), 2, 4, S("abcdefghij"), 5, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 5, 1, -3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 5, 2, -3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 5, 4, -3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 5, 5, -3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 5, 6, -3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 9, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 9, 1, -7);
  test(S("abcde"), 2, 4, S("abcdefghij"), 9, 2, -7);
  test(S("abcde"), 2, 4, S("abcdefghij"), 10, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 10, 1, 3);
  test(S("abcde"), 2, 4, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 0, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 0, 1, 2);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 0, 10, 2);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 0, 19, 2);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 0, 20, 2);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 0, 21, 2);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 1, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 1, 1, 1);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 1, 9, 1);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 1, 18, 1);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 1, 19, 1);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 1, 20, 1);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 10, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 10, 1, -8);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 10, 5, -8);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 10, 9, -8);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 10, 10, -8);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 10, 11, -8);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 19, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 19, 1, -17);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 19, 2, -17);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 20, 0, 3);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 20, 1, 3);
  test(S("abcde"), 2, 4, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 4, 0, S(""), 0, 0, 0);
  test(S("abcde"), 4, 0, S(""), 0, 1, 0);
  test(S("abcde"), 4, 0, S(""), 1, 0, 0);
  test(S("abcde"), 4, 0, S("abcde"), 0, 0, 0);
  test(S("abcde"), 4, 0, S("abcde"), 0, 1, -1);
  test(S("abcde"), 4, 0, S("abcde"), 0, 2, -2);
  test(S("abcde"), 4, 0, S("abcde"), 0, 4, -4);
  test(S("abcde"), 4, 0, S("abcde"), 0, 5, -5);
  test(S("abcde"), 4, 0, S("abcde"), 0, 6, -5);
  test(S("abcde"), 4, 0, S("abcde"), 1, 0, 0);
  test(S("abcde"), 4, 0, S("abcde"), 1, 1, -1);
  test(S("abcde"), 4, 0, S("abcde"), 1, 2, -2);
  test(S("abcde"), 4, 0, S("abcde"), 1, 3, -3);
  test(S("abcde"), 4, 0, S("abcde"), 1, 4, -4);
  test(S("abcde"), 4, 0, S("abcde"), 1, 5, -4);
  test(S("abcde"), 4, 0, S("abcde"), 2, 0, 0);
  test(S("abcde"), 4, 0, S("abcde"), 2, 1, -1);
  test(S("abcde"), 4, 0, S("abcde"), 2, 2, -2);
  test(S("abcde"), 4, 0, S("abcde"), 2, 3, -3);
  test(S("abcde"), 4, 0, S("abcde"), 2, 4, -3);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test15() {
  test(S("abcde"), 4, 0, S("abcde"), 4, 0, 0);
  test(S("abcde"), 4, 0, S("abcde"), 4, 1, -1);
  test(S("abcde"), 4, 0, S("abcde"), 4, 2, -1);
  test(S("abcde"), 4, 0, S("abcde"), 5, 0, 0);
  test(S("abcde"), 4, 0, S("abcde"), 5, 1, 0);
  test(S("abcde"), 4, 0, S("abcde"), 6, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcde"), 4, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcde"), 4, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcde"), 4, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcde"), 4, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcde"), 4, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcde"), 4, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcde"), 4, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcde"), 4, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcde"), 4, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 4, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 4, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 4, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcde"), 4, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcde"), 4, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcde"), 4, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 4, 1, S(""), 0, 0, 1);
  test(S("abcde"), 4, 1, S(""), 0, 1, 1);
  test(S("abcde"), 4, 1, S(""), 1, 0, 0);
  test(S("abcde"), 4, 1, S("abcde"), 0, 0, 1);
  test(S("abcde"), 4, 1, S("abcde"), 0, 1, 4);
  test(S("abcde"), 4, 1, S("abcde"), 0, 2, 4);
  test(S("abcde"), 4, 1, S("abcde"), 0, 4, 4);
  test(S("abcde"), 4, 1, S("abcde"), 0, 5, 4);
  test(S("abcde"), 4, 1, S("abcde"), 0, 6, 4);
  test(S("abcde"), 4, 1, S("abcde"), 1, 0, 1);
  test(S("abcde"), 4, 1, S("abcde"), 1, 1, 3);
  test(S("abcde"), 4, 1, S("abcde"), 1, 2, 3);
  test(S("abcde"), 4, 1, S("abcde"), 1, 3, 3);
  test(S("abcde"), 4, 1, S("abcde"), 1, 4, 3);
  test(S("abcde"), 4, 1, S("abcde"), 1, 5, 3);
  test(S("abcde"), 4, 1, S("abcde"), 2, 0, 1);
  test(S("abcde"), 4, 1, S("abcde"), 2, 1, 2);
  test(S("abcde"), 4, 1, S("abcde"), 2, 2, 2);
  test(S("abcde"), 4, 1, S("abcde"), 2, 3, 2);
  test(S("abcde"), 4, 1, S("abcde"), 2, 4, 2);
  test(S("abcde"), 4, 1, S("abcde"), 4, 0, 1);
  test(S("abcde"), 4, 1, S("abcde"), 4, 1, 0);
  test(S("abcde"), 4, 1, S("abcde"), 4, 2, 0);
  test(S("abcde"), 4, 1, S("abcde"), 5, 0, 1);
  test(S("abcde"), 4, 1, S("abcde"), 5, 1, 1);
  test(S("abcde"), 4, 1, S("abcde"), 6, 0, 0);
  test(S("abcde"), 4, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 0, 1, 4);
  test(S("abcde"), 4, 1, S("abcdefghij"), 0, 5, 4);
  test(S("abcde"), 4, 1, S("abcdefghij"), 0, 9, 4);
  test(S("abcde"), 4, 1, S("abcdefghij"), 0, 10, 4);
  test(S("abcde"), 4, 1, S("abcdefghij"), 0, 11, 4);
  test(S("abcde"), 4, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 1, 1, 3);
  test(S("abcde"), 4, 1, S("abcdefghij"), 1, 4, 3);
  test(S("abcde"), 4, 1, S("abcdefghij"), 1, 8, 3);
  test(S("abcde"), 4, 1, S("abcdefghij"), 1, 9, 3);
  test(S("abcde"), 4, 1, S("abcdefghij"), 1, 10, 3);
  test(S("abcde"), 4, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 5, 2, -1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 5, 4, -1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 5, 5, -1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 5, 6, -1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 9, 1, -5);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test16() {
  test(S("abcde"), 4, 1, S("abcdefghij"), 9, 2, -5);
  test(S("abcde"), 4, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcde"), 4, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 0, 1, 4);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 0, 10, 4);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 0, 19, 4);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 0, 20, 4);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 0, 21, 4);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 1, 1, 3);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 1, 9, 3);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 1, 18, 3);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 1, 19, 3);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 1, 20, 3);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 10, 1, -6);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 10, 5, -6);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 10, 9, -6);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 10, 10, -6);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 10, 11, -6);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 19, 1, -15);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 19, 2, -15);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcde"), 4, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 4, 2, S(""), 0, 0, 1);
  test(S("abcde"), 4, 2, S(""), 0, 1, 1);
  test(S("abcde"), 4, 2, S(""), 1, 0, 0);
  test(S("abcde"), 4, 2, S("abcde"), 0, 0, 1);
  test(S("abcde"), 4, 2, S("abcde"), 0, 1, 4);
  test(S("abcde"), 4, 2, S("abcde"), 0, 2, 4);
  test(S("abcde"), 4, 2, S("abcde"), 0, 4, 4);
  test(S("abcde"), 4, 2, S("abcde"), 0, 5, 4);
  test(S("abcde"), 4, 2, S("abcde"), 0, 6, 4);
  test(S("abcde"), 4, 2, S("abcde"), 1, 0, 1);
  test(S("abcde"), 4, 2, S("abcde"), 1, 1, 3);
  test(S("abcde"), 4, 2, S("abcde"), 1, 2, 3);
  test(S("abcde"), 4, 2, S("abcde"), 1, 3, 3);
  test(S("abcde"), 4, 2, S("abcde"), 1, 4, 3);
  test(S("abcde"), 4, 2, S("abcde"), 1, 5, 3);
  test(S("abcde"), 4, 2, S("abcde"), 2, 0, 1);
  test(S("abcde"), 4, 2, S("abcde"), 2, 1, 2);
  test(S("abcde"), 4, 2, S("abcde"), 2, 2, 2);
  test(S("abcde"), 4, 2, S("abcde"), 2, 3, 2);
  test(S("abcde"), 4, 2, S("abcde"), 2, 4, 2);
  test(S("abcde"), 4, 2, S("abcde"), 4, 0, 1);
  test(S("abcde"), 4, 2, S("abcde"), 4, 1, 0);
  test(S("abcde"), 4, 2, S("abcde"), 4, 2, 0);
  test(S("abcde"), 4, 2, S("abcde"), 5, 0, 1);
  test(S("abcde"), 4, 2, S("abcde"), 5, 1, 1);
  test(S("abcde"), 4, 2, S("abcde"), 6, 0, 0);
  test(S("abcde"), 4, 2, S("abcdefghij"), 0, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 0, 1, 4);
  test(S("abcde"), 4, 2, S("abcdefghij"), 0, 5, 4);
  test(S("abcde"), 4, 2, S("abcdefghij"), 0, 9, 4);
  test(S("abcde"), 4, 2, S("abcdefghij"), 0, 10, 4);
  test(S("abcde"), 4, 2, S("abcdefghij"), 0, 11, 4);
  test(S("abcde"), 4, 2, S("abcdefghij"), 1, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 1, 1, 3);
  test(S("abcde"), 4, 2, S("abcdefghij"), 1, 4, 3);
  test(S("abcde"), 4, 2, S("abcdefghij"), 1, 8, 3);
  test(S("abcde"), 4, 2, S("abcdefghij"), 1, 9, 3);
  test(S("abcde"), 4, 2, S("abcdefghij"), 1, 10, 3);
  test(S("abcde"), 4, 2, S("abcdefghij"), 5, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 5, 2, -1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 5, 4, -1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 5, 5, -1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 5, 6, -1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 9, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 9, 1, -5);
  test(S("abcde"), 4, 2, S("abcdefghij"), 9, 2, -5);
  test(S("abcde"), 4, 2, S("abcdefghij"), 10, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 10, 1, 1);
  test(S("abcde"), 4, 2, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 0, 1, 4);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 0, 10, 4);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 0, 19, 4);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 0, 20, 4);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 0, 21, 4);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 1, 1, 3);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 1, 9, 3);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 1, 18, 3);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 1, 19, 3);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 1, 20, 3);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 10, 1, -6);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 10, 5, -6);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 10, 9, -6);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 10, 10, -6);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 10, 11, -6);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 19, 1, -15);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 19, 2, -15);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 20, 0, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test17() {
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 5, 0, S(""), 0, 0, 0);
  test(S("abcde"), 5, 0, S(""), 0, 1, 0);
  test(S("abcde"), 5, 0, S(""), 1, 0, 0);
  test(S("abcde"), 5, 0, S("abcde"), 0, 0, 0);
  test(S("abcde"), 5, 0, S("abcde"), 0, 1, -1);
  test(S("abcde"), 5, 0, S("abcde"), 0, 2, -2);
  test(S("abcde"), 5, 0, S("abcde"), 0, 4, -4);
  test(S("abcde"), 5, 0, S("abcde"), 0, 5, -5);
  test(S("abcde"), 5, 0, S("abcde"), 0, 6, -5);
  test(S("abcde"), 5, 0, S("abcde"), 1, 0, 0);
  test(S("abcde"), 5, 0, S("abcde"), 1, 1, -1);
  test(S("abcde"), 5, 0, S("abcde"), 1, 2, -2);
  test(S("abcde"), 5, 0, S("abcde"), 1, 3, -3);
  test(S("abcde"), 5, 0, S("abcde"), 1, 4, -4);
  test(S("abcde"), 5, 0, S("abcde"), 1, 5, -4);
  test(S("abcde"), 5, 0, S("abcde"), 2, 0, 0);
  test(S("abcde"), 5, 0, S("abcde"), 2, 1, -1);
  test(S("abcde"), 5, 0, S("abcde"), 2, 2, -2);
  test(S("abcde"), 5, 0, S("abcde"), 2, 3, -3);
  test(S("abcde"), 5, 0, S("abcde"), 2, 4, -3);
  test(S("abcde"), 5, 0, S("abcde"), 4, 0, 0);
  test(S("abcde"), 5, 0, S("abcde"), 4, 1, -1);
  test(S("abcde"), 5, 0, S("abcde"), 4, 2, -1);
  test(S("abcde"), 5, 0, S("abcde"), 5, 0, 0);
  test(S("abcde"), 5, 0, S("abcde"), 5, 1, 0);
  test(S("abcde"), 5, 0, S("abcde"), 6, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcde"), 5, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcde"), 5, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcde"), 5, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcde"), 5, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcde"), 5, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcde"), 5, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcde"), 5, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcde"), 5, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcde"), 5, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 5, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 5, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 5, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcde"), 5, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcde"), 5, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcde"), 5, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 5, 1, S(""), 0, 0, 0);
  test(S("abcde"), 5, 1, S(""), 0, 1, 0);
  test(S("abcde"), 5, 1, S(""), 1, 0, 0);
  test(S("abcde"), 5, 1, S("abcde"), 0, 0, 0);
  test(S("abcde"), 5, 1, S("abcde"), 0, 1, -1);
  test(S("abcde"), 5, 1, S("abcde"), 0, 2, -2);
  test(S("abcde"), 5, 1, S("abcde"), 0, 4, -4);
  test(S("abcde"), 5, 1, S("abcde"), 0, 5, -5);
  test(S("abcde"), 5, 1, S("abcde"), 0, 6, -5);
  test(S("abcde"), 5, 1, S("abcde"), 1, 0, 0);
  test(S("abcde"), 5, 1, S("abcde"), 1, 1, -1);
  test(S("abcde"), 5, 1, S("abcde"), 1, 2, -2);
  test(S("abcde"), 5, 1, S("abcde"), 1, 3, -3);
  test(S("abcde"), 5, 1, S("abcde"), 1, 4, -4);
  test(S("abcde"), 5, 1, S("abcde"), 1, 5, -4);
  test(S("abcde"), 5, 1, S("abcde"), 2, 0, 0);
  test(S("abcde"), 5, 1, S("abcde"), 2, 1, -1);
  test(S("abcde"), 5, 1, S("abcde"), 2, 2, -2);
  test(S("abcde"), 5, 1, S("abcde"), 2, 3, -3);
  test(S("abcde"), 5, 1, S("abcde"), 2, 4, -3);
  test(S("abcde"), 5, 1, S("abcde"), 4, 0, 0);
  test(S("abcde"), 5, 1, S("abcde"), 4, 1, -1);
  test(S("abcde"), 5, 1, S("abcde"), 4, 2, -1);
  test(S("abcde"), 5, 1, S("abcde"), 5, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test18() {
  test(S("abcde"), 5, 1, S("abcde"), 5, 1, 0);
  test(S("abcde"), 5, 1, S("abcde"), 6, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghij"), 0, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghij"), 0, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghij"), 0, 5, -5);
  test(S("abcde"), 5, 1, S("abcdefghij"), 0, 9, -9);
  test(S("abcde"), 5, 1, S("abcdefghij"), 0, 10, -10);
  test(S("abcde"), 5, 1, S("abcdefghij"), 0, 11, -10);
  test(S("abcde"), 5, 1, S("abcdefghij"), 1, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghij"), 1, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghij"), 1, 4, -4);
  test(S("abcde"), 5, 1, S("abcdefghij"), 1, 8, -8);
  test(S("abcde"), 5, 1, S("abcdefghij"), 1, 9, -9);
  test(S("abcde"), 5, 1, S("abcdefghij"), 1, 10, -9);
  test(S("abcde"), 5, 1, S("abcdefghij"), 5, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghij"), 5, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghij"), 5, 2, -2);
  test(S("abcde"), 5, 1, S("abcdefghij"), 5, 4, -4);
  test(S("abcde"), 5, 1, S("abcdefghij"), 5, 5, -5);
  test(S("abcde"), 5, 1, S("abcdefghij"), 5, 6, -5);
  test(S("abcde"), 5, 1, S("abcdefghij"), 9, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghij"), 9, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghij"), 9, 2, -1);
  test(S("abcde"), 5, 1, S("abcdefghij"), 10, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghij"), 10, 1, 0);
  test(S("abcde"), 5, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcde"), 5, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcde"), 6, 0, S(""), 0, 0, 0);
  test(S("abcde"), 6, 0, S(""), 0, 1, 0);
  test(S("abcde"), 6, 0, S(""), 1, 0, 0);
  test(S("abcde"), 6, 0, S("abcde"), 0, 0, 0);
  test(S("abcde"), 6, 0, S("abcde"), 0, 1, 0);
  test(S("abcde"), 6, 0, S("abcde"), 0, 2, 0);
  test(S("abcde"), 6, 0, S("abcde"), 0, 4, 0);
  test(S("abcde"), 6, 0, S("abcde"), 0, 5, 0);
  test(S("abcde"), 6, 0, S("abcde"), 0, 6, 0);
  test(S("abcde"), 6, 0, S("abcde"), 1, 0, 0);
  test(S("abcde"), 6, 0, S("abcde"), 1, 1, 0);
  test(S("abcde"), 6, 0, S("abcde"), 1, 2, 0);
  test(S("abcde"), 6, 0, S("abcde"), 1, 3, 0);
  test(S("abcde"), 6, 0, S("abcde"), 1, 4, 0);
  test(S("abcde"), 6, 0, S("abcde"), 1, 5, 0);
  test(S("abcde"), 6, 0, S("abcde"), 2, 0, 0);
  test(S("abcde"), 6, 0, S("abcde"), 2, 1, 0);
  test(S("abcde"), 6, 0, S("abcde"), 2, 2, 0);
  test(S("abcde"), 6, 0, S("abcde"), 2, 3, 0);
  test(S("abcde"), 6, 0, S("abcde"), 2, 4, 0);
  test(S("abcde"), 6, 0, S("abcde"), 4, 0, 0);
  test(S("abcde"), 6, 0, S("abcde"), 4, 1, 0);
  test(S("abcde"), 6, 0, S("abcde"), 4, 2, 0);
  test(S("abcde"), 6, 0, S("abcde"), 5, 0, 0);
  test(S("abcde"), 6, 0, S("abcde"), 5, 1, 0);
  test(S("abcde"), 6, 0, S("abcde"), 6, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 0, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 0, 5, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 0, 9, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 0, 10, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 0, 11, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 1, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 1, 4, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 1, 8, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 1, 9, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 1, 10, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 5, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 5, 2, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 5, 4, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 5, 5, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 5, 6, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 9, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 9, 2, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghij"), 11, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test19() {
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 10, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 19, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 20, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 21, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 1, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 1, 9, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 1, 18, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 1, 19, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 1, 20, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 10, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 10, 5, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 10, 9, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 10, 10, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 10, 11, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 19, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 19, 2, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 0, 0, S(""), 0, 0, 0);
  test(S("abcdefghij"), 0, 0, S(""), 0, 1, 0);
  test(S("abcdefghij"), 0, 0, S(""), 1, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghij"), 0, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghij"), 0, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghij"), 0, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghij"), 0, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghij"), 0, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghij"), 0, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghij"), 0, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghij"), 0, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 0, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghij"), 0, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghij"), 0, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghij"), 0, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghij"), 0, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 0, 1, S(""), 0, 0, 1);
  test(S("abcdefghij"), 0, 1, S(""), 0, 1, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test20() {
  test(S("abcdefghij"), 0, 1, S(""), 1, 0, 0);
  test(S("abcdefghij"), 0, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 0, 1, 0);
  test(S("abcdefghij"), 0, 1, S("abcde"), 0, 2, -1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 0, 4, -3);
  test(S("abcdefghij"), 0, 1, S("abcde"), 0, 5, -4);
  test(S("abcdefghij"), 0, 1, S("abcde"), 0, 6, -4);
  test(S("abcdefghij"), 0, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 1, 2, -1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 1, 3, -1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 1, 4, -1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 1, 5, -1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 2, 1, -2);
  test(S("abcdefghij"), 0, 1, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 0, 1, S("abcde"), 2, 3, -2);
  test(S("abcdefghij"), 0, 1, S("abcde"), 2, 4, -2);
  test(S("abcdefghij"), 0, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 4, 1, -4);
  test(S("abcdefghij"), 0, 1, S("abcde"), 4, 2, -4);
  test(S("abcdefghij"), 0, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghij"), 0, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 0, 1, 0);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 0, 5, -4);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 0, 9, -8);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 0, 10, -9);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 0, 11, -9);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 0, 1, 0);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 0, 10, -9);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 0, 19, -18);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 0, 20, -19);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 0, 21, -19);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghij"), 0, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 0, 5, S(""), 0, 0, 5);
  test(S("abcdefghij"), 0, 5, S(""), 0, 1, 5);
  test(S("abcdefghij"), 0, 5, S(""), 1, 0, 0);
  test(S("abcdefghij"), 0, 5, S("abcde"), 0, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcde"), 0, 1, 4);
  test(S("abcdefghij"), 0, 5, S("abcde"), 0, 2, 3);
  test(S("abcdefghij"), 0, 5, S("abcde"), 0, 4, 1);
  test(S("abcdefghij"), 0, 5, S("abcde"), 0, 5, 0);
  test(S("abcdefghij"), 0, 5, S("abcde"), 0, 6, 0);
  test(S("abcdefghij"), 0, 5, S("abcde"), 1, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 0, 5, S("abcde"), 1, 2, -1);
  test(S("abcdefghij"), 0, 5, S("abcde"), 1, 3, -1);
  test(S("abcdefghij"), 0, 5, S("abcde"), 1, 4, -1);
  test(S("abcdefghij"), 0, 5, S("abcde"), 1, 5, -1);
  test(S("abcdefghij"), 0, 5, S("abcde"), 2, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcde"), 2, 1, -2);
  test(S("abcdefghij"), 0, 5, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 0, 5, S("abcde"), 2, 3, -2);
  test(S("abcdefghij"), 0, 5, S("abcde"), 2, 4, -2);
  test(S("abcdefghij"), 0, 5, S("abcde"), 4, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcde"), 4, 1, -4);
  test(S("abcdefghij"), 0, 5, S("abcde"), 4, 2, -4);
  test(S("abcdefghij"), 0, 5, S("abcde"), 5, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcde"), 5, 1, 5);
  test(S("abcdefghij"), 0, 5, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 1, 4);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test21() {
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 5, 0);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 9, -4);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 10, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 11, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 1, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 5, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 9, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 10, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 10, 1, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 0, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 0, 1, 4);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 0, 10, -5);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 0, 19, -14);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 0, 20, -15);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 0, 21, -15);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 1, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 10, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 19, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 20, 0, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 20, 1, 5);
  test(S("abcdefghij"), 0, 5, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 0, 9, S(""), 0, 0, 9);
  test(S("abcdefghij"), 0, 9, S(""), 0, 1, 9);
  test(S("abcdefghij"), 0, 9, S(""), 1, 0, 0);
  test(S("abcdefghij"), 0, 9, S("abcde"), 0, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcde"), 0, 1, 8);
  test(S("abcdefghij"), 0, 9, S("abcde"), 0, 2, 7);
  test(S("abcdefghij"), 0, 9, S("abcde"), 0, 4, 5);
  test(S("abcdefghij"), 0, 9, S("abcde"), 0, 5, 4);
  test(S("abcdefghij"), 0, 9, S("abcde"), 0, 6, 4);
  test(S("abcdefghij"), 0, 9, S("abcde"), 1, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 0, 9, S("abcde"), 1, 2, -1);
  test(S("abcdefghij"), 0, 9, S("abcde"), 1, 3, -1);
  test(S("abcdefghij"), 0, 9, S("abcde"), 1, 4, -1);
  test(S("abcdefghij"), 0, 9, S("abcde"), 1, 5, -1);
  test(S("abcdefghij"), 0, 9, S("abcde"), 2, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcde"), 2, 1, -2);
  test(S("abcdefghij"), 0, 9, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 0, 9, S("abcde"), 2, 3, -2);
  test(S("abcdefghij"), 0, 9, S("abcde"), 2, 4, -2);
  test(S("abcdefghij"), 0, 9, S("abcde"), 4, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcde"), 4, 1, -4);
  test(S("abcdefghij"), 0, 9, S("abcde"), 4, 2, -4);
  test(S("abcdefghij"), 0, 9, S("abcde"), 5, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcde"), 5, 1, 9);
  test(S("abcdefghij"), 0, 9, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 0, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 0, 1, 8);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 0, 5, 4);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 0, 9, 0);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 0, 10, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 0, 11, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 1, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 5, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 9, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 10, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 10, 1, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 1, 8);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 10, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 19, -10);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test22() {
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 20, -11);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 21, -11);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 1, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 10, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 19, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 20, 0, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 20, 1, 9);
  test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 0, 10, S(""), 0, 0, 10);
  test(S("abcdefghij"), 0, 10, S(""), 0, 1, 10);
  test(S("abcdefghij"), 0, 10, S(""), 1, 0, 0);
  test(S("abcdefghij"), 0, 10, S("abcde"), 0, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcde"), 0, 1, 9);
  test(S("abcdefghij"), 0, 10, S("abcde"), 0, 2, 8);
  test(S("abcdefghij"), 0, 10, S("abcde"), 0, 4, 6);
  test(S("abcdefghij"), 0, 10, S("abcde"), 0, 5, 5);
  test(S("abcdefghij"), 0, 10, S("abcde"), 0, 6, 5);
  test(S("abcdefghij"), 0, 10, S("abcde"), 1, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 0, 10, S("abcde"), 1, 2, -1);
  test(S("abcdefghij"), 0, 10, S("abcde"), 1, 3, -1);
  test(S("abcdefghij"), 0, 10, S("abcde"), 1, 4, -1);
  test(S("abcdefghij"), 0, 10, S("abcde"), 1, 5, -1);
  test(S("abcdefghij"), 0, 10, S("abcde"), 2, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcde"), 2, 1, -2);
  test(S("abcdefghij"), 0, 10, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 0, 10, S("abcde"), 2, 3, -2);
  test(S("abcdefghij"), 0, 10, S("abcde"), 2, 4, -2);
  test(S("abcdefghij"), 0, 10, S("abcde"), 4, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcde"), 4, 1, -4);
  test(S("abcdefghij"), 0, 10, S("abcde"), 4, 2, -4);
  test(S("abcdefghij"), 0, 10, S("abcde"), 5, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcde"), 5, 1, 10);
  test(S("abcdefghij"), 0, 10, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 0, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 0, 1, 9);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 0, 10, 0);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 0, 11, 0);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 1, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 5, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 9, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 10, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 10, 1, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 0, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 0, 1, 9);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 0, 10, 0);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 0, 19, -9);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 0, 20, -10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 0, 21, -10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 1, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 10, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 19, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 20, 0, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 20, 1, 10);
  test(S("abcdefghij"), 0, 10, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 0, 11, S(""), 0, 0, 10);
  test(S("abcdefghij"), 0, 11, S(""), 0, 1, 10);
  test(S("abcdefghij"), 0, 11, S(""), 1, 0, 0);
  test(S("abcdefghij"), 0, 11, S("abcde"), 0, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcde"), 0, 1, 9);
  test(S("abcdefghij"), 0, 11, S("abcde"), 0, 2, 8);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test23() {
  test(S("abcdefghij"), 0, 11, S("abcde"), 0, 4, 6);
  test(S("abcdefghij"), 0, 11, S("abcde"), 0, 5, 5);
  test(S("abcdefghij"), 0, 11, S("abcde"), 0, 6, 5);
  test(S("abcdefghij"), 0, 11, S("abcde"), 1, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 0, 11, S("abcde"), 1, 2, -1);
  test(S("abcdefghij"), 0, 11, S("abcde"), 1, 3, -1);
  test(S("abcdefghij"), 0, 11, S("abcde"), 1, 4, -1);
  test(S("abcdefghij"), 0, 11, S("abcde"), 1, 5, -1);
  test(S("abcdefghij"), 0, 11, S("abcde"), 2, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcde"), 2, 1, -2);
  test(S("abcdefghij"), 0, 11, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 0, 11, S("abcde"), 2, 3, -2);
  test(S("abcdefghij"), 0, 11, S("abcde"), 2, 4, -2);
  test(S("abcdefghij"), 0, 11, S("abcde"), 4, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcde"), 4, 1, -4);
  test(S("abcdefghij"), 0, 11, S("abcde"), 4, 2, -4);
  test(S("abcdefghij"), 0, 11, S("abcde"), 5, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcde"), 5, 1, 10);
  test(S("abcdefghij"), 0, 11, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 0, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 0, 1, 9);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 0, 10, 0);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 0, 11, 0);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 1, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 5, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 9, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 10, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 10, 1, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 0, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 0, 1, 9);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 0, 10, 0);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 0, 19, -9);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 0, 20, -10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 0, 21, -10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 1, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 10, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 19, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 20, 0, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 20, 1, 10);
  test(S("abcdefghij"), 0, 11, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 1, 0, S(""), 0, 0, 0);
  test(S("abcdefghij"), 1, 0, S(""), 0, 1, 0);
  test(S("abcdefghij"), 1, 0, S(""), 1, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghij"), 1, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghij"), 1, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghij"), 1, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghij"), 1, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghij"), 1, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghij"), 1, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghij"), 1, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghij"), 1, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 1, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghij"), 1, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghij"), 1, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghij"), 1, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghij"), 1, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 11, -10);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test24() {
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghij"), 1, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 1, 1, S(""), 0, 0, 1);
  test(S("abcdefghij"), 1, 1, S(""), 0, 1, 1);
  test(S("abcdefghij"), 1, 1, S(""), 1, 0, 0);
  test(S("abcdefghij"), 1, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 0, 1, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 0, 2, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 0, 4, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 0, 5, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 0, 6, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 1, 1, 0);
  test(S("abcdefghij"), 1, 1, S("abcde"), 1, 2, -1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 1, 3, -2);
  test(S("abcdefghij"), 1, 1, S("abcde"), 1, 4, -3);
  test(S("abcdefghij"), 1, 1, S("abcde"), 1, 5, -3);
  test(S("abcdefghij"), 1, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 2, 2, -1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 2, 3, -1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 2, 4, -1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 4, 1, -3);
  test(S("abcdefghij"), 1, 1, S("abcde"), 4, 2, -3);
  test(S("abcdefghij"), 1, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghij"), 1, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 1, 1, 0);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 1, 4, -3);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 1, 8, -7);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 1, 9, -8);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 1, 10, -8);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 1, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test25() {
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 9, -8);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 18, -17);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 19, -18);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 20, -18);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 1, 4, S(""), 0, 0, 4);
  test(S("abcdefghij"), 1, 4, S(""), 0, 1, 4);
  test(S("abcdefghij"), 1, 4, S(""), 1, 0, 0);
  test(S("abcdefghij"), 1, 4, S("abcde"), 0, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcde"), 0, 1, 1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 0, 2, 1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 0, 4, 1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 0, 5, 1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 0, 6, 1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 1, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcde"), 1, 1, 3);
  test(S("abcdefghij"), 1, 4, S("abcde"), 1, 2, 2);
  test(S("abcdefghij"), 1, 4, S("abcde"), 1, 3, 1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 1, 4, 0);
  test(S("abcdefghij"), 1, 4, S("abcde"), 1, 5, 0);
  test(S("abcdefghij"), 1, 4, S("abcde"), 2, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 2, 2, -1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 2, 3, -1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 2, 4, -1);
  test(S("abcdefghij"), 1, 4, S("abcde"), 4, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcde"), 4, 1, -3);
  test(S("abcdefghij"), 1, 4, S("abcde"), 4, 2, -3);
  test(S("abcdefghij"), 1, 4, S("abcde"), 5, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcde"), 5, 1, 4);
  test(S("abcdefghij"), 1, 4, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 0, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 1, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 1, 1, 3);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 1, 4, 0);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 1, 8, -4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 1, 9, -5);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 1, 10, -5);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 5, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 9, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 10, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 10, 1, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 0, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 1, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 1, 1, 3);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 1, 9, -5);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 1, 18, -14);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 1, 19, -15);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 1, 20, -15);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 10, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 19, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 20, 0, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 20, 1, 4);
  test(S("abcdefghij"), 1, 4, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 1, 8, S(""), 0, 0, 8);
  test(S("abcdefghij"), 1, 8, S(""), 0, 1, 8);
  test(S("abcdefghij"), 1, 8, S(""), 1, 0, 0);
  test(S("abcdefghij"), 1, 8, S("abcde"), 0, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcde"), 0, 1, 1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 0, 2, 1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 0, 4, 1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 0, 5, 1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 0, 6, 1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 1, 0, 8);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test26() {
  test(S("abcdefghij"), 1, 8, S("abcde"), 1, 1, 7);
  test(S("abcdefghij"), 1, 8, S("abcde"), 1, 2, 6);
  test(S("abcdefghij"), 1, 8, S("abcde"), 1, 3, 5);
  test(S("abcdefghij"), 1, 8, S("abcde"), 1, 4, 4);
  test(S("abcdefghij"), 1, 8, S("abcde"), 1, 5, 4);
  test(S("abcdefghij"), 1, 8, S("abcde"), 2, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 2, 2, -1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 2, 3, -1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 2, 4, -1);
  test(S("abcdefghij"), 1, 8, S("abcde"), 4, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcde"), 4, 1, -3);
  test(S("abcdefghij"), 1, 8, S("abcde"), 4, 2, -3);
  test(S("abcdefghij"), 1, 8, S("abcde"), 5, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcde"), 5, 1, 8);
  test(S("abcdefghij"), 1, 8, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 0, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 1, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 1, 1, 7);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 1, 4, 4);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 1, 8, 0);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 5, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 9, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 10, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 10, 1, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 0, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 1, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 1, 1, 7);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 1, 18, -10);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 1, 19, -11);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 1, 20, -11);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 10, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 19, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 20, 0, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 20, 1, 8);
  test(S("abcdefghij"), 1, 8, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 1, 9, S(""), 0, 0, 9);
  test(S("abcdefghij"), 1, 9, S(""), 0, 1, 9);
  test(S("abcdefghij"), 1, 9, S(""), 1, 0, 0);
  test(S("abcdefghij"), 1, 9, S("abcde"), 0, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcde"), 0, 1, 1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 0, 2, 1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 0, 4, 1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 0, 5, 1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 0, 6, 1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 1, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcde"), 1, 1, 8);
  test(S("abcdefghij"), 1, 9, S("abcde"), 1, 2, 7);
  test(S("abcdefghij"), 1, 9, S("abcde"), 1, 3, 6);
  test(S("abcdefghij"), 1, 9, S("abcde"), 1, 4, 5);
  test(S("abcdefghij"), 1, 9, S("abcde"), 1, 5, 5);
  test(S("abcdefghij"), 1, 9, S("abcde"), 2, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 2, 2, -1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 2, 3, -1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 2, 4, -1);
  test(S("abcdefghij"), 1, 9, S("abcde"), 4, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcde"), 4, 1, -3);
  test(S("abcdefghij"), 1, 9, S("abcde"), 4, 2, -3);
  test(S("abcdefghij"), 1, 9, S("abcde"), 5, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcde"), 5, 1, 9);
  test(S("abcdefghij"), 1, 9, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 0, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 1, 8);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 4, 5);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 8, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test27() {
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 9, 0);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 10, 0);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 5, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 9, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 10, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 10, 1, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 0, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 1, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 1, 1, 8);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 1, 9, 0);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 1, 18, -9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 1, 19, -10);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 1, 20, -10);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 10, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 19, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 20, 0, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 20, 1, 9);
  test(S("abcdefghij"), 1, 9, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 1, 10, S(""), 0, 0, 9);
  test(S("abcdefghij"), 1, 10, S(""), 0, 1, 9);
  test(S("abcdefghij"), 1, 10, S(""), 1, 0, 0);
  test(S("abcdefghij"), 1, 10, S("abcde"), 0, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcde"), 0, 1, 1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 0, 2, 1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 0, 4, 1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 0, 5, 1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 0, 6, 1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 1, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcde"), 1, 1, 8);
  test(S("abcdefghij"), 1, 10, S("abcde"), 1, 2, 7);
  test(S("abcdefghij"), 1, 10, S("abcde"), 1, 3, 6);
  test(S("abcdefghij"), 1, 10, S("abcde"), 1, 4, 5);
  test(S("abcdefghij"), 1, 10, S("abcde"), 1, 5, 5);
  test(S("abcdefghij"), 1, 10, S("abcde"), 2, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 2, 2, -1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 2, 3, -1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 2, 4, -1);
  test(S("abcdefghij"), 1, 10, S("abcde"), 4, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcde"), 4, 1, -3);
  test(S("abcdefghij"), 1, 10, S("abcde"), 4, 2, -3);
  test(S("abcdefghij"), 1, 10, S("abcde"), 5, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcde"), 5, 1, 9);
  test(S("abcdefghij"), 1, 10, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 0, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 1, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 1, 1, 8);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 1, 4, 5);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 1, 8, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 1, 9, 0);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 1, 10, 0);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 5, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 9, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 10, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 10, 1, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 0, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 1, 8);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 9, 0);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 18, -9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 19, -10);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 20, -10);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test28() {
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 19, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 20, 0, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 20, 1, 9);
  test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 5, 0, S(""), 0, 0, 0);
  test(S("abcdefghij"), 5, 0, S(""), 0, 1, 0);
  test(S("abcdefghij"), 5, 0, S(""), 1, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghij"), 5, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghij"), 5, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghij"), 5, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghij"), 5, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghij"), 5, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghij"), 5, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghij"), 5, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghij"), 5, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 5, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghij"), 5, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghij"), 5, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghij"), 5, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghij"), 5, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghij"), 5, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 5, 1, S(""), 0, 0, 1);
  test(S("abcdefghij"), 5, 1, S(""), 0, 1, 1);
  test(S("abcdefghij"), 5, 1, S(""), 1, 0, 0);
  test(S("abcdefghij"), 5, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 0, 1, 5);
  test(S("abcdefghij"), 5, 1, S("abcde"), 0, 2, 5);
  test(S("abcdefghij"), 5, 1, S("abcde"), 0, 4, 5);
  test(S("abcdefghij"), 5, 1, S("abcde"), 0, 5, 5);
  test(S("abcdefghij"), 5, 1, S("abcde"), 0, 6, 5);
  test(S("abcdefghij"), 5, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 1, 1, 4);
  test(S("abcdefghij"), 5, 1, S("abcde"), 1, 2, 4);
  test(S("abcdefghij"), 5, 1, S("abcde"), 1, 3, 4);
  test(S("abcdefghij"), 5, 1, S("abcde"), 1, 4, 4);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test29() {
  test(S("abcdefghij"), 5, 1, S("abcde"), 1, 5, 4);
  test(S("abcdefghij"), 5, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 2, 1, 3);
  test(S("abcdefghij"), 5, 1, S("abcde"), 2, 2, 3);
  test(S("abcdefghij"), 5, 1, S("abcde"), 2, 3, 3);
  test(S("abcdefghij"), 5, 1, S("abcde"), 2, 4, 3);
  test(S("abcdefghij"), 5, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 4, 1, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 4, 2, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghij"), 5, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 0, 1, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 0, 9, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 0, 10, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 0, 11, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 1, 1, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 1, 4, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 1, 8, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 1, 9, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 1, 10, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 5, 1, 0);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 5, 2, -1);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 5, 4, -3);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 9, 1, -4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 9, 2, -4);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 0, 1, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 0, 10, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 0, 19, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 0, 20, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 0, 21, 5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 1, 1, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 1, 9, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 1, 18, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 1, 19, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 1, 20, 4);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 10, 1, -5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 10, 9, -5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 10, 10, -5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 10, 11, -5);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 19, 1, -14);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 19, 2, -14);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghij"), 5, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 5, 2, S(""), 0, 0, 2);
  test(S("abcdefghij"), 5, 2, S(""), 0, 1, 2);
  test(S("abcdefghij"), 5, 2, S(""), 1, 0, 0);
  test(S("abcdefghij"), 5, 2, S("abcde"), 0, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcde"), 0, 1, 5);
  test(S("abcdefghij"), 5, 2, S("abcde"), 0, 2, 5);
  test(S("abcdefghij"), 5, 2, S("abcde"), 0, 4, 5);
  test(S("abcdefghij"), 5, 2, S("abcde"), 0, 5, 5);
  test(S("abcdefghij"), 5, 2, S("abcde"), 0, 6, 5);
  test(S("abcdefghij"), 5, 2, S("abcde"), 1, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcde"), 1, 1, 4);
  test(S("abcdefghij"), 5, 2, S("abcde"), 1, 2, 4);
  test(S("abcdefghij"), 5, 2, S("abcde"), 1, 3, 4);
  test(S("abcdefghij"), 5, 2, S("abcde"), 1, 4, 4);
  test(S("abcdefghij"), 5, 2, S("abcde"), 1, 5, 4);
  test(S("abcdefghij"), 5, 2, S("abcde"), 2, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcde"), 2, 1, 3);
  test(S("abcdefghij"), 5, 2, S("abcde"), 2, 2, 3);
  test(S("abcdefghij"), 5, 2, S("abcde"), 2, 3, 3);
  test(S("abcdefghij"), 5, 2, S("abcde"), 2, 4, 3);
  test(S("abcdefghij"), 5, 2, S("abcde"), 4, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcde"), 4, 1, 1);
  test(S("abcdefghij"), 5, 2, S("abcde"), 4, 2, 1);
  test(S("abcdefghij"), 5, 2, S("abcde"), 5, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcde"), 5, 1, 2);
  test(S("abcdefghij"), 5, 2, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 0, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 0, 1, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 0, 9, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 0, 10, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 0, 11, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 1, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 1, 1, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 1, 4, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 1, 8, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 1, 9, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 1, 10, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 1, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test30() {
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 2, 0);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 4, -2);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 5, -3);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 6, -3);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 9, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 9, 1, -4);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 9, 2, -4);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 10, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 10, 1, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 0, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 0, 1, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 0, 10, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 0, 19, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 0, 20, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 0, 21, 5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 1, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 1, 1, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 1, 9, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 1, 18, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 1, 19, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 1, 20, 4);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 10, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 10, 1, -5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 10, 9, -5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 10, 10, -5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 10, 11, -5);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 19, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 19, 1, -14);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 19, 2, -14);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 20, 0, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 20, 1, 2);
  test(S("abcdefghij"), 5, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 5, 4, S(""), 0, 0, 4);
  test(S("abcdefghij"), 5, 4, S(""), 0, 1, 4);
  test(S("abcdefghij"), 5, 4, S(""), 1, 0, 0);
  test(S("abcdefghij"), 5, 4, S("abcde"), 0, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 0, 1, 5);
  test(S("abcdefghij"), 5, 4, S("abcde"), 0, 2, 5);
  test(S("abcdefghij"), 5, 4, S("abcde"), 0, 4, 5);
  test(S("abcdefghij"), 5, 4, S("abcde"), 0, 5, 5);
  test(S("abcdefghij"), 5, 4, S("abcde"), 0, 6, 5);
  test(S("abcdefghij"), 5, 4, S("abcde"), 1, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 1, 1, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 1, 2, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 1, 3, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 1, 4, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 1, 5, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 2, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 2, 1, 3);
  test(S("abcdefghij"), 5, 4, S("abcde"), 2, 2, 3);
  test(S("abcdefghij"), 5, 4, S("abcde"), 2, 3, 3);
  test(S("abcdefghij"), 5, 4, S("abcde"), 2, 4, 3);
  test(S("abcdefghij"), 5, 4, S("abcde"), 4, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 4, 1, 1);
  test(S("abcdefghij"), 5, 4, S("abcde"), 4, 2, 1);
  test(S("abcdefghij"), 5, 4, S("abcde"), 5, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 5, 1, 4);
  test(S("abcdefghij"), 5, 4, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 0, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 0, 1, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 0, 9, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 0, 10, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 0, 11, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 1, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 1, 1, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 1, 4, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 1, 8, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 1, 9, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 1, 10, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 5, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 5, 1, 3);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 5, 2, 2);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 5, 4, 0);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 5, 5, -1);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 5, 6, -1);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 9, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 9, 1, -4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 9, 2, -4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 10, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 10, 1, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 0, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 0, 1, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 0, 10, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 0, 19, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 0, 20, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 0, 21, 5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 1, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 1, 1, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 1, 9, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 1, 18, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 1, 19, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 1, 20, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 1, -5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 9, -5);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test31() {
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 10, -5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 11, -5);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 19, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 19, 1, -14);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 19, 2, -14);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 20, 0, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 20, 1, 4);
  test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 5, 5, S(""), 0, 0, 5);
  test(S("abcdefghij"), 5, 5, S(""), 0, 1, 5);
  test(S("abcdefghij"), 5, 5, S(""), 1, 0, 0);
  test(S("abcdefghij"), 5, 5, S("abcde"), 0, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 0, 1, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 0, 2, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 0, 4, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 0, 5, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 0, 6, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 1, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 1, 1, 4);
  test(S("abcdefghij"), 5, 5, S("abcde"), 1, 2, 4);
  test(S("abcdefghij"), 5, 5, S("abcde"), 1, 3, 4);
  test(S("abcdefghij"), 5, 5, S("abcde"), 1, 4, 4);
  test(S("abcdefghij"), 5, 5, S("abcde"), 1, 5, 4);
  test(S("abcdefghij"), 5, 5, S("abcde"), 2, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 2, 1, 3);
  test(S("abcdefghij"), 5, 5, S("abcde"), 2, 2, 3);
  test(S("abcdefghij"), 5, 5, S("abcde"), 2, 3, 3);
  test(S("abcdefghij"), 5, 5, S("abcde"), 2, 4, 3);
  test(S("abcdefghij"), 5, 5, S("abcde"), 4, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 4, 1, 1);
  test(S("abcdefghij"), 5, 5, S("abcde"), 4, 2, 1);
  test(S("abcdefghij"), 5, 5, S("abcde"), 5, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 5, 1, 5);
  test(S("abcdefghij"), 5, 5, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 0, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 0, 1, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 0, 9, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 0, 10, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 0, 11, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 1, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 1, 1, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 1, 4, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 1, 8, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 1, 9, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 1, 10, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 5, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 5, 1, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 5, 2, 3);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 5, 4, 1);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 5, 5, 0);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 5, 6, 0);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 9, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 9, 1, -4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 9, 2, -4);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 10, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 10, 1, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 0, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 0, 1, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 0, 10, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 0, 19, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 0, 20, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 0, 21, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 1, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 1, 1, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 1, 9, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 1, 18, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 1, 19, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 1, 20, 4);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 10, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 10, 1, -5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 10, 9, -5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 10, 10, -5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 10, 11, -5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 19, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 19, 1, -14);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 19, 2, -14);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 20, 0, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 20, 1, 5);
  test(S("abcdefghij"), 5, 5, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 5, 6, S(""), 0, 0, 5);
  test(S("abcdefghij"), 5, 6, S(""), 0, 1, 5);
  test(S("abcdefghij"), 5, 6, S(""), 1, 0, 0);
  test(S("abcdefghij"), 5, 6, S("abcde"), 0, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 0, 1, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 0, 2, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 0, 4, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 0, 5, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 0, 6, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 1, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 1, 1, 4);
  test(S("abcdefghij"), 5, 6, S("abcde"), 1, 2, 4);
  test(S("abcdefghij"), 5, 6, S("abcde"), 1, 3, 4);
  test(S("abcdefghij"), 5, 6, S("abcde"), 1, 4, 4);
  test(S("abcdefghij"), 5, 6, S("abcde"), 1, 5, 4);
  test(S("abcdefghij"), 5, 6, S("abcde"), 2, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 2, 1, 3);
  test(S("abcdefghij"), 5, 6, S("abcde"), 2, 2, 3);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test32() {
  test(S("abcdefghij"), 5, 6, S("abcde"), 2, 3, 3);
  test(S("abcdefghij"), 5, 6, S("abcde"), 2, 4, 3);
  test(S("abcdefghij"), 5, 6, S("abcde"), 4, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 4, 1, 1);
  test(S("abcdefghij"), 5, 6, S("abcde"), 4, 2, 1);
  test(S("abcdefghij"), 5, 6, S("abcde"), 5, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 5, 1, 5);
  test(S("abcdefghij"), 5, 6, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 0, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 0, 1, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 0, 9, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 0, 10, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 0, 11, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 1, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 1, 1, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 1, 4, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 1, 8, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 1, 9, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 1, 10, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 5, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 5, 1, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 5, 2, 3);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 5, 4, 1);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 5, 5, 0);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 5, 6, 0);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 9, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 9, 1, -4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 9, 2, -4);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 10, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 10, 1, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 0, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 0, 1, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 0, 10, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 0, 19, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 0, 20, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 0, 21, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 1, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 1, 1, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 1, 9, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 1, 18, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 1, 19, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 1, 20, 4);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 10, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 10, 1, -5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 10, 9, -5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 10, 10, -5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 10, 11, -5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 19, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 19, 1, -14);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 19, 2, -14);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 20, 0, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 20, 1, 5);
  test(S("abcdefghij"), 5, 6, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 9, 0, S(""), 0, 0, 0);
  test(S("abcdefghij"), 9, 0, S(""), 0, 1, 0);
  test(S("abcdefghij"), 9, 0, S(""), 1, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghij"), 9, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghij"), 9, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghij"), 9, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghij"), 9, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghij"), 9, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghij"), 9, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghij"), 9, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghij"), 9, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 9, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghij"), 9, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghij"), 9, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghij"), 9, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghij"), 9, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 6, -5);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test33() {
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghij"), 9, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 9, 1, S(""), 0, 0, 1);
  test(S("abcdefghij"), 9, 1, S(""), 0, 1, 1);
  test(S("abcdefghij"), 9, 1, S(""), 1, 0, 0);
  test(S("abcdefghij"), 9, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcde"), 0, 1, 9);
  test(S("abcdefghij"), 9, 1, S("abcde"), 0, 2, 9);
  test(S("abcdefghij"), 9, 1, S("abcde"), 0, 4, 9);
  test(S("abcdefghij"), 9, 1, S("abcde"), 0, 5, 9);
  test(S("abcdefghij"), 9, 1, S("abcde"), 0, 6, 9);
  test(S("abcdefghij"), 9, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcde"), 1, 1, 8);
  test(S("abcdefghij"), 9, 1, S("abcde"), 1, 2, 8);
  test(S("abcdefghij"), 9, 1, S("abcde"), 1, 3, 8);
  test(S("abcdefghij"), 9, 1, S("abcde"), 1, 4, 8);
  test(S("abcdefghij"), 9, 1, S("abcde"), 1, 5, 8);
  test(S("abcdefghij"), 9, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcde"), 2, 1, 7);
  test(S("abcdefghij"), 9, 1, S("abcde"), 2, 2, 7);
  test(S("abcdefghij"), 9, 1, S("abcde"), 2, 3, 7);
  test(S("abcdefghij"), 9, 1, S("abcde"), 2, 4, 7);
  test(S("abcdefghij"), 9, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcde"), 4, 1, 5);
  test(S("abcdefghij"), 9, 1, S("abcde"), 4, 2, 5);
  test(S("abcdefghij"), 9, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghij"), 9, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 0, 1, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 0, 5, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 0, 9, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 0, 10, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 0, 11, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 1, 1, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 1, 4, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 1, 8, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 1, 9, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 1, 10, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 5, 1, 4);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 5, 2, 4);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 5, 4, 4);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 5, 5, 4);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 5, 6, 4);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 9, 1, 0);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 9, 2, 0);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 0, 1, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 0, 10, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 0, 19, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 0, 20, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 0, 21, 9);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 1, 1, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 1, 9, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 1, 18, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 1, 19, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 1, 20, 8);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 10, 5, -1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 10, 9, -1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 10, 10, -1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 10, 11, -1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 19, 1, -10);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test34() {
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 19, 2, -10);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 9, 2, S(""), 0, 0, 1);
  test(S("abcdefghij"), 9, 2, S(""), 0, 1, 1);
  test(S("abcdefghij"), 9, 2, S(""), 1, 0, 0);
  test(S("abcdefghij"), 9, 2, S("abcde"), 0, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcde"), 0, 1, 9);
  test(S("abcdefghij"), 9, 2, S("abcde"), 0, 2, 9);
  test(S("abcdefghij"), 9, 2, S("abcde"), 0, 4, 9);
  test(S("abcdefghij"), 9, 2, S("abcde"), 0, 5, 9);
  test(S("abcdefghij"), 9, 2, S("abcde"), 0, 6, 9);
  test(S("abcdefghij"), 9, 2, S("abcde"), 1, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcde"), 1, 1, 8);
  test(S("abcdefghij"), 9, 2, S("abcde"), 1, 2, 8);
  test(S("abcdefghij"), 9, 2, S("abcde"), 1, 3, 8);
  test(S("abcdefghij"), 9, 2, S("abcde"), 1, 4, 8);
  test(S("abcdefghij"), 9, 2, S("abcde"), 1, 5, 8);
  test(S("abcdefghij"), 9, 2, S("abcde"), 2, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcde"), 2, 1, 7);
  test(S("abcdefghij"), 9, 2, S("abcde"), 2, 2, 7);
  test(S("abcdefghij"), 9, 2, S("abcde"), 2, 3, 7);
  test(S("abcdefghij"), 9, 2, S("abcde"), 2, 4, 7);
  test(S("abcdefghij"), 9, 2, S("abcde"), 4, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcde"), 4, 1, 5);
  test(S("abcdefghij"), 9, 2, S("abcde"), 4, 2, 5);
  test(S("abcdefghij"), 9, 2, S("abcde"), 5, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcde"), 5, 1, 1);
  test(S("abcdefghij"), 9, 2, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 0, 1, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 0, 5, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 0, 9, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 0, 10, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 0, 11, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 1, 1, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 1, 4, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 1, 8, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 1, 9, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 1, 10, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 5, 1, 4);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 5, 2, 4);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 5, 4, 4);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 5, 5, 4);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 5, 6, 4);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 9, 1, 0);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 9, 2, 0);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 0, 1, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 0, 10, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 0, 19, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 0, 20, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 0, 21, 9);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 1, 1, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 1, 9, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 1, 18, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 1, 19, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 1, 20, 8);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 10, 5, -1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 10, 9, -1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 10, 10, -1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 10, 11, -1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 19, 1, -10);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 19, 2, -10);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghij"), 9, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 10, 0, S(""), 0, 0, 0);
  test(S("abcdefghij"), 10, 0, S(""), 0, 1, 0);
  test(S("abcdefghij"), 10, 0, S(""), 1, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghij"), 10, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghij"), 10, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghij"), 10, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghij"), 10, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghij"), 10, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghij"), 10, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghij"), 10, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghij"), 10, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 10, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghij"), 10, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghij"), 10, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcde"), 4, 1, -1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test35() {
  test(S("abcdefghij"), 10, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghij"), 10, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghij"), 10, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghij"), 10, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 10, 1, S(""), 0, 0, 0);
  test(S("abcdefghij"), 10, 1, S(""), 0, 1, 0);
  test(S("abcdefghij"), 10, 1, S(""), 1, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcde"), 0, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcde"), 0, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcde"), 0, 2, -2);
  test(S("abcdefghij"), 10, 1, S("abcde"), 0, 4, -4);
  test(S("abcdefghij"), 10, 1, S("abcde"), 0, 5, -5);
  test(S("abcdefghij"), 10, 1, S("abcde"), 0, 6, -5);
  test(S("abcdefghij"), 10, 1, S("abcde"), 1, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcde"), 1, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcde"), 1, 2, -2);
  test(S("abcdefghij"), 10, 1, S("abcde"), 1, 3, -3);
  test(S("abcdefghij"), 10, 1, S("abcde"), 1, 4, -4);
  test(S("abcdefghij"), 10, 1, S("abcde"), 1, 5, -4);
  test(S("abcdefghij"), 10, 1, S("abcde"), 2, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcde"), 2, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcde"), 2, 2, -2);
  test(S("abcdefghij"), 10, 1, S("abcde"), 2, 3, -3);
  test(S("abcdefghij"), 10, 1, S("abcde"), 2, 4, -3);
  test(S("abcdefghij"), 10, 1, S("abcde"), 4, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcde"), 4, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcde"), 4, 2, -1);
  test(S("abcdefghij"), 10, 1, S("abcde"), 5, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcde"), 5, 1, 0);
  test(S("abcdefghij"), 10, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 10, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test36() {
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghij"), 10, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghij"), 11, 0, S(""), 0, 0, 0);
  test(S("abcdefghij"), 11, 0, S(""), 0, 1, 0);
  test(S("abcdefghij"), 11, 0, S(""), 1, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 0, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 0, 2, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 0, 4, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 0, 5, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 0, 6, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 1, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 1, 2, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 1, 3, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 1, 4, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 1, 5, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 2, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 2, 2, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 2, 3, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 2, 4, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 4, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 4, 2, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 0, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 0, 5, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 0, 9, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 0, 10, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 0, 11, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 1, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 1, 4, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 1, 8, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 1, 9, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 1, 10, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 5, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 5, 2, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 5, 4, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 5, 5, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 5, 6, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 9, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 9, 2, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 0, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 0, 10, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 0, 19, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 0, 20, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 0, 21, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 1, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 1, 9, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 1, 18, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 1, 19, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 1, 20, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 10, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 10, 5, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 10, 9, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 10, 10, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 10, 11, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 19, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 19, 2, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test37() {
  test(S("abcdefghijklmnopqrst"), 0, 0, S(""), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S(""), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghijklmnopqrst"), 0, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 1, S(""), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S(""), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 0, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 0, 4, -3);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 0, 5, -4);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 0, 6, -4);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 1, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 1, 3, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 1, 5, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 2, 1, -2);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 2, 3, -2);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 2, 4, -2);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 4, 1, -4);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 4, 2, -4);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 6, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test38() {
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 5, -4);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 9, -8);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 10, -9);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 11, -9);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 0, 10, -9);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 0, 19, -18);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 0, 20, -19);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 0, 21, -19);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 10, S(""), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S(""), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 0, 1, 9);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 0, 2, 8);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 0, 4, 6);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 0, 5, 5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 0, 6, 5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 1, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 1, 3, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 1, 5, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 2, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 2, 1, -2);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 2, 3, -2);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 2, 4, -2);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 4, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 4, 1, -4);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 4, 2, -4);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 5, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 5, 1, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 0, 1, 9);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 0, 5, 5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 0, 10, 0);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 0, 11, 0);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 5, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 9, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 10, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 10, 1, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 1, 9);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test39() {
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 10, 0);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 19, -9);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 20, -10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 21, -10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 10, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 19, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 20, 0, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 20, 1, 10);
  test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 19, S(""), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S(""), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 0, 1, 18);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 0, 2, 17);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 0, 4, 15);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 0, 5, 14);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 0, 6, 14);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 1, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 1, 3, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 1, 5, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 2, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 2, 1, -2);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 2, 3, -2);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 2, 4, -2);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 4, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 4, 1, -4);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 4, 2, -4);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 5, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 5, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 0, 1, 18);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 0, 5, 14);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 0, 9, 10);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 0, 10, 9);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 0, 11, 9);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 5, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 9, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 10, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 10, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 0, 1, 18);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 0, 10, 9);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 0, 19, 0);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 0, 20, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 0, 21, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 10, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 19, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 20, 0, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 20, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 19, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 20, S(""), 0, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S(""), 0, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 0, 20);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test40() {
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 2, 18);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 4, 16);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 5, 15);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 6, 15);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 1, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 1, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 1, 3, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 1, 5, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 2, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 2, 1, -2);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 2, 3, -2);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 2, 4, -2);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 4, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 4, 1, -4);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 4, 2, -4);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 5, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 5, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 0, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 0, 5, 15);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 0, 9, 11);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 0, 11, 10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 1, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 5, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 9, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 10, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 10, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 0, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 0, 20, 0);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 0, 21, 0);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 1, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 10, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 19, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 20, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 20, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 20, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 21, S(""), 0, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S(""), 0, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 0, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 0, 2, 18);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 0, 4, 16);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 0, 5, 15);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 0, 6, 15);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 1, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 1, 2, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 1, 3, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 1, 5, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 2, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 2, 1, -2);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 2, 3, -2);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 2, 4, -2);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 4, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 4, 1, -4);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 4, 2, -4);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 5, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 5, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 5, 15);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 9, 11);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test41() {
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 11, 10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 1, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 1, 4, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 1, 8, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 1, 10, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 5, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 5, 1, -5);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 5, 2, -5);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 5, 4, -5);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 9, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 9, 1, -9);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 9, 2, -9);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 10, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 10, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 0, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 0, 20, 0);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 0, 21, 0);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 1, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 1, 9, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 1, 18, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 10, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 10, 1, -10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 10, 5, -10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 10, 9, -10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 19, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 19, 1, -19);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 19, 2, -19);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 20, 0, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 20, 1, 20);
  test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S(""), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S(""), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test42() {
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 1, S(""), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S(""), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 0, 2, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 0, 4, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 0, 6, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 1, 1, 0);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 1, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 1, 3, -2);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 1, 4, -3);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 1, 5, -3);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 2, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 2, 3, -1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 2, 4, -1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 4, 1, -3);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 4, 2, -3);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 1, 1, 0);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 1, 4, -3);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 1, 8, -7);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 1, 9, -8);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 1, 10, -8);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 1, 1, 0);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 1, 9, -8);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 1, 18, -17);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 1, 19, -18);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 1, 20, -18);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 9, S(""), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S(""), 0, 1, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 2, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 4, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 5, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test43() {
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 6, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 1, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 1, 1, 8);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 1, 2, 7);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 1, 3, 6);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 1, 4, 5);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 1, 5, 5);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 2, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 2, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 2, 3, -1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 2, 4, -1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 4, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 4, 1, -3);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 4, 2, -3);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 5, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 5, 1, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 1, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 1, 1, 8);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 1, 4, 5);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 1, 8, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 1, 9, 0);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 1, 10, 0);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 5, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 9, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 10, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 10, 1, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 1, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 1, 1, 8);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 1, 9, 0);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 1, 18, -9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 1, 19, -10);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 1, 20, -10);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 10, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 19, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 20, 0, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 20, 1, 9);
  test(S("abcdefghijklmnopqrst"), 1, 9, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 18, S(""), 0, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S(""), 0, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 0, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 0, 2, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 0, 4, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 0, 6, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 1, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 1, 1, 17);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 1, 2, 16);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 1, 3, 15);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 1, 4, 14);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 1, 5, 14);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 2, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 2, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 2, 3, -1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 2, 4, -1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 4, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 4, 1, -3);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 4, 2, -3);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 5, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 5, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 0, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 1, 17);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test44() {
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 4, 14);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 8, 10);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 10, 9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 5, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 9, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 10, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 10, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 0, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 1, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 1, 1, 17);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 1, 18, 0);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 1, 19, -1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 1, 20, -1);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 10, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 19, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 20, 0, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 20, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 19, S(""), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S(""), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 0, 2, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 0, 4, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 0, 6, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 1, 2, 17);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 1, 3, 16);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 1, 4, 15);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 1, 5, 15);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 2, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 2, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 2, 3, -1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 2, 4, -1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 4, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 4, 1, -3);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 4, 2, -3);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 5, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 5, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 1, 4, 15);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 1, 8, 11);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 1, 9, 10);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 1, 10, 10);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 5, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 9, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 10, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 10, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 9, 10);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 18, 1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test45() {
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 19, 0);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 20, 0);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 10, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 19, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 20, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 20, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 20, S(""), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S(""), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 0, 2, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 0, 4, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 0, 6, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 1, 2, 17);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 1, 3, 16);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 1, 4, 15);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 1, 5, 15);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 2, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 2, 2, -1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 2, 3, -1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 2, 4, -1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 4, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 4, 1, -3);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 4, 2, -3);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 5, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 5, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 0, 5, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 0, 9, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 0, 11, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 1, 4, 15);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 1, 8, 11);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 1, 9, 10);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 1, 10, 10);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 5, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 5, 1, -4);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 5, 2, -4);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 5, 5, -4);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 5, 6, -4);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 9, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 9, 1, -8);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 9, 2, -8);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 10, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 10, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 0, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 0, 10, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 0, 19, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 0, 20, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 0, 21, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 1, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 1, 9, 10);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 1, 18, 1);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 1, 19, 0);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 1, 20, 0);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 10, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 10, 1, -9);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 10, 5, -9);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 19, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 19, 1, -18);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 19, 2, -18);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 20, 0, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 20, 1, 19);
  test(S("abcdefghijklmnopqrst"), 1, 20, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S(""), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S(""), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 2, -2);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test46() {
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghijklmnopqrst"), 10, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 1, S(""), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S(""), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 0, 2, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 0, 4, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 0, 6, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 1, 2, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 1, 3, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 1, 5, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 2, 1, 8);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 2, 2, 8);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 2, 3, 8);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 2, 4, 8);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 4, 1, 6);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 4, 2, 6);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 0, 9, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 0, 11, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 8, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 10, 9);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test47() {
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 2, 5);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 4, 5);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 5, 5);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 6, 5);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 9, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 9, 2, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 0, 19, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 0, 20, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 0, 21, 10);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 1, 18, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 1, 19, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 1, 20, 9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 10, 5, -4);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 10, 9, -8);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 10, 10, -9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 10, 11, -9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 19, 1, -9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 19, 2, -9);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 5, S(""), 0, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S(""), 0, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 0, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 0, 2, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 0, 4, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 0, 6, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 1, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 1, 2, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 1, 3, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 1, 5, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 2, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 2, 1, 8);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 2, 2, 8);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 2, 3, 8);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 2, 4, 8);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 4, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 4, 1, 6);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 4, 2, 6);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 5, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 5, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 0, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 0, 9, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 0, 11, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 1, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 1, 8, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 1, 10, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 5, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 5, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 5, 2, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 5, 4, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 5, 5, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 5, 6, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 9, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 9, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 9, 2, 1);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 10, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 10, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 0, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 0, 19, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 0, 20, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 0, 21, 10);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 1, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 1, 18, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 1, 19, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 1, 20, 9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 1, 4);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test48() {
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 5, 0);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 9, -4);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 10, -5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 11, -5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 19, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 19, 1, -9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 19, 2, -9);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 20, 0, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 20, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 9, S(""), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S(""), 0, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 0, 2, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 0, 4, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 0, 6, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 1, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 1, 2, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 1, 3, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 1, 5, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 2, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 2, 1, 8);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 2, 2, 8);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 2, 3, 8);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 2, 4, 8);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 4, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 4, 1, 6);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 4, 2, 6);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 5, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 5, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 0, 9, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 0, 11, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 1, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 1, 8, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 1, 10, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 5, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 5, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 5, 2, 5);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 5, 4, 5);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 5, 5, 5);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 5, 6, 5);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 9, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 9, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 9, 2, 1);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 10, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 10, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 0, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 0, 19, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 0, 20, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 0, 21, 10);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 1, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 1, 18, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 1, 19, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 1, 20, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 10, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 10, 1, 8);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 10, 5, 4);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 10, 9, 0);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 10, 10, -1);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 10, 11, -1);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 19, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 19, 1, -9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 19, 2, -9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 20, 0, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 20, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 9, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 10, S(""), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S(""), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 0, 2, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 0, 4, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 0, 6, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 2, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 3, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 5, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 0, 10);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test49() {
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 1, 8);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 2, 8);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 3, 8);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 4, 8);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 4, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 4, 1, 6);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 4, 2, 6);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 5, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 5, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 0, 9, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 0, 11, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 1, 8, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 1, 10, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 5, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 5, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 5, 2, 5);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 5, 4, 5);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 5, 5, 5);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 5, 6, 5);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 9, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 9, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 9, 2, 1);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 10, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 10, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 0, 19, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 0, 20, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 0, 21, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 1, 18, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 1, 19, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 1, 20, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 10, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 10, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 10, 5, 5);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 10, 9, 1);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 10, 10, 0);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 10, 11, 0);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 19, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 19, 1, -9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 19, 2, -9);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 20, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 20, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 10, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 11, S(""), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S(""), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 0, 2, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 0, 4, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 0, 6, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 1, 2, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 1, 3, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 1, 5, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 2, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 2, 1, 8);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 2, 2, 8);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 2, 3, 8);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 2, 4, 8);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 4, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 4, 1, 6);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 4, 2, 6);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 5, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 5, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 0, 5, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 0, 9, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 0, 11, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 1, 4, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 1, 8, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 1, 10, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 1, 5);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 2, 5);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 4, 5);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test50() {
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 5, 5);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 6, 5);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 9, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 9, 1, 1);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 9, 2, 1);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 10, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 10, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 0, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 0, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 0, 10, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 0, 19, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 0, 20, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 0, 21, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 1, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 1, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 1, 9, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 1, 18, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 1, 19, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 1, 20, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 10, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 10, 1, 9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 10, 5, 5);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 10, 9, 1);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 10, 10, 0);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 10, 11, 0);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 19, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 19, 1, -9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 19, 2, -9);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 20, 0, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 20, 1, 10);
  test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S(""), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S(""), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test51() {
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 1, S(""), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S(""), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 0, 2, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 0, 4, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 0, 5, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 0, 6, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 1, 2, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 1, 3, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 1, 4, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 1, 5, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 2, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 2, 1, 17);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 2, 2, 17);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 2, 3, 17);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 2, 4, 17);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 4, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 4, 1, 15);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 4, 2, 15);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 5, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 0, 5, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 0, 9, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 0, 10, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 0, 11, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 1, 4, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 1, 8, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 1, 9, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 1, 10, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 5, 1, 14);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 5, 2, 14);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 5, 4, 14);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 5, 5, 14);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 5, 6, 14);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 9, 1, 10);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 9, 2, 10);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 0, 10, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 0, 19, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 0, 20, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 0, 21, 19);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 1, 9, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 1, 18, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 1, 19, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 1, 20, 18);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 10, 1, 9);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 10, 5, 9);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 10, 9, 9);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 10, 10, 9);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 10, 11, 9);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 19, 1, 0);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 19, 2, 0);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 2, S(""), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S(""), 0, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 0, 2, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 0, 4, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 0, 5, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 0, 6, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 1, 2, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 1, 3, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 1, 4, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 1, 5, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 1, 17);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 2, 17);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 3, 17);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 4, 17);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test52() {
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 4, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 4, 1, 15);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 4, 2, 15);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 5, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 0, 5, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 0, 9, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 0, 10, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 0, 11, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 1, 4, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 1, 8, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 1, 9, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 1, 10, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 5, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 5, 1, 14);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 5, 2, 14);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 5, 4, 14);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 5, 5, 14);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 5, 6, 14);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 9, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 9, 1, 10);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 9, 2, 10);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 10, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 0, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 0, 1, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 0, 10, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 0, 19, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 0, 20, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 0, 21, 19);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 1, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 1, 1, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 1, 9, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 1, 18, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 1, 19, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 1, 20, 18);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 10, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 10, 1, 9);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 10, 5, 9);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 10, 9, 9);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 10, 10, 9);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 10, 11, 9);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 19, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 19, 1, 0);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 19, 2, 0);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 20, 0, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 20, 1, 1);
  test(S("abcdefghijklmnopqrst"), 19, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S(""), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S(""), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 0, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 0, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 0, 6, -5);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 1, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 1, 3, -3);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 1, 5, -4);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 2, 3, -3);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 2, 4, -3);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 4, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 4, 2, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 9, 1, -1);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test53() {
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S(""), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S(""), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 0, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 0, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 0, 6, -5);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 1, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 1, 3, -3);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 1, 5, -4);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 2, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 2, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 2, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 2, 3, -3);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 2, 4, -3);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 4, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 4, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 4, 2, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 0, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 0, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 0, 11, -10);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 1, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 1, 8, -8);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 1, 10, -9);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 5, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 5, 2, -2);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 5, 4, -4);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 5, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 5, 6, -5);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 9, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 9, 2, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 0, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 0, 10, -10);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 0, 19, -19);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 0, 20, -20);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 0, 21, -20);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 1, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 1, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 1, 18, -18);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 1, 19, -19);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 1, 20, -19);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 10, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 10, 5, -5);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 10, 9, -9);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 10, 10, -10);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 10, 11, -10);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 19, 1, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 19, 2, -1);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 20, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test54() {
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S(""), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S(""), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S(""), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 0, 2, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 0, 4, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 0, 5, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 0, 6, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 1, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 1, 2, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 1, 3, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 1, 4, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 1, 5, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 2, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 2, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 2, 2, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 2, 3, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 2, 4, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 4, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 4, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 4, 2, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcde"), 6, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 0, 5, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 0, 9, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 0, 10, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 0, 11, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 1, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 1, 4, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 1, 8, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 1, 9, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 1, 10, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 5, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 5, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 5, 2, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 5, 4, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 5, 5, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 5, 6, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 9, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 9, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 9, 2, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghij"), 11, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0, 10, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0, 19, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0, 20, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0, 21, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 1, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 1, 9, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 1, 18, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 1, 19, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 1, 20, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 10, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 10, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 10, 5, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 10, 9, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 10, 10, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 10, 11, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 19, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 19, 2, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
  test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);

  return true;
}

template <class S>
TEST_CONSTEXPR_CXX20 bool test55() {
  test_npos(S(""), 0, 0, S(""), 0, 0);
  test_npos(S(""), 0, 0, S("abcde"), 0, -5);
  test_npos(S("abcde"), 0, 0, S("abcdefghij"), 0, -10);
  test_npos(S("abcde"), 0, 0, S("abcdefghij"), 1, -9);
  test_npos(S("abcde"), 0, 0, S("abcdefghij"), 5, -5);

  return true;
}

template <class S>
void test() {
  test0<S>();
  test1<S>();
  test2<S>();
  test3<S>();
  test4<S>();
  test5<S>();
  test6<S>();
  test7<S>();
  test8<S>();
  test9<S>();
  test10<S>();
  test11<S>();
  test12<S>();
  test13<S>();
  test14<S>();
  test15<S>();
  test16<S>();
  test17<S>();
  test18<S>();
  test19<S>();
  test20<S>();
  test21<S>();
  test22<S>();
  test23<S>();
  test24<S>();
  test25<S>();
  test26<S>();
  test27<S>();
  test28<S>();
  test29<S>();
  test30<S>();
  test31<S>();
  test32<S>();
  test33<S>();
  test34<S>();
  test35<S>();
  test36<S>();
  test37<S>();
  test38<S>();
  test39<S>();
  test40<S>();
  test41<S>();
  test42<S>();
  test43<S>();
  test44<S>();
  test45<S>();
  test46<S>();
  test47<S>();
  test48<S>();
  test49<S>();
  test50<S>();
  test51<S>();
  test52<S>();
  test53<S>();
  test54<S>();
  test55<S>();

#if TEST_STD_VER > 17
  static_assert(test0<S>());
  static_assert(test1<S>());
  static_assert(test2<S>());
  static_assert(test3<S>());
  static_assert(test4<S>());
  static_assert(test5<S>());
  static_assert(test6<S>());
  static_assert(test7<S>());
  static_assert(test8<S>());
  static_assert(test9<S>());
  static_assert(test10<S>());
  static_assert(test11<S>());
  static_assert(test12<S>());
  static_assert(test13<S>());
  static_assert(test14<S>());
  static_assert(test15<S>());
  static_assert(test16<S>());
  static_assert(test17<S>());
  static_assert(test18<S>());
  static_assert(test19<S>());
  static_assert(test20<S>());
  static_assert(test21<S>());
  static_assert(test22<S>());
  static_assert(test23<S>());
  static_assert(test24<S>());
  static_assert(test25<S>());
  static_assert(test26<S>());
  static_assert(test27<S>());
  static_assert(test28<S>());
  static_assert(test29<S>());
  static_assert(test30<S>());
  static_assert(test31<S>());
  static_assert(test32<S>());
  static_assert(test33<S>());
  static_assert(test34<S>());
  static_assert(test35<S>());
  static_assert(test36<S>());
  static_assert(test37<S>());
  static_assert(test38<S>());
  static_assert(test39<S>());
  static_assert(test40<S>());
  static_assert(test41<S>());
  static_assert(test42<S>());
  static_assert(test43<S>());
  static_assert(test44<S>());
  static_assert(test45<S>());
  static_assert(test46<S>());
  static_assert(test47<S>());
  static_assert(test48<S>());
  static_assert(test49<S>());
  static_assert(test50<S>());
  static_assert(test51<S>());
  static_assert(test52<S>());
  static_assert(test53<S>());
  static_assert(test54<S>());
  static_assert(test55<S>());
#endif
}

int main(int, char**) {
  test<std::string>();
#if TEST_STD_VER >= 11
  test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>();
#endif

  return 0;
}